/* PsyWeave marketing site. Light page for a daylight consulting room; the app's own light workbench is the product material. */

:root {
  --ground: #eff1f3;
  --ground-raise: #e6e9ed;
  --card: #e3e6ea;
  --paper: #ffffff;
  --line: #d2d6dd;
  --line-strong: #b9bfc9;
  --ink: #15171c;
  --ink-2: #444b59;
  --ink-3: #5e6675;

  /* app material: the desktop app's light theme (theme.py, docs/DESIGN.md) */
  --app-ground: #f4f5f7;
  --app-surface: #ffffff;
  --app-field: #f7f8fa;
  --app-hover: #eef0f3;
  --app-line: #e6e8ec;
  --app-line-strong: #b6bcc6;
  --app-ink: #25272d;
  --app-ink-2: #555b66;
  --app-ink-3: #636874;
  --app-iris: #6354c7;
  --app-iris-hover: #594bb3;
  --app-iris-soft: #eeebfa;
  --app-success: #26735d;
  --wheel-emotions: #c2410c; /* note_labels.WHEEL_COLORS: data only */

  --iris: #7f70e8;
  --iris-ink: #5444c2;

  /* category colours from the app (taxonomy.NODE_COLORS): data only */
  --c-emotion: #788e16;
  --c-thought: #8b5cf6;
  --c-behaviour: #f472b6;
  --c-person: #10b981;
  --c-trigger: #dc2626;
  --c-body: #fb7185;

  --display: "Noto Serif Display", "Times New Roman", serif;
  --text: "Commissioner", "Segoe UI", system-ui, sans-serif;
  --app-font: "Segoe UI", "Commissioner", system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: 24px;
  --radius: 18px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--iris-ink); outline-offset: 3px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 42px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 8px;
  font-size: 15px; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out), transform .2s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 50px; padding: 0 20px; font-size: 16px; }

.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #2a2e38; }

.btn-quiet { background: var(--ground-raise); color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: #dde1e7; border-color: var(--line-strong); }

.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-paper:hover { border-color: var(--line-strong); }

/* the one recurring brand mark: an iris square carrying an arrow */
.btn-mark {
  position: relative; flex: none;
  width: 20px; height: 20px; border-radius: 4px;
  background: var(--iris);
}
.btn-mark::after {
  content: ""; position: absolute; inset: 0;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10h8M10.5 6.5 14 10l-3.5 3.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10h8M10.5 6.5 14 10l-3.5 3.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
  transition: transform .25s var(--ease-out);
}
.btn:hover .btn-mark::after { transform: translateX(2px); }

.text-link {
  display: inline-block; margin-top: 8px;
  font-weight: 600; color: var(--iris-ink); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.text-link:hover { color: var(--ink); }

/* ---------- Announcement + header ---------- */

.announce { background: var(--ink); color: #d9dce3; font-size: 13.5px; }
.announce p { margin: 0; padding: 9px var(--gutter); text-align: center; }
.announce-tag {
  display: inline-block; margin-right: 10px; padding: 3px 7px; border-radius: 4px;
  border: 1px solid var(--iris); color: #cfc8ff; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  vertical-align: 1px;
}
.announce a { color: #fff; margin-left: 8px; text-underline-offset: 3px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(239, 241, 243, 0.92);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: rgba(239, 241, 243, 0.8); backdrop-filter: saturate(1.4) blur(14px); }
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-row { display: flex; align-items: center; gap: 28px; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand img { border-radius: 8px; }

.nav { display: flex; gap: 26px; margin: 0 auto; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); padding: 6px 0; white-space: nowrap; }
.nav a:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.lang { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--ground-raise); border: 1px solid var(--line); }
.lang button {
  border: 0; background: transparent; cursor: pointer;
  min-width: 36px; height: 30px; padding: 0 8px; border-radius: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-3);
}
.lang button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(21, 23, 28, .12); }

.menu-toggle { display: none; }

/* seven links and the language tray need about 1180px; below that the nav folds into the menu */
@media (max-width: 1180px) {
  .header-row { gap: 12px; height: 64px; }
  .header-actions { margin-left: auto; }
  .menu-toggle {
    display: inline-grid; place-items: center;
    width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--line);
    background: var(--paper); cursor: pointer;
  }
  .menu-bars, .menu-bars::before, .menu-bars::after {
    display: block; width: 18px; height: 1.8px; background: var(--ink); border-radius: 2px;
    transition: transform .25s var(--ease-out), opacity .2s ease;
  }
  .menu-bars { position: relative; }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -6px; }
  .menu-bars::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; margin: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--ground); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -20px rgba(21, 23, 28, .35);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .35s var(--ease-out), visibility 0s linear .35s;
  }
  .nav.is-open { clip-path: inset(0 0 -40px 0); visibility: visible; transition: clip-path .35s var(--ease-out), visibility 0s; }
  .nav a { font-size: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
}

