/* Coda for the Psion netBook */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --light-bg: #fbfbfd;
  --light-alt: #f2f2f5;
  --light-fg: #1d1d1f;
  --light-muted: #5f5f66;
  --light-card: #ffffff;
  --light-line: #d9d9de;

  --dark-bg: #0b0b0d;
  --dark-deep: #000000;
  --dark-fg: #f5f5f7;
  --dark-muted: #a8a8b0;
  --dark-card: #1a1a1d;
  --dark-line: #2c2c31;

  /* Coda's colours, the netBook's own (each channel a multiple of 0x33) */
  --coda-navy: #003366;
  --coda-blue: #0066cc;
  --coda-sky: #3399ff;
  --coda-teal: #009999;
  --coda-orange: #ff6600;

  --accent: var(--coda-blue);
  --accent-dark: var(--coda-sky);

  --wrap: 1120px;
  --gutter: 24px;
  --radius: 18px;
  --nav-h: 52px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --light-bg: #101012;
    --light-alt: #17171a;
    --light-fg: #f5f5f7;
    --light-muted: #a8a8b0;
    --light-card: #1f1f23;
    --light-line: #34343a;
    --accent: var(--coda-sky);
    --dark-bg: #050506;
    --dark-card: #19191c;
  }
}
:root[data-theme="dark"] {
  --light-bg: #101012;
  --light-alt: #17171a;
  --light-fg: #f5f5f7;
  --light-muted: #a8a8b0;
  --light-card: #1f1f23;
  --light-line: #34343a;
  --accent: var(--coda-sky);
  --dark-bg: #050506;
  --dark-card: #19191c;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--light-fg);
  background: var(--light-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
img.px { image-rendering: pixelated; image-rendering: crisp-edges; }
@supports (image-rendering: pixelated) { img.px { image-rendering: pixelated; } }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible + .ba-handle { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
code, kbd { font-family: var(--mono); font-size: 0.9em; }
kbd {
  display: inline-block; padding: 1px 7px; border-radius: 6px;
  border: 1px solid currentColor; border-bottom-width: 2px; opacity: 0.95;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: #fff; color: #000; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* Layout */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 820px; }
.narrow-text { max-width: 760px; }
.center-text { text-align: center; margin-left: auto; margin-right: auto; }
section { padding: clamp(80px, 12vw, 150px) 0; position: relative; }

.light { background: var(--light-bg); color: var(--light-fg); }
.light.alt { background: var(--light-alt); }
.dark { background: var(--dark-bg); color: var(--dark-fg); --accent: var(--accent-dark); }
.dark.deep { background: var(--dark-deep); }

/* Type */
h1, h2, h3 { margin: 0; letter-spacing: -0.022em; line-height: 1.06; }
h1 { font-size: clamp(46px, 9vw, 104px); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(36px, 6.4vw, 72px); font-weight: 700; margin-bottom: 28px; }
h3 { font-size: 21px; font-weight: 650; line-height: 1.2; }
.h3-lg { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
.h3-sm { font-size: 19px; margin: 32px 0 10px; }
.eyebrow { font-size: 17px; font-weight: 600; margin: 0 0 14px; color: var(--accent); }
.light .eyebrow { color: var(--accent); }
.body-lg { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.45; margin: 0 0 22px; font-weight: 450; }
.body { font-size: 18px; margin: 0 0 18px; }
.light .body-lg, .light .body { color: var(--light-muted); }
.dark .body-lg, .dark .body { color: var(--dark-muted); }
.light .body-lg strong, .dark .body-lg strong { color: inherit; }
.caption, figcaption { font-size: 15px; line-height: 1.45; margin-top: 14px; }
.light figcaption, .light .caption { color: var(--light-muted); }
.dark figcaption, .dark .caption { color: var(--dark-muted); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(10, 10, 12, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
}
.nav-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #f5f5f7; font-weight: 650; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 20px; height: 20px; color: var(--coda-sky); }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a { color: rgba(245, 245, 247, 0.82); font-size: 13px; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links a[aria-current="true"] { color: #fff; box-shadow: 0 2px 0 var(--coda-sky); }
.nav-cta { font-size: 13px; color: #fff; background: var(--accent-dark); color: #001; padding: 5px 12px; border-radius: 980px; font-weight: 600; white-space: nowrap; }
.nav-cta:hover { text-decoration: none; filter: brightness(1.08); }

/* Buttons */
.cta-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin: 32px 0 0; }
.cta-row.center { justify-content: center; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 980px; font-size: 17px; font-weight: 600;
  background: var(--accent); color: #fff;
}
.dark .btn { background: var(--coda-blue); color: #fff; }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.link-arrow { font-weight: 500; }
.link-arrow::after { content: " \203A"; font-size: 1.15em; }

/* Hero */
.hero { padding-top: clamp(64px, 10vw, 120px); padding-bottom: 80px; text-align: center; overflow: hidden;
  background: radial-gradient(1200px 600px at 50% 85%, rgba(0, 51, 102, 0.75) 0%, rgba(11,11,13,0) 70%), var(--dark-deep); }
.hero h1 {
  background: linear-gradient(180deg, #ffffff 30%, #99ccff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .eyebrow { color: var(--coda-sky); }
.hero .lede { font-size: clamp(19px, 2.4vw, 26px); color: var(--dark-muted); max-width: 760px; margin: 26px auto 0; line-height: 1.4; }
.hero .cta-row { justify-content: center; }
.hero .caption { margin-top: 28px; }

/* The netBook frame */
.device { margin: clamp(48px, 7vw, 84px) auto 0; max-width: 1008px; }
.bezel {
  padding: clamp(10px, 2.6vw, 30px);
  border-radius: clamp(14px, 2.4vw, 28px);
  background: linear-gradient(160deg, #3a3b40 0%, #202124 45%, #151518 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 -1px 0 rgba(0,0,0,0.6) inset, 0 50px 120px rgba(0,0,0,0.55), 0 0 0 1px #000;
}
.screen { border-radius: 4px; overflow: hidden; background: #000; box-shadow: 0 0 0 2px #0a0a0a, 0 0 0 3px #2c2d31; }
.screen img { width: 100%; }
.deck {
  height: clamp(12px, 2vw, 22px); margin: 0 -3.5%;
  border-radius: 0 0 22px 22px / 0 0 100% 100%;
  background: linear-gradient(180deg, #4a4b50 0%, #2a2b2f 50%, #141416 100%);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

/* Story stats */
.stats { list-style: none; padding: 0; margin: 72px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 1px solid var(--light-line); padding-top: 40px; }
.stats strong { display: block; font-size: clamp(34px, 4.6vw, 52px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.stats span { display: block; color: var(--light-muted); font-size: 16px; margin-top: 8px; }

/* Frames and cards */
.frame { margin: 48px 0 0; }
.frame img, .card img, .note-card img {
  border-radius: 12px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 18px 50px rgba(0,0,0,0.12);
}
.dark .frame img, .dark-card img { box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 24px 60px rgba(0,0,0,0.5); }
.frame.wide img { width: 100%; }
.frame.center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.frame img.xl { width: min(100%, 666px); }
.frame img.mid { width: min(100%, 584px); margin: 0 auto; }
.frame img.tall, .card img.tall { width: auto; max-height: 420px; margin: 0 auto; }

.grid { display: grid; gap: 28px; margin-top: 48px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > .frame, .grid > .ba { margin-top: 0; }

.card { background: var(--light-card); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 0 0 1px var(--light-line); }
.card img { width: 100%; margin-bottom: 8px; box-shadow: 0 0 0 1px var(--light-line); }
.card p { margin: 0; color: var(--light-muted); font-size: 16px; }
.dark-card { background: var(--dark-card); box-shadow: 0 0 0 1px var(--dark-line); }
.dark-card p { color: var(--dark-muted); }
.card .link-arrow { margin-top: auto; padding-top: 6px; font-size: 16px; }

.note-card { margin-top: 64px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; background: var(--light-card); border-radius: var(--radius); padding: 28px; box-shadow: 0 0 0 1px var(--light-line); }
.note-card p { margin: 0; font-size: 20px; color: var(--light-muted); line-height: 1.45; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; margin-top: 56px; }
.split:first-child { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 28px; }
.stack .frame { margin: 0; }

.feature { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 5vw, 64px); align-items: center; margin-top: clamp(72px, 9vw, 110px); }
.feature.reverse { grid-template-columns: 1.15fr 0.85fr; }
.feature.reverse .feature-text { order: 2; }
.feature .ba { margin: 0; }

/* Chips */
.chips { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: var(--dark-card); border: 1px solid var(--dark-line); padding: 8px 14px; border-radius: 980px; font-size: 15px; color: var(--dark-muted); }
.chips kbd { color: var(--dark-fg); margin-right: 6px; border-color: #55555c; }

/* Before and after slider */
.ba { --pos: 50%; margin: 48px 0 0; }
.ba.small { max-width: 420px; justify-self: center; width: 100%; }
.ba-stage {
  position: relative; overflow: hidden; border-radius: 12px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 18px 50px rgba(0,0,0,0.14);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.dark .ba-stage { box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 24px 60px rgba(0,0,0,0.5); }
.ba-stage img { width: 100%; -webkit-user-drag: none; pointer-events: none; }
.ba-after { position: absolute; inset: 0; height: 100%; clip-path: inset(0 0 0 var(--pos)); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.25); pointer-events: none;
}
.ba-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border-radius: 50%; background: rgba(255,255,255,0.96);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M16 13l-6 7 6 7M24 13l6 7-6 7' fill='none' stroke='%23111' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
  -webkit-appearance: none; appearance: none; background: transparent;
}
.ba-range:focus-visible ~ .ba-handle::after, .ba-range:focus-visible + .ba-handle::after { outline: 3px solid var(--accent); outline-offset: 2px; }
.ba-label {
  position: absolute; top: 12px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 980px;
  background: rgba(0,0,0,0.66); color: #fff; pointer-events: none; z-index: 1;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ba-label.left { left: 12px; }
.ba-label.right { right: 12px; }

/* Gallery tabs */
.gallery { margin-top: 40px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 8px; }
.tabs button {
  font: inherit; font-size: 15px; font-weight: 500; padding: 8px 16px; border-radius: 980px; cursor: pointer;
  border: 1px solid var(--light-line); background: var(--light-card); color: var(--light-fg);
}
.tabs button[aria-selected="true"] { background: var(--light-fg); color: var(--light-bg); border-color: var(--light-fg); }
.gallery .ba { margin-top: 24px; }
.gallery .ba-stage { max-width: 960px; margin: 0 auto; }
.gallery .ba-stage.slim { max-width: 170px; }
.gallery figcaption { text-align: center; max-width: 680px; margin-left: auto; margin-right: auto; font-size: 17px; }

/* Office formats */
.formats { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 56px 0 40px; }
.format-col { background: var(--light-card); border-radius: 24px; padding: clamp(28px, 4vw, 48px); box-shadow: 0 0 0 1px var(--light-line); }
.format-col h3 { font-size: 17px; color: var(--light-muted); font-weight: 600; margin-bottom: 18px; }
.ext-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.ext-list li { font-size: clamp(34px, 5.6vw, 64px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.format-col:first-child .ext-list li { color: #2b6be8; }
.format-col:last-child .ext-list li { color: #1f9d57; }

/* Linux */
.terminal img { background: #000; }
.facts { margin-top: 56px; }
.fact { border-top: 1px solid var(--dark-line); padding-top: 22px; }
.fact h3 { margin-bottom: 10px; }
.fact p { margin: 0; color: var(--dark-muted); }
.fact code, .fact kbd { color: var(--dark-fg); }
.linux-more { margin-top: 48px; }
.linux-more .frame { margin: 0; }

/* Lists */
.tick-list { list-style: none; padding: 0; margin: 24px 0 0; }
.tick-list li { padding: 10px 0 10px 30px; border-top: 1px solid var(--light-line); position: relative; color: var(--light-muted); }
.tick-list li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.tick-list strong { color: var(--light-fg); font-weight: 600; }
.plain-list { margin: 0; padding-left: 20px; color: var(--light-muted); }
.plain-list li { margin: 6px 0; }

.swap { width: 100%; border-collapse: collapse; font-size: 18px; }
.swap th { text-align: left; font-size: 14px; color: var(--light-muted); font-weight: 600; padding: 0 0 10px; }
.swap td { padding: 12px 0; border-top: 1px solid var(--light-line); }
.swap td:first-child { color: var(--light-muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.swap td:last-child { font-weight: 600; }

.pair { display: grid; grid-template-columns: 560fr 860fr; gap: 28px; margin: 56px 0 0; align-items: end; }
.pair .frame { margin: 0; text-align: center; }
.pair img { width: 100%; }

.detail-grid { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.detail-grid li { background: var(--light-card); border-radius: 14px; padding: 18px 20px; font-size: 16px; color: var(--light-muted); box-shadow: 0 0 0 1px var(--light-line); }
.detail-grid strong { display: block; color: var(--light-fg); font-size: 18px; margin-bottom: 2px; }

.repo-links { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; }
.repo-links a { color: var(--dark-muted); }
.repo-links a:hover { color: var(--dark-fg); }

/* Footer */
.footer { background: var(--light-alt); color: var(--light-muted); font-size: 13px; padding: 36px 0 48px; border-top: 1px solid var(--light-line); }
.footer p { margin: 0 0 8px; max-width: 760px; }
.footer strong { color: var(--light-fg); }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Responsive */
@media (max-width: 980px) {
  .nav { height: auto; }
  .nav-inner { flex-wrap: wrap; height: auto; padding-top: 0; row-gap: 0; }
  .brand, .nav-cta { height: var(--nav-h); display: inline-flex; align-items: center; }
  .nav-cta { margin-left: auto; height: auto; }
  .nav-links { order: 3; width: 100%; max-width: 100%; min-width: 0; margin: 0; padding: 0 0 10px; overflow-x: auto; scrollbar-width: none; gap: 18px; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; }
  html { scroll-padding-top: 96px; }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .feature, .feature.reverse { grid-template-columns: 1fr; }
  .feature.reverse .feature-text { order: 0; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .grid.two, .grid.three, .split, .formats, .note-card, .detail-grid, .pair { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .hero .cta-row { flex-direction: column; gap: 18px; }
  .deck { margin: 0 -2%; }
  .ba-handle::after { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
  .tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; padding: 0 24px 6px 0; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: 0 0 auto; }
  .card { padding: 16px; }
}

/* Medium width for crops that would otherwise blow up too far */
.frame.wide.md { max-width: 820px; margin-left: auto; margin-right: auto; }
.frame.wide.md figcaption { text-align: center; }
.ba-stage:has(.ba-range:focus-visible) .ba-handle::after { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Chapters: a short dark band that opens each group of sections */
.chapter {
  padding: clamp(64px, 9vw, 112px) 0 clamp(56px, 8vw, 96px);
  background: radial-gradient(900px 420px at 15% 120%, rgba(0, 51, 102, 0.6) 0%, rgba(0,0,0,0) 70%), var(--dark-deep);
  color: var(--dark-fg); --accent: var(--accent-dark);
}
.chapter h2 { font-size: clamp(44px, 7.4vw, 88px); margin-bottom: 18px; }
.chapter .body-lg { color: var(--dark-muted); }
.chapter-links { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chapter-links a {
  display: inline-block; padding: 8px 14px; border-radius: 980px; font-size: 15px;
  color: var(--dark-fg); background: var(--dark-card); border: 1px solid var(--dark-line);
  transition: background-color .2s ease, border-color .2s ease;
}
.chapter-links a:hover { text-decoration: none; border-color: #55555c; background: #232327; }

/* A heading inside a section, with room above it */
.sub-head { margin-top: clamp(64px, 8vw, 96px); }
.visually-h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* Cards with a short picture */
.card img.short { width: auto; max-height: 200px; margin: 0 auto 8px; }

/* Two column tick list */
.tick-list.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; margin-top: 48px; }

/* Both machines */
.machine-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 64px); margin-top: 56px; }
.machine-col h3 { font-size: clamp(24px, 3vw, 30px); margin-bottom: 6px; }

/* Footer */
.footer-cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; }
.footer-h { font-size: 13px; font-weight: 650; color: var(--light-fg); margin: 0 0 10px; letter-spacing: 0; }

h1, h2, h3 { text-wrap: balance; }
.body, .body-lg, figcaption { text-wrap: pretty; }

@media (max-width: 720px) {
  .tick-list.two-col, .machine-cols, .footer-cols { grid-template-columns: 1fr; }
  .chapter-links a { font-size: 14px; padding: 7px 12px; }
}

/* a before/after slider inside a card */
.card .ba { margin: 0 0 8px; }
.card .ba-stage img { margin-bottom: 0; box-shadow: none; }

/* Terminal listings (Linux) */
.term-list { max-width: 820px; margin: 40px auto 0; background: var(--dark-card); border: 1px solid var(--dark-line); border-radius: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.term-list pre { margin: 0; padding: 20px 22px; font-family: var(--mono); font-size: 14px; line-height: 1.7; color: var(--dark-fg); white-space: pre; }
.term-list code { font-size: inherit; }
.term-list .c { color: var(--dark-muted); }
.term-list:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.term-list + .body { margin-top: 28px; }
@media (max-width: 600px) { .term-list pre { font-size: 12.5px; padding: 16px; } }

/* phones: nothing may widen the page (Safari zooms out to fit a wide box) */
html, body { overflow-x: clip; }
.term-list { max-width: min(820px, 100%); min-width: 0; }
.term-list pre { width: max-content; min-width: 100%; }

/* phones: every box sized from the screen, not from its content */
img, svg, video, canvas, iframe, input, select, textarea { max-width: 100%; }
body { overflow-wrap: break-word; }
.grid > *, .split > *, .feature > *, .pair > *, .formats > *, .stats > *, .note-card > *,
.detail-grid > *, .machine-cols > *, .footer-cols > *, .tick-list.two-col > *,
.stack > *, .frame, .ba, figure, .wrap, .nav-inner > * { min-width: 0; }
.ext-list li { overflow-wrap: anywhere; }
.swap td { overflow-wrap: anywhere; }
.chips li, .chapter-links li { max-width: 100%; }


/* Everything in Coda: the complete list, grouped as the page is */
.all-features { margin-top: 32px; columns: 3 250px; column-gap: 40px; }
.af-group { font-size: 13px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 8px; padding-top: 18px; break-after: avoid; -webkit-column-break-after: avoid; }
.af-group:first-child { padding-top: 0; }
.af-group a { color: var(--accent); }
.af-list { list-style: none; margin: 0 0 8px; padding: 0; }
.af-list li { break-inside: avoid; -webkit-column-break-inside: avoid; padding: 9px 0; border-top: 1px solid var(--light-line); font-size: 15px; line-height: 1.4; }
.af-list a { font-weight: 600; color: var(--light-fg); }
.af-list a:hover { color: var(--accent); }
.af-list span { display: block; color: var(--light-muted); }
.af-new { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-left: 8px; padding: 1px 7px; border-radius: 980px; box-shadow: inset 0 0 0 1px currentColor; vertical-align: 1px; }
.sub-head-sm { margin-top: 48px; }
@media (max-width: 720px) {
}
.deck { margin-left: max(-3.5%, calc(-1 * var(--gutter))); margin-right: max(-3.5%, calc(-1 * var(--gutter))); }
@media (max-width: 980px) {
  .nav-links { padding-right: 24px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
}
@media (max-width: 720px) { .af-list li { padding: 8px 0; } }


/* Install guide (install.html) */
.install-hero { padding-bottom: clamp(72px, 10vw, 120px); }
.glance { list-style: none; padding: 0; margin: clamp(48px, 7vw, 72px) auto 0; max-width: 860px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: glance; }
.glance li { counter-increment: glance; background: var(--dark-card); border: 1px solid var(--dark-line); border-radius: 16px; padding: 18px 16px; text-align: left; }
.glance li::before { content: counter(glance); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--coda-blue); color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.glance strong { display: block; font-size: 19px; color: var(--dark-fg); }
.glance span { display: block; font-size: 14px; color: var(--dark-muted); }

.need .card { position: relative; padding-top: 26px; }
.need-n { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--accent); }
.note-card.warn { grid-template-columns: 1.2fr 1fr; align-items: start; box-shadow: 0 0 0 1px var(--light-line), inset 4px 0 0 var(--coda-orange); }
.note-card.warn .tick-list { margin-top: 0; }
.note-card.warn .tick-list li { font-size: 16px; }

.steps { list-style: none; padding: 0; margin: 56px 0 0; }
.step { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: clamp(16px, 3vw, 32px); padding: clamp(32px, 5vw, 48px) 0; border-top: 1px solid var(--light-line); }
.step-num { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-weight: 700; color: #fff; background: var(--accent); }
.step-body { max-width: 760px; }
.step-body .body:last-child { margin-bottom: 0; }

.download-row { margin: 22px 0 0; gap: 18px; }
.download-row .caption { margin: 0; }

.tree { max-width: min(640px, 100%); min-width: 0; margin: 8px 0 22px; background: var(--dark-card); border: 1px solid var(--dark-line); border-radius: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tree pre { margin: 0; padding: 18px 20px; font-family: var(--mono); font-size: 14px; line-height: 1.75; color: var(--dark-fg); white-space: pre; width: max-content; min-width: 100%; }
.tree code { font-size: inherit; }
.tree .c { color: var(--dark-muted); }
.tree .t-dir { color: #66cccc; }
.tree:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.small-device { max-width: 720px; margin-top: 56px; }
.tag { display: block; font-size: 13px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--coda-sky); margin-bottom: 6px; }
#images .card h3 { font-size: 24px; }

.faq { margin: 40px 0 0; }
.faq dt { font-size: 19px; font-weight: 650; color: var(--light-fg); padding-top: 22px; border-top: 1px solid var(--light-line); }
.faq dd { margin: 8px 0 22px; color: var(--light-muted); font-size: 17px; }

.close-band { text-align: center; }
.close-band .narrow-text { margin-left: auto; margin-right: auto; }

@media (max-width: 720px) {
  .glance { grid-template-columns: 1fr 1fr; }
  .note-card.warn { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: 14px; }
  .step-num { width: 44px; height: 44px; font-size: 20px; }
  .tree pre { font-size: 12.5px; padding: 14px; }
}
.step > *, .glance > *, .need > * { min-width: 0; }
@media (max-width: 720px) { .step { grid-template-columns: minmax(0, 1fr); } }

/* Beta 1 (19 November 2026): the label, the line beside it, a quieter second button */
.beta-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 16px; margin: 22px 0 0; font-size: 15px; line-height: 1.4; }
.hero .beta-row { color: var(--dark-muted); }
.light .beta-row { color: var(--light-muted); }
.chapter .beta-row { color: var(--dark-muted); }
.beta-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1; padding: 5px 10px; border-radius: 980px; color: #111; background: var(--coda-orange); }
.light .beta-tag { color: #fff; background: #cc3300; box-shadow: none; }
.beta-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; margin: 28px 0 0; }
.beta-cta .beta-row { margin: 0; justify-content: flex-start; }
.btn-quiet { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px currentColor; }
.dark .btn-quiet, .chapter .btn-quiet { background: transparent; color: var(--coda-sky); }
.close-band .beta-row { margin-top: 26px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.download-row .beta-row { margin: 0; justify-content: flex-start; }
.tools .eyebrow .af-new { vertical-align: 2px; }
.card-soon { opacity: 0.75; }
.download-row + .body { margin-top: 18px; }

/* Download page: the list of releases */
.release-list { display: grid; gap: 18px; margin-top: 26px; }
.release { gap: 10px; }
.release-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.release-name { margin: 0; font-size: 22px; }
.release-pre { font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 999px; color: var(--light-muted); box-shadow: 0 0 0 1px var(--light-line); }
.release-row { margin-top: 8px; gap: 22px; }
.body-lg.narrow-text.center-text { margin-left: auto; margin-right: auto; }

/* Beta 1 announcement, under what Coda is */
.beta-announce { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); }
.beta-announce h2 { margin-bottom: 18px; }
.beta-row.start { justify-content: flex-start; margin: 0 0 14px; }
.beta-announce .cta-row { margin-top: 28px; }
.small-print { font-size: 15px; margin-top: 28px; }
.everything .all-features { margin-top: 36px; }
