
:root {
  --bg-color: #f3f4fa;
  --bg-surface: #ffffff;
  --bg-input: #f8f9fb;
  --text-primary: #16181f;
  --text-secondary: #545b6e;
  --text-tertiary: #868da1;
  --text-muted: #b0b7c8;
  --border-default: rgba(15, 18, 34, 0.08);
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-soft: rgba(99, 102, 241, 0.08);
  --secondary: #ec4899;
  --secondary-soft: rgba(236, 72, 153, 0.08);
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --gradient-text: linear-gradient(135deg, #4f46e5, #a855f7, #ec4899);
  --gradient-primary: linear-gradient(135deg, #6366f1, #818cf8);
  --shadow-sm: 0 2px 8px rgba(23, 25, 60, .05), 0 1px 2px rgba(23, 25, 60, .03);
  --shadow-md: 0 4px 18px rgba(23, 25, 60, .07), 0 2px 4px rgba(23, 25, 60, .03);
  --shadow-lg: 0 12px 44px rgba(23, 25, 60, .1), 0 4px 12px rgba(23, 25, 60, .04);
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px 64px; }
.narrow { max-width: 680px; }

::selection { background: rgba(99, 102, 241, .18); }

a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible,
input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(99, 102, 241, .45);
  outline-offset: 2px;
}

/* ── Header / Navbar ── */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid rgba(15, 18, 34, .06);
}
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; max-width: 1180px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 7px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #4f46e5; color: #fff; font-size: 16px; line-height: 1;
  font-family: 'Nirmala UI', 'Noto Sans Devanagari', 'Devanagari Sangam MN', system-ui, sans-serif;
}
.brand-icon {
  width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; box-shadow: 0 4px 14px rgba(99, 102, 241, .3);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}
.brand:hover .brand-icon { transform: rotate(-8deg) scale(1.06); }
.brand-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.gradient-text {
  background: var(--gradient-text);
  background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradientShift 7s ease-in-out infinite alternate;
}
@keyframes gradientShift {
  0%   { background-position: 0% 40%; }
  100% { background-position: 100% 60%; }
}
.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-user { color: var(--text-tertiary); font-size: .88rem; margin-right: 6px; }

/* ── Panels ── */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 26px;
  margin-bottom: 20px;
}
.panel h2 { font-size: 1.12rem; margin-bottom: 4px; letter-spacing: -.01em; }
.panel .sub { color: var(--text-tertiary); font-size: .87rem; margin-bottom: 16px; }

.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-icon {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  background: var(--primary-soft); color: var(--primary);
}
.section-icon.pink { background: var(--secondary-soft); color: var(--secondary); }
.section-icon.green { background: rgba(16, 185, 129, .1); color: var(--emerald); }