/* ---------- Hero ---------- */

.hero { padding: 72px 0 0; }
.demo-wrap { margin-top: 56px; }
.hero-inner { text-align: center; }

h1, .section-title {
  font-family: var(--display);
  font-stretch: 72%;
  font-variation-settings: "wdth" 72;
  font-weight: 400;
  letter-spacing: -0.012em;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2.6rem, 6.2vw, 5.4rem); line-height: 1.02; }

.hero-lede {
  max-width: 35em; margin: 28px auto 0;
  font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--ink-2); text-wrap: pretty;
}
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-meta { margin: 20px 0 0; font-size: 13.5px; color: var(--ink-3); }

.audience {
  list-style: none; margin: 72px 0 0; padding: 26px 0;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.audience li {
  font-family: var(--display); font-variation-settings: "wdth" 80; font-stretch: 80%;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem); color: var(--ink-2);
  padding: 0 clamp(16px, 3vw, 40px);
}
.audience li + li { border-left: 1px solid var(--line-strong); }

/* ---------- Section scaffolding ---------- */

section { position: relative; }
.section-title { font-size: clamp(2.1rem, 4.4vw, 3.6rem); line-height: 1.05; text-align: center; }
.section-title-left { text-align: left; }
.section-lede { max-width: 38em; margin: 18px auto 0; text-align: center; color: var(--ink-2); font-size: 1.08rem; text-wrap: pretty; }
.sub-title {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-variation-settings: "wdth" 72; font-stretch: 72%;
  font-size: clamp(1.7rem, 2.6vw, 2.25rem); line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance;
}

/* ---------- Demo: a slice of the app's light workbench ---------- */

.demo-frame {
  padding: clamp(10px, 2vw, 22px);
  background: var(--card); border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -48px rgba(21, 23, 28, .45);
}

.app-window {
  background: var(--app-surface); color: var(--app-ink);
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line-strong);
  font-family: var(--app-font); font-size: 13px;
}
.app-bar { display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--app-line); }
.app-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.app-brand img { border-radius: 4px; }
.app-back { padding: 5px 10px; border: 1px solid var(--app-line); border-radius: 8px; font-size: 12.5px; color: var(--app-ink); white-space: nowrap; }
.app-sep { color: var(--app-line-strong); }
.app-patient { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-tools { display: flex; gap: 6px; margin-left: auto; }
.app-tools > span { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--app-line); border-radius: 8px; font-size: 11px; font-weight: 600; color: var(--app-iris); }
.app-moon::before { content: ""; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset -3px -2px 0 0 var(--app-iris); transform: rotate(-20deg); }

.app-tabs { display: flex; gap: 4px; height: 40px; padding: 0 8px; border-bottom: 1px solid var(--app-line); }
.app-tab { display: inline-flex; align-items: center; padding: 0 12px; color: var(--app-ink-2); border-bottom: 2px solid transparent; }
.app-tab.is-active { color: var(--app-iris); border-bottom-color: var(--app-iris); }

.app-body { display: grid; grid-template-columns: minmax(250px, 290px) minmax(0, 1fr) minmax(240px, 280px); min-height: 540px; }

