/* ── Hango Social — design system ─────────────────────────────────── */
:root {
  --green: #45c4a0;
  --green-soft: #e3f6ef;
  --green-deep: #1f8f72;
  --ink: #10241d;
  --ink-soft: #5c6f68;
  --bg: #f6f5f1;
  --card: #ffffff;
  --line: #e7e4dc;
  --orange: #f0a24b;
  --orange-soft: #fdf1e2;
  --red: #e0684b;
  --red-soft: #fcebe6;
  --radius: 18px;
  --shadow: 0 2px 10px rgba(16, 36, 29, .05), 0 12px 32px rgba(16, 36, 29, .06);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100dvh;
}
img { max-width: 100%; }
a { color: var(--green-deep); }

.shell { max-width: 600px; margin: 0 auto; padding: 22px 20px 60px; }
.center-shell { display: flex; min-height: 100dvh; align-items: center; justify-content: center; }
.center-text { text-align: center; }

h1 {
  font-size: clamp(1.7rem, 6.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 18px 0 12px;
}
.lead { font-size: 1.06rem; color: var(--ink-soft); margin-bottom: 20px; }
.muted { color: var(--ink-soft); }
.tiny { font-size: .82rem; }

.fade-in { animation: fadeUp .45s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Branding */
.brandline { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.hango-wm { height: 26px; width: auto; display: block; }
.hango-wm-small { height: 18px; width: auto; opacity: .8; }
.brand-x { color: var(--ink-soft); font-weight: 600; }
.etab-logo { height: 44px; width: auto; }
.etab-name { font-weight: 700; }
.big-emoji { font-size: 3rem; margin-bottom: 6px; }

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  border: 1px solid rgba(16, 36, 29, .04);
}
.note-card { background: var(--green-soft); border: none; box-shadow: none; margin-bottom: 24px; }
.note-card p { color: #17503f; }

/* Forms */
.start-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.field-label { font-weight: 600; font-size: .92rem; }
.input-big {
  font: inherit; font-size: 1.05rem;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--card);
  width: 100%;
  color: var(--ink);
  transition: border-color .15s;
}
.input-big:focus { outline: none; border-color: var(--green); }
textarea.input-big { resize: vertical; }
.form-err { color: var(--red); font-weight: 600; font-size: .92rem; }

/* Buttons */
.btn {
  font: inherit; font-weight: 700;
  border: none; cursor: pointer;
  border-radius: 999px;
  padding: 12px 22px;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s ease, box-shadow .12s ease, background .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--green); color: #08201a; box-shadow: 0 6px 18px rgba(69, 196, 160, .35); }
.btn-primary:hover { background: #3db894; }
.btn-big { padding: 16px 26px; font-size: 1.1rem; width: 100%; }
.btn-ghost { background: var(--card); color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--green); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Questionnaire ────────────────────────────────────────────────── */
.q-shell { padding-top: 14px; }
.q-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.q-mark { height: 30px; width: 30px; }
.progress-wrap { flex: 1; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--green); border-radius: 99px; transition: width .35s ease; }
.q-count { font-size: .8rem; font-weight: 600; color: var(--ink-soft); min-width: 44px; text-align: right; }

.q-stage { position: relative; min-height: 60dvh; display: flex; flex-direction: column; }
.screen { animation: slideIn .3s ease both; display: flex; flex-direction: column; flex: 1; padding-top: 6vh; }
.screen.leaving { animation: slideOut .18s ease both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes slideOut { from { opacity: 1; } to { opacity: 0; transform: translateX(-20px); } }
.screen.back-in { animation-name: slideInBack; }
@keyframes slideInBack { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }

.section-chip {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 6px;
  background: var(--green-soft); color: #17503f;
  font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 99px; margin-bottom: 14px;
}
.q-title { font-size: clamp(1.3rem, 5vw, 1.65rem); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; margin-bottom: 8px; }
.q-subtitle { color: var(--ink-soft); margin-bottom: 14px; }
.section-intro-screen h1 { margin-top: 8px; }
.section-num { font-size: 4rem; font-weight: 800; color: var(--green); line-height: 1; }

.choices { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 18px; }
.choice {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 2px solid var(--line);
  border-radius: 16px; padding: 14px 16px;
  font: inherit; font-size: 1rem; font-weight: 500; color: var(--ink);
  text-align: left; cursor: pointer; width: 100%;
  transition: border-color .12s, background .12s, transform .08s;
}
.choice:active { transform: scale(.985); }
.choice.selected { border-color: var(--green); background: var(--green-soft); font-weight: 600; }
.choice .check {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; color: transparent; transition: all .12s;
}
.choice.multi .check { border-radius: 7px; }
.choice.selected .check { background: var(--green); border-color: var(--green); color: #fff; }
.other-input { margin-top: -4px; }

.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.chip {
  font: inherit; font-weight: 600; font-size: .95rem;
  background: var(--card); border: 2px solid var(--line); color: var(--ink);
  padding: 10px 16px; border-radius: 99px; cursor: pointer; transition: all .12s;
}
.chip.selected { background: var(--green); border-color: var(--green); color: #08201a; }

/* Sliders */
.slider-block { margin: 20px 0; }
.slider-labels { display: flex; justify-content: space-between; gap: 16px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 10px; }
.slider-value { text-align: center; font-size: 2.2rem; font-weight: 800; color: var(--green-deep); margin-bottom: 4px; }
input[type=range] { width: 100%; accent-color: var(--green); height: 34px; }
.mix-row { margin-bottom: 16px; }
.mix-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.mix-pct { font-weight: 800; font-size: 1.2rem; color: var(--green-deep); min-width: 52px; text-align: right; }
.mix-total { text-align: center; font-weight: 700; margin-top: 6px; }
.mix-total.bad { color: var(--red); }

/* Stats shown in consensus round */
.stats-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px; }
.stats-card .stats-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 10px; }

.q-nav { margin-top: auto; padding: 18px 0 8px; display: flex; gap: 10px; align-items: center; }
.q-nav .btn-primary { flex: 1; }
.btn-back { background: none; border: none; font: inherit; font-weight: 600; color: var(--ink-soft); cursor: pointer; padding: 12px 10px; }

/* Recap */
.recap-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 8px; }
.recap-item { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--card); border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); }
.recap-q { font-size: .85rem; color: var(--ink-soft); }
.recap-a { font-weight: 600; font-size: .92rem; }
.recap-edit { background: none; border: none; color: var(--green-deep); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }

