/* the result title font from the FKA design system */
@font-face { font-family: "TT Directors"; src: url("/fonts/TTDirectors-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f6f1ea;
  --card: #fffdf9;
  --text: #2a2522;
  --muted: #7a6f66;
  --line: #e6ddd2;
  --accent: #c8553d;
  --accent-soft: #f3dcd3;
  --accent-text: #fff;
  --ok: #4f7a5a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 6px 20px rgba(60, 40, 20, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1a18;
    --card: #282421;
    --text: #f1ebe4;
    --muted: #a99d92;
    --line: #3a3430;
    --accent: #e0765d;
    --accent-soft: #4a2e26;
    --ok: #8dbb98;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.app {
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.loading { margin: auto; color: var(--muted); }

h1 { font-size: 26px; line-height: 1.25; margin: 8px 0 16px; letter-spacing: -.01em; }
h2 { font-size: 21px; line-height: 1.3; margin: 0 0 12px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 600; }

.screen { display: flex; flex-direction: column; flex: 1; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.spacer { flex: 1; min-height: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 16px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-text);
  transition: transform .08s ease, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn + .btn { margin-top: 10px; }
.btn.secondary { background: var(--accent-soft); color: var(--text); }
.btn.ghost { background: transparent; color: var(--muted); font-weight: 500; padding: 12px; }
.btn:disabled { opacity: .5; cursor: default; }

.points { padding: 0; margin: 0 0 16px; list-style: none; }
.points li { position: relative; padding-left: 26px; margin-bottom: 12px; }
.points li::before {
  content: ""; position: absolute; left: 4px; top: .6em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

/* question screen */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.icon-btn {
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 15px;
  padding: 8px 4px; cursor: pointer;
}
.precision { margin-bottom: 20px; }
.precision-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.precision-row strong { color: var(--text); }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar-wrap { position: relative; }
.mark {
  position: absolute; top: -3px; width: 3px; height: 14px; margin-left: -1.5px;
  background: var(--muted); border-radius: 2px; opacity: .6;
}
.mark.done { background: var(--accent); opacity: 1; }
.mark-label {
  position: absolute; top: 14px; transform: translateX(-50%);
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.mark-label.right { transform: none; }
.precision:has(.mark-label) { margin-bottom: 36px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s ease; }

.statement {
  font-size: 22px; line-height: 1.35; font-weight: 600;
  min-height: 4.2em; display: flex; align-items: center;
  margin: 8px 0 20px;
}
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--card); color: var(--text);
  padding: 14px 16px; font: inherit; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.option .dot {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); display: grid; place-items: center;
}
.option.selected { border-color: var(--accent); background: var(--accent-soft); }
.option.selected .dot { border-color: var(--accent); }
.option.selected .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
@media (hover: hover) { .option:hover { border-color: var(--accent); } }

.see-result { margin-top: 18px; }
.situation { font-size: 21px; line-height: 1.35; font-weight: 600; margin: 8px 0 6px; }
.step-label { font-size: 14px; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.option.choice { align-items: flex-start; font-size: 16px; line-height: 1.4; }
.option.choice .dot { margin-top: 1px; }
.option.picked { opacity: .45; border-style: dashed; }
.compare h3 { margin: 0 0 6px; font-size: 16px; }
.compare-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.compare ol { margin: 0; padding-left: 18px; font-size: 14px; }
.compare li { margin-bottom: 4px; color: var(--muted); }
.compare li.match { color: var(--text); font-weight: 600; }

/* result */
h2.section { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
.list { padding: 2px 14px; }
.sig-list { border: 2px solid var(--accent); }
.srow { padding: 10px 0 12px; }
.srow + .srow { border-top: 1px solid var(--line); }
.srow-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; background: none; color: var(--text); font: inherit; text-align: left;
  padding: 0; margin-bottom: 8px; cursor: pointer;
}
.rank {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--line); color: var(--muted);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.sig-list .rank { background: var(--accent-soft); color: var(--accent); }
.sname { font-weight: 600; font-size: 16px; }
.tag {
  font-size: 11px; font-weight: 600; color: var(--accent); white-space: nowrap;
  border: 1px dashed var(--accent); border-radius: 99px; padding: 0 8px;
}
.chev {
  margin-left: auto; flex: none; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s; margin-right: 4px;
}
.srow-head[aria-expanded="true"] .chev { transform: rotate(-135deg); }
.bar.thin { height: 6px; position: relative; }
.list:not(.sig-list) .bar > i { opacity: .55; }
.bar .unsure {
  position: absolute; top: 0; bottom: 0;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 3px, transparent 3px 7px);
  opacity: .5;
}
.list:not(.sig-list) .bar .unsure { opacity: .3; }
.details { padding-top: 10px; }
.shadow { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border-left: 3px solid var(--muted); }
.shadow-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.shadow p { margin: 0; font-size: 15px; }
.srow-head:focus { outline: none; }
.srow-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.chip {
  display: inline-block; font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px; margin-bottom: 6px;
}
.mirror { margin: 0; font-size: 16px; }
.usage { margin-top: 12px; }
.usage-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.usage-card h3 { font-size: 16px; margin: 0 0 10px; }
.usage-row { padding: 6px 0; }
.usage-row + .usage-row { border-top: 1px solid var(--line); padding-top: 10px; }
.usage-name { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.seg button {
  border: 1.5px solid var(--line); background: transparent; color: var(--text);
  border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.seg button.selected { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.gap-prompt { margin: 8px 0 0; }
.gap-text { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.draft { border: 1.5px dashed var(--accent); border-radius: var(--radius); padding: 12px 14px; margin: 4px 0 6px; }
.draft-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.draft-pct { font-size: 14px; color: var(--muted); white-space: nowrap; }
.draft p { margin-bottom: 10px; }
.locked { display: flex; gap: 12px; align-items: center; border-style: dashed; color: var(--muted); }
.locked p { margin: 0; }
.lock {
  flex: none; width: 14px; height: 11px; border-radius: 2px; background: var(--muted); position: relative; margin-top: 6px;
}
.lock::before {
  content: ""; position: absolute; left: 2px; top: -7px; width: 6px; height: 7px;
  border: 2px solid var(--muted); border-bottom: 0; border-radius: 5px 5px 0 0;
}
.members { margin: 10px 0 0; }
.members strong { color: var(--text); }
.btn.compact { padding: 11px 14px; font-size: 15px; }

.notice { border-left: 3px solid var(--accent); padding: 4px 0 4px 12px; margin: 0 0 16px; font-size: 15px; }
.notice.ok { border-color: var(--ok); }
.bridge { background: var(--text); color: var(--bg); border: 0; }
.bridge .btn { background: var(--bg); color: var(--text); }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100% - 32px); width: max-content;
  background: var(--text); color: var(--bg);
  padding: 12px 16px; border-radius: 12px; font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

/* title (archetype) */
.hero { text-align: center; padding: 22px 18px; }
.hero-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hero-title {
  font-family: "TT Directors", Georgia, serif; font-weight: 700; text-transform: uppercase;
  font-size: 77px; line-height: 1.05; letter-spacing: .01em; margin: 4px 0 10px;
  white-space: nowrap;   /* never break inside a word; fitHeroTitle() shrinks the size to fit */
}
.hero-essence { font-size: 16px; margin: 0 0 12px; }
.hero-top { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.hero-top .usage-label { display: block; margin-bottom: 2px; font-weight: 400; }
.hero .shadow, .hero .fields { text-align: left; }
.fields { margin: 12px 0 16px; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.fields-hint { margin: 0 0 6px; font-size: 13px; font-style: italic; color: var(--muted); }
.fields ul { margin: 0; padding-left: 18px; font-size: 15px; }
h1.h-section { font-size: 22px; margin-top: 18px; }

/* live hints */
.pulse { min-height: 20px; font-size: 13px; color: var(--accent); font-weight: 600; margin: -10px 0 8px; }
.pulse.flash { animation: pulse-in .6s ease; }
@keyframes pulse-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* main call to action: continue the test */
.btn.cta {
  padding: 19px 18px; font-size: 18px; font-weight: 700;
  box-shadow: 0 6px 18px rgba(200, 85, 61, .35);
}
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.sticky-cta .btn { max-width: 488px; margin: 0 auto; }
.sticky-cta[hidden] { display: none; }
.screen:has(.sticky-cta:not([hidden])) { padding-bottom: 96px; }

/* where this can grow — dark block leading into the product */
.growth { padding: 22px 18px 18px; }
.growth-label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; opacity: .7; margin-bottom: 14px; }
.growth-part + .growth-part { margin-top: 18px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.growth h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.3; }
.growth p { margin: 0 0 10px; }
.growth .hypothesis { opacity: .8; font-style: italic; }
.growth .hypothesis strong { font-style: normal; color: var(--accent-soft); }
.growth { margin-top: 18px; }
.growth .btn {
  margin-top: 20px; padding: 18px; font-size: 17px; font-weight: 700; line-height: 1.3;
  background: var(--accent); color: var(--accent-text);
  box-shadow: 0 6px 20px rgba(200, 85, 61, .45);
}

/* "how much is this you" 1..10 */
.rating h3 { margin: 0 0 12px; font-size: 18px; }
.scale10 { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.scale10 button {
  height: 36px; min-width: 0; padding: 0; border: 1.5px solid var(--line); border-radius: 8px;
  background: transparent; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.scale10 button.selected { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
@media (hover: hover) { .scale10 button:hover { border-color: var(--accent); } }
.scale10-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.rating-thanks { margin: 10px 0 0; }
.accuracy { font-weight: 600; color: var(--accent); }

/* sphere slider inside the dark block */
.spheres {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -18px; padding: 2px 18px 6px; scroll-padding: 0 18px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.spheres::-webkit-scrollbar { display: none; }
.sphere {
  flex: 0 0 86%; scroll-snap-align: start;
  border-radius: 14px; padding: 16px;
  background: color-mix(in srgb, currentColor 15%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 14%, transparent);
}
.sphere-title { font-size: 26px; line-height: 1.15; font-weight: 700; margin-bottom: 14px; }
.sphere-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; opacity: .65; margin-bottom: 4px; }
/* two-tone card: the barrier sits in its own tinted part under a "boom gate" stripe */
.sphere { display: flex; flex-direction: column; overflow: hidden; }
.sphere-barrier {
  position: relative; margin: 16px -16px -16px; padding: 22px 16px 16px; flex: 1;
  background: rgba(200, 85, 61, .28);
}
.sphere-barrier::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: repeating-linear-gradient(-45deg, #c8553d 0 10px, #f6f1ea 10px 20px);
}
.sphere-label.barrier { color: #f6f1ea; opacity: .9; }
.sphere p { margin: 0; font-size: 16px; line-height: 1.45; }
.sphere-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.sphere-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .3; transition: opacity .2s, width .2s; }
.sphere-dots i.on { opacity: 1; width: 16px; border-radius: 3px; }

/* more air at the top of the result screen */
.screen > .eyebrow:first-child { margin: 12px 0 16px; }
.screen > .eyebrow:first-child + .hero { padding-top: 30px; }

/* the six totems on one sheet on the welcome screen */
.virtue-marks { margin: -16px 0 4px; text-align: center; }   /* chains run up to the top of the screen */
.virtue-marks-caption { text-align: center; margin: 0 0 22px; }
.science { margin: 14px 0 4px; padding: 10px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.science summary { cursor: pointer; font-weight: 600; color: var(--text); }
.science p { margin: 8px 0 0; line-height: 1.45; }

/* totem pendants hanging on thin infographic chains (one line per bail) */
.pendant { --chain: 24px; --h: 112px; display: inline-block; max-width: 100%; padding-top: var(--chain); vertical-align: bottom; }
.pendant-box { position: relative; display: block; }
.pendant img {
  position: relative; z-index: 1; display: block; width: auto; height: auto; max-width: 100%; max-height: var(--h);
}
.pendant .chain {
  position: absolute; z-index: 0; overflow: visible;
  top: calc(-1 * var(--reach, var(--chain))); height: calc(var(--reach, var(--chain)) + var(--y));
  fill: none; stroke: #483c32; stroke-width: 1; opacity: .12;   /* taupe */
}
/* on the result screen every pendant is drawn at one scale (source pixels × 0.2), so a turtle is never bigger than an owl */
.pendant.large { --h: none; --chain: 0px; --reach: 900px; }   /* threads run up to the card edge, the card clips them */
.hero { position: relative; overflow: hidden; }
.hero-eyebrow { position: relative; z-index: 2; }
.pendant.large img { width: calc(var(--sw) * 0.2px); }
.hero-pendant { display: flex; justify-content: center; margin: 24px 0 -24px; }   /* ~30px from the text to the top of the figure (images keep ~6px of padding) */
.pendant.wide { --h: none; --chain: 36px; }

/* the title sits under the pendants: the figure overlaps its top a little */
.hero-title { position: relative; z-index: 0; color: #bdada0; }   /* FKA taupe */