.note-pane { display: flex; flex-direction: column; gap: 12px; padding: 20px 18px; border-right: 1px solid var(--app-line); background: var(--app-surface); }
.note-kicker { margin: 0; color: var(--app-iris); font-size: 12.5px; }
.note-heading { margin: -4px 0 4px; font-size: 19px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.note-count { margin: 0 0 -4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--app-ink-2); }
.note-tick { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border-radius: 4px; background: var(--app-iris) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2 5 8.2l4-4.4' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; }
.note-card { background: var(--app-iris-soft); border-radius: 10px; padding: 13px 14px; }
.note-date { margin: 0 0 8px; color: var(--app-ink); font-size: 12.5px; font-weight: 600; }
.note-text { margin: 0; font-size: 13.5px; line-height: 1.62; color: var(--app-ink); }

.note-text mark {
  background: transparent; color: inherit;
  border-radius: 3px; padding: 0 1px;
  box-shadow: inset 0 -1px 0 rgba(85, 91, 102, .35);
  transition: background-color .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.app-window[data-state="analysing"] .note-text mark,
.note-text mark.is-lit {
  background: color-mix(in srgb, var(--mark) 22%, transparent);
  box-shadow: inset 0 -2px 0 var(--mark);
}
.app-window[data-state="analysing"] .note-text mark { transition-delay: calc(var(--i) * 140ms); }

.app-primary {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 14px; border-radius: 9px; border: 0; cursor: pointer;
  background: var(--app-iris); color: #fff; font-weight: 600; font-size: 13.5px;
}
.app-primary:hover { background: var(--app-iris-hover); }
.app-primary:disabled { background: var(--app-hover); color: var(--app-ink-3); cursor: default; }
.app-primary-sm { min-height: 34px; font-size: 13px; }
.app-spinner { display: none; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(99, 84, 199, .25); border-top-color: var(--app-iris); animation: spin .8s linear infinite; }
.app-window[data-state="analysing"] .app-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.app-ghost { min-height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--app-line); background: var(--app-surface); color: var(--app-ink); cursor: pointer; font-size: 13px; }
.app-ghost:hover { border-color: var(--app-line-strong); }

.note-fine { margin: auto 0 0; font-size: 11.5px; line-height: 1.5; color: var(--app-ink-3); }

.canvas { position: relative; overflow: hidden; background: var(--app-ground); }
.canvas svg { display: block; width: 100%; height: 100%; min-height: 540px; }

.g-node rect { fill: var(--app-surface); stroke: var(--col); stroke-width: 1.6; }
.g-node .g-cat { fill: var(--app-ink-2); font-size: 10.5px; font-family: var(--app-font); }
.g-node .g-title { fill: var(--app-ink); font-size: 13.5px; font-weight: 600; font-family: var(--app-font); }
.g-node .g-dot { fill: var(--col); }
.g-node .g-badge rect { fill: var(--app-surface); stroke: var(--col); stroke-width: 1.3; }
.g-node .g-badge text { fill: var(--app-ink); font-size: 10.5px; font-weight: 700; font-family: var(--app-font); text-anchor: middle; }
.g-node { opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity .5s var(--ease-out), transform .6s var(--ease-out); transform: translateY(8px) scale(.96); transition-delay: calc(var(--i, 0) * 80ms); }
.g-node:hover rect { fill: var(--app-field); }
.g-node.is-proposed { opacity: 1; transform: none; }
.g-node.is-proposed > rect { stroke-dasharray: 5 4; }
.g-node.is-kept { opacity: 1; transform: none; }
.g-node.is-dropped { opacity: .16; }
.g-node.is-existing { opacity: 1; transform: none; }
.g-node .g-tag { fill: var(--app-ink-3); font-size: 11px; font-family: var(--app-font); transition: fill .3s ease; }
.g-node.is-enriched > rect { stroke-width: 2.8; }
.g-node.is-enriched .g-tag { fill: var(--app-success); }

.g-edge { fill: none; stroke: #9aa1ad; stroke-width: 1.4; marker-end: url(#arrow); opacity: 0; transition: opacity .3s ease; }
.g-edge.is-proposed { opacity: .7; stroke-dasharray: 4 4; }
.g-edge.is-kept { opacity: 1; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw .9s var(--ease-out) forwards; animation-delay: var(--d, 0ms); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* The review sits beside the canvas as a docked panel, so the proposals it lists are never covered. */
.review { display: flex; flex-direction: column; background: var(--app-surface); border-left: 1px solid var(--app-line); }
.review-head { padding: 20px 18px 14px; border-bottom: 1px solid var(--app-line); }
.review-title { margin: 0; font-weight: 700; font-size: 14px; }
.review-sub { margin: 4px 0 0; color: var(--app-ink-2); font-size: 12.5px; line-height: 1.45; min-height: 2.9em; }
.review-list { list-style: none; margin: 0; padding: 8px; flex: 1; overflow: auto; }
.review-list li { animation: rise .45s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.review-foot button { display: none; }
.app-window[data-state="review"] #demo-cancel,
.app-window[data-state="review"] #demo-accept,
.app-window[data-state="done"] #demo-replay,
.app-window[data-state="cancelled"] #demo-replay { display: inline-flex; align-items: center; }
.app-window[data-state="idle"] .review-foot,
.app-window[data-state="analysing"] .review-foot { visibility: hidden; }
.app-window[data-state="done"] .review-list label { cursor: default; }
.app-window[data-state="done"] .review-list label:hover { background: transparent; }
.review-list label { display: grid; grid-template-columns: 18px 8px 1fr auto; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; cursor: pointer; }
.review-list label:hover { background: var(--app-hover); }
.review-list input { accent-color: var(--app-iris); width: 15px; height: 15px; margin: 0; }
.review-list .r-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--col); }
.review-list .r-title { font-size: 13px; }
.review-list .r-cat { font-size: 11px; color: var(--app-ink-3); }
.review-list .r-new { font-size: 10.5px; color: var(--app-iris); font-weight: 600; }
.review-list .r-enrich { color: var(--app-success); }
.review-list .r-title-wrap { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.review-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--app-line); }

.steps {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  counter-reset: step;
}
.steps li { counter-increment: step; padding: 6px 20px 4px; border-left: 1px solid var(--line-strong); font-size: 14.5px; color: var(--ink-2); }
.steps li:first-child { border-left: 0; padding-left: 4px; }
.steps strong { display: block; color: var(--ink); font-size: 15.5px; margin-bottom: 3px; }
.steps strong::before { content: counter(step) ". "; color: var(--iris-ink); }

.demo-caption { margin: 18px 4px 2px; font-size: 12.5px; color: var(--ink-3); }

/* ---------- Stacked product cards ---------- */

.screens { padding: 120px 0 60px; }
.stack { margin-top: 56px; }

.stack-card {
  position: sticky; top: 100px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: 560px; margin-bottom: 64px;
  background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: 0 -2px 0 rgba(255, 255, 255, .6) inset, 0 30px 60px -36px rgba(21, 23, 28, .5);
}
.stack-card:nth-child(2) { top: 128px; background: #dce1e7; }
.stack-card:nth-child(3) { top: 156px; background: #e4e2ec; }
.stack-card:nth-child(4) { top: 184px; background: #dfe5e3; }

.stack-text { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 56px 48px; }
.stack-num { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--iris-ink); }
.stack-text h3 { margin: 0; font-family: var(--display); font-weight: 400; font-variation-settings: "wdth" 72; font-stretch: 72%; font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.05; letter-spacing: -0.01em; }
.stack-text p:not(.stack-num) { margin: 18px 0 0; color: var(--ink-2); max-width: 32em; text-wrap: pretty; }

/* the app screenshot sits on the card like a window, bleeding off the right and bottom edges */
.stack-visual { position: relative; overflow: hidden; }
.stack-visual picture { position: absolute; left: 36px; top: 44px; width: calc(100% + 120px); }
.stack-visual img {
  width: 100%; max-width: none;
  border-radius: 10px 0 0 0; border: 1px solid var(--line-strong); border-right: 0; border-bottom: 0;
  box-shadow: 0 24px 50px -30px rgba(21, 23, 28, .45);
}

/* ---------- From paper: a photographed page becomes a note ---------- */

.paper { padding: 100px 0 120px; border-top: 1px solid var(--line); }
.paper-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: center; }
.paper-text > p { color: var(--ink-2); margin: 20px 0 0; max-width: 32em; text-wrap: pretty; }
.paper-points { list-style: none; margin: 28px 0 0; padding: 0; max-width: 34em; }
.paper-points li { padding: 12px 0; border-top: 1px solid var(--line-strong); color: var(--ink-2); text-wrap: pretty; }
.paper-points li:last-child { border-bottom: 1px solid var(--line-strong); }
.paper-points b { color: var(--ink); font-weight: 600; }
.paper-text .paper-fine { font-size: 13px; color: var(--ink-3); }

.paper-visual { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; }
.paper-page {
  position: relative; padding: 26px 22px 30px 34px; transform: rotate(-2deg);
  background: #fffdf7 repeating-linear-gradient(to bottom, transparent 0 31px, #dfe6f0 31px 32px);
  background-position: 0 14px;
  border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 30px 60px -40px rgba(21, 23, 28, .5);
}
.paper-page::before { content: ""; position: absolute; top: 0; bottom: 0; left: 22px; width: 1px; background: #f0b8b8; }
.hand, .hand-date { margin: 0; font-family: "Mansalva", "Segoe Print", cursive; color: #1e3a8a; font-size: 19px; line-height: 32px; }
.hand-date { text-align: right; }
.paper-arrow { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--iris-ink); }
.paper-arrow::before { content: ""; width: 34px; height: 34px; border-radius: 50%; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10h10M11 6l4 4-4 4' fill='none' stroke='%235444c2' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; border: 1px solid var(--line); }
.paper-note { padding: 18px 18px 20px; background: var(--app-surface); border: 1px solid var(--line-strong); border-radius: 12px; font-family: var(--app-font); box-shadow: 0 30px 60px -40px rgba(21, 23, 28, .45); }
.paper-note-head { display: flex; flex-direction: column; margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--app-line); font-size: 12px; color: var(--app-ink-2); }
.paper-note-head span + span { color: var(--app-ink); font-weight: 600; font-size: 14px; }
.paper-note-text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--app-ink); }
.paper-note-text mark { background: var(--app-iris-soft); color: var(--app-iris); font-weight: 600; border-radius: 3px; padding: 0 2px; }

/* ---------- Three ways to mark a note ---------- */

.marking { padding: 100px 0 120px; border-top: 1px solid var(--line); }
.marks { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 56px; border-top: 1px solid var(--line-strong); }
.mark-item { padding: 28px 28px 8px; border-left: 1px solid var(--line); }
.mark-item:first-child { border-left: 0; padding-left: 0; }
.mark-item h3 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.mark-item p { margin: 8px 0 0; color: var(--ink-2); text-wrap: pretty; }
.mark-item .mark-sample { margin: 0 0 18px; font-family: var(--app-font); font-size: 15px; color: var(--ink); }
.sample-tag { text-decoration: underline; text-decoration-color: var(--app-iris); text-decoration-thickness: 2px; text-underline-offset: 4px; background: var(--app-iris-soft); padding: 1px 3px; border-radius: 3px; }
.sample-hl { background: #fde68a; padding: 1px 3px; border-radius: 3px; }
.sample-label { display: inline-flex; align-items: center; gap: 7px; }
.sample-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--col); }