/* ── Admin ────────────────────────────────────────────────────────── */
.admin-shell { max-width: 760px; }
.admin-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.admin-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; }
.admin-brand img { height: 20px; }
.admin-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.backlink { text-decoration: none; font-weight: 600; }

.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ws-card { text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .12s; }
.ws-card:hover { transform: translateY(-2px); }
.ws-card h2 { font-size: 1.15rem; margin: 8px 0 2px; }
.ws-card-top { display: flex; justify-content: space-between; align-items: center; }
.ws-logo { height: 38px; width: auto; }
.ws-stat { margin-top: 10px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 26px; }
.stat-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; }
.stat-num { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: .8rem; color: var(--ink-soft); font-weight: 600; }
.stat-green .stat-num { color: var(--green-deep); }
.stat-orange .stat-num { color: var(--orange); }
.stat-red .stat-num { color: var(--red); }

.topic-section { margin-bottom: 30px; }
.topic-heading { font-size: .95rem; font-weight: 800; letter-spacing: .04em; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.heading-green { color: var(--green-deep); }
.heading-orange { color: var(--orange); }
.heading-red { color: var(--red); }
.topic-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); margin-bottom: 8px; transition: transform .1s; }
.topic-card:hover { transform: translateX(2px); }
.topic-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.topic-label { font-weight: 700; }
.topic-summary { color: var(--ink-soft); font-size: .92rem; }
.mini-meter { width: 64px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; flex: none; }
.mini-meter-fill { height: 100%; border-radius: 99px; }
.fill-green { background: var(--green); }
.fill-orange { background: var(--orange); }
.fill-red { background: var(--red); }

.pill { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; letter-spacing: .03em; }
.pill-green { background: var(--green-soft); color: var(--green-deep); }
.pill-orange { background: var(--orange-soft); color: #b06a14; }
.pill-red { background: var(--red-soft); color: var(--red); }
.pill-gray { background: var(--line); color: var(--ink-soft); }

.banner-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--green-soft); border: none; margin-bottom: 20px; }

.dist-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dist-label { flex: 0 0 42%; font-size: .88rem; font-weight: 500; }
.dist-bar { flex: 1; height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.dist-fill { height: 100%; background: var(--green); border-radius: 99px; }
.dist-pct { font-size: .85rem; font-weight: 700; min-width: 44px; text-align: right; }

.slider-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; color: var(--ink-soft); }
.slider-stats strong { color: var(--ink); font-size: 1.15rem; }
.slider-dots { position: relative; height: 22px; background: var(--bg); border-radius: 99px; margin-bottom: 4px; }
.slider-dot { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--green); opacity: .7; transform: translate(-6px, -50%); }
.slider-scale { display: flex; justify-content: space-between; font-size: .75rem; color: var(--ink-soft); }

.quote-card { background: var(--bg); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.quote-name { font-size: .8rem; color: var(--ink-soft); font-weight: 600; }

.ptable { width: 100%; border-collapse: collapse; }
.ptable td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .93rem; }
.ptable tr:last-child td { border-bottom: none; }

.nominative { margin-top: 10px; }
.nominative summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); font-size: .88rem; padding: 6px 0; }

.check-card { cursor: pointer; }
.check-card input { width: 20px; height: 20px; accent-color: var(--green); flex: none; }

.q-detail-title { font-size: 1.35rem; margin-bottom: 20px; }
.logout-form { margin: 0; }

.pb-edit-card { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pb-edit-title { font-weight: 700; }

/* ── Playbook public ──────────────────────────────────────────────── */
.pb-shell { max-width: 640px; }
.pb-doc { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 40px 34px; }
.pb-head { text-align: center; margin-bottom: 30px; }
.pb-logo { height: 64px; width: auto; margin-bottom: 12px; }
.pb-kicker { font-weight: 700; letter-spacing: .18em; color: var(--ink-soft); font-size: .8rem; }
.pb-head h1 { margin: 6px 0 8px; }
.pb-head .btn { margin-top: 12px; }
.pb-section { margin-bottom: 24px; border-top: 2px solid var(--green-soft); padding-top: 16px; }
.pb-section h2 { font-size: 1.02rem; text-transform: uppercase; letter-spacing: .08em; color: var(--green-deep); margin-bottom: 8px; }
.pb-body p { margin-bottom: 6px; }
.pb-foot { text-align: center; margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 6px; }

@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .pb-doc { box-shadow: none; padding: 0; }
  .shell { padding: 0; }
}

@media (max-width: 480px) {
  .dist-label { flex-basis: 46%; }
  .pb-doc { padding: 26px 20px; }
}
