:root {
  --brand: #14708C;
  --brand-dark: #0E5368;
  --accent: #E8A33D;
  --bg: #FBF7F0;
  --text: #1F2933;
  --card: #FFFFFF;
  --muted: #5D6A70;
  --line: #E7E1D8;
  --soft-blue: #EAF3F4;
  --soft-gold: #FFF3DE;
  --danger: #A34236;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(ellipse at 4% 8%, rgba(232, 163, 61, .09), transparent 28rem),
    radial-gradient(ellipse at 96% 64%, rgba(20, 112, 140, .07), transparent 29rem),
    var(--bg);
}
a { color: var(--brand-dark); text-underline-offset: .2em; }
a:hover { color: var(--brand); }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.page-shell { position: relative; z-index: 1; display: flex; min-height: 100vh; min-height: 100dvh; flex-direction: column; }
.site-header, .site-footer { width: min(100% - 36px, 640px); margin-inline: auto; }
.site-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(31, 41, 51, .09); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 16px; font-weight: 700; letter-spacing: -.025em; }
.wordmark b { color: var(--brand); font-weight: 650; }
.wordmark-mark { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(20, 112, 140, .23); border-radius: 50% 50% 50% 12px; color: var(--brand-dark); font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.header-note { color: var(--muted); font-size: 14px; }
.main-content { width: min(100% - 36px, 640px); margin: auto; padding: 50px 0 60px; flex: 1; }
.site-footer { display: flex; justify-content: space-between; align-items: center; padding: 20px 0 26px; border-top: 1px solid rgba(31, 41, 51, .10); color: var(--muted); font-size: 14px; }
.site-footer a { font-weight: 600; }
.eyebrow { margin: 0 0 12px; color: var(--brand-dark); font-size: 13px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.17; letter-spacing: -.035em; }
h1 { max-width: 590px; margin-bottom: 14px; font-size: clamp(36px, 8vw, 58px); font-weight: 750; }
h2 { margin-bottom: 12px; font-size: clamp(27px, 6vw, 38px); font-weight: 730; }
h3 { margin-bottom: 8px; font-size: 22px; }
p { color: #45535A; }
.intro { max-width: 510px; margin-bottom: 28px; font-size: 19px; line-height: 1.55; }
.hero-panel { position: relative; padding: clamp(26px, 7vw, 52px); overflow: hidden; border: 1px solid rgba(20, 112, 140, .12); border-radius: 24px; background: rgba(255, 255, 255, .83); box-shadow: 0 20px 60px rgba(64, 68, 52, .08), 0 2px 7px rgba(64, 68, 52, .04); }
.hero-panel::after { position: absolute; top: -62px; right: -42px; width: 180px; height: 180px; border: 1px solid rgba(232, 163, 61, .33); border-radius: 50%; content: ""; box-shadow: 0 0 0 20px rgba(232, 163, 61, .055), 0 0 0 42px rgba(232, 163, 61, .035); pointer-events: none; }
.hero-panel > * { position: relative; z-index: 1; }
.hero-panel .intro { margin-bottom: 24px; }
.small-note { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 9px; padding: 12px 22px; border: 1px solid transparent; border-radius: 12px; background: var(--brand); color: #fff; cursor: pointer; font-size: 16px; font-weight: 700; line-height: 1.25; text-align: center; text-decoration: none; transition: background-color .18s ease, transform .18s ease; }
.button:hover { transform: translateY(-1px); background: var(--brand-dark); color: #fff; }
.button:disabled { cursor: wait; opacity: .72; transform: none; }
.button-secondary { border-color: rgba(20, 112, 140, .28); background: var(--card); color: var(--brand-dark); }
.button-secondary:hover { background: var(--soft-blue); color: var(--brand-dark); }
.button-quiet { background: transparent; border-color: var(--line); color: var(--text); }
.button-quiet:hover { background: #F6F1E9; color: var(--text); }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.quiz-card, .form-card, .result-card, .privacy-card { padding: clamp(23px, 6vw, 40px); border: 1px solid rgba(31, 41, 51, .10); border-radius: 20px; background: var(--card); box-shadow: 0 16px 44px rgba(64, 68, 52, .07); }
.quiz-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: 15px; font-weight: 650; }
.progress-track { height: 8px; margin-bottom: 34px; overflow: hidden; border-radius: 99px; background: #E8E6DF; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--brand); transition: width .28s ease; }
.question-text { max-width: 550px; min-height: 3.1em; margin-bottom: 30px; font-size: clamp(24px, 5.5vw, 34px); line-height: 1.32; font-weight: 680; letter-spacing: -.025em; }
.answer-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.answer-button { min-height: 58px; border: 1px solid rgba(20, 112, 140, .28); border-radius: 13px; background: var(--soft-blue); color: var(--brand-dark); cursor: pointer; font-weight: 750; transition: background-color .16s ease, transform .16s ease; }
.answer-button:hover { transform: translateY(-1px); background: #DCEDEF; }
.back-row { margin-top: 22px; }
.link-button { min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--brand-dark); cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
.form-card { max-width: 600px; }
.form-lead { margin-bottom: 24px; font-size: 18px; }
.field { margin: 0 0 19px; }
.field label { display: block; margin-bottom: 7px; color: var(--text); font-weight: 700; }
.field input { display: block; width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid #C9D1D0; border-radius: 10px; background: #FFFEFC; color: var(--text); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { display: block; min-height: 0; margin-top: 5px; color: var(--danger); font-size: 14px; }
.consent-box { display: flex; align-items: flex-start; gap: 12px; margin: 7px 0 18px; padding: 15px; border-radius: 12px; background: #F7F5EF; }
.consent-box input { width: 21px; height: 21px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--brand); }
.consent-box label { line-height: 1.55; }
.consent-box .field-error { margin-left: -33px; }
.error-message { margin: 0 0 16px; color: var(--danger); font-weight: 650; }
.honeypot { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.status-panel { padding: 24px; border-radius: 16px; background: var(--soft-blue); }
.status-panel p:last-child { margin-bottom: 0; }
.result-intro { margin-bottom: 30px; }
.result-card { margin-top: 18px; }
.result-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.result-name { margin-bottom: 5px; color: var(--brand-dark); }
.score-pill { flex: 0 0 auto; padding: 6px 11px; border-radius: 99px; background: var(--soft-gold); color: #765018; font-size: 14px; font-weight: 750; }
.content-section { padding-top: 17px; border-top: 1px solid var(--line); }
.content-section + .content-section { margin-top: 16px; }
.content-section h3 { margin-bottom: 6px; font-size: 17px; letter-spacing: -.01em; }
.content-section p { margin-bottom: 0; }
.moves-list { margin: 8px 0 0; padding-left: 22px; color: #45535A; }
.moves-list li + li { margin-top: 7px; }
.combo-box { margin: 23px 0; padding: 21px; border: 1px solid rgba(232, 163, 61, .45); border-radius: 15px; background: var(--soft-gold); }
.combo-box h3 { color: #604418; }
.combo-box p:last-child { margin-bottom: 0; }
.course-note { margin: 22px 0 0; padding: 18px 20px; border-left: 3px solid var(--accent); background: #FCF8EF; }
.cta-panel { margin-top: 28px; padding: clamp(23px, 6vw, 34px); border-radius: 19px; background: var(--brand-dark); color: #fff; }
.cta-panel h2 { font-size: clamp(25px, 5vw, 33px); }
.cta-panel h2, .cta-panel p { color: #fff; }
.cta-panel p { margin-bottom: 20px; color: rgba(255, 255, 255, .84); }
.cta-panel .button { background: var(--accent); color: #30250F; }
.cta-panel .button:hover { background: #F1B75D; color: #30250F; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 17px; }
.share-row .button { min-height: 48px; }
.plain-copy { font-size: 17px; }
.privacy-card { padding: clamp(24px, 6vw, 42px); }
.privacy-card h2 { margin-top: 28px; font-size: 22px; }
.privacy-card h2:first-of-type { margin-top: 29px; }
.privacy-card p, .privacy-card li { line-height: 1.72; }
.privacy-card ul { padding-left: 22px; }
.privacy-email { overflow-wrap: anywhere; }
.alert-panel { padding: 24px; border: 1px solid rgba(163, 66, 54, .2); border-radius: 16px; background: #FFF8F5; }
.alert-panel p { margin-bottom: 18px; }
.loading-block { display: grid; gap: 14px; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.skeleton { height: 18px; border-radius: 8px; background: linear-gradient(90deg, #EEEAE2 0%, #F7F4ED 50%, #EEEAE2 100%); background-size: 200% 100%; animation: shimmer 1.8s ease infinite; }
.skeleton-title { width: 68%; height: 32px; }
.skeleton-copy { width: 92%; }
.skeleton-copy-short { width: 55%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.ambient-shape { position: fixed; z-index: 0; pointer-events: none; border: 1px solid rgba(20, 112, 140, .10); border-radius: 50%; }
.ambient-shape-one { top: 27vh; left: -92px; width: 180px; height: 180px; box-shadow: 0 0 0 18px rgba(20, 112, 140, .025); }
.ambient-shape-two { right: -45px; bottom: 5vh; width: 110px; height: 110px; border-color: rgba(232, 163, 61, .25); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Protected admin surface */
.admin-main { width: min(100% - 32px, 1200px); margin: 0 auto; padding: 34px 0 54px; }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.admin-header h1 { margin-bottom: 7px; font-size: clamp(30px, 5vw, 42px); }
.admin-header p { margin: 0; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.admin-search { width: min(100%, 390px); min-height: 52px; padding: 11px 14px; border: 1px solid #C9D1D0; border-radius: 10px; background: var(--card); }
.admin-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; margin: 20px 0; }
.metric { min-height: 104px; padding: 16px; border: 1px solid rgba(31, 41, 51, .09); border-radius: 13px; background: var(--card); }
.metric-label { display: block; color: var(--muted); font-size: 14px; }
.metric-value { display: block; margin-top: 4px; color: var(--brand-dark); font-size: 26px; font-weight: 750; letter-spacing: -.03em; }
.admin-notice { margin: 14px 0; padding: 13px 16px; border-radius: 10px; background: var(--soft-gold); color: #604418; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th, .admin-table td { padding: 12px 13px; border-bottom: 1px solid #EEEAE2; vertical-align: top; }
.admin-table th { background: #F4F3EC; color: #47565D; font-size: 13px; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.admin-table td { font-size: 14px; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-delete { min-height: 40px; padding: 7px 11px; border: 1px solid #D9AAA3; border-radius: 8px; background: #FFF8F5; color: #8B3028; cursor: pointer; font-weight: 700; }
.admin-delete:hover { background: #F8E8E3; }
.admin-state { padding: 20px; border-radius: 12px; background: var(--card); }
.admin-state.error { color: var(--danger); }
.admin-summary-breakdown { display: flex; flex-wrap: wrap; gap: 10px 18px; grid-column: 1 / -1; color: var(--muted); }

@media (max-width: 520px) {
  .site-header, .site-footer, .main-content { width: min(100% - 28px, 640px); }
  .site-header { min-height: 68px; }
  .header-note { max-width: 118px; font-size: 12px; text-align: right; line-height: 1.3; }
  .main-content { padding: 34px 0 42px; }
  .answer-buttons { grid-template-columns: 1fr; }
  .answer-button { min-height: 56px; }
  .button-row > .button { width: 100%; }
  .result-card-head { display: block; }
  .score-pill { display: inline-block; margin-top: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
