/* Riff. Colours come from the app: the icon's #10B981 green on a near black
   ground, the keyboard's Midnight and Dark themes, and the legal pages' #121214. */
:root {
  --bg: #111113;
  --bg-2: #161619;
  --card: #1b1b1f;
  --card-2: #232327;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f7f7f5;
  --muted: #b4b4ae;
  --dim: #8c8c87;
  --green: #10b981;
  --green-2: #34d499;
  --green-ink: #9ae6b4;
  --radius: 14px;
  --radius-lg: 22px;
  --wrap: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Inter, ui-sans-serif, system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
figure { margin: 0; }
.hero .wrap > *, .split > *, .setup > * { min-width: 0; }
a { color: var(--green-ink); text-underline-offset: 3px; }
a:hover { color: #c6f6d5; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.022em; line-height: 1.08; margin: 0; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--green); color: #04130d; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--green-2); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(17, 17, 19, .82); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 18px; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.nav .pill { color: #04130d; background: var(--green-2); padding: 7px 14px; border-radius: 999px; font-weight: 600; }
.nav .pill:hover { color: #04130d; background: #6ee7b7; }
/* Phone menu */
.menu-btn { display: none; width: 44px; height: 44px; margin-right: -8px; border: 0; border-radius: 12px; background: transparent; color: var(--text); cursor: pointer; place-items: center; }
.menu-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-btn path { transition: transform .2s ease, opacity .2s; transform-origin: 12px 12px; }
.menu-btn[aria-expanded="true"] .l1 { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .l2 { transform: translateY(-4px) rotate(-45deg); }
.menu-btn:hover { background: rgba(255, 255, 255, .06); }
.menu { display: grid; gap: 2px; padding: 8px 20px 20px; border-top: 1px solid var(--line); background: rgba(17, 17, 19, .97); }
.menu[hidden] { display: none; }
.menu a:not(.btn) { color: var(--text); text-decoration: none; font-size: 18px; font-weight: 550; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.menu a:not(.btn):hover { color: var(--green-2); }
.menu .btn { justify-content: center; margin-top: 16px; }
@media (max-width: 760px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
}
@media (min-width: 761px) { .menu { display: none !important; } }

/* Jump button */
.jump { position: fixed; z-index: 6; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px)); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(35, 35, 39, .92); color: var(--green-2); display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .7); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility 0s linear .2s; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.jump.show { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s, visibility 0s; }
.jump:hover { background: #2c2c31; }
.jump svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .jump, .jump.show, .menu-btn path { transition: none; transform: none; } .menu-btn[aria-expanded="true"] .l1, .menu-btn[aria-expanded="true"] .l2 { transition: none; } }

/* Hero */
.hero { position: relative; padding: 76px 0 88px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto; height: 760px; background: radial-gradient(closest-side, rgba(16, 185, 129, .16), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.02fr 1fr; gap: 64px; align-items: center; }
.app-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); }
.status { display: inline-flex; align-items: center; gap: 8px; margin: 28px 0 18px; padding: 6px 12px 6px 10px; border: 1px solid rgba(52, 212, 153, .35); border-radius: 999px; color: var(--green-ink); font-size: 14px; font-weight: 600; background: rgba(16, 185, 129, .08); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 4px rgba(52, 212, 153, .18); }
.hero h1 { font-size: clamp(40px, 4.9vw, 64px); font-weight: 750; }
.hero h1 span { color: var(--green-2); }
.lede { margin-top: 20px; font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 33em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--green-2); color: #04130d; }
.btn-primary:hover { background: #6ee7b7; color: #04130d; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .3); color: var(--text); }
.fine { margin-top: 18px; font-size: 14px; color: var(--dim); }

/* Keyboard illustration (Midnight theme values from Theme.swift) */
.device { position: relative; }
.chat { background: var(--card); border: 1px solid var(--line); border-radius: 24px 24px 0 0; padding: 22px 20px 16px; display: grid; gap: 10px; }
.bubble { max-width: 78%; padding: 9px 14px; border-radius: 18px; font-size: 15px; line-height: 1.35; }
.bubble.them { background: #2c2c30; justify-self: start; border-bottom-left-radius: 6px; }
.bubble.me { background: #10b981; color: #03130c; justify-self: end; border-bottom-right-radius: 6px; }
.field { margin-top: 6px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 20px; padding: 8px 14px; font-size: 15px; color: var(--text); }
.field .caret { width: 2px; height: 18px; background: var(--green-2); border-radius: 1px; }
.kb { background: #000; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 24px 24px; padding: 8px 5px 12px; }
.chips { display: flex; gap: 6px; overflow: hidden; padding: 2px 3px 8px; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: 999px; background: #1c1c1e; color: #fff; border: 1px solid #2a2a2d; }
.chip.on { background: #30d158; color: #001a08; border-color: #30d158; }
.chip svg { width: 13px; height: 13px; }
.strip { display: grid; grid-template-columns: 1fr 1fr 1fr; text-align: center; font-size: 16px; color: #fff; padding: 6px 0 9px; }
.strip span + span { border-left: 1px solid rgba(255, 255, 255, .12); }
.strip b { font-weight: 700; }
.rows { position: relative; display: grid; gap: 10px; }
.row { display: flex; justify-content: center; gap: 5px; }
.k { flex: 0 0 calc((100% - 45px) / 10); height: 44px; display: grid; place-items: center; border-radius: 7px; background: #141416; border: 1px solid #2a2a2d; color: #fff; font-size: 20px; }
.k.sp { background: #0a0a0b; color: #8e8e93; font-size: 15px; }
.k.w15 { flex-basis: calc((100% - 45px) / 10 * 1.35); }
.k.space { flex: 1; font-size: 15px; color: #8e8e93; }
.k.ret { flex-basis: 22%; font-size: 15px; background: #0a0a0b; color: #8e8e93; }
.row.r2 { padding: 0 5%; }
.trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.label { position: absolute; right: 14px; bottom: -30px; font-size: 12px; color: var(--dim); letter-spacing: .02em; }

/* Sections */
section { padding: 96px 0; }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { display: block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green-2); margin-bottom: 14px; }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(32px, 4.2vw, 50px); font-weight: 720; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 19px; }

.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.card h3 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin: 18px 0 8px; }
.card p { color: var(--muted); font-size: 16px; }
.glyph { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: rgba(16, 185, 129, .13); color: var(--green-2); }
.glyph svg { width: 22px; height: 22px; }

/* Split feature rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split + .split { margin-top: 110px; }
.split.flip .copy { order: 2; }
.copy h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 720; }
.copy > p { margin-top: 16px; color: var(--muted); font-size: 18px; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: var(--text); font-size: 16px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(16, 185, 129, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d499' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.ticks li span { color: var(--muted); }

/* Panels (illustrations of keyboard panels) */
.panel { position: relative; background: #000; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.panel .cap { position: absolute; right: 16px; bottom: -28px; font-size: 12px; color: var(--dim); }
.pane { background: #1c1c1e; border: 1px solid #2a2a2d; border-radius: 16px; padding: 16px; }
.pane + .pane { margin-top: 10px; }
.pane-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: #8e8e93; }
.langs { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; font-size: 14px; }
.langs em { font-style: normal; color: #30d158; }
.src { margin-top: 12px; color: #8e8e93; font-size: 14px; }
.out { margin-top: 6px; font-size: 21px; line-height: 1.3; color: #fff; font-weight: 500; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: #aeaeb2; background: #2c2c2e; padding: 4px 9px; border-radius: 999px; }
.badge svg { width: 12px; height: 12px; }
.actions { display: flex; gap: 8px; margin-top: 16px; }
.act { flex: 1; text-align: center; padding: 10px; border-radius: 12px; font-weight: 600; font-size: 15px; background: #2c2c2e; color: #fff; }
.act.pri { background: #30d158; color: #001a08; }
.scope { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tone { text-align: center; font-size: 14px; font-weight: 600; padding: 10px 6px; border-radius: 12px; background: #1c1c1e; border: 1px solid #2a2a2d; color: #fff; }
.tone.on { border-color: #30d158; color: #30d158; }

.reply { background: #1c1c1e; border: 1px solid #2a2a2d; border-radius: 16px; padding: 14px 16px; }
.reply + .reply { margin-top: 10px; }
.reply .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #30d158; }
.reply .meta span:last-child { color: #8e8e93; text-transform: none; letter-spacing: 0; font-weight: 500; }
.reply p { margin-top: 6px; color: #fff; font-size: 15px; line-height: 1.4; }

/* Steps */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green-2); color: #04130d; font-weight: 750; font-size: 16px; }
.step h3 { margin: 18px 0 8px; font-size: 20px; }
.step p { color: var(--muted); font-size: 16px; }

/* Engine tiers */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tier { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.tier .n { font-size: 13px; color: var(--dim); font-weight: 600; }
.tier h3 { margin: 12px 0 8px; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.tier p { color: var(--muted); font-size: 16px; }

.table { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.table > div { padding: 24px 26px; }
.table > div + div { border-left: 1px solid var(--line); }
.table h3 { font-size: 16px; font-weight: 650; margin-bottom: 12px; }
.table ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; display: grid; gap: 6px; }

/* Themes */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.theme { border-radius: 18px; padding: 12px 10px 14px; border: 1px solid var(--line); }
.theme .mini { display: grid; gap: 5px; }
.theme .mr { display: flex; gap: 4px; justify-content: center; }
.theme .mk { flex: 1; height: 22px; border-radius: var(--r, 6px); }
.theme .mk.s { flex: 1.4; }
.theme .bar { height: 5px; width: 40%; margin: 2px auto 8px; border-radius: 3px; }
.theme figcaption { margin-top: 12px; font-size: 14px; font-weight: 600; text-align: center; }

/* Setup */
.setup { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.path { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: p; }
.path li { counter-increment: p; display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; font-size: 16px; }
.path li::before { content: counter(p); flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--card-2); color: var(--green-2); font-weight: 700; font-size: 14px; }

/* Closing */
.closing { text-align: center; padding: 110px 0 120px; position: relative; overflow: hidden; }
.closing::before { content: ""; position: absolute; left: 50%; top: 40%; width: 900px; height: 520px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(16, 185, 129, .14), transparent 70%); pointer-events: none; }
.closing .wrap { position: relative; }
.closing img { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 26px; box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08); }
.closing h2 { font-size: clamp(34px, 5vw, 58px); font-weight: 750; }
.closing p { margin: 16px auto 0; color: var(--muted); font-size: 19px; max-width: 34em; }
.closing .cta { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0 44px; font-size: 14px; color: var(--dim); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.berth { display: inline-flex; align-items: center; gap: 7px; }
.berth b { color: var(--text); font-weight: 600; }

/* Document pages */
.doc { max-width: 760px; margin: 0 auto; padding: 72px 24px 96px; }
.doc .eyebrow { margin-bottom: 10px; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 740; }
.doc .updated { margin-top: 12px; color: var(--dim); font-size: 15px; }
.doc h2 { font-size: 24px; margin: 44px 0 12px; letter-spacing: -.015em; }
.doc p, .doc li { color: var(--muted); font-size: 17px; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 20px; display: grid; gap: 8px; }
.doc strong { color: var(--text); font-weight: 600; }
.callout { margin-top: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 26px; }
.callout p { color: var(--text); }
.faq { margin-top: 12px; display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 24px; font-weight: 400; color: var(--green-2); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 18px; font-size: 16px; }

.notfound { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 80px 24px; }
.notfound img { width: 80px; height: 80px; border-radius: 18px; margin: 0 auto 24px; }
.notfound h1 { font-size: clamp(40px, 6vw, 64px); }
.notfound p { margin-top: 12px; color: var(--muted); font-size: 18px; }
.notfound .cta { justify-content: center; }

/* Responsive */
@media (max-width: 980px) {
  .hero .wrap, .split, .setup { grid-template-columns: 1fr; gap: 48px; }
  .split.flip .copy { order: 0; }
  .g3, .steps, .tiers { grid-template-columns: 1fr 1fr; }
  .device { max-width: 520px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .hero { padding: 44px 0 72px; }
  .app-icon { width: 80px; height: 80px; border-radius: 19px; }
  section { padding: 72px 0; }
  .g3, .g2, .steps, .tiers { grid-template-columns: 1fr; }
  .table { grid-template-columns: 1fr; }
  .table > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .split + .split { margin-top: 80px; }
  .k { height: 38px; font-size: 17px; border-radius: 6px; }
  .rows { gap: 8px; }
  .row { gap: 4px; }
  .chat { padding: 16px 14px 12px; }
  .themes { grid-template-columns: 1fr 1fr; gap: 12px; }
  .theme .mk { height: 16px; }
  .card, .step, .tier { padding: 22px; }
  .section-head { margin-bottom: 36px; }
  .section-head p, .copy > p { font-size: 17px; }
}