.wheel-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: center; margin-top: 88px; }
.wheel-text p { color: var(--ink-2); margin: 18px 0 0; max-width: 32em; text-wrap: pretty; }
.wheel-text .wheel-try { color: var(--ink); font-weight: 600; margin-top: 28px; }
.wheel-fine { font-size: 13px; color: var(--ink-3) !important; }

.wheel-strip { margin-top: 12px; padding: 14px 16px; min-height: 64px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-family: var(--app-font); font-size: 14px; }
.ws-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 !important; color: var(--ink) !important; }
.ws-row + .ws-row { margin-top: 6px !important; }
.ws-wheel { border: 0; background: none; padding: 0; cursor: pointer; color: var(--app-iris); font-weight: 600; }
.ws-wheel:hover { text-decoration: underline; }
.ws-chip { display: inline-flex; align-items: center; gap: 6px; }
.ws-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--col); }
.ws-x { border: 0; background: none; padding: 0 2px; cursor: pointer; color: var(--app-iris); font-size: 12px; }
.ws-empty { margin: 0 !important; color: var(--ink-3) !important; }

.wheel-panel {
  justify-self: center; width: 100%; max-width: 520px;
  padding: 22px 24px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 30px 60px -44px rgba(21, 23, 28, .45);
  font-family: var(--app-font);
}
.wheel-panel-title { margin: 0; font-size: 16px; font-weight: 600; }
.wheel-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.wheel-tabs button {
  min-height: 34px; padding: 0 12px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--app-line); background: var(--app-surface); color: var(--app-ink); font-size: 13.5px;
}
.wheel-tabs button:hover { border-color: var(--app-line-strong); }
.wheel-tabs button[aria-selected="true"] { background: var(--app-iris-soft); border-color: color-mix(in srgb, var(--app-iris) 30%, transparent); color: var(--app-iris); }

