/* Shared by the marketing pages (/ and /claude-code-codex-mobile).
   The guides and policies keep their own inline styles. */
:root {
  --accent: #1060F0; --accent-ink: #0b47b8;
  --canvas: #f6f1e8; --card: #fffdf8; --ink: #1c1915; --muted: #5c564c; --line: #e4dccf;
  --code: #efe8d8; --night: #201d19; --night-ink: #f3ede2;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Georgia, "Iowan Old Style", "Songti SC", serif;
  --mono: ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.6 var(--serif); color: var(--ink); background: var(--canvas); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .86em; background: var(--code); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
pre { font-family: var(--mono); background: var(--night); color: var(--night-ink); padding: 12px 14px; border-radius: 10px;
  overflow-x: auto; font-size: .85rem; line-height: 1.5; margin: .6em 0 1em; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
/* Commands and paths read left to right inside right-to-left text too. */
code { direction: ltr; unicode-bidi: isolate; }
pre { direction: ltr; text-align: left; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: color-mix(in srgb, var(--canvas) 84%, white); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.top .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.top .brand:hover { text-decoration: none; }
.top .brand img { width: 34px; height: 34px; border-radius: 8px; }
.top nav { margin-inline-start: auto; display: flex; gap: 18px; font: 500 .9rem/1 var(--sans); }
.top nav a { color: var(--muted); white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); text-decoration: none; }
@media (max-width: 960px) { .top nav .mid, .lang .name { display: none; } }
@media (max-width: 640px) { .top nav .wide { display: none; } .top nav { gap: 14px; } }

/* Language menu: every version of the page, each name in its own language */
.lang { position: relative; font: 500 .9rem/1 var(--sans); }
.lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 6px;
  margin: -6px; border-radius: 8px; color: var(--muted); white-space: nowrap; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { color: var(--ink); }
.lang summary svg { flex: none; }
.lang ul { position: absolute; inset-inline-end: -6px; top: calc(100% + 14px); z-index: 6; margin: 0; padding: 6px;
  list-style: none; columns: 2; column-gap: 2px; width: max-content; max-width: calc(100vw - 24px);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(40, 30, 10, .4); }
.lang li { break-inside: avoid; }
.lang li a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); white-space: nowrap; }
.lang li a:hover { background: var(--canvas); text-decoration: none; }
.lang li a[aria-current] { color: var(--accent); font-weight: 700; }
@media (max-width: 640px) { .lang .name { display: none; } .lang li a { padding: 9px 10px; } }

