/* Project pages (/<slug>): the card text from the home page next to the project's demo in a phone. */
:root { --page: #EEF0F3; --card: #fff; --ink: #111114; --soft: #5E5E66; --sep: #E1E2E7; --blue: #0A66D8;
  --sf: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif; --s: .82; }
@media (prefers-color-scheme: dark) { :root { --page: #0D0D10; --card: #1A1A1E; --ink: #F3F3F5; --soft: #A2A2AA; --sep: #2A2A30; --blue: #5AA2FF; } }
* { box-sizing: border-box; margin: 0; }
html { background: var(--page); color: var(--ink); font-family: var(--sf); -webkit-font-smoothing: antialiased; }
body { font-size: 18px; line-height: 1.55; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
nav.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; font-weight: 600; font-size: 15px; flex-wrap: wrap; }
nav.top .me { color: var(--ink); }
nav.top .right { display: flex; align-items: center; gap: 16px; }
nav.top .lang { background: var(--card); border-radius: 9px; padding: 3px; display: flex; gap: 2px; }
nav.top .lang a { color: var(--ink); padding: 4px 12px; border-radius: 7px; font-size: 14px; }
nav.top .lang a[aria-current] { background: var(--page); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "hero demo" "body demo"; column-gap: 56px; align-items: start; padding: 24px 0 40px; }
.hero { grid-area: hero; }
.demo { grid-area: demo; position: sticky; top: 20px; width: calc(402px * var(--s) + 24px); }
.body { grid-area: body; max-width: 72ch; }
.kicker { display: flex; align-items: center; gap: 12px; color: var(--soft); font-weight: 600; font-size: 16px; }
.kicker .icon { width: 48px; height: 48px; border-radius: 11px; }
h1 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.08; letter-spacing: -0.025em; font-weight: 800; margin: 14px 0 16px; max-width: 22ch; }
.lead { font-size: 21px; line-height: 1.45; font-weight: 500; max-width: 60ch; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 8px; }
.btn { background: var(--card); color: var(--ink); padding: 10px 16px; border-radius: 11px; font-weight: 600; font-size: 16px; }
.btn:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--sep); }
.body h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.015em; margin: 34px 0 8px; }
.body p + p { margin-top: 12px; }
.body p a, .body li a, .body .note a, footer p a { text-decoration: underline; text-underline-offset: 2px; }
.body ul.plain { padding-left: 1.1em; }
.body ul.plain li + li { margin-top: 6px; }
.body .try { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.body .try a { background: var(--card); color: var(--ink); padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.body .stack { color: var(--soft); font-size: 16px; margin-top: 18px; }
.steps { list-style: none; padding: 0; margin-top: 4px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--sep); }
.steps li:first-child { border-top: 0; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 8px; background: var(--c, #2E8B57); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; margin-top: 1px; }
.steps li b { display: block; }
.steps li span { color: var(--soft); font-size: 16px; }
.bars { margin-top: 10px; }
.bars .row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; font-size: 15px; padding: 7px 0; }
.bars .bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--sep); }
.bars .pct { grid-column: 2; color: var(--soft); font-size: 14px; margin-top: -4px; }
.note { color: var(--soft); font-size: 16px; margin-top: 8px; }
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; font-variant-numeric: tabular-nums; }
table.t th { text-align: left; font-weight: 600; color: var(--soft); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--sep); }
table.t td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--sep); }
table.t td.n, table.t th.n { text-align: right; }
table.t caption { caption-side: bottom; text-align: left; color: var(--soft); font-size: 15px; padding-top: 8px; }
table.t tfoot td { font-weight: 600; border-bottom: 0; }
.rail { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 8px; margin-top: 12px; scroll-snap-type: x mandatory; }
.rail img { flex: 0 0 auto; height: 380px; border-radius: 16px; scroll-snap-align: start; border: 1px solid var(--sep); }
.rail.short img { height: 300px; }
figure.wide img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--sep); }
figure.wide figcaption { color: var(--soft); font-size: 15px; margin-top: 6px; }
/* the phone: the demo is a 402×874 screen, scaled to fit by project.js */
.tabs { display: inline-grid; grid-auto-flow: column; background: var(--card); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.tabs button { font: 600 14px/1 var(--sf); color: var(--ink); background: none; border: 0; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--page); }
.phone { position: relative; padding: 12px; border-radius: calc(58px * var(--s) + 12px); background: #0B0B0D; box-shadow: 0 0 0 2px #2A2A30, 0 24px 60px rgba(0,0,0,.18); }
.screen { width: calc(402px * var(--s)); height: calc(874px * var(--s)); border-radius: calc(56px * var(--s)); overflow: hidden; position: relative; background: #000; }
.screen iframe { width: 402px; height: 874px; border: 0; display: block; transform: scale(var(--s)); transform-origin: 0 0; }
.island { position: absolute; top: calc(12px + 11px * var(--s)); left: 50%; width: calc(124px * var(--s)); height: calc(36px * var(--s)); margin-left: calc(-62px * var(--s)); background: #000; border-radius: 99px; pointer-events: none; }
.cap { color: var(--soft); font-size: 15px; line-height: 1.45; margin-top: 12px; max-width: calc(402px * var(--s) + 24px); }
.cap b { color: var(--ink); }
footer { border-top: 1px solid var(--sep); padding: 28px 0 60px; }
footer h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.015em; margin: 12px 0 10px; }
footer h2 + p { margin-bottom: 8px; }
.others { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.others a { display: block; background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 15px; }
@media (max-width: 900px) {
  .wrap { padding: 0 18px; }
  .grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "demo" "body"; padding-top: 8px; }
  .demo { position: static; margin: 26px auto 8px; }
  .rail img { height: 320px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