.wheel { display: block; width: 100%; max-width: 420px; margin: 10px auto 0; overflow: visible; }
.w-seg { cursor: pointer; outline: none; }
.w-seg .w-fill { fill: var(--col); fill-opacity: .14; stroke: var(--paper); stroke-width: 2.5; transition: fill-opacity .2s ease; }
.w-seg:hover .w-fill { fill-opacity: .3; }
.w-seg.is-partial .w-fill { fill-opacity: .22; }
.w-seg.is-partial:hover .w-fill { fill-opacity: .34; }
.w-seg .w-rim { fill: var(--col); stroke: var(--paper); stroke-width: 2.5; pointer-events: none; }
.w-seg.is-on .w-fill { fill-opacity: 1; }
.w-seg.is-on:hover .w-fill { filter: brightness(1.1); }
.w-seg text { fill: var(--app-ink-2); font-weight: 600; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.w-seg.is-partial text { fill: var(--app-ink); }
.w-seg.is-on text { fill: #fff; }
.w-seg:focus-visible .w-fill { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 4 3; }
.w-hub circle { fill: var(--paper); }
.w-hub .w-count { font-size: 34px; font-weight: 700; fill: var(--app-ink); text-anchor: middle; }
.w-hub .w-cap { font-size: 12.5px; fill: var(--app-ink-2); text-anchor: middle; }
.wheel-legend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 8px; margin: 6px 0 0; font-size: 12.5px; color: var(--app-ink-2); }
.wheel-legend span[class] { width: 14px; height: 10px; border-radius: 2px; background: var(--wheel-emotions); }
/* the rim, drawn as a band of the fill rather than a border, like the wheel segment it explains */
.wheel-legend .wl-partial { background: linear-gradient(var(--wheel-emotions) 0 3px, color-mix(in srgb, var(--wheel-emotions) 22%, transparent) 3px) !important; margin-left: 10px; }

/* ---------- Traceability ---------- */

.trace { padding: 100px 0 120px; border-top: 1px solid var(--line); }
.trace-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.trace-text p { color: var(--ink-2); margin: 20px 0 0; max-width: 30em; text-wrap: pretty; }
.trace-text .trace-hint { color: var(--ink-3); font-size: 14px; }

.trace-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px; }
.trace-table-wrap { overflow-x: auto; }
.trace-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.trace-table th, .trace-table td { padding: 0; text-align: center; border-bottom: 1px solid #e7e9ed; }
.trace-table thead th { font-weight: 600; font-size: 12.5px; color: var(--ink-3); padding: 0 4px 10px; line-height: 1.3; }
.trace-table thead th small { display: block; font-weight: 400; font-size: 11.5px; }
.trace-table thead th:first-child { text-align: left; }
.trace-table tbody th { text-align: left; font-weight: 500; padding: 4px 12px 4px 0; white-space: nowrap; }
.trace-table tbody th::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--col); margin-right: 9px; vertical-align: 1px; }
.trace-table td { height: 46px; min-width: 52px; }
.trace-table td.is-none { color: #b4bac4; }
.trace-cell {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--col); color: #fff; font-size: 12px; font-weight: 700;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.trace-cell:not(.has-count) { width: 14px; height: 14px; }
.trace-cell:hover { transform: scale(1.12); }
.trace-cell[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--col); }