/* Layout */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
html:lang(ja) :is(h1, h2, h3) { word-break: auto-phrase; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); margin: .2em 0 .35em; letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 .5em; }
h3 { font-size: 1.15rem; margin: 0 0 .35em; }
p { margin: 0 0 1em; }
/* Georgia has no CJK, Arabic, Devanagari or full Vietnamese glyphs, and tight tracking breaks those scripts. */
html:is(:lang(ja), :lang(ko), :lang(zh), :lang(ar), :lang(hi), :lang(vi)) { --serif: var(--sans); }
html:is(:lang(ja), :lang(ko), :lang(zh), :lang(ar), :lang(hi)) :is(h1, h2, h3, .eyebrow) { letter-spacing: 0; }
.eyebrow { font: 600 .78rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 .6em; }
.lede { font-size: clamp(1.08rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 38em; }
.muted { color: var(--muted); }
.fine { font: .85rem/1.5 var(--sans); color: var(--muted); }

/* Buttons */
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4em 0 .8em; }
.btn { display: inline-flex; flex-direction: column; justify-content: center; min-width: 168px; padding: 10px 18px;
  border-radius: 12px; background: var(--ink); color: #fff; font: 600 1rem/1.2 var(--sans); }
.btn small { font-weight: 500; font-size: .72rem; opacity: .75; letter-spacing: .02em; }
.btn:hover { text-decoration: none; background: #000; }
.btn.alt { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.alt:hover { background: #fff; }

/* Hero */
.hero { padding-top: 48px; }
.hero-shot { margin: 40px 0 0; }
.hero-shot img { border-radius: 22px; box-shadow: 0 30px 60px -30px rgba(40, 30, 10, .45); }

/* Framed shots: the store gallery's background and device, made by
   ScreenshotComposer.swift --web (see shots.py) */
.shot { width: 100%; max-width: 360px; border-radius: 24px; box-shadow: 0 24px 48px -24px rgba(40, 30, 10, .45); }

/* Phone and tablet shots */
.phone { width: 100%; max-width: 300px; border-radius: 34px; border: 1px solid var(--line);
  box-shadow: 0 24px 48px -24px rgba(40, 30, 10, .4); background: var(--card); }
.tablet { border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 24px 48px -24px rgba(40, 30, 10, .35); }
.duo { width: 100%; max-width: 340px; border-radius: 26px; border: 1px solid var(--line); box-shadow: 0 24px 48px -24px rgba(40, 30, 10, .35); }

/* Feature rows: text beside a phone, sides alternate on wide screens */
.row { display: grid; gap: 28px; align-items: center; padding: 40px 0; }
.row + .row { border-top: 1px dashed var(--line); }
.row > *, .grid > *, .flow > * { min-width: 0; }
.row figure { margin: 0; display: flex; justify-content: center; }
.row ul { padding-inline-start: 1.2em; margin: 0 0 1em; }
.row li { margin: .25em 0; }
@media (min-width: 820px) {
  .row { grid-template-columns: 1fr 360px; gap: 56px; }
  .row.flip { grid-template-columns: 360px 1fr; }
  .row.flip figure { order: -1; }
  .row.single { grid-template-columns: 1fr; gap: 0; }
}
.tag { display: inline-block; font: 600 .66rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 5px; padding: 3px 5px; margin-inline-start: 8px; vertical-align: middle; }

/* Cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-inline-start: 1.2em; margin: 0 0 1em; }
.card h3 a { color: inherit; }
.shots { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 24px; }
.shots figure { margin: 0; }
.shots img { border-radius: 18px; box-shadow: 0 18px 36px -22px rgba(40, 30, 10, .45); }
.shots figcaption { font: .85rem/1.4 var(--sans); color: var(--muted); margin-top: 8px; text-align: center; }

/* Platform cards */
.platforms .card { display: flex; flex-direction: column; }
.platforms .card .btn { margin-top: auto; align-self: flex-start; }

/* Flow diagram */
.flow { display: grid; gap: 10px; align-items: stretch; margin: 24px 0; font-family: var(--sans); }
.flow .node { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.flow .node strong { display: block; font-size: .98rem; }
.flow .node span { font-size: .85rem; color: var(--muted); }
.flow .link { display: flex; align-items: center; justify-content: center; font-size: .78rem; color: var(--muted);
  letter-spacing: .04em; text-transform: uppercase; }
.flow .link::before { content: "↓"; margin-inline-end: 6px; font-size: 1rem; }
.flow .server { border-color: var(--accent); }
@media (min-width: 760px) {
  .flow { grid-template-columns: 1fr 96px 1.6fr; }
  .flow .link::before { content: "→"; }
  [dir="rtl"] .flow .link::before { content: "←"; }
}

/* Steps */
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
ol.steps > li { min-width: 0; counter-increment: s; position: relative; padding: 16px 18px; padding-inline-start: 58px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; }
ol.steps > li::before { content: counter(s); position: absolute; inset-inline-start: 16px; top: 15px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff; font: 700 .9rem/28px var(--sans); text-align: center; }
ol.steps p { margin: 0 0 .4em; }
ol.steps pre { margin-bottom: .2em; }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin: 0 0 10px; }
.faq summary { cursor: pointer; padding: 15px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--muted); font-family: var(--sans); }
.faq details[open] summary::after { content: "–"; }
.faq details > p { margin: 0 0 16px; }

/* Footer */
footer.site { border-top: 1px solid var(--line); padding: 36px 0 48px; font: .88rem/1.6 var(--sans); color: var(--muted); }
footer.site .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 24px; }
footer.site h4 { margin: 0 0 6px; color: var(--ink); font-size: .9rem; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin: 3px 0; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--ink); }

/* At-a-glance facts table (FAQ page) */
table.facts { width: 100%; border-collapse: collapse; margin-top: 16px; font: .95rem/1.5 var(--sans); }
table.facts th, table.facts td { text-align: start; vertical-align: top; padding: 12px 14px; border-top: 1px solid var(--line); }
table.facts tr:last-child th, table.facts tr:last-child td { border-bottom: 1px solid var(--line); }
table.facts th { width: 30%; font-weight: 600; color: var(--ink); }
table.facts td { color: var(--muted); }
@media (max-width: 640px) { table.facts th, table.facts td { display: block; width: auto; } table.facts td { border-top: 0; padding-top: 0; } }

/* The film: a dark band on the home page, the hero of the Claude Code page.
   Phones held upright get the 9:16 cut; preload="none" keeps the hidden one unloaded. */
.night { background: #0c161e; color: #e8edf3; border-top: 0; }
section.night + section { border-top: 0; }
.night h2 { color: #fff; }
.night .eyebrow { color: #7fb0ff; }
.night .tag { color: #7fb0ff; border-color: #7fb0ff; }
.night a { color: #9cc2ff; }
.night code { background: #1b2733; color: #e8edf3; }
.film { margin: 28px 0 0; }
.film video { display: block; width: 100%; height: auto; border-radius: 18px; background: #0c161e;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.hero .film video { box-shadow: 0 30px 60px -30px rgba(40, 30, 10, .55); }
.film .clip { position: relative; }
.film .cut-tall { display: none; }
@media (max-width: 640px) and (orientation: portrait) {
  .film .cut-wide { display: none; }
  .film .cut-tall { display: block; width: fit-content; margin: 0 auto; }
  .film .cut-tall video { width: auto; max-width: 100%; max-height: 82svh; }
}
.film .play { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; display: flex;
  align-items: center; gap: 8px; padding: 14px 24px 14px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .94); color: #0c161e; font: 700 1.05rem/1 var(--sans); letter-spacing: .02em;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .55); transition: transform .15s ease; }
.film .play:hover { transform: scale(1.05); }
.film .play:focus-visible { outline: 3px solid #7fb0ff; outline-offset: 3px; }
.film-notes { display: grid; gap: 0 40px; margin-top: 28px; color: #c3ccd6; }
@media (min-width: 820px) { .film-notes { grid-template-columns: 1fr 1fr; } }
