/* tiun atlas v2: shared base for the story pages (canvas, journey). Light ground, white sheet, ink outlines. */
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --ground: #eceef2;
  --sheet: #ffffff;
  --ink: #14161c;
  --ink-2: #434857;
  --line: #cfd4dd;
  --focus: #1f4fff;
  /* one hue per pairing: what the customer feels and what tiun puts against it share a colour */
  --job: #ffe07a;        --job-ink: #3f3200;
  --pain: #ffb9ad;       --pain-ink: #5a160c;
  --reliever: #ffd9d1;   --reliever-ink: #5a160c;
  --gain: #b4e3a8;       --gain-ink: #133a10;
  --creator: #d6f0cd;    --creator-ink: #133a10;
  --product: #b9d6ff;    --product-ink: #0d2c59;
  --pain-line: #c2371f;
  --gain-line: #2c7a22;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--ground); color: var(--ink); scrollbar-color: #a9b0bd var(--ground); }
body { margin: 0; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
::selection { background: var(--job); color: var(--job-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 12px; background: var(--ink); color: #fff; border-radius: 6px; }
.skip:focus { top: 8px; }
.nojs { padding: 24px; }

/* ---- top bar */
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px 24px; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar__mark { font-weight: 650; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.bar__page { color: var(--ink-2); font-size: 14px; padding-left: 16px; border-left: 1px solid var(--line); }
.bar__nav { display: flex; gap: 2px; padding-left: 14px; border-left: 1px solid var(--line); }
.bar__nav a { padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-size: 14px; font-weight: 520; text-decoration: none; transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.bar__nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.6); }
.bar__nav a[aria-current="page"] { color: var(--ink); font-weight: 620; box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
.bar__tabs { margin-left: auto; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: #dfe3ea; border-radius: 10px; }
.seg__btn { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font-size: 14px; font-weight: 520; color: var(--ink-2); cursor: pointer; transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.seg__btn:hover { color: var(--ink); background: rgba(255, 255, 255, 0.55); }
.seg__btn[data-persona]:not([data-persona=""])::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--dot); box-shadow: inset 0 0 0 1.2px var(--ink); }
[data-persona="founder"] { --dot: #a995ff; } [data-persona="developer"] { --dot: #6fcacd; } [data-persona="operator"] { --dot: #ffab5c; } [data-persona="end-customer"] { --dot: #ff8fc1; }
.portrait { display: block; flex: none; }
.seg__btn[aria-selected="true"], .seg__btn[aria-pressed="true"] { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 22, 28, 0.14), 0 2px 6px -2px rgba(20, 22, 28, 0.18); }

/* ---- the sheet: headings, the canvas, the key */
main { padding: 0 24px 56px; }
main:focus { outline: none; }
.scroller { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
.ev { width: 0.5em; height: 0.5em; border-radius: 50%; background: currentColor; flex: none; }
.ev--assumed { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.textbtn { border: 0; padding: 0; background: none; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: #9aa1af; text-underline-offset: 3px; cursor: pointer; }
.textbtn:hover { text-decoration-color: var(--ink); }

/* ---- detail card */
.card { position: absolute; z-index: 20; width: 348px; max-height: min(520px, 80vh); overflow: auto; padding: 18px 20px 20px; background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 4px rgba(20, 22, 28, 0.08), 0 18px 40px -12px rgba(20, 22, 28, 0.32); animation: card-in 240ms var(--ease); scrollbar-width: thin; }
@keyframes card-in { from { opacity: 0; translate: 0 6px; scale: 0.98; } }
.card__close { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; }
.card__close:hover { background: var(--ground); color: var(--ink); }
.card__title { margin: 0 36px 0 0; font-size: 19px; line-height: 1.25; font-weight: 640; letter-spacing: -0.012em; text-wrap: balance; }
.card__title:focus { outline: none; }
.card__meta { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; box-shadow: inset 0 0 0 1px rgba(20, 22, 28, 0.18); }
.swatch--job { background: var(--job); } .swatch--pain { background: var(--pain); } .swatch--reliever { background: var(--reliever); }
.swatch--gain { background: var(--gain); } .swatch--creator { background: var(--creator); } .swatch--product { background: var(--product); }
.card__text { margin: 14px 0 0; font-size: 16px; line-height: 1.5; }
.card__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }
.card__line .ev { align-self: center; width: 9px; height: 9px; color: var(--ink); }
.card__key { color: var(--ink); font-weight: 600; }
.card__src, .row { font-size: 14px; }
.card__src { margin-top: 10px; color: var(--ink-2); }
.card__src summary { cursor: pointer; color: var(--ink); font-weight: 560; width: fit-content; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.card__src p { margin: 6px 0 0; overflow-wrap: anywhere; }
.card__sub { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 640; }
.card__gap { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
.card__links, .card__list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.linkbtn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--sheet); font-size: 14px; font-weight: 520; text-align: left; cursor: pointer; transition: background-color 140ms var(--ease), border-color 140ms var(--ease); }
.linkbtn:hover { background: var(--ground); border-color: #aeb5c2; }
.card__list li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.card__list li:first-child { border-top: 0; padding-top: 4px; }
.card__list span { color: var(--ink-2); }

/* ---- under the canvas */
.below { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 1180px; margin: 56px auto 0; }
.below h2 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 640; letter-spacing: -0.015em; }
.below__sub { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }
.insight { margin: 12px 0 0; font-size: 20px; line-height: 1.4; font-weight: 500; letter-spacing: -0.01em; max-width: 34ch; text-wrap: pretty; }
.rows { margin-top: 16px; border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); }
.row > summary { display: flex; align-items: center; gap: 10px; padding: 12px 2px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 540; }
.row > summary::-webkit-details-marker { display: none; }
.row > summary::before { content: ""; width: 8px; height: 8px; flex: none; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); rotate: -45deg; transition: rotate 160ms var(--ease); }
.row[open] > summary::before { rotate: 45deg; }
.row > summary:hover .row__title { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #9aa1af; }
.row__body { padding: 0 2px 16px 20px; max-width: 68ch; }
.row__body .card__text { margin-top: 0; font-size: 15px; }
.learn { margin: 0; padding-left: 38px; display: grid; gap: 6px; font-size: 15px; color: var(--ink-2); }
.credit { max-width: 1180px; margin: 40px auto 0; color: var(--ink-2); font-size: 13px; }

/* ---- presenter tour: a Present button in the top bar, and a bar at the bottom that steps through the stops */
.present { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px 7px 11px; border: 0; border-radius: 9px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 140ms var(--ease); }
.present:hover { background: #2a2e3a; }
.present[aria-pressed="true"] { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.present[aria-pressed="true"] svg { display: none; }
.present[aria-pressed="true"] { padding-left: 14px; }
body.is-touring { padding-bottom: 96px; }
.tour { position: fixed; z-index: 40; left: 50%; bottom: 14px; translate: -50% 0; width: min(1080px, calc(100vw - 28px)); display: flex; align-items: center; gap: 12px; padding: 9px 10px 8px 12px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: 0 2px 4px rgba(20, 22, 28, 0.2), 0 18px 40px -14px rgba(20, 22, 28, 0.6); animation: tour-in 360ms var(--ease); }
@keyframes tour-in { from { translate: -50% 24px; opacity: 0; } }
.tour__prog { position: absolute; left: 14px; right: 14px; top: 0; display: flex; gap: 3px; }
.tour__prog span { flex: 1; height: 3px; border-radius: 0 0 2px 2px; background: #4a5061; transition: background-color 240ms var(--ease); }
.tour__prog span.is-done { background: var(--job); }
.tour__btn { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; min-width: 36px; padding: 0 9px; justify-content: center; border: 0; border-radius: 9px; background: #2c303c; color: #fff; font-size: 14px; font-weight: 560; cursor: pointer; transition: background-color 140ms var(--ease); }
.tour__btn:hover:not(:disabled) { background: #3d4252; }
.tour__btn:disabled { opacity: 0.4; cursor: default; }
.tour__btn:focus-visible { outline-color: #fff; }
.tour__btn--next { background: var(--job); color: var(--job-ink); padding: 0 10px 0 14px; max-width: min(42%, 330px); }
.tour__btn--next:hover:not(:disabled) { background: #ffe9a0; }
.tour__btn--quit { background: transparent; color: #c9cedb; }
.tour__up { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour__count { flex: none; font-size: 14px; font-weight: 600; color: #c9cedb; font-variant-numeric: tabular-nums; }
.tour__body { flex: 1; min-width: 0; margin: 0; display: grid; gap: 1px; line-height: 1.3; }
.tour__t { font-size: 16px; font-weight: 620; letter-spacing: -0.008em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour__n { font-size: 14px; color: #dfe2ea; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-wrap: pretty; }
body.is-touring .card { max-height: min(520px, calc(100vh - 190px)); }
body.is-touring .stepnavs__hint { display: none; }

/* ---- phones */
@media (max-width: 700px) {
  .bar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .bar__page { display: none; }
  .bar__nav { order: 2; width: 100%; padding-left: 0; border-left: 0; }   /* four views need a row of their own */
  .bar__tabs { margin-left: 0; order: 3; width: 100%; }
  .bar__tabs .seg { display: flex; }
  .bar__tabs .seg__btn { flex: 1; padding: 7px 4px; font-size: 13px; white-space: nowrap; }
  .bar__tabs .seg__btn[data-persona]::before { display: none; }
  .bar__view { margin-left: auto; }
  .present { margin-left: auto; padding: 6px 11px 6px 9px; font-size: 13px; }
  .bar__view + .present { margin-left: 0; }
  body.is-touring { padding-bottom: 150px; }
  .tour { flex-wrap: wrap; gap: 8px; padding: 12px 10px 10px; bottom: 8px; width: calc(100vw - 16px); }
  .tour__body { order: -1; flex-basis: 100%; }
  .tour__t { white-space: normal; }
  .tour__n { display: block; }
  .tour__count { margin: 0 2px; }
  .tour__btn--next { flex: 1; min-width: 0; max-width: none; justify-content: space-between; }
  main { padding: 0 16px 40px; }
  .scroller { overflow: visible; margin: 0; padding: 0; }
  .card { position: fixed; left: 8px !important; right: 8px; top: auto !important; bottom: 8px; width: auto; max-height: 70vh; }
  .below { grid-template-columns: 1fr; gap: 36px; margin-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .seg__btn, .bar__nav a, .row > summary::before, .linkbtn, .tour, .tour__prog span { transition-duration: 1ms; animation-duration: 1ms; }
}