.trace-source { margin-top: 18px; min-height: 120px; padding: 18px 20px; border-radius: 12px; background: var(--ground); }
.trace-source-head { margin: 0 0 10px; font-size: 13px; color: var(--ink-3); }
.trace-source-head b { color: var(--ink); font-weight: 600; }
.trace-quote { margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line-strong); font-size: 15.5px; line-height: 1.55; }
.trace-quote + .trace-quote { margin-top: 10px; }
.trace-quote mark { background: color-mix(in srgb, var(--col) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.trace-fine { margin: 12px 2px 0; font-size: 12px; color: var(--ink-3); }

/* ---------- Privacy ---------- */

.privacy { padding: 120px 0; border-top: 1px solid var(--line); }
.flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; margin-top: 64px; align-items: stretch; }
.flow-col { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 32px; box-shadow: 0 30px 60px -44px rgba(21, 23, 28, .45); }
.flow-col h3 { margin: 0 0 16px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.flow-col ul { list-style: none; margin: 0; padding: 0; }
.flow-col li { padding: 12px 0; border-top: 1px solid var(--line); font-size: 16.5px; }
.flow-col li:first-child { border-top: 0; padding-top: 0; }
.flow-never { margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--line-strong); color: var(--iris-ink); font-weight: 600; }

.flow-gate { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 28px; text-align: center; min-width: 170px; }
.flow-gate p { margin: 14px 0; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.flow-gate b { display: inline-block; margin-top: 6px; padding: 6px 12px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 600; }
.flow-line { flex: 1; width: 1px; min-height: 30px; background: repeating-linear-gradient(to bottom, var(--line-strong) 0 4px, transparent 4px 9px); }
.flow-relay { max-width: 46em; margin: 28px auto 0; text-align: center; font-size: 14.5px; color: var(--ink-3); text-wrap: pretty; }

.rights { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: center; margin-top: 96px; padding-top: 72px; border-top: 1px solid var(--line); }
.rights-list { margin: 28px 0 0; }
.rights-list div { display: grid; grid-template-columns: minmax(130px, 1fr) 3fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line-strong); }
.rights-list div:last-child { border-bottom: 1px solid var(--line-strong); }
.rights-list dt { font-weight: 600; }
.rights-list dd { margin: 0; color: var(--ink-2); text-wrap: pretty; }
.rights-visual img { border-radius: 12px; border: 1px solid var(--line-strong); box-shadow: 0 30px 60px -40px rgba(21, 23, 28, .45); }

.privacy-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 72px; }
.privacy-notes p { margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 34em; }
.privacy-notes p:last-child { color: var(--ink); }

/* ---------- Institutes ---------- */

.institutes { padding: 120px 0 40px; border-top: 1px solid var(--line); }
.inst-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; padding-bottom: 100px; border-bottom: 1px solid var(--line); }
.inst-body p { margin: 0 0 16px; font-size: 1.12rem; color: var(--ink-2); max-width: 34em; }
.inst-body p:first-child { color: var(--ink); }

/* ---------- FAQ ---------- */

.faq { padding: 100px 0 120px; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.faq-list { border-top: 1px solid var(--line-strong); }
.faq-list details { border-bottom: 1px solid var(--line-strong); }
.faq-list summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 44px 22px 0; font-size: 1.12rem; font-weight: 500;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 1.8px solid var(--ink); border-bottom: 1.8px solid var(--ink);
  transform: rotate(45deg); transition: transform .3s var(--ease-out);
}
.faq-list details[open] summary::after { transform: translate(0, 5px) rotate(-135deg); }
.faq-list summary:hover { color: var(--iris-ink); }
.faq-list details p { margin: -6px 0 24px; color: var(--ink-2); max-width: 40em; }

/* ---------- Closing band ---------- */

.closing { padding: 110px 0 120px; background: var(--ground-raise); border-top: 1px solid var(--line); }
.closing-inner { text-align: center; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ground-raise); color: var(--ink-3); padding: 0 0 48px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; padding-top: 36px; border-top: 1px solid var(--line); }
.footer-line { margin: 10px 0 0; font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }
.footer-links a, .footer-pending { text-decoration: none; font-size: 14px; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }
.footer-pending { color: var(--ink-3); }
.footer-copy { grid-column: 1 / -1; margin: 12px 0 0; font-size: 13px; color: var(--ink-3); }

