/* The Story Compass: "Compass & Lantern" palette (brand kit, 2026-11-05).
   Rule: gold is decoration only. Words and buttons are teal or ink (contrast). */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-vf.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-vf.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }

:root {
  --midnight: #184E4A;   /* Midnight Teal: headings, primary buttons */
  --teal: #215C57;       /* Deep Teal: links, selected states */
  --gold: #BB842F;       /* Compass Gold: decoration only */
  --brass: #D2B06A;      /* Soft Brass: decoration only */
  --paper: #F5F0E6;      /* Warm Parchment: page */
  --card: #FCFAF5;       /* Ivory Paper: cards */
  --ink: #4A4038;        /* Ink Brown: body text */
  --sage: #DCE6E1;       /* Mist Sage: chips, selected fills */
  --soft: #6B5E52;       /* secondary text (passes AA on paper and card) */
  --line: #E4D9C4;
  --warn-bg: #FBF0D9;
  --warn: #7A5200;
  /* spec sheet: radius sm/md/lg, two subtle shadows, spacing 4-48 */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px;   /* fields / buttons+choices / cards / profile hero */
  --radius: var(--r-lg);
  --shadow: 0 2px 6px rgba(24, 78, 74, .08);
  --shadow-lg: 0 4px 12px rgba(24, 78, 74, .12);
  --s-xs: 4px; --s-sm: 8px; --s-12: 12px; --s-md: 16px; --s-lg: 24px; --s-xl: 32px; --s-2xl: 48px; --s-3xl: 64px;
  --focus: 0 0 0 3px #FCFAF5, 0 0 0 6px #184E4A;   /* 3px ivory gap + 3px teal outline */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); line-height: 1.55; color: var(--ink); background: var(--paper); }
a { color: var(--teal); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; color: var(--midnight); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 3.9vw, 52px); line-height: 1.1; margin: .2rem 0 .8rem; }
h1.qtitle { font-size: clamp(26px, 3vw, 34px); line-height: 1.16; }
h2 { font-size: 34px; line-height: 1.16; margin: var(--s-xl) 0 .6rem; }
h3 { font-size: 25px; line-height: 1.2; }
.lead { font-size: 1.15rem; color: var(--soft); }
.muted { color: var(--soft); font-size: 14px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 10; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
main:focus, main:focus-visible { outline: none; box-shadow: none; }
code { background: var(--sage); padding: .05rem .35rem; border-radius: 4px; font-size: .85em; }

/* header + footer */
.demo-banner { background: var(--warn-bg); color: var(--warn); text-align: center; font-size: .8rem; padding: .4rem 1rem; border-bottom: 1px solid #EED9AE; }
.site-header {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between;
  padding: .9rem clamp(1rem, 4vw, 2.5rem); background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--midnight); font-family: var(--serif); font-size: 1.3rem; font-weight: 650; }
.brand img { height: 40px; width: auto; display: block; }
nav { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; font-size: .95rem; }
nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
nav a:hover { color: var(--teal); text-decoration: underline; }
.site-footer { text-align: center; color: var(--soft); font-size: .9rem; padding: 2rem 1rem 3rem; border-top: 1px solid var(--line); background: var(--card); }
.site-footer .rule { color: var(--gold); letter-spacing: .4em; }

main { max-width: 780px; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 2rem) 4rem; outline: none; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-size: 17px; line-height: 1.3; font-weight: 600; cursor: pointer;
  padding: .7rem 1.4rem; border-radius: var(--r-md); border: 2px solid var(--midnight);
  background: var(--midnight); color: #fff; text-decoration: none; min-height: 46px;
  box-shadow: inset 0 0 0 1px rgba(210, 176, 106, .35);
}
.btn:hover { background: var(--teal); border-color: var(--teal); transform: translateY(-1px); }
.btn:active { background: var(--midnight); border-color: var(--midnight); box-shadow: inset 0 2px 4px rgba(0,0,0,.25); transform: none; }
.btn .chev { font-size: 1.1em; line-height: 1; }
.btn .star { color: var(--brass); }
.btn.ghost { background: var(--card); color: var(--midnight); box-shadow: none; }
.btn.ghost:hover { background: var(--sage); }
.btn.ghost:active { background: #C9D9D2; transform: none; }
.btn.small { padding: .35rem 1rem; font-size: .9rem; min-height: 38px; }
.btn[disabled], .btn[disabled]:hover { background: var(--sage); border-color: var(--sage); color: #7C8E88; box-shadow: none; cursor: not-allowed; transform: none; }
.btn.ghost[disabled] { background: transparent; border-color: var(--line); color: #A39886; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-lg); margin: 1rem 0; box-shadow: var(--shadow); }
.callout { border-left: 4px solid var(--gold); background: var(--card); padding: 1rem 1.2rem; margin: 1.5rem 0; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); }
.ornament { text-align: center; color: var(--gold); margin: 1.5rem 0; letter-spacing: .5em; }

/* home */
.hero { text-align: center; padding: 2rem 1rem 1rem; }
.hero .rose { width: 104px; height: 104px; margin: 0 auto 1rem; display: block; }
.hero h1 { font-size: clamp(34px, 7vw, 52px); }
.hero .divider { color: var(--gold); margin: -.2rem 0 1rem; }
.hero .lead { max-width: 34rem; margin: 0 auto 1.5rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin: 2rem 0; }
.steps .step { text-align: center; padding: 1rem .5rem; }
.steps img { width: 44px; height: 44px; }
.steps p { margin: .4rem 0 0; color: var(--ink); font-weight: 500; }

/* quiz */
.progress { font-size: .85rem; color: var(--soft); margin-bottom: .3rem; font-weight: 600; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 1.5rem; }
.bar > span { display: block; height: 100%; background: var(--teal); transition: width .25s; }
.options { display: grid; gap: .6rem; margin: 1.2rem 0 1.6rem; }
.opt {
  display: flex; align-items: center; gap: .75rem; text-align: left; font: inherit; font-size: 17px; line-height: 1.3; padding: .8rem 1rem; min-height: 50px;
  border: 2px solid var(--line); border-radius: var(--r-md); background: var(--card); color: var(--ink); cursor: pointer;
}
.opt:disabled { opacity: .5; cursor: not-allowed; }
.opt:focus-visible { box-shadow: var(--focus); border-radius: var(--r-md); }
.opt::before { content: ""; flex: none; width: 22px; height: 22px; border: 2px solid #B9AC96; border-radius: 6px; background: #fff; }
.opt:hover { background: #EEF3F0; }
.opt[aria-pressed="true"] { border-color: var(--teal); background: var(--sage); color: var(--midnight); font-weight: 600; }
.opt[aria-pressed="true"]::before {
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
  border-color: var(--teal);
}
.content-grid { display: grid; gap: .9rem; margin: 1.2rem 0 1.6rem; }
.content-grid label { display: grid; gap: .3rem; font-weight: 600; }
select { font: inherit; padding: .55rem; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: #fff; color: var(--ink); min-height: 44px; }

/* results */
.archetype {
  position: relative; overflow: hidden; text-align: center; color: #fff; border-radius: var(--r-xl); padding: 2.2rem 1.4rem; margin: 1rem 0;
  background: radial-gradient(ellipse at 50% 0%, #215C57 0%, #184E4A 55%, #123C39 100%);
  border: 1px solid var(--gold); box-shadow: var(--shadow);
}
.archetype::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(210, 176, 106, .45); border-radius: 10px; pointer-events: none; }
.archetype h2 { color: #fff; font-size: clamp(30px, 6vw, 44px); margin: .3rem 0 .4rem; }
.archetype .divider { color: var(--brass); margin: .2rem 0 .8rem; letter-spacing: .3em; }
.archetype .bgrose { position: absolute; right: -30px; top: -20px; width: 190px; opacity: .1; pointer-events: none; }
.archetype .kicker { text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; color: var(--brass); font-weight: 700; }
.archetype .btn { background: transparent; border-color: var(--brass); color: #fff; position: relative; z-index: 1; }
.archetype .btn:hover { background: rgba(255, 255, 255, .1); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; list-style: none; margin: .5rem 0; }
.chips li { background: var(--sage); color: var(--midnight); border-radius: 99px; padding: .25rem .8rem; font-size: .88rem; font-weight: 500; }
.book h3 { margin: 0 0 .1rem; font-size: 1.35rem; }
.book h3 a { color: var(--midnight); text-decoration: none; }
.book h3 a:hover { text-decoration: underline; }
.book .by { color: var(--soft); margin: 0 0 .6rem; font-size: .92rem; }
.tag-demo { background: var(--warn-bg); color: var(--warn); font-family: var(--sans); font-size: .68rem; font-weight: 700; padding: .12rem .5rem; border-radius: 99px; margin-left: .45rem; vertical-align: middle; letter-spacing: .04em; }
.fit, .misfit { list-style: none; padding: 0; margin: .4rem 0; }
.fit li, .misfit li { padding-left: 1.5rem; position: relative; margin: .2rem 0; }
.fit li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 800; }
.misfit li::before { content: "!"; position: absolute; left: .3rem; color: var(--warn); font-weight: 800; }
.fit .who { color: var(--soft); font-size: .85rem; }
.evidence { display: inline-block; font-size: .75rem; border: 1px solid var(--line); border-radius: 99px; padding: .1rem .6rem; color: var(--soft); background: #fff; }
.star-pick { color: var(--midnight); font-weight: 700; }
.star-pick::before { content: "✦ "; color: var(--gold); }
.consent { border: 2px dashed var(--line); box-shadow: none; }
pre.payload { background: var(--paper); padding: .8rem; border-radius: 8px; font-size: .75rem; overflow-x: auto; }

/* book page */
.facet { margin: .8rem 0; }
.facet h4 { margin: 0 0 .2rem; font-size: .8rem; color: var(--soft); text-transform: uppercase; letter-spacing: .08em; }
table.content { border-collapse: collapse; width: 100%; font-size: .92rem; background: var(--card); }
table.content td { border-bottom: 1px solid var(--line); padding: .5rem .5rem; vertical-align: top; }
.st-confirmed { color: var(--teal); font-weight: 600; }
.st-author, .st-disputed, .st-reported, .st-unknown { color: var(--warn); }

/* contribution form */
input.text, textarea.text { font: inherit; width: 100%; padding: .65rem .8rem; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--ink); margin: .4rem 0; }
input.text:focus, textarea.text:focus { border-color: var(--teal); }
.options.tight { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .45rem; margin: .6rem 0 1rem; }
.options.tight .opt { padding: .55rem .75rem; min-height: 44px; font-size: .93rem; }
details.facet-pick { border-bottom: 1px solid var(--line); padding: .5rem 0; }
details.facet-pick summary { cursor: pointer; font-family: var(--serif); font-weight: 600; color: var(--midnight); padding: .3rem 0; min-height: 36px; }
details summary { cursor: pointer; }
.hint { background: var(--warn-bg); color: var(--warn); font-size: .88rem; padding: .4rem .7rem; border-radius: 8px; margin: 0 0 .6rem; }
fieldset.facts { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem; }
fieldset.facts legend { font-weight: 600; padding: 0 .3rem; }
label.check { display: flex; gap: .5rem; align-items: center; font-weight: normal; min-height: 36px; }

.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--midnight); color: #fff; padding: .6rem 1.2rem; border-radius: 99px; font-size: .92rem; box-shadow: var(--shadow); }

@media (max-width: 600px) {
  :root { font-size: 17px; }
  h1 { font-size: clamp(34px, 9vw, 38px); }
  h1.qtitle { font-size: 26px; }
  h2 { font-size: 28px; }
  .brand img { height: 34px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.found-head { margin: .6rem 0 0; font-weight: 600; color: var(--midnight); }
.opt.pick::before { display: none; }
.opt.pick { border-color: var(--teal); }
.card.dup { border: 2px solid var(--gold); }

.reader-note { margin: .6rem 0; padding: .8rem 1.1rem; background: var(--card); border-left: 4px solid var(--brass); border-radius: var(--r-sm); font-style: italic; }

.card.centered { text-align: center; }
.card.centered p { margin-left: auto; margin-right: auto; max-width: 34rem; }
.callout.centered { text-align: center; border-left: none; border-top: 4px solid var(--gold); }
.xtoggle { display: flex; gap: .5rem; align-items: center; font-size: .95rem; color: var(--soft); margin: .5rem 0 .25rem; }
.readers-note { border-left: 4px solid var(--brass); }
.readers-note h3 { margin-top: 0; }
.callout.growing { margin: .75rem 0; }
.book-collapsed { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.botcheck { margin: .75rem 0; }
.about p { font-size: 1.08rem; line-height: 1.65; }
.about p:last-child { font-style: italic; color: var(--soft); }
