/* Motive is an independent static site. Shared visual tokens live here. */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #242628;
  --muted: #6c6e71;
  --line: #e8e8e8;
  --line-strong: #d7d7d7;
  --wash: #f0f0f0;
  --white: #fafafa;
  --accent: #575b60;
  --max: 1040px;
  --gutter: clamp(20px, 4vw, 48px);
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --text-body: .9375rem;
  --text-ui: .875rem;
  --text-small: .75rem;
  --text-title: clamp(1.75rem, 3vw, 2rem);
  --space-section: 48px;
  --ease: cubic-bezier(.23, 1, .32, 1);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 28px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--text-body)/1.5 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: #d4dcca; color: #263020; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
h1 { font-size: var(--text-title); line-height: 1.15; letter-spacing: -.035em; }
p { text-wrap: pretty; }
svg, iframe { display: block; }
iframe { width: 100%; height: 100%; border: 0; }
code { font-family: var(--mono); font-size: .85em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 20; left: 16px; top: 12px; padding: 10px 18px; background: var(--ink); color: var(--paper); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.shell { width: min(var(--max), calc(100% - var(--gutter)*2)); margin-inline: auto; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.small-icon { width: 16px; height: 16px; }
.site-header { min-height: 88px; padding-block: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 28px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 24px; font-weight: 600; letter-spacing: -.045em; }
.nav { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(4, 64px); }
.nav a { display: flex; justify-content: center; align-items: center; min-height: 44px; color: var(--muted); font-size: 13px; border-radius: 7px; transition: color 140ms ease; }
.nav a[aria-current=page], .nav a:hover { color: var(--ink); }
.nav a[aria-current=page] { background: var(--wash); }
.nav[data-enhanced] a[aria-current=page] { background: none; }
.nav-highlight { position: absolute; z-index: -1; top: 5px; left: 0; width: 64px; height: 34px; border-radius: 7px; background: var(--wash); opacity: 0; pointer-events: none; }
[data-rail][data-ready] .nav-highlight, [data-rail][data-ready] .tree-highlight, [data-rail][data-ready] .tree-marker { transition: transform 190ms var(--ease), opacity 140ms ease; }
[data-rail][data-instant] .nav-highlight, [data-rail][data-instant] .tree-highlight, [data-rail][data-instant] .tree-marker { transition: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: var(--text-ui); line-height: 1.4; font-weight: 500; transition: background 140ms ease, transform 140ms var(--ease); }
.button.primary { color: var(--white); background: var(--ink); border-color: var(--ink); }
.button:active, .icon-button:active { transform: scale(.96); }
.icon-button { width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; border-radius: 5px; transition: background 140ms ease, transform 140ms var(--ease); }
.icon-button .icon { grid-area: 1/1; }
.copy-button .icon, .icon-button .pause-icon, .icon-button .play-icon { transition: opacity 180ms var(--ease), transform 180ms var(--ease), filter 180ms var(--ease); }
.copy-button .check, .icon-button .play-icon, .copy-button[data-copied=true] .copy, .icon-button[data-playing=false] .pause-icon { opacity: 0; transform: scale(.9); filter: blur(2px); }
.copy-button[data-copied=true] .check, .icon-button[data-playing=false] .play-icon { opacity: 1; transform: scale(1); filter: blur(0); }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: var(--text-ui); text-decoration: underline; text-underline-offset: 4px; }
.hero-heading { text-align: center; padding: 72px 0 8px; }
.hero-heading h1 { font-size: clamp(2.125rem, 4.5vw, 3rem); line-height: 1.1; letter-spacing: -.045em; font-weight: 500; }
.hero-heading > p { max-width: 415px; margin: 18px auto 24px; font-size: var(--text-body); line-height: 1.5; color: var(--muted); }
.get-started-row { display: flex; align-items: stretch; justify-content: center; gap: 10px; max-width: 570px; margin-inline: auto; }
.get-started-row > .button { white-space: nowrap; }
.install-command { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 0 0 12px; background: var(--paper); border: 1px solid #e1e1e1; border-radius: 8px; box-shadow: 0 1px 2px #00000008, 0 3px 7px #00000004; font: 13px/1.4 var(--mono); }
.command-prefix { color: var(--muted); }
.install-command code { font: inherit; text-align: start; overflow-wrap: anywhere; }
.install-command .copy-button { color: var(--muted); margin-inline-start: 0; }
.browse-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 12px; color: var(--muted); font-size: var(--text-ui); }
.hero-study { max-width: 560px; margin: 4px auto 56px; }
.hero-stage { position: relative; height: 380px; }
.hero-stage > .icon-button { position: absolute; bottom: 0; right: 0; color: var(--muted); }
.page-intro { padding: 44px 0 28px; }
.figure-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 36px 24px; }
.figure-card { min-width: 0; }
.figure-card > a { display: block; height: 100%; border-radius: 3px; }
.card-stage { position: relative; height: 252px; background: var(--white); border-radius: 3px; }
.card-stage iframe { pointer-events: none; position: absolute; inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px); }
.card-number { position: absolute; top: 14px; left: 16px; font: var(--text-small)/1.5 var(--mono); color: var(--muted); }
.card-arrow { position: absolute; top: 16px; right: 16px; color: var(--muted); }
.card-copy { padding: 13px 0 0; }
.card-copy h2 { font-size: 14px; font-weight: 500; line-height: 1.4; letter-spacing: -.01em; }
.card-copy p { font-size: 12px; line-height: 1.5; margin-top: 4px; color: var(--muted); }
.figure-card:focus-within .card-stage { background: var(--wash); }
.figure-card:focus-within .card-number { color: var(--ink); }
.gallery-page { padding-bottom: 72px; }
.concepts-intro { display: flex; align-items: end; justify-content: space-between; gap: 16px 32px; }
.concepts-intro p { margin-top: 12px; max-width: 450px; color: var(--muted); font-size: var(--text-ui); line-height: 1.5; }
.concepts-intro > a { flex: none; font-size: 12px; text-decoration: none; }
.concepts-gallery { padding-bottom: 120px; }
.concept-preview { display: block; border-radius: 3px; }
.concept-poster, .concept-player { position: absolute; inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px); object-fit: contain; pointer-events: none; }
.concept-poster { display: block; inset: calc(2.5% + 19px); width: calc(95% - 38px); height: calc(95% - 38px); }
.concept-card[data-previewing=true] .concept-poster { visibility: hidden; }
.concept-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 24px; }
.concept-title .shortlist-button { width: 44px; height: 44px; margin: -10px -12px -10px 0; color: var(--muted); }
.shortlist-button[aria-pressed="true"] { color: var(--ink); }
.shortlist-button[aria-pressed="true"] .icon { fill: currentColor; }
.concept-details { margin-top: 8px; font-size: 12px; color: var(--muted); }
.concept-details summary { width: max-content; min-height: 36px; padding: 9px 0; cursor: pointer; }
.concept-details p { margin-top: 8px; }
.shortlist-dock { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 10; display: flex; align-items: center; gap: 16px; max-width: calc(100% - 32px); padding: 6px 6px 6px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 2px 5px #00000006, 0 8px 24px #0000000a; white-space: nowrap; }
.shortlist-dock > span { font-size: 12px; font-variant-numeric: tabular-nums; }
.shortlist-dock .button { font-size: 12px; border-color: transparent; background: var(--white); }
.shortlist-dock .button[data-copied="true"] { background: var(--wash); }
.shortlist-fallback { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 10; width: min(480px,calc(100% - 40px)); max-height: 35vh; overflow: auto; background: var(--paper); padding: 16px; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 20px #0000000a; font-size: 13px; user-select: all; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; border-top: 1px solid var(--line); padding: 24px 0 32px; font-size: var(--text-ui); color: var(--muted); }
.footer-credit a { color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 24px; color: var(--muted); font-size: var(--text-ui); }
.detail-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin: 20px 0 16px; }
.detail-heading h1 { margin-bottom: 10px; }
.detail-heading p { font-size: var(--text-body); }
.detail-stage { position: relative; height: 470px; border-radius: 4px; }
.detail-stage iframe { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
.detail-stage[data-finish=dark] { background: #08090a; }
.detail-stage[data-finish=light] { background: #fff; }
.viewer-dock { display: flex; gap: 4px; align-items: center; justify-content: center; width: max-content; max-width: 100%; margin: 12px auto 0; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.intensity-control { position: relative; isolation: isolate; width: 150px; min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; gap: 16px; border-radius: 5px; font-size: var(--text-ui); background: var(--paper); --amount: 60%; }
.intensity-control::before { content: ''; position: absolute; inset: 0; width: var(--amount); border-radius: 5px; background: var(--line); z-index: -1; }
.intensity-control input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.intensity-control:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.intensity-control output { font-size: var(--text-small); font-variant-numeric: tabular-nums; pointer-events: none; }
.finish-options { display: flex; gap: 2px; }
.finish-options button { min-height: 44px; padding: 0 10px; border-radius: 5px; color: var(--muted); font-size: var(--text-ui); }
.finish-options button[aria-pressed=true] { color: var(--ink); background: var(--wash); }
.dock-line { width: 1px; height: 20px; background: var(--line); margin-inline: 4px; }
.detail-info { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin: 56px 0 48px; }
.detail-info h2 { font-size: var(--text-ui); font-weight: 600; margin-bottom: 12px; }
.detail-info p { max-width: 48ch; }
.next-figure { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0 40px; }
.reading-layout { display: grid; grid-template-columns: 185px minmax(0,1fr); gap: 72px; padding: 48px 0 72px; }
.reading-nav { position: sticky; top: 28px; align-self: start; }
.reading-nav-title { font-size: 12px; font-weight: 500; color: var(--muted); margin: 0 0 14px 24px; }
.tree-nav { position: relative; isolation: isolate; }
.tree-nav::before { content: ''; position: absolute; left: 6px; top: 18px; bottom: 18px; width: 1px; background: var(--line); }
.tree-nav ul { margin: 0; padding: 0; list-style: none; }
.tree-nav li { position: relative; }
.tree-nav li::before { content: ''; position: absolute; left: 6px; top: 18px; width: 9px; height: 1px; background: var(--line); }
.tree-nav a { display: flex; align-items: center; min-height: 36px; margin-left: 22px; padding: 7px 9px; border-radius: 6px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.tree-nav a[aria-current] { color: var(--ink); background: var(--wash); }
.tree-nav[data-enhanced] a[aria-current] { background: none; }
.tree-highlight { position: absolute; top: 0; left: 22px; right: 0; height: 36px; z-index: -1; border-radius: 6px; background: var(--wash); pointer-events: none; }
.tree-marker { position: absolute; top: -3px; left: 3px; width: 7px; height: 7px; background: var(--ink); border: 1px solid var(--paper); pointer-events: none; }
.reading { max-width: 590px; min-width: 0; line-height: 1.55; }
.reading > h1 { margin: 0 0 24px; }
.reading .lead { font-size: 16px; line-height: 1.5; color: var(--muted); margin-bottom: var(--space-section); }
.reading section { margin-top: var(--space-section); scroll-margin-top: 28px; }
.reading h2 { font-size: 20px; line-height: 1.3; letter-spacing: -.02em; margin: 0 0 16px; }
.reading h3 { font-size: 18px; margin: 24px 0 12px; }
.reading p { margin: 0 0 16px; }
.reading p a, .reading li a, .reading figcaption a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: from-font; }
.reading strong { font-weight: 600; }
.reading ol, .reading ul { padding-inline-start: 22px; }
.reading li { padding-inline-start: 4px; margin: 10px 0; }
.code-block { position: relative; padding: 14px 54px 14px 14px; border: 1px solid var(--line); background: var(--white); border-radius: 6px; margin: 24px 0; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.55 var(--mono); }
.code-block code { font: inherit; }
.code-block .copy-button { position: absolute; top: 2px; right: 2px; color: var(--muted); }
.finish-list { margin: 24px 0; }
.finish-list > div { display: grid; grid-template-columns: 145px 1fr; gap: 16px; padding: 12px 0; }
.finish-list dt { display: flex; align-items: center; align-self: start; gap: 9px; font-weight: 500; }
.finish-list dd { margin: 0; }
.swatch { display: block; flex: none; width: 12px; height: 12px; border: 1px solid var(--muted); border-radius: 50%; }
.swatch-drawing { background: repeating-linear-gradient(135deg,#d9dcd3 0 2px,#8d9385 2px 3px); }
.swatch-flat { background: #626968; }
.swatch-light { background: #fff; }
.swatch-dark { background: #111315; }
.reading-example { margin: 28px 0; }
.reading-figure { height: 320px; }
.reading-figure iframe { pointer-events: none; }
.reading figcaption { font-size: var(--text-ui); margin-top: 8px; color: var(--muted); }
.empty-page { text-align: center; padding: 100px 0 150px; }
.empty-page h1 { margin: 12px 0 20px; }
.empty-page p { margin-bottom: 24px; }
.error-code { color: var(--muted); font-family: var(--mono); }
@media (hover:hover) and (pointer:fine) {
  .site-footer a:hover, .browse-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
  .button:hover, .icon-button:hover { background: var(--wash); }
  .button.primary:hover { background: #393b3d; }
  .figure-card:hover .card-stage { background: var(--wash); }
  .figure-card:hover .card-number { color: var(--ink); }
  .figure-card:hover .card-copy h2 { color: #000; }
  .tree-nav a:hover { color: var(--ink); }
  .finish-options button:hover { background: var(--wash); color: var(--ink); }
}
@media (max-width: 850px) {
  .figure-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reading-layout { grid-template-columns: 170px minmax(0,1fr); gap: 36px; }
  .detail-info { gap: 32px; }
}
@media (max-width: 620px) {
  .concepts-intro { align-items: start; flex-direction: column; gap: 8px; }
  .site-header { min-height: 76px; gap: 4px 16px; }
  .nav { grid-template-columns: repeat(4, 58px); }
  .nav-highlight { width: 58px; }
  .nav a { font-size: 13px; }
  .brand { font-size: 23px; }
  .hero-heading { padding-top: 38px; }
  .hero-heading > p { margin-top: 20px; }
  .get-started-row { flex-direction: column; max-width: 365px; }
  .install-command { justify-content: space-between; }
  .install-command code { flex: 1; }
  .hero-stage { height: 330px; }
  .hero-study { margin-bottom: 40px; }
  .figure-grid { grid-template-columns: 1fr; gap: 32px; }
  .card-stage { height: 300px; }
  .page-intro { padding-top: 32px; }
  .detail-stage { height: 350px; }
  .viewer-dock { flex-wrap: wrap; width: min(100%,350px); justify-content: space-between; }
  .viewer-dock .dock-line { display: none; }
  .viewer-dock .finish-options { order: 4; width: 100%; justify-content: space-between; }
  .finish-options button { flex: 1; font-size: 13px; padding-inline: 6px; }
  .intensity-control { flex: 1; }
  .detail-info { grid-template-columns: 1fr; gap: 28px; margin-top: 36px; }
  .reading-layout { display: block; padding: 36px 0 56px; }
  .reading-nav { position: static; margin-bottom: 32px; max-width: 240px; }
  .reading .lead { font-size: var(--text-body); }
  .finish-list > div { grid-template-columns: 1fr; gap: 4px; }
  .site-footer { align-items: flex-start; gap: 0; }
  .footer-credit { width: 100%; }
  .footer-links { gap: 4px 24px; }
}
:root[data-input=keyboard] *, :root[data-input=keyboard] *::before, :root[data-input=keyboard] *::after { transition: none !important; }
@media (max-width: 380px) {
 .install-command { font-size: 12px; gap: 6px; padding-left: 10px; }
 .site-header { gap: 0; }
 .nav { grid-template-columns: repeat(4, 54px); }
 .nav-highlight { width: 54px; }
 .nav a { font-size: 12px; }
 .brand { font-size: 21px; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .button:active, .icon-button:active { transform: none; }
}
@media (forced-colors:active) {
  button:focus-visible, a:focus-visible, input:focus-visible, .intensity-control:has(input:focus-visible) { outline-color: Highlight; }
}