/* ---------- Guide page (download.html): the one download action, the guide, then the recorded walkthrough ---------- */

.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--iris-ink); }

.btn-mark-down::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 5v8M6.5 9.5 10 13l3.5-3.5M6 15.5h8' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 5v8M6.5 9.5 10 13l3.5-3.5M6 15.5h8' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.btn:hover .btn-mark-down::after { transform: translateY(2px); }
.btn-xl { min-height: 60px; padding: 0 26px; font-size: 18px; gap: 14px; }
.btn-xl .btn-mark { width: 24px; height: 24px; }

.dl-hero { padding: 64px 0 0; text-align: center; }
.dl-eyebrow { margin: 0 0 18px; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; color: var(--iris-ink); }
.dl-hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); }
.dl-hero .hero-lede { margin-top: 22px; }

.video-frame { margin: 48px 0 0; text-align: left; }
.video-box video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10;
  border-radius: 12px; border: 1px solid var(--line-strong); background: var(--app-ground);
}
.chapters { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chapters button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper); cursor: pointer;
  font-size: 14px; color: var(--ink-2);
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.chapters button:hover { border-color: var(--line-strong); color: var(--ink); }
.chapters button[aria-current="true"] { border-color: var(--iris-ink); color: var(--ink); }
.ch-time { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--iris-ink); }

.dl-band { padding: 56px 0 72px; }
.dl-action { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.dl-meta { margin: 0; font-size: 13.5px; color: var(--ink-3); overflow-wrap: anywhere; }

/* the contents list under the lede: a wrapped row of text links */
.toc { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; max-width: 46em; margin: 30px auto 0; }
.toc a { font-size: 14.5px; font-weight: 500; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }
.toc a:hover { color: var(--ink); border-bottom-color: var(--iris-ink); }

/* every section from #first-day to #terms: a top hairline and a reading measure; html's scroll-padding-top keeps anchored headings below the sticky header */
.guide-section { padding: 72px 0; border-top: 1px solid var(--line); }
.guide-section:last-child { padding-bottom: 120px; }
.guide-section .sub-title { max-width: 24em; }
.guide-lede { max-width: 40em; margin: 14px 0 0; color: var(--ink-2); font-size: 1.05rem; text-wrap: pretty; }
.guide-section a:not(.btn) { color: var(--iris-ink); font-weight: 600; text-underline-offset: 3px; }

.guide-steps { list-style: none; margin: 36px 0 0; padding: 0; counter-reset: step; border-top: 1px solid var(--line-strong); }
.guide-steps > li { counter-increment: step; padding: 26px 0; border-bottom: 1px solid var(--line); }
.guide-steps > li.has-shot { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.guide-step-text { max-width: 38em; }
.guide-step-text h3 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.guide-step-text h3::before { content: counter(step) ". "; color: var(--iris-ink); }
.guide-step-text p { margin: 8px 0 0; color: var(--ink-2); text-wrap: pretty; }
.guide-shot { margin: 0; }
.guide-shot img { width: 100%; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--app-ground); box-shadow: 0 24px 48px -34px rgba(21, 23, 28, .5); }

.guide-list { list-style: none; max-width: 46em; margin: 28px 0 0; padding: 0; }
.guide-list > li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink-2); text-wrap: pretty; }
.guide-list > li:last-child { border-bottom: 1px solid var(--line); }
.guide-list b { color: var(--ink); font-weight: 600; }
.guide-numbered { counter-reset: item; }
.guide-numbered > li { counter-increment: item; }
.guide-numbered > li::before { content: counter(item) ". "; color: var(--iris-ink); font-weight: 600; }

/* the #when table scrolls inside its wrapper, never the page */
.guide-table-wrap { max-width: 52em; margin: 28px 0 0; overflow-x: auto; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.guide-table th, .guide-table td { text-align: left; vertical-align: top; padding: 12px 20px 12px 0; border-bottom: 1px solid var(--line); text-wrap: pretty; }
.guide-table thead th { font-size: 13.5px; font-weight: 600; color: var(--ink-3); border-bottom-color: var(--line-strong); }
.guide-table tbody th { width: 38%; font-weight: 500; color: var(--ink); }
.guide-table td { color: var(--ink-2); }

/* one app message per item: the message as the heading, what it means, then what to do in ink */
.help-item { max-width: 46em; padding: 22px 0; border-top: 1px solid var(--line); }
.help-item:first-of-type { margin-top: 28px; }
.help-item h3 { margin: 0; font-size: 1.08rem; font-weight: 600; text-wrap: pretty; }
.help-item p { margin: 6px 0 0; color: var(--ink-2); text-wrap: pretty; }
.help-item p + p { color: var(--ink); }
.guide-stuck { max-width: 46em; margin: 0; padding-top: 22px; border-top: 1px solid var(--line-strong); font-weight: 500; }

#tour .video-frame { margin-top: 32px; }

.terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin: 28px 0 0; }
.terms div { padding: 14px 0; border-top: 1px solid var(--line); }
.terms dt { font-weight: 600; }
.terms dd { margin: 4px 0 0; color: var(--ink-2); text-wrap: pretty; }

