:root {
  --ink: #17243a;
  --paper: #f3f6fa;
  --card: #ffffff;
  --muted: #66758a;
  --line: #d5dfeb;
  --violet: #4f70ad;
  --coral: #7f96bc;
  --lime: #a9c1dc;
  --cyan: #78a6b5;
  --yellow: #c2cfdf;
  --blue-soft: #e7eef8;
  --shadow: 0 20px 55px rgba(35, 64, 103, .10);
  --radius: 24px;
}

html[data-theme="dark"] { --ink: #edf3fa; --paper: #101824; --card: #172331; --muted: #a9b7c8; --line: #2c3d51; --violet: #91abd8; --coral:#829cc5; --lime:#a7bfd8; --cyan:#7eabb8; --yellow:#c1cedd; --blue-soft:#243a55; --shadow: 0 20px 60px rgba(0,0,0,.25); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.55; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 200; padding: 10px 14px; background: var(--ink); color: var(--paper); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 100; min-height: 72px; display: flex; align-items: center; gap: 30px; padding: 10px clamp(18px, 4vw, 64px); border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 42px; aspect-ratio: 1; background: var(--ink); color: var(--paper); border-radius: 12px; font: 700 12px "DM Mono", monospace; transform: rotate(-3deg); }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy b { font-size: 14px; }
.brand-copy small { font: 500 10px "DM Mono", monospace; letter-spacing: .03em; color: var(--muted); }
nav { display: flex; align-items: center; gap: 26px; font-size: 13px; font-weight: 700; }
nav a:hover { color: var(--violet); }
.nav-test { border: 0; border-radius: 999px; padding: 9px 16px; background: var(--ink); color: var(--paper); cursor: pointer; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang-switch button { border: 0; background: transparent; border-radius: 999px; padding: 6px 8px; font: 600 10px "DM Mono", monospace; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.icon-button { width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.hero { max-width: 1440px; margin: 0 auto; min-height: calc(100vh - 72px); display: grid; grid-template-columns: .88fr 1.12fr; align-items: center; gap: clamp(30px, 5vw, 80px); padding: clamp(55px, 8vw, 112px) clamp(20px, 5vw, 76px); overflow: hidden; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow, .kicker { font: 600 11px "DM Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--violet); }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 6px color-mix(in srgb, var(--coral) 18%, transparent); }
h1 { max-width: 710px; margin: 24px 0; font-size: clamp(45px, 5.8vw, 82px); line-height: .98; letter-spacing: -.065em; }
h1 em { color: var(--violet); font-style: normal; }
.hero-lead { max-width: 650px; margin: 0 0 30px; color: var(--muted); font-size: clamp(16px, 1.6vw, 20px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { min-width: 190px; display: grid; gap: 1px; border: 2px solid var(--ink); border-radius: 16px; padding: 13px 18px; text-align: left; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform .18s, box-shadow .18s; }
.button:hover { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }
.button span { font-weight: 800; }
.button small { font: 500 10px "DM Mono", monospace; opacity: .72; }
.button-primary { background: var(--lime); color: #171228; }
.button-secondary { background: var(--card); }
.fine-print { max-width: 590px; margin-top: 22px; color: var(--muted); font-size: 11px; }
.hero-art-wrap { position: relative; }
.hero-art-wrap::before { content:""; position: absolute; inset: 10% 3% -3% 10%; background: var(--cyan); border-radius: 48% 52% 50% 43%; transform: rotate(4deg); }
.hero-art-wrap img { position: relative; width: 100%; display: block; border: 3px solid var(--ink); border-radius: 28px; box-shadow: 12px 14px 0 var(--ink); transform: rotate(1deg); }
.sticker { position: absolute; z-index: 3; display: grid; place-items: center; min-width: 84px; aspect-ratio: 1; border: 2px solid #171228; background: var(--coral); color: #171228; border-radius: 50%; font: 800 21px "DM Mono", monospace; box-shadow: 4px 5px 0 #171228; }
.sticker small { font-size: 9px; text-transform: uppercase; }
.sticker-a { left: -28px; top: -28px; transform: rotate(-8deg); }
.sticker-b { right: -24px; bottom: -18px; min-width: auto; aspect-ratio: auto; padding: 12px 16px; border-radius: 10px; background: var(--yellow); font-size: 11px; transform: rotate(5deg); }
.ticker { overflow: hidden; border-block: 2px solid var(--ink); background: var(--ink); color: var(--paper); }
.ticker div { width: max-content; display: flex; gap: 44px; padding: 12px 22px; animation: ticker 25s linear infinite; font: 500 11px "DM Mono", monospace; }
.ticker span::before { content:"✦"; margin-right: 44px; color: var(--lime); }
@keyframes ticker { to { transform: translateX(-50%); } }
.section { max-width: 1440px; margin: 0 auto; padding: clamp(80px, 10vw, 140px) clamp(20px, 5vw, 76px); }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: end; margin-bottom: 42px; }
.section-heading h2, .method-card h2 { margin: 5px 0 0; font-size: clamp(40px, 5vw, 70px); line-height: 1; letter-spacing: -.05em; }
.section-heading > p { max-width: 600px; color: var(--muted); }
.catalog-tools { display: flex; gap: 18px; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.search-box { min-width: min(100%, 320px); display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 10px 14px; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.filter-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.filter-chip { border: 1px solid var(--line); border-radius: 999px; background: transparent; padding: 7px 12px; font-size: 11px; font-weight: 700; cursor: pointer; }
.filter-chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.role-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.role-card { min-height: 240px; position: relative; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 18px; transition: transform .2s, box-shadow .2s; }
.role-card:hover { transform: translateY(-4px) rotate(-.35deg); box-shadow: var(--shadow); }
.role-card-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.role-visual { width: 74px; height: 74px; flex: 0 0 auto; border: 2px solid var(--ink); border-radius: 18px; background-color: var(--lime); background-size: 300% 300%; box-shadow: 3px 3px 0 var(--ink); }
.role-emoji { display: grid; place-items: center; font-size: 35px; }
.role-category { font: 500 9px "DM Mono", monospace; text-transform: uppercase; color: var(--muted); }
.role-card h3 { margin: auto 0 6px; font-size: 20px; line-height: 1.1; }
.role-card p { margin: 0; color: var(--muted); font-size: 12px; }
.role-count { margin: 24px 0 0; text-align: right; color: var(--muted); font: 500 10px "DM Mono", monospace; }
.method-section { padding-top: 0; }
.method-card { position: relative; overflow: hidden; border-radius: 36px; background: var(--ink); color: var(--paper); padding: clamp(35px, 7vw, 90px); }
.method-card::after { content:"?"; position:absolute; right: 4%; top: -38%; font-size: 390px; font-weight: 900; opacity: .05; transform: rotate(12deg); }
.method-card > p:not(.kicker) { max-width: 750px; color: color-mix(in srgb, var(--paper) 65%, transparent); }
.formula { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 36px; }
.formula span, .formula strong { border: 1px solid color-mix(in srgb, var(--paper) 30%, transparent); border-radius: 999px; padding: 9px 14px; font: 500 11px "DM Mono", monospace; }
.formula strong { background: var(--lime); color: #171228; border-color: var(--lime); }
.method-points { position:relative; z-index:2; display:grid; grid-template-columns:repeat(3,1fr); gap:1px; margin-top:44px; background:color-mix(in srgb,var(--paper) 18%,transparent); border:1px solid color-mix(in srgb,var(--paper) 18%,transparent); }
.method-points div { min-height:110px; display:flex; flex-direction:column; justify-content:space-between; gap:20px; background:var(--ink); padding:18px; }
.method-points b { color:var(--lime); font:600 10px "DM Mono",monospace; }
.method-points span { max-width:230px; font-size:12px; }
.test-cta { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(35px,8vw,110px); border-block: 1px solid var(--line); }
.test-cta h2 { max-width: 680px; margin: 6px 0 18px; font-size: clamp(42px,5vw,72px); line-height: 1; letter-spacing: -.055em; }
.test-cta-copy > p:not(.kicker) { max-width: 590px; color: var(--muted); }
.test-options { display: grid; gap: 14px; }
.test-option { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 18px; border: 2px solid var(--ink); border-radius: 22px; background: var(--card); padding: 18px; text-align:left; cursor:pointer; box-shadow: 5px 6px 0 var(--ink); transition: transform .18s, box-shadow .18s; }
.test-option:hover { transform: translate(2px,2px); box-shadow: 2px 3px 0 var(--ink); }
.test-option.featured { background: var(--violet); color: white; }
.option-number { display:grid; place-items:center; width:65px; height:65px; border: 2px solid currentColor; border-radius:18px; font:800 24px "DM Mono",monospace; }
.test-option > span:nth-child(2) { display:grid; }
.test-option b { font-size:17px; }
.test-option small { opacity:.7; }
.test-option i { font-size:25px; font-style:normal; }
.research-section { padding-top: 80px; }
.research-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.research-grid a { min-height:170px; display:flex; flex-direction:column; border:1px solid var(--line); border-radius:20px; background:var(--card); padding:18px; transition:transform .2s,background .2s; }
.research-grid a:hover { transform:translateY(-4px); background:color-mix(in srgb,var(--card) 85%,var(--lime)); }
.research-grid span { color:var(--violet); font:600 11px "DM Mono",monospace; }
.research-grid b { margin-top:auto; }
.research-grid small { color:var(--muted); }
.test-dialog { width:100vw; max-width:none; height:100dvh; max-height:none; margin:0; border:0; padding:0; background:var(--paper); color:var(--ink); }
.test-dialog::backdrop { background:rgba(10,7,18,.78); backdrop-filter:blur(8px); }
.test-shell { width:min(1100px,100%); min-height:100%; margin:0 auto; padding:22px clamp(20px,5vw,70px) 55px; display:flex; flex-direction:column; }
.test-header { display:flex; justify-content:space-between; align-items:center; gap:20px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.test-header > div { display:grid; }
.test-brand { font:700 12px "DM Mono",monospace; }
.test-header small { color:var(--muted); }
.test-close { display:grid; place-items:center; width:42px; height:42px; border:1px solid var(--line); border-radius:50%; background:transparent; font-size:26px; cursor:pointer; }
.test-progress { height:5px; margin:20px 0; overflow:hidden; border-radius:999px; background:var(--line); }
.test-progress span { display:block; width:0; height:100%; background:var(--violet); transition:width .25s; }
.question-view { width:min(780px,100%); flex:1; display:flex; flex-direction:column; justify-content:center; margin:0 auto; padding:30px 0; }
.question-index { margin:0; color:var(--violet); font:600 11px "DM Mono",monospace; }
.question-view h2 { margin:16px 0 12px; font-size:clamp(32px,5vw,58px); line-height:1.06; letter-spacing:-.045em; }
.answer-hint { color:var(--muted); }
.likert { display:grid; grid-template-columns:repeat(5,1fr); gap:9px; margin-top:24px; }
.likert button { min-height:82px; display:grid; place-items:center; gap:3px; border:1px solid var(--line); border-radius:16px; background:var(--card); cursor:pointer; }
.likert button b { font:700 16px "DM Mono",monospace; }
.likert button small { color:var(--muted); font-size:9px; }
.likert button:hover,.likert button.selected { border:2px solid var(--ink); background:var(--lime); color:#171228; box-shadow:3px 4px 0 var(--ink); }
.likert button.selected small { color:#171228; }
.test-nav { display:flex; justify-content:space-between; margin-top:30px; }
.test-nav button { border:1px solid var(--line); border-radius:999px; background:transparent; padding:10px 18px; cursor:pointer; }
.test-nav #nextQuestion { background:var(--ink); color:var(--paper); border-color:var(--ink); }
.test-nav button:disabled { opacity:.35; cursor:not-allowed; }
.results-view { padding:clamp(32px,6vw,80px) 0; }
.result-intro { max-width:760px; }
.result-intro h2 { margin:6px 0 12px; font-size:clamp(44px,7vw,76px); line-height:.96; letter-spacing:-.06em; }
.result-intro > p:last-child { color:var(--muted); }
.results-layout { display:grid; grid-template-columns:.72fr 1.28fr; gap:clamp(30px,6vw,80px); margin-top:45px; align-items:start; }
.donut-wrap { position:sticky; top:30px; }
.result-donut { width:min(300px,75vw); aspect-ratio:1; display:grid; place-items:center; border-radius:50%; background:conic-gradient(var(--violet) 0 25%,var(--coral) 25% 47%,var(--lime) 47% 66%,var(--cyan) 66% 83%,var(--yellow) 83% 100%); }
.result-donut::before { content:""; grid-area:1/1; width:60%; aspect-ratio:1; border-radius:50%; background:var(--paper); }
.result-donut > div { position:relative; grid-area:1/1; display:grid; text-align:center; }
.result-donut b { font:800 24px "DM Mono",monospace; }
.result-donut small { max-width:90px; color:var(--muted); font-size:9px; }
.donut-legend { display:grid; gap:6px; margin-top:20px; }
.donut-legend span { display:flex; align-items:center; gap:8px; font-size:11px; }
.donut-legend i { width:9px; height:9px; border-radius:50%; }
.result-list { display:grid; gap:12px; }
.result-card { display:grid; grid-template-columns:64px 1fr 60px; gap:16px; align-items:center; border:1px solid var(--line); border-radius:20px; background:var(--card); padding:14px; }
.result-rank { display:grid; place-items:center; width:58px; height:58px; border:2px solid var(--ink); border-radius:16px; font:700 18px "DM Mono",monospace; background:var(--role-color); color:#171228; box-shadow:3px 3px 0 var(--ink); }
.result-card h3 { margin:0; font-size:19px; }
.result-card p { margin:3px 0 7px; color:var(--muted); font-size:11px; }
.result-card blockquote { margin:0; font-size:11px; font-weight:700; }
.result-percent { font:800 20px "DM Mono",monospace; text-align:right; }
.result-bar { grid-column:2/4; height:5px; border-radius:999px; background:var(--line); overflow:hidden; }
.result-bar span { display:block; height:100%; width:var(--share); background:var(--role-color); }
.result-note { margin-top:36px; border-left:4px solid var(--lime); background:var(--card); padding:18px 20px; }
.result-note p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.result-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:24px; }
body:has(dialog[open]) { overflow:hidden; }
footer { display: flex; align-items: center; gap: 30px; margin: 0 clamp(20px, 5vw, 76px); padding: 28px 0 50px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
footer .brand { margin-right: 0; }
@media (max-width: 1000px) { .hero { grid-template-columns: 1fr; } .hero-art-wrap { max-width: 760px; } .role-grid { grid-template-columns: repeat(3, 1fr); } .test-cta { grid-template-columns:1fr; } .research-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width: 760px) { .site-header nav { display:none; } .brand-copy { display:none; } .site-header { gap: 12px; } .hero { min-height: auto; padding-top: 60px; } .hero-art-wrap { margin: 25px 6px 0; } .sticker { transform: scale(.8) rotate(-8deg); } .section-heading { grid-template-columns: 1fr; gap: 12px; } .catalog-tools { align-items: stretch; flex-direction: column; } .filter-row { justify-content: flex-start; } .role-grid { grid-template-columns: repeat(2, 1fr); } .results-layout { grid-template-columns:1fr; } .donut-wrap { position:static; } }
@media (max-width: 490px) { h1 { font-size: 43px; } .header-actions { margin-left: auto; } .role-grid { grid-template-columns: 1fr; } .role-card { min-height: 210px; } .button { width: 100%; } footer { align-items:flex-start; flex-direction:column; } .research-grid { grid-template-columns:1fr; } .method-points { grid-template-columns:1fr; } .likert { gap:4px; } .likert button { min-height:72px; padding:5px 2px; } .likert button small { font-size:7px; } .result-card { grid-template-columns:52px 1fr 52px; gap:10px; } .result-rank { width:48px;height:48px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior:auto !important; animation:none !important; transition:none !important; } }

/* Calm assessment palette + installable app affordances */
.brand-mark, .nav-test, .filter-chip.active, .test-nav #nextQuestion { background:#315c9d; color:#fff; border-color:#315c9d; }
.button { border-color:#294a76; box-shadow:3px 4px 0 #294a76; }
.button:hover { box-shadow:1px 2px 0 #294a76; }
.button-primary { background:var(--blue-soft); color:var(--ink); }
.pulse { background:#6f93c2; box-shadow:0 0 0 6px color-mix(in srgb,#6f93c2 18%,transparent); }
.hero-art-wrap::before { background:#cfdeed; }
.hero-art-wrap img { border-color:#294a76; box-shadow:10px 12px 0 #294a76; filter:saturate(.68) contrast(.98); }
.sticker { background:#b8cbe1; color:#17243a; border-color:#294a76; box-shadow:3px 4px 0 #294a76; }
.sticker-b { background:#d9e4ef; }
.ticker { border-color:#294a76; background:#294a76; }
.ticker span::before { color:#aac2dc; }
.role-visual { border-color:#3d5f89; box-shadow:2px 3px 0 #3d5f89; filter:saturate(.72); }
.formula strong { background:#a9c1dc; border-color:#a9c1dc; color:#17243a; }
.test-option { border-color:#35577f; box-shadow:4px 5px 0 #35577f; }
.test-option:hover { box-shadow:2px 2px 0 #35577f; }
.test-option.featured { background:#4f70ad; }
.likert button:hover,.likert button.selected { border:2px solid #315c9d; background:var(--blue-soft); color:var(--ink); box-shadow:2px 3px 0 #315c9d; }
.likert button.selected small { color:var(--muted); }
.result-note { border-color:#6d92bf; }

.install-button { display:inline-flex; align-items:center; gap:6px; border:1px solid #a9bad0; border-radius:999px; background:var(--card); padding:7px 11px; color:var(--ink); font-size:11px; font-weight:750; cursor:pointer; }
.install-button[hidden] { display:none; }
.install-button:hover { background:var(--blue-soft); }
.network-status { position:fixed; z-index:120; left:50%; top:82px; translate:-50% 0; border:1px solid #9bb0c9; border-radius:999px; background:var(--card); box-shadow:var(--shadow); padding:8px 14px; color:var(--muted); font-size:12px; }
.test-side { display:grid; gap:18px; }
.dog-helper { display:grid; grid-template-columns:96px 1fr; align-items:center; gap:16px; border:1px solid var(--line); border-radius:22px; background:color-mix(in srgb,var(--card) 88%,var(--blue-soft)); padding:12px 18px 12px 10px; }
.dog-helper img { width:96px; aspect-ratio:1; object-fit:cover; border-radius:18px; filter:saturate(.8); }
.dog-helper p { margin:0; color:var(--muted); font-size:13px; font-weight:650; }
@media (max-width:760px) { .install-button span:last-child { display:none; } }
@media (max-width:490px) { .dog-helper { grid-template-columns:78px 1fr; } .dog-helper img { width:78px; } }