/* ── Forms ── */
label.label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], select, textarea {
  width: 100%; padding: 11px 14px; font: inherit; font-size: .93rem;
  background: var(--bg-input); color: var(--text-primary);
  border: 1.5px solid var(--border-default); border-radius: var(--radius-md);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
  background: #fff;
}
.field { margin-bottom: 18px; }
.req { color: var(--rose); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; font: inherit; font-size: .9rem; font-weight: 600;
  border: none; border-radius: var(--radius-md); cursor: pointer;
  text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
  color: var(--text-primary); background: var(--bg-surface);
  border: 1.5px solid var(--border-default);
  position: relative; overflow: hidden;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: rgba(99, 102, 241, .35); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--gradient-primary); color: #fff; border: none;
  box-shadow: 0 4px 14px rgba(99, 102, 241, .32);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .35) 50%, transparent 62%);
  transform: translateX(-110%); transition: transform .6s ease;
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(99, 102, 241, .45); }
.btn-primary:hover::after { transform: translateX(110%); }
.btn-pink { background: linear-gradient(135deg, #ec4899, #f472b6); color: #fff; border: none; box-shadow: 0 4px 14px rgba(236, 72, 153, .3); }
.btn-green { background: linear-gradient(135deg, #10b981, #34d399); color: #fff; border: none; box-shadow: 0 4px 14px rgba(16, 185, 129, .3); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-input); box-shadow: none; border-color: transparent; }
.btn-sm { padding: 7px 12px; font-size: .8rem; border-radius: 9px; }
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 14px; }
.btn-danger { color: var(--rose); }
.btn .arr { display: inline-block; transition: transform .2s; }
.btn:hover .arr { transform: translateX(3px); }
.w-full { width: 100%; }

/* ── Flash messages ── */
.flash { padding: 12px 16px; border-radius: var(--radius-md); font-size: .88rem; margin: 14px 0; }
.flash.error { background: rgba(244, 63, 94, .08); color: #be123c; border: 1px solid rgba(244, 63, 94, .2); }
.flash.info { background: var(--primary-soft); color: #4338ca; border: 1px solid rgba(99, 102, 241, .2); }

/* Inline dismissible banner — the in-panel replacement for alert() popups */
.inline-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border-radius: var(--radius-md); font-size: .88rem; margin: 0 0 14px; }
.inline-banner.error { background: rgba(244, 63, 94, .08); color: #be123c;
  border: 1px solid rgba(244, 63, 94, .25); }
.inline-banner .banner-close { margin-left: auto; background: none; border: none;
  color: inherit; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 2px;
  opacity: .65; }
.inline-banner .banner-close:hover { opacity: 1; }

/* ── Progress modal (translations & other long AI jobs) ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(22, 24, 31, .45);
  display: flex; align-items: center; justify-content: center; z-index: 200;
  backdrop-filter: blur(2px); }
.modal { background: var(--bg-surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 26px; width: min(440px, calc(100vw - 40px)); }
.modal h3 { margin: 0 0 4px; font-size: 1.05rem; letter-spacing: -.01em; }
.modal .modal-sub { color: var(--text-secondary); font-size: .85rem; margin: 0 0 16px; }
.progress-track { height: 10px; border-radius: 999px; background: var(--bg-input);
  border: 1px solid var(--border-default); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; border-radius: 999px;
  background: var(--gradient-primary); transition: width .35s ease; }
.progress-pct { font-size: .82rem; color: var(--text-secondary); margin-top: 6px;
  text-align: right; font-variant-numeric: tabular-nums; }
.lang-status { list-style: none; margin: 14px 0 0; padding: 0; max-height: 180px;
  overflow-y: auto; }
.lang-status li { display: flex; align-items: center; gap: 8px; padding: 5px 2px;
  font-size: .88rem; color: var(--text-secondary); }
.lang-status li .st { width: 18px; text-align: center; }
.lang-status li.done { color: var(--text-primary); }
.lang-status li.failed { color: #be123c; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

/* ═══════════════════════ AUTH (login / register) ═══════════════════════ */

.auth-shell { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  background: var(--bg-surface); border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border-default);
  margin: 36px 0 48px; min-height: 560px; }
.auth-side { position: relative; color: #fff; padding: 46px 42px;
  background: linear-gradient(160deg, #4f46e5, #7c3aed 55%, #db2777);
  display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.auth-side::after { content: ''; position: absolute; width: 340px; height: 340px;
  border-radius: 50%; background: rgba(255, 255, 255, .09); top: -120px; right: -120px; }
.auth-side::before { content: ''; position: absolute; width: 260px; height: 260px;
  border-radius: 50%; background: rgba(255, 255, 255, .07); bottom: -100px; left: -80px; }
.auth-side h2 { font-size: 1.65rem; letter-spacing: -.02em; line-height: 1.25;
  margin: 0 0 10px; position: relative; }
.auth-side h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.auth-side p { color: rgba(255, 255, 255, .85); font-size: .92rem; line-height: 1.55;
  margin: 0 0 22px; position: relative; }
.auth-ticks { list-style: none; margin: 0; padding: 0; position: relative; }
.auth-ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem;
  color: rgba(255, 255, 255, .92); padding: 7px 0; }
.auth-ticks li b { font-weight: 600; }
.auth-card { padding: 46px 44px; display: flex; flex-direction: column;
  justify-content: center; }
.auth-card h1 { font-size: 1.45rem; letter-spacing: -.02em; margin: 0 0 4px; }
.auth-card .auth-sub { color: var(--text-secondary); font-size: .9rem; margin: 0 0 22px; }
.auth-field { margin-bottom: 15px; }
.auth-field .label { display: block; margin-bottom: 6px; }
.auth-field input.invalid { border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, .1); }
.field-error { color: #be123c; font-size: .8rem; margin-top: 5px; }
.form-error { background: rgba(244, 63, 94, .08); border: 1px solid rgba(244, 63, 94, .25);
  color: #be123c; border-radius: var(--radius-md); padding: 10px 14px; font-size: .87rem;
  margin-bottom: 16px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1.02rem; opacity: .55;
  padding: 4px 6px; }
.pw-toggle:hover { opacity: 1; }
.pw-meter { display: flex; gap: 5px; margin-top: 7px; }
.pw-meter span { height: 4px; flex: 1; border-radius: 999px; background: var(--bg-input);
  border: 1px solid var(--border-default); transition: background .25s, border-color .25s; }
.pw-meter.s1 span:nth-child(1) { background: var(--rose); border-color: var(--rose); }
.pw-meter.s2 span:nth-child(-n+2) { background: var(--amber); border-color: var(--amber); }
.pw-meter.s3 span:nth-child(-n+3) { background: var(--emerald); border-color: var(--emerald); }
.pw-hint { font-size: .78rem; color: var(--text-tertiary); margin-top: 5px; }
.auth-footer { color: var(--text-secondary); font-size: .87rem; margin-top: 18px; }

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; min-height: 0; margin: 20px 0 36px; }
  .auth-side { display: none; }
  .auth-card { padding: 32px 24px; }
}

/* ═══════════════════════ LANDING PAGE ═══════════════════════ */
/* Modern sans type, solid colour, alternating light/dark bands. Colour comes
   from flat fills and real contrast, never from gradients, glows or blur.
   Scoped to body.home so the rest of the app is unaffected. */

body.home {
  --bg-color: #ffffff;
  --bg-surface: #ffffff;
  --bg-tint: #f4f5fb;
  --bg-input: #f4f5fb;
  --text-primary: #0f1021;
  --text-secondary: #474c66;
  --text-tertiary: #6f748f;
  --border-default: #e3e5f0;
  --ink-deep: #1b1a45;
  --primary: #4f46e5;
  --primary-light: #6d63f5;
  --primary-soft: #eceafd;
  --accent: #e07b1a;
  --accent-soft: #fdf1e3;
  --gradient-primary: #4f46e5;
  --shadow-sm: 0 1px 2px rgba(15, 16, 33, .05);
  --shadow-md: 0 1px 3px rgba(15, 16, 33, .06);
  --shadow-lg: 0 4px 16px rgba(15, 16, 33, .08);
  background: var(--bg-color);
}
/* Shared chrome, tuned for this page. */
body.home .site-header { background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--border-default); }
body.home .gradient-text, body.home .sec-eyebrow {
  background: none; -webkit-text-fill-color: currentColor; color: inherit; animation: none;
}
body.home .btn { border-radius: 9px; font-weight: 600; }
body.home .btn:hover { transform: none; box-shadow: none; border-color: #c9cce0; }
body.home .btn-primary { background: var(--primary); box-shadow: none; }
body.home .btn-primary::after { display: none; }
body.home .btn-primary:hover { background: #4038d4; box-shadow: none; }
body.home .btn-lg { padding: 13px 22px; font-size: .97rem; border-radius: 10px; }
body.home .site-footer { background: var(--bg-tint); margin-top: 0; border-top: 1px solid var(--border-default); }
body.home .footer-col a:hover { transform: none; color: var(--primary); }

.lp { max-width: none; padding: 0; }
.lp .wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.lp > .flash { max-width: 1072px; margin: 16px auto 0; }
.lp section { padding: 76px 0; }
.lp h1, .lp h2, .lp h3 { letter-spacing: -.028em; }

/* Band backgrounds do the work colour used to do with gradients. */
.band-tint { background: var(--bg-tint); border-top: 1px solid var(--border-default); border-bottom: 1px solid var(--border-default); }
.band-deep { background: var(--ink-deep); }

.eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .13em; color: var(--primary); margin-bottom: 14px;
}
.band-deep .eyebrow { color: #a5a0fb; }
.sec-h2 { font-size: clamp(1.6rem, 3.1vw, 2.15rem); font-weight: 800; line-height: 1.17; }
.band-deep .sec-h2 { color: #fff; }
.sec-lede { margin-top: 12px; color: var(--text-secondary); font-size: 1rem; max-width: 46em; }
.band-deep .sec-lede { color: #b9b7dd; }
.sec-top { margin-bottom: 40px; max-width: 40em; }

/* ── Hero ── */
.hero { padding: 68px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 56px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px 6px 10px;
  border-radius: 999px; background: var(--primary-soft); color: #3c33cf;
  font-size: .79rem; font-weight: 600; margin-bottom: 22px;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.hero h1 { font-size: clamp(2.25rem, 4.6vw, 3.35rem); font-weight: 800; line-height: 1.06; }
.hero h1 .hl { color: var(--primary); }
.hero .lead { margin: 20px 0 30px; font-size: 1.09rem; color: var(--text-secondary); max-width: 33em; }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.text-link { font-size: .93rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.hero-note { margin-top: 24px; font-size: .84rem; color: var(--text-tertiary); }
.hero-note b { color: var(--text-primary); font-weight: 600; }

/* Hero product card: real output, flat colour, no fake browser chrome. */
.card {
  background: #fff; border: 1px solid var(--border-default);
  border-radius: 14px; box-shadow: var(--shadow-lg);
}
.card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--border-default); flex-wrap: wrap;
}
.card-top h3 { font-size: .8rem; font-weight: 700; letter-spacing: .02em; min-width: 0; }
.card-top .pill { white-space: nowrap; }
.pill { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--bg-tint); color: var(--text-tertiary); }
.pill-live { background: #e7f7ee; color: #0f7a42; }
.card-body { padding: 20px; }
.ask { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; font-weight: 600; }
.ask .who { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--primary); color: #fff; font-size: .68rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.test-tag {
  display: inline-block; margin: 16px 0 10px; font-size: .71rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  background: var(--accent-soft); color: #9a4f05; padding: 5px 10px; border-radius: 6px;
}
.read { font-size: .89rem; color: var(--text-secondary); line-height: 1.6; }

.chart { display: grid; grid-template-columns: 62px 1fr 42px; align-items: center; gap: 9px 12px; margin: 18px 0 14px; }
.chart .lbl { font-size: .81rem; font-weight: 600; }
.chart .track { height: 26px; background: var(--bg-tint); border-radius: 5px; overflow: hidden; }
.chart .fill { height: 100%; border-radius: 5px; }
.chart .fill.a { width: 76%; background: var(--primary); }
.chart .fill.b { width: 62%; background: var(--accent); }
.chart .val { font-size: .84rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.chart .axis { grid-column: 2 / -1; font-size: .7rem; color: var(--text-tertiary); display: flex; justify-content: space-between; }

.stat-table { width: 100%; border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; }
.stat-table th, .stat-table td { text-align: right; padding: 7px 0; }
.stat-table th:first-child, .stat-table td:first-child { text-align: left; }
.stat-table thead th { font-size: .69rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-tertiary); border-bottom: 1px solid var(--border-default); }
.stat-table tbody tr + tr td { border-top: 1px solid #f0f1f7; }
.apa {
  margin-top: 14px; padding: 10px 12px; border-radius: 8px;
  background: var(--bg-tint); border: 1px solid var(--border-default);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .81rem; font-weight: 600;
}
.card-foot { padding: 13px 20px; border-top: 1px solid var(--border-default); font-size: .78rem; color: var(--text-tertiary); background: #fcfcfe; border-radius: 0 0 14px 14px; }
.card-foot b { color: var(--text-secondary); font-weight: 600; }

/* ── Steps (deep band) ── */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.step { border-top: 2px solid #4a44a8; padding-top: 18px; }
.step .n { font-size: .74rem; font-weight: 800; letter-spacing: .1em; color: #a5a0fb; margin-bottom: 10px; }
.step h3 { font-size: 1.02rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.step p { font-size: .88rem; color: #b9b7dd; line-height: 1.6; }
.step p q { color: #dedcff; font-style: normal; font-weight: 600; }
.step p q::before, .step p q::after { content: '"'; }

/* ── Respondent-side figure ── */
.form-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 28px; align-items: start; }
.q { padding: 15px 0; }
.q + .q { border-top: 1px solid var(--border-default); }
.q-num { font-size: .71rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 6px; }
.q-text { font-size: .94rem; font-weight: 600; margin-bottom: 11px; }
.scale { display: flex; align-items: center; gap: 12px; font-size: .78rem; color: var(--text-tertiary); }
.scale-dots { display: flex; gap: 8px; }
.scale-dots i { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--border-default); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--text-tertiary); }
.scale-dots i.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.choices { display: flex; flex-direction: column; gap: 8px; font-size: .88rem; color: var(--text-secondary); }
.choices span { display: flex; align-items: center; gap: 10px; }
.choices span::before { content: ""; width: 14px; height: 14px; flex: none; border: 1.5px solid #c9cce0; border-radius: 50%; }
.choices span.on { color: var(--text-primary); font-weight: 600; }
.choices span.on::before { border-color: var(--primary); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 10px var(--primary); }
.q-open { border: 1px solid var(--border-default); border-radius: 8px; background: var(--bg-tint); padding: 11px 13px; font-size: .86rem; color: var(--text-tertiary); min-height: 56px; }

.langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.langs i {
  font-style: normal; font-size: .82rem; font-weight: 600;
  padding: 6px 12px; border-radius: 8px;
  background: var(--primary-soft); color: #3c33cf;
}
.langs i.more { background: var(--bg-tint); color: var(--text-tertiary); }
.side-note { margin-top: 16px; font-size: .86rem; color: var(--text-secondary); line-height: 1.6; }
.side-note b { font-weight: 600; color: var(--text-primary); }

/* ── Features ── */
.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feat {
  background: #fff; border: 1px solid var(--border-default); border-radius: 12px;
  padding: 22px; transition: border-color .15s, box-shadow .15s;
}
.feat:hover { border-color: #c5c2f5; box-shadow: var(--shadow-md); }
.feat .ico {
  width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft);
  color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.feat .ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feat h3 { font-size: .98rem; font-weight: 700; margin-bottom: 7px; }
.feat p { font-size: .88rem; color: var(--text-secondary); }
.feat p b { font-weight: 600; color: var(--text-primary); }

/* ── Privacy ── */
.privacy-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 8px; }
.pv { border-left: 2px solid var(--primary); padding-left: 14px; }
.pv h4 { font-size: .89rem; font-weight: 700; margin-bottom: 6px; }
.pv p { font-size: .83rem; color: var(--text-secondary); line-height: 1.55; }
.privacy-more { display: inline-block; margin-top: 28px; font-size: .93rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.privacy-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── FAQ ── */
.faq { max-width: 780px; }
.faq details { border: 1px solid var(--border-default); border-radius: 10px; background: #fff; margin-bottom: 10px; }
.faq details[open] { border-color: #c5c2f5; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; font-size: .95rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; margin-left: auto; flex: none; width: 9px; height: 9px;
  border-right: 2px solid var(--text-tertiary); border-bottom: 2px solid var(--text-tertiary);
  transform: rotate(45deg) translateY(-2px); transition: transform .18s;
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-2px); border-color: var(--primary); }
.faq .a { padding: 0 18px 17px; font-size: .9rem; color: var(--text-secondary); line-height: 1.65; }

/* ── Closing ── */
.closing { text-align: center; }
.closing h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 800; color: #fff; line-height: 1.12; }
.closing p { margin: 16px auto 28px; color: #b9b7dd; font-size: 1.03rem; max-width: 34em; }
.closing .btn-inverse { background: #fff; color: var(--ink-deep); border: none; font-weight: 700; }
.closing .btn-inverse:hover { background: #e9e7fb; }
.closing .note { display: block; margin-top: 18px; font-size: .84rem; color: #9a97c8; }

/* ── Landing responsive ── */
@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
  .privacy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .lp section { padding: 56px 0; }
  .hero { padding: 44px 0 52px; }
}
@media (max-width: 620px) {
  .feat-grid, .steps, .privacy-grid { grid-template-columns: minmax(0, 1fr); }
  .lp .wrap { padding: 0 18px; }
  .lp section { padding: 46px 0; }
  .chart { grid-template-columns: 54px 1fr 38px; }
  .card-top { padding: 12px 16px; row-gap: 6px; }
  .card-body { padding: 16px; }
}

/* ═══════════════════════ APP COMPONENTS ═══════════════════════ */

/* ── Stat cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.stat-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-tertiary); }
.stat-value { font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; margin-top: 3px; }
.stat-sub { font-size: .76rem; color: var(--text-muted); }

/* ── Tables ── */
.table-scroll { overflow-x: auto; border: 1px solid var(--border-default); border-radius: var(--radius-md); }
table.data-table { width: 100%; border-collapse: collapse; font-size: .84rem; background: #fff; }
.data-table th {
  position: sticky; top: 0; background: #f8f9fb; text-align: left;
  padding: 10px 12px; font-size: .74rem; text-transform: uppercase; letter-spacing: .03em;
  color: var(--text-tertiary); border-bottom: 1px solid var(--border-default); white-space: nowrap;
}
.data-table td { padding: 9px 12px; border-bottom: 1px solid var(--border-default); vertical-align: top; max-width: 260px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbff; }

/* ── Charts grid ── */
.charts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.chart-card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); }
.chart-card h4 { font-size: .86rem; margin-bottom: 10px; color: var(--text-secondary); }
.chart-card .chart-wrap { height: 210px; position: relative; }
.chart-card .chart-wrap.tall { height: 290px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chart-pick { width: auto; padding: 3px 7px; font-size: .72rem; border-radius: 7px;
  color: var(--text-secondary); flex-shrink: 0; }

/* Per-question statistics panels */
.q-stats { margin-top: 10px; border-top: 1px dashed var(--border-default); padding-top: 8px; }
.q-stats summary { font-size: .78rem; color: var(--text-tertiary); cursor: pointer;
  font-weight: 600; user-select: none; }
.q-stats summary:hover { color: var(--primary); }
.q-stats-body { padding-top: 8px; }
.q-stats-table { width: 100%; border-collapse: collapse; font-size: .78rem; margin: 4px 0 8px; }
.q-stats-table td, .q-stats-table th { padding: 4px 8px; border-bottom: 1px solid var(--border-default); text-align: left; }
.q-stats-table td:first-child { color: var(--text-secondary); }
.q-stats-table td:not(:first-child), .q-stats-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.q-stats-table.freq th { font-size: .68rem; text-transform: uppercase; color: var(--text-tertiary); }
.q-stats-hint { font-size: .74rem; color: var(--text-tertiary); font-style: italic; margin: 4px 0; }
.q-stats-sub { margin-bottom: 10px; font-size: .8rem; }

/* Pre/post */
.phase-card { border-left: 4px solid var(--secondary); }
.phase-indicator { font-size: .92rem; }
.phase-indicator b.phase-pre { color: var(--primary); }
.phase-indicator b.phase-post { color: #be185d; }
.sig-row td { background: rgba(16, 185, 129, .07); }

/* ── Chips / badges ── */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: 999px; font-size: .77rem; font-weight: 600;
  background: var(--bg-input); border: 1px solid var(--border-default); color: var(--text-secondary);
}
.chip.active { background: var(--primary-soft); border-color: rgba(99, 102, 241, .3); color: var(--primary); }
.badge { padding: 4px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.badge.draft { background: rgba(245, 158, 11, .12); color: #b45309; }
.badge.published { background: rgba(16, 185, 129, .12); color: #047857; }
.badge.closed { background: rgba(107, 114, 128, .12); color: #4b5563; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); display: inline-block; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

/* ── Question editor ── */
.q-item {
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  padding: 16px; margin-bottom: 12px; background: #fff;
}
.q-item .q-head { display: flex; gap: 10px; align-items: flex-start; }
.q-type-tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); white-space: nowrap; }
.q-controls { display: flex; gap: 4px; margin-left: auto; }
.icon-btn { border: none; background: transparent; cursor: pointer; font-size: .95rem;
  color: var(--text-tertiary); padding: 4px 7px; border-radius: 7px; }
.icon-btn:hover { background: var(--bg-input); color: var(--text-primary); }
.q-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: .8rem; color: var(--text-tertiary); align-items: center; }
.q-item.q-section { background: var(--primary-soft); border-left: 3px solid var(--primary); }
.q-type-tag.tag-scale { background: var(--secondary-soft); color: #be185d; }
.q-type-tag.tag-choice { background: rgba(16, 185, 129, .1); color: #047857; }
.q-type-tag.tag-pii { background: rgba(245, 158, 11, .12); color: #b45309; }
.q-type-tag.tag-structure { background: rgba(84, 91, 110, .12); color: var(--text-secondary); }
.pii-warn { margin-top: 10px; font-size: .8rem; color: #b45309;
  background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .25);
  border-radius: 8px; padding: 8px 11px; }

/* ── Respondent form ── */
.respond-header { text-align: center; padding: 42px 16px 8px; }
.respond-header h1 { font-size: 1.7rem; letter-spacing: -.02em; }
.respond-header p { color: var(--text-secondary); margin-top: 8px; }
.lang-picker { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 6px; }
.consent-box { background: var(--primary-soft); border: 1px solid rgba(99, 102, 241, .2);
  border-radius: var(--radius-md); padding: 16px; font-size: .88rem; color: #3730a3; margin-bottom: 20px; }
.likert-row { display: flex; gap: 6px; flex-wrap: wrap; }
.likert-row label {
  flex: 1; min-width: 44px; text-align: center; padding: 10px 6px; cursor: pointer;
  border: 1.5px solid var(--border-default); border-radius: 10px; background: var(--bg-input);
  font-size: .88rem; font-weight: 600; color: var(--text-secondary); transition: all .12s;
}
.likert-row input { display: none; }
.likert-row input:checked + span, .likert-row label:has(input:checked) {
  background: var(--gradient-primary); color: #fff; border-color: transparent;
  box-shadow: 0 3px 10px rgba(99, 102, 241, .3);
}
.scale-anchors { display: flex; justify-content: space-between; font-size: .74rem; color: var(--text-muted); margin-top: 5px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1.5px solid var(--border-default);
  border-radius: 10px; margin-bottom: 8px; cursor: pointer; background: var(--bg-input); font-size: .9rem; }
.check-row:has(input:checked) { border-color: var(--primary-light); background: var(--primary-soft); }
.check-row input { width: auto; accent-color: var(--primary); }

/* ── New question types (respondent form) ── */
.section-block { margin: 30px 0 16px; padding: 14px 16px; border-left: 3px solid var(--primary);
  background: var(--primary-soft); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.section-block h3 { margin: 0; font-size: 1.02rem; letter-spacing: -.01em; }
.section-block p { margin: 6px 0 0; font-size: .85rem; }

.matrix-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.matrix-table { border-collapse: collapse; width: 100%; font-size: .86rem; }
.matrix-table th { font-size: .74rem; color: var(--text-tertiary); font-weight: 600;
  padding: 6px 4px; text-align: center; min-width: 40px; }
.matrix-table td { padding: 4px; text-align: center; border-top: 1px solid var(--border-default); }
.matrix-row-label { text-align: left !important; font-weight: 500; padding-right: 10px !important;
  min-width: 160px; }
.matrix-cell { display: inline-flex; cursor: pointer; padding: 6px; }
.matrix-cell input { width: auto; accent-color: var(--primary); cursor: pointer;
  width: 17px; height: 17px; }
.matrix-cell span { display: none; }

.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1.5px solid var(--border-default); border-radius: 10px; margin-bottom: 8px;
  background: var(--bg-input); font-size: .9rem; cursor: grab; }
.rank-list li:active { cursor: grabbing; }
.rank-pos { width: 24px; height: 24px; border-radius: 50%; background: var(--gradient-primary);
  color: #fff; font-size: .78rem; font-weight: 700; display: inline-flex; align-items: center;
  justify-content: center; flex-shrink: 0; }
.rank-label { flex: 1; }
.rank-btns { display: flex; gap: 4px; }

.slider-wrap { display: flex; align-items: center; gap: 14px; }
.slider-wrap input[type=range] { flex: 1; accent-color: var(--primary); height: 6px; padding: 12px 0; }
.slider-value { min-width: 44px; text-align: center; font-weight: 700; font-size: 1rem;
  background: var(--primary-soft); color: #4338ca; border-radius: 8px; padding: 5px 8px;
  font-variant-numeric: tabular-nums; }

/* NPS pills: detractor (0-6) rose, passive (7-8) amber, promoter (9-10) green */
.nps-row label { min-width: 34px; padding: 10px 4px; }
.nps-row label:has(input:checked):nth-child(-n+7) {
  background: var(--rose); box-shadow: 0 3px 10px rgba(244, 63, 94, .3); }
.nps-row label:has(input:checked):nth-child(n+8):nth-child(-n+9) {
  background: var(--amber); box-shadow: 0 3px 10px rgba(245, 158, 11, .3); }
.nps-row label:has(input:checked):nth-child(n+10) {
  background: var(--emerald); box-shadow: 0 3px 10px rgba(16, 185, 129, .3); }

/* ── Analysis chat ── */
.chat-box { display: flex; flex-direction: column; gap: 12px; max-height: 560px; overflow-y: auto; padding: 4px; }
.msg { border-radius: var(--radius-md); padding: 13px 16px; font-size: .88rem; max-width: 92%; }
.msg.user { align-self: flex-end; background: var(--gradient-primary); color: #fff; box-shadow: 0 3px 10px rgba(99, 102, 241, .25); }
.msg.ai { align-self: flex-start; background: var(--bg-input); border: 1px solid var(--border-default); width: 92%; }
.msg.ai .apa { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem;
  background: #fff; border: 1px solid var(--border-default); border-radius: 8px; padding: 8px 10px; margin: 10px 0; }
.msg.ai .reason { font-size: .78rem; color: var(--text-tertiary); font-style: italic; margin-top: 8px; }
.msg.ai .warn { font-size: .78rem; color: #b45309; margin-top: 6px; }
.msg.ai .effect { font-size: .8rem; margin-top: 7px; display: flex; gap: 8px;
  flex-wrap: wrap; align-items: baseline; }
.msg.ai .effect .muted { font-size: .75rem; }
.msg.ai details.tech { margin-top: 8px; font-size: .78rem; border: 1px solid var(--border-default);
  border-radius: 8px; background: #fff; }
.msg.ai details.tech > summary { cursor: pointer; padding: 7px 10px; font-weight: 600;
  color: var(--text-secondary); list-style: none; }
.msg.ai details.tech > summary::before { content: '📐 '; }
.msg.ai details.tech[open] > summary { border-bottom: 1px solid var(--border-default); }
.msg.ai details.tech > *:not(summary) { padding: 0 10px; }
.msg.ai details.tech > p, .msg.ai details.tech > ul { padding: 9px 12px 9px 28px; margin: 0; }
.msg.ai details.tech > p { padding-left: 12px; }
.msg.ai details.tech table { margin: 0; border-radius: 0; }
.msg.ai table { width: 100%; border-collapse: collapse; font-size: .8rem; margin: 8px 0; background: #fff; border-radius: 8px; overflow: hidden; }
.msg.ai th, .msg.ai td { padding: 6px 9px; border: 1px solid var(--border-default); text-align: left; }
.msg.ai th { background: #f8f9fb; font-size: .72rem; text-transform: uppercase; color: var(--text-tertiary); }
.chat-input-row { display: flex; gap: 8px; margin-top: 14px; }
.chat-input-row input { flex: 1; }
.suggestion-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.suggestion-chips .chip { cursor: pointer; }
.suggestion-chips .chip:hover { border-color: var(--primary-light); color: var(--primary); }

/* ── Share panel ── */
.share-grid { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.share-url { flex: 1; min-width: 240px; display: flex; gap: 8px; }
.share-url input { font-size: .84rem; color: var(--text-secondary); }
.qr-img { width: 132px; height: 132px; border-radius: var(--radius-md); border: 1px solid var(--border-default); }

/* ── Survey list cards ── */
.survey-card { display: flex; align-items: center; gap: 16px; }
.survey-card .info { flex: 1; min-width: 0; }
.survey-card h3 { font-size: 1rem; letter-spacing: -.01em; }
.survey-card .meta { font-size: .8rem; color: var(--text-tertiary); margin-top: 3px; }
.survey-card .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Misc ── */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
/* minmax(0, ...) not a bare 1fr: an fr track's automatic minimum is the item's
   min-content width, which lets the nested auto-fill charts grid push this
   single column far past the viewport and scroll the whole page sideways. */
@media (max-width: 960px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.muted { color: var(--text-tertiary); font-size: .84rem; }
.spacer { height: 10px; }
.loader { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.mock-banner { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.25); color: #92400e;
  padding: 9px 14px; border-radius: var(--radius-md); font-size: .8rem; margin-bottom: 16px; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border-default); margin-top: 48px;
  background: linear-gradient(180deg, transparent, rgba(99, 102, 241, .05));
}
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 40px 20px 34px;
  display: grid; grid-template-columns: 1.4fr repeat(3, minmax(130px, 1fr)); gap: 28px;
}
.footer-brand p { color: var(--text-tertiary); font-size: .85rem; margin: 10px 0 14px; max-width: 300px; }
.footer-copy { color: var(--text-muted); font-size: .78rem; }
.footer-col h4 {
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-tertiary); margin-bottom: 12px;
}
.footer-col a { display: block; color: var(--text-secondary); font-size: .86rem; text-decoration: none; padding: 4px 0; transition: color .15s, transform .15s; }
.footer-col a:hover { color: var(--primary); transform: translateX(2px); }
/* legacy simple footer links (still used on some flows) */
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--text-tertiary); font-size: .82rem; text-decoration: none; }
.footer-links a:hover { color: var(--primary); text-decoration: underline; }

@media (max-width: 820px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ── Legal pages ── */
.legal-hero { text-align: center; padding: 52px 16px 26px; }
.legal-hero h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; }
.legal-hero .updated {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  font-size: .8rem; font-weight: 600; color: var(--text-tertiary);
  background: var(--bg-surface); border: 1px solid var(--border-default);
  padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.legal-doc { padding: clamp(24px, 4vw, 42px); }
.legal-doc h2 {
  font-size: 1.28rem; letter-spacing: -.015em; margin: 34px 0 8px;
  padding-top: 22px; border-top: 1px solid var(--border-default);
  scroll-margin-top: 90px;
}
.legal-doc h2:first-of-type { margin-top: 4px; padding-top: 0; border-top: none; }
.legal-doc h3 { font-size: 1rem; margin: 18px 0 6px; color: var(--text-secondary); }
.legal-doc p, .legal-doc li { font-size: .92rem; color: var(--text-secondary); line-height: 1.7; }
.legal-doc ul, .legal-doc ol { padding-left: 22px; margin: 8px 0; }
.legal-doc li { margin-bottom: 5px; }
.legal-doc a { color: var(--primary); }
.legal-doc .updated { color: var(--text-tertiary); font-size: .82rem; margin-bottom: 24px; }

/* ── Consent box additions ── */
.consent-box a { color: inherit; text-decoration: underline; }
.consent-box .consent-fields { font-size: .8rem; opacity: .82; margin-top: 10px; }
.consent-box label:hover { opacity: .9; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .navbar { flex-wrap: wrap; gap: 8px; }
  .nav-links {
    gap: 7px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; width: 100%;
  }
  .nav-links > *, .nav-links .btn { flex: none; }
  .nav-user { display: none; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}

/* ═══════════════════════ GYANANK ADMIN CONSOLE ═══════════════════════ */

.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.admin-container { max-width: 1280px; }
.admin-nav-link { border-color: rgba(99, 102, 241, .24); background: var(--primary-soft); color: #4338ca; }
.admin-role-label {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 7px;
  background: #ede9fe; color: #6d28d9; font-size: .67rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
}
.breach-notice {
  background: #881337; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .2);
  padding: 11px 20px;
}
.breach-notice > div { max-width: 1180px; margin: 0 auto; display: flex; align-items: baseline; gap: 12px; }
.breach-notice strong { flex: none; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.breach-notice span { font-size: .88rem; }

.admin-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 34px 2px 20px;
}
.admin-heading h1 { font-size: clamp(1.65rem, 3vw, 2.1rem); letter-spacing: -.035em; line-height: 1.15; }
.admin-eyebrow {
  color: var(--primary); font-size: .72rem; font-weight: 800; letter-spacing: .11em;
  text-transform: uppercase; margin-bottom: 5px;
}
.admin-subtitle { color: var(--text-secondary); font-size: .92rem; margin-top: 7px; }
.admin-identity {
  background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 999px;
  box-shadow: var(--shadow-sm); color: var(--text-secondary); flex: none; font-size: .78rem;
  font-weight: 600; padding: 7px 12px; text-decoration: none;
}
.admin-identity:hover { border-color: rgba(99, 102, 241, .3); color: var(--primary); }
.admin-tabs {
  display: flex; align-items: center; gap: 4px; overflow-x: auto; margin-bottom: 22px;
  padding: 5px; background: rgba(255, 255, 255, .72); border: 1px solid var(--border-default);
  border-radius: 13px; box-shadow: var(--shadow-sm); scrollbar-width: thin;
}
.admin-tabs a {
  color: var(--text-secondary); flex: none; font-size: .82rem; font-weight: 650;
  padding: 8px 13px; text-decoration: none; border-radius: 9px;
}
.admin-tabs a:hover { background: var(--bg-input); color: var(--text-primary); }
.admin-tabs a.active { background: var(--primary-soft); color: #4338ca; }

.admin-alert {
  display: flex; align-items: flex-start; gap: 11px; border: 1px solid; border-radius: var(--radius-md);
  font-size: .84rem; line-height: 1.45; margin-bottom: 18px; padding: 12px 14px;
}
.admin-alert > span { font-size: 1rem; }
.admin-alert.info { color: #3730a3; background: #eef2ff; border-color: #c7d2fe; }
.admin-alert.warning { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.admin-alert.danger { color: #9f1239; background: #fff1f2; border-color: #fecdd3; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.admin-stat-grid.compact { margin-top: 2px; }
.admin-stat {
  align-items: center; background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); color: inherit; display: flex;
  gap: 13px; min-width: 0; padding: 18px; text-decoration: none; transition: transform .15s, box-shadow .15s;
}
a.admin-stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.admin-stat-icon {
  align-items: center; border-radius: 12px; display: inline-flex; flex: none; font-size: 1.05rem;
  height: 42px; justify-content: center; width: 42px;
}
.admin-stat-icon.indigo { background: #eef2ff; color: #4338ca; }
.admin-stat-icon.pink { background: #fdf2f8; color: #be185d; }
.admin-stat-icon.green { background: #ecfdf5; color: #047857; }
.admin-stat-icon.amber { background: #fffbeb; color: #b45309; }
.admin-stat b { display: block; font-size: 1.45rem; font-variant-numeric: tabular-nums; letter-spacing: -.025em; line-height: 1.1; }
.admin-stat small { color: var(--text-tertiary); display: block; font-size: .75rem; margin-top: 3px; }
.admin-health-strip {
  align-items: center; background: rgba(255, 255, 255, .66); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); color: var(--text-secondary); display: flex; flex-wrap: wrap;
  font-size: .73rem; gap: 5px 18px; margin: -7px 0 20px; padding: 9px 13px;
}
.admin-health-strip b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.admin-health-strip .warn, .admin-health-strip .warn b { color: #b45309; }

.admin-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; min-width: 0; }
.admin-split > * { min-width: 0; }
.admin-detail-grid { grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr); }
.admin-settings-grid { grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr); }
.admin-panel { min-width: 0; padding: 22px; }
.admin-panel-head { align-items: flex-start; display: flex; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.admin-panel-head h2 { font-size: 1.03rem; margin: 0; }
.admin-panel-head p { color: var(--text-tertiary); font-size: .8rem; margin-top: 2px; }
.admin-panel-head > a { color: var(--primary); font-size: .8rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.admin-panel-head > a:hover { text-decoration: underline; }
.admin-empty { color: var(--text-tertiary); font-size: .84rem; padding: 26px 4px; text-align: center; }
.admin-empty.compact { padding: 12px 2px 18px; text-align: left; }

.admin-table { min-width: 720px; }
.admin-overview-table { min-width: 0; width: 100%; }
.admin-overview-table th:last-child,
.admin-overview-table td:last-child { text-align: right; white-space: nowrap; }
.admin-table th { white-space: nowrap; }
.admin-table td { color: var(--text-secondary); }
.admin-table td small, .admin-list small, .admin-inline-action small, .admin-action-box small {
  color: var(--text-tertiary); display: block; font-size: .72rem; margin-top: 2px;
}
.admin-table a:not(.btn), .admin-definition-list a { color: #4338ca; text-decoration: none; }
.admin-table a:not(.btn):hover, .admin-definition-list a:hover { text-decoration: underline; }
.admin-primary-link { color: var(--text-primary) !important; display: block; font-weight: 700; }
.admin-number { font-variant-numeric: tabular-nums; text-align: right; }
.admin-details-code { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-action {
  background: var(--bg-input); border: 1px solid var(--border-default); border-radius: 6px;
  color: var(--text-secondary); display: inline-flex; font-size: .71rem; font-weight: 650;
  padding: 3px 7px; text-transform: capitalize; white-space: nowrap;
}
.admin-badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.admin-badge {
  border-radius: 999px; display: inline-flex; font-size: .69rem; font-weight: 750;
  padding: 3px 8px; white-space: nowrap;
}
.admin-badge.success { background: #ecfdf5; color: #047857; }
.admin-badge.warning { background: #fffbeb; color: #b45309; }
.admin-badge.danger { background: #fff1f2; color: #be123c; }
.admin-badge.neutral { background: #f3f4f6; color: #4b5563; }
.admin-badge.admin { background: #ede9fe; color: #6d28d9; }

.admin-list { display: flex; flex-direction: column; }
.admin-list > a {
  align-items: center; border-bottom: 1px solid var(--border-default); color: inherit; display: flex;
  gap: 12px; justify-content: space-between; padding: 11px 2px; text-decoration: none;
}
.admin-list > a:first-child { padding-top: 2px; }
.admin-list > a:last-child { border-bottom: 0; padding-bottom: 2px; }
.admin-list > a:hover strong { color: var(--primary); }
.admin-list strong { display: block; font-size: .84rem; }

.admin-filters {
  align-items: center; background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); display: flex; gap: 9px;
  margin-bottom: 18px; padding: 13px;
}
.admin-filters .admin-search { flex: 1; min-width: 180px; }
.admin-filters input[type=search] {
  background: var(--bg-input); border: 1.5px solid var(--border-default); border-radius: var(--radius-md);
  color: var(--text-primary); font: inherit; font-size: .9rem; outline: 0; padding: 10px 13px; width: 100%;
}
.admin-filters input[type=search]:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.admin-filters select { min-width: 160px; padding: 10px 13px; }
.admin-pagination { align-items: center; display: flex; gap: 12px; justify-content: center; margin: 8px 0 24px; }
.admin-pagination > span:not(.btn) { color: var(--text-tertiary); font-size: .78rem; }
.admin-pagination .disabled { cursor: not-allowed; opacity: .45; }

.admin-back { color: var(--text-secondary); display: inline-flex; font-size: .82rem; margin: -6px 0 12px; text-decoration: none; }
.admin-back:hover { color: var(--primary); }
.admin-profile-card { align-items: center; display: flex; gap: 17px; }
.admin-avatar {
  align-items: center; background: var(--gradient-primary); border-radius: 15px; box-shadow: 0 4px 14px rgba(99, 102, 241, .25);
  color: #fff; display: flex; flex: none; font-size: 1.35rem; font-weight: 800; height: 54px; justify-content: center; width: 54px;
}
.admin-avatar.survey { background: linear-gradient(135deg, #ec4899, #a855f7); }
.admin-profile-main { flex: 1; min-width: 0; }
.admin-profile-title { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.admin-profile-title h2 { font-size: 1.25rem; margin: 0; }
.admin-profile-main > p { color: var(--text-tertiary); font-size: .8rem; margin-top: 2px; }
.admin-facts { display: flex; flex-wrap: wrap; gap: 22px; }
.admin-facts div { min-width: 82px; }
.admin-facts dt { color: var(--text-tertiary); font-size: .68rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.admin-facts dd { color: var(--text-secondary); font-size: .8rem; font-weight: 650; margin-top: 3px; }
.admin-facts a { color: var(--primary); text-decoration: none; }

.admin-inline-action { align-items: center; border-bottom: 1px solid var(--border-default); display: flex; gap: 12px; justify-content: space-between; padding: 5px 2px 15px; }
.admin-inline-action strong, .admin-action-box strong { display: block; font-size: .86rem; }
.admin-action-box { border-bottom: 1px solid var(--border-default); padding: 0 2px; }
.admin-action-box:last-child { border-bottom: 0; }
.admin-action-box summary {
  align-items: center; cursor: pointer; display: flex; gap: 12px; justify-content: space-between;
  list-style: none; padding: 14px 0;
}
.admin-action-box summary::-webkit-details-marker { display: none; }
.admin-action-box summary > span:last-child { color: var(--primary); font-size: .72rem; font-weight: 700; }
.admin-action-box[open] summary > span:last-child { color: var(--text-tertiary); }
.admin-action-box form { background: var(--bg-input); border-radius: var(--radius-md); margin: 0 0 14px; padding: 14px; }
.admin-action-box .field { margin-bottom: 13px; }
.admin-action-box.danger-zone strong, .danger-zone summary > span:last-child { color: var(--rose); }
.admin-action-box .btn-danger { border-color: rgba(244, 63, 94, .25); }

.admin-definition-list { display: grid; gap: 0; }
.admin-definition-list > div { align-items: baseline; border-bottom: 1px solid var(--border-default); display: grid; gap: 12px; grid-template-columns: 120px 1fr; padding: 9px 0; }
.admin-definition-list > div:last-child { border-bottom: 0; }
.admin-definition-list dt { color: var(--text-tertiary); font-size: .76rem; }
.admin-definition-list dd { color: var(--text-secondary); font-size: .82rem; font-weight: 600; }
.admin-button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.admin-fieldset { border: 0; margin: 0 0 19px; padding: 0; }
.admin-fieldset legend { font-size: .82rem; font-weight: 700; margin-bottom: 8px; }
.admin-toggle { align-items: flex-start; border-bottom: 1px solid var(--border-default); cursor: pointer; display: flex; gap: 11px; padding: 11px 2px; }
.admin-toggle:last-child { border-bottom: 0; }
.admin-toggle input[type=checkbox] { accent-color: var(--primary); height: 18px; margin-top: 2px; width: 18px; }
.admin-toggle strong { display: block; font-size: .86rem; }
.admin-toggle small { color: var(--text-tertiary); display: block; font-size: .75rem; margin-top: 2px; }
.admin-help { color: var(--text-tertiary); font-size: .73rem; margin-top: 5px; }
.admin-input-suffix { align-items: stretch; display: flex; max-width: 240px; }
.admin-input-suffix input { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.admin-input-suffix span { align-items: center; background: #eef0f5; border: 1.5px solid var(--border-default); border-left: 0; border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--text-secondary); display: flex; font-size: .8rem; padding: 0 12px; }
.admin-job-result { background: var(--bg-input); border: 1px solid var(--border-default); border-radius: var(--radius-md); margin-bottom: 13px; padding: 13px; }
.admin-job-result > span { color: var(--text-tertiary); display: block; font-size: .69rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.admin-job-result strong { display: block; font-size: .9rem; margin-top: 4px; }
.admin-job-result small { color: var(--text-tertiary); display: block; font-size: .74rem; margin-top: 2px; }

.maintenance-card { margin-top: 70px; padding: 46px; text-align: center; }
.maintenance-card h1 { font-size: 1.65rem; letter-spacing: -.025em; margin-bottom: 10px; }
.maintenance-card > p:not(.admin-eyebrow) { color: var(--text-secondary); margin: 0 auto 13px; max-width: 520px; }
.maintenance-card .btn { margin-top: 8px; }
.maintenance-icon { font-size: 2.4rem; margin-bottom: 8px; }
.admin-reauth-card { margin-top: 58px; padding: 34px; }
.admin-reauth-card .section-title { align-items: flex-start; }
.admin-reauth-card h1 { font-size: 1.32rem; line-height: 1.2; margin: 0; }
.admin-reauth-card .admin-eyebrow { margin-bottom: 3px; }
.admin-reauth-card > .admin-subtitle { margin: 8px 0 22px; }
.admin-reauth-help { margin-top: 12px; text-align: center; }

@media (max-width: 960px) {
  .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-split, .admin-detail-grid, .admin-settings-grid { grid-template-columns: 1fr; }
  .admin-facts { width: 100%; }
  .admin-profile-card { flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .breach-notice > div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-identity { display: none; }
  .admin-tabs { margin-left: -5px; margin-right: -5px; }
  .admin-filters { align-items: stretch; flex-direction: column; }
  .admin-filters select { width: 100%; }
  .admin-pagination { flex-wrap: wrap; }
  .admin-profile-card { align-items: flex-start; }
  .admin-facts { border-top: 1px solid var(--border-default); padding-top: 14px; }
}
@media (max-width: 480px) {
  .admin-stat-grid { grid-template-columns: 1fr; }
  .admin-stat { padding: 14px; }
  .admin-panel { padding: 17px; }
  .admin-profile-card { padding: 18px; }
  .maintenance-card { margin-top: 30px; padding: 30px 20px; }
}
