:root {
  --ink: #162d42;
  --ink-2: #25465f;
  --red: #b5322f;
  --red-dark: #922622;
  --paper: #f4f6f7;
  --card: #ffffff;
  --line: #d8e0e5;
  --muted: #60707c;
  --seen: #69859a;
  --working: #c8832b;
  --known: #42755d;
  --shadow: 0 8px 28px rgba(19, 46, 66, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: #1e2b34;
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.48;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.site-header {
  background: #fff;
  border-bottom: 3px solid var(--red);
  padding: max(10px, env(safe-area-inset-top)) 18px 10px;
}
.brand-wrap { max-width: 980px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand-logo { width: 166px; height: 70px; object-fit: contain; object-position: left center; }
.brand-title { text-align: right; color: var(--ink); line-height: 1.12; }
.brand-title span { display: block; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--red); font-weight: 800; }
.brand-title strong { display: block; font-size: 1.13rem; }

main { width: min(100% - 28px, 920px); margin: 0 auto; }
.dashboard { margin: 22px 0 14px; padding: 24px; background: var(--ink); color: #fff; border-radius: 20px; box-shadow: var(--shadow); }
.eyebrow { color: #8e9eaa; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .73rem; }
.dashboard .eyebrow { color: #aebdc8; }
h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.15; }
h1 { margin-top: 4px; color: #fff; font-size: clamp(1.65rem, 6vw, 2.25rem); }
h2 { margin-top: 3px; font-size: clamp(1.45rem, 5vw, 1.9rem); }

.progress-track { height: 9px; display: flex; margin: 20px 0 15px; overflow: hidden; border-radius: 20px; background: rgba(255,255,255,.14); }
.progress-segment { width: 0; transition: width .35s ease; }
.progress-segment.seen { background: #9ab2c3; }
.progress-segment.working { background: #f1b45f; }
.progress-segment.known { background: #77b491; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { min-width: 0; padding: 10px 6px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; color: #fff; background: rgba(255,255,255,.065); cursor: pointer; }
.stat strong { display: block; font-size: 1.4rem; line-height: 1; }
.stat span { display: block; margin-top: 5px; font-size: .72rem; color: #cbd5dc; }
.stat:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.dashboard-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin-top: 14px; }
.dashboard-note { margin: 0; color: #cbd5dc; font-size: .88rem; }
.dashboard-note strong { color: #fff; }
.save-copy-button { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; color: #eef3f6; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; font-size: .76rem; font-weight: 800; cursor: pointer; }
.save-copy-button:hover { background: rgba(255,255,255,.13); }
.save-copy-button svg { flex: 0 0 auto; }
.save-copy-button { min-height: 44px; font-size: .875rem; max-width: 100%; }
.save-copy-button:disabled { opacity: .65; cursor: wait; }

.purpose { margin: 14px 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.purpose summary { padding: 16px 18px; color: var(--ink); font-weight: 800; cursor: pointer; }
.purpose div { padding: 0 18px 16px; color: #46555f; }
.purpose p { margin: 0 0 10px; }
.purpose p:last-child { margin-bottom: 0; }

.tools { position: sticky; top: 0; z-index: 10; margin: 14px -14px 24px; padding: 12px 14px 10px; background: rgba(244,246,247,.95); backdrop-filter: blur(9px); }
.search-box { position: relative; display: block; }
.search-icon { position: absolute; left: 16px; top: 50%; width: 14px; height: 14px; border: 2px solid var(--muted); border-radius: 50%; transform: translateY(-58%); pointer-events: none; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; background: var(--muted); right: -6px; bottom: -3px; transform: rotate(45deg); }
#search { width: 100%; height: 48px; padding: 0 16px 0 44px; color: var(--ink); background: #fff; border: 1px solid #cbd5db; border-radius: 13px; outline: none; }
#search:focus { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(37,70,95,.12); }
.filters { display: flex; gap: 7px; margin-top: 9px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: 0 0 auto; min-height: 38px; padding: 7px 13px; border: 1px solid #ccd6dc; border-radius: 999px; color: var(--ink-2); background: #fff; font-weight: 700; font-size: .82rem; cursor: pointer; }
.filter.active { color: #fff; background: var(--ink); border-color: var(--ink); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.text-button { border: 0; padding: 8px 0; color: var(--red-dark); background: transparent; font-weight: 800; font-size: .86rem; cursor: pointer; }
.category { margin-bottom: 12px; border: 1px solid var(--line); background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 3px 14px rgba(19,46,66,.04); }
.category[open] { box-shadow: var(--shadow); }
.category-summary { list-style: none; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 13px 16px; cursor: pointer; }
.category-summary::-webkit-details-marker { display: none; }
.category-monogram { flex: 0 0 43px; height: 43px; display: grid; place-items: center; color: #fff; background: var(--red); border-radius: 11px; font-size: .72rem; font-weight: 900; letter-spacing: .04em; }
.category-copy { min-width: 0; flex: 1; }
.category-copy strong { display: block; color: var(--ink); font-size: 1rem; line-height: 1.25; }
.category-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; }
.category-chevron { width: 9px; height: 9px; border-right: 2px solid #647684; border-bottom: 2px solid #647684; transform: rotate(45deg); transition: transform .2s; }
.category[open] .category-chevron { transform: rotate(225deg); }
.techniques { border-top: 1px solid var(--line); }
.technique { padding: 16px; border-bottom: 1px solid #e7ecef; }
.technique:last-child { border-bottom: 0; }
.technique h3 { font-size: 1.04rem; }
.technique p { margin: 5px 0 13px; color: #52616b; font-size: .91rem; }
.status-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.status-button { min-height: 42px; padding: 7px 5px; border: 1px solid #cfd9df; border-radius: 10px; color: #4a5d6a; background: #f8fafb; font-size: .76rem; font-weight: 800; cursor: pointer; }
.status-button:hover { border-color: #9babb6; }
.status-button[aria-pressed="true"].seen { color: #fff; background: var(--seen); border-color: var(--seen); }
.status-button[aria-pressed="true"].working { color: #fff; background: var(--working); border-color: var(--working); }
.status-button[aria-pressed="true"].known { color: #fff; background: var(--known); border-color: var(--known); }
.technique-actions { min-width: 0; }
.request-button { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 9px; border: 1px dashed #bdc9d0; border-radius: 10px; color: var(--ink-2); background: #fff; font-size: .8rem; font-weight: 800; cursor: pointer; }
.request-button::before { content: "+"; display: grid; place-items: center; width: 19px; height: 19px; border: 1px solid #94a6b2; border-radius: 50%; font-size: .9rem; line-height: 1; }
.request-button[aria-pressed="true"] { color: var(--red-dark); background: #fff6f5; border-style: solid; border-color: #d9a4a1; }
.request-button[aria-pressed="true"]::before { content: "✓"; color: #fff; background: var(--red); border-color: var(--red); font-size: .72rem; }
.status-button:focus-visible, .request-button:focus-visible, .filter:focus-visible, .text-button:focus-visible, .reset-button:focus-visible, .save-copy-button:focus-visible, .clear-requests:focus-visible, .share-requests:focus-visible { outline: 3px solid rgba(181,50,47,.25); outline-offset: 2px; }
.category-note { margin: 0; padding: 14px 16px; color: #53636e; background: #f7f9fa; border-top: 1px solid var(--line); font-size: .86rem; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty strong, .empty span { display: block; }
.empty strong { color: var(--ink); font-size: 1.05rem; }

.footer-actions { margin: 24px 0 12px; padding: 20px; text-align: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.footer-actions p { margin: 0 0 12px; font-size: .86rem; }
.reset-button { border: 0; color: var(--red-dark); background: transparent; font-weight: 800; font-size: .86rem; cursor: pointer; }
footer { padding: 22px 16px calc(24px + env(safe-area-inset-bottom)); text-align: center; color: #78858e; font-size: .75rem; }
.request-bar { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 18; width: min(calc(100% - 24px), 620px); min-height: 68px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 10px 11px 10px 16px; color: #fff; background: var(--ink); border: 1px solid rgba(255,255,255,.14); border-radius: 17px; box-shadow: 0 14px 38px rgba(9,29,44,.3); transform: translateX(-50%); }
.request-bar[hidden] { display: none; }
.request-bar-copy { min-width: 0; line-height: 1.18; }
.request-bar-copy strong, .request-bar-copy span { display: block; }
.request-bar-copy strong { font-size: .92rem; }
.request-bar-copy > span { margin-top: 3px; color: #bfcbd3; font-size: .7rem; }
.clear-requests, .share-requests { min-height: 44px; border-radius: 11px; font-size: .78rem; font-weight: 850; cursor: pointer; }
.clear-requests { padding: 8px 4px; color: #cfdae1; background: transparent; border: 0; }
.share-requests { padding: 8px 15px; color: #fff; background: var(--red); border: 0; }
body.requests-active { padding-bottom: 92px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 20; padding: 10px 16px; color: #fff; background: #182b3a; border-radius: 999px; box-shadow: var(--shadow); font-size: .82rem; font-weight: 750; opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .2s, transform .2s; }
.requests-active .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .site-header { padding-left: 28px; padding-right: 28px; }
  .brand-logo { width: 215px; height: 80px; }
  .brand-title strong { font-size: 1.35rem; }
  .dashboard { padding: 30px 34px; }
  .stats { max-width: 620px; }
  .stat { text-align: left; padding: 13px 15px; }
  .stat span { font-size: .8rem; }
  .technique { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(340px, 1.25fr); gap: 22px; align-items: center; padding: 18px 20px; }
  .technique p { margin-bottom: 0; }
  .status-button { font-size: .79rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