.dl-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 40px; margin: 64px 0 0; padding-top: 32px; border-top: 1px solid var(--line); }
.dl-facts dt { font-size: 14px; font-weight: 600; }
.dl-facts dd { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); text-wrap: pretty; }
.dl-facts code { font-size: 13px; padding: 1px 5px; border-radius: 4px; background: var(--ground-raise); overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .dl-facts, .terms { grid-template-columns: 1fr; }
  .guide-steps > li.has-shot { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .dl-facts { gap: 18px; }
}

@media (max-width: 640px) {
  .dl-hero { padding-top: 44px; }
  .video-frame { margin-top: 36px; }
  .dl-band { padding: 44px 0 56px; }
  .btn-xl { width: 100%; justify-content: center; }
  .toc { gap: 8px 18px; }
  .guide-section { padding: 56px 0; }
  .guide-section:last-child { padding-bottom: 84px; }
  .guide-table th, .guide-table td { padding-right: 14px; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1120px) {
  .app-body { grid-template-columns: minmax(250px, 290px) minmax(0, 1fr); }
  .review { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--app-line); }
  .review-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); flex: none; }
  .review-foot { justify-content: flex-start; }
}

@media (max-width: 1080px) {
  .stack-text { padding: 44px 34px; }
  .trace-grid, .faq-grid, .inst-grid, .wheel-grid, .rights, .paper-grid { gap: 40px; }
}

@media (max-width: 900px) {
  .app-body { grid-template-columns: 1fr; }
  .note-pane { border-right: 0; border-bottom: 1px solid var(--app-line); }
  .note-fine { margin-top: 0; }
  .canvas svg { min-height: 0; }
  .app-back, .app-sep { display: none; }

  .steps { grid-template-columns: 1fr 1fr; gap: 16px 0; }
  .steps li:nth-child(3) { border-left: 0; padding-left: 4px; }

  .stack-card { position: relative; top: auto !important; grid-template-columns: 1fr; min-height: 0; margin-bottom: 24px; }
  .stack-visual picture { position: relative; left: auto; top: auto; display: block; width: auto; margin: 0 0 0 24px; }

  .marks { grid-template-columns: 1fr; }
  .mark-item, .mark-item:first-child { padding: 24px 0 20px; border-left: 0; border-bottom: 1px solid var(--line); }

  .trace-grid, .faq-grid, .inst-grid, .wheel-grid, .rights, .paper-grid { grid-template-columns: minmax(0, 1fr); }
  .wheel-grid { margin-top: 56px; }
  .flow { grid-template-columns: 1fr; }
  .flow-gate { flex-direction: row; padding: 16px 0; min-width: 0; }
  .flow-gate p { margin: 0 16px; }
  .flow-gate br { display: none; }
  .flow-line { width: auto; height: 1px; min-height: 0; flex: 1; background: repeating-linear-gradient(to right, var(--line-strong) 0 4px, transparent 4px 9px); }
  .rights { margin-top: 72px; padding-top: 56px; }
  .privacy-notes { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .audience { margin-top: 56px; padding: 18px 0; }
  .audience li { padding: 0 12px; font-size: 1.05rem; }
  .screens, .institutes { padding-top: 84px; }
  .hero { padding-top: 48px; }
  .demo-wrap { margin-top: 40px; }
  .announce-text { display: none; }
  .app-tools { display: none; }
  .app-tabs { overflow-x: auto; }
  .app-tab { flex: none; padding: 0 10px; }
  .marking, .trace, .faq, .paper { padding: 72px 0 84px; }
  .paper-visual { grid-template-columns: 1fr; }
  .paper-arrow { flex-direction: row; justify-content: center; }
  .paper-arrow::before { transform: rotate(90deg); }
  .privacy { padding: 84px 0; }
  .closing { padding: 80px 0 84px; }
  .stack-text { padding: 32px 24px; }
  .stack-visual picture { margin-left: 16px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li:nth-child(3) { border-left: 0; padding: 0 4px; }
  .flow-col { padding: 24px 22px; }
  .wheel-panel { padding: 16px 14px 14px; }
  .rights-list div { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  .trace-panel { padding: 16px 14px 14px; }
  .trace-table tbody th { white-space: normal; min-width: 104px; font-size: 13.5px; }
  .trace-table td { min-width: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
}
