/* ==========================================================================
   Typeme — line-grid editorial page.

   The layout borrows the line system from the english-game landing page:
   every section is a band between two long vertical rails, closed by a
   horizontal rule, with a square "nail" where the rails meet the rule.
   Content sits in shared-border grids instead of floating round cards.
   Dot / hatch / stripe patterns are used only as quiet texture.

   Palette: neutral paper, ink, grey lines, one coral accent. The app icon
   supplies the only saturated colour on the page. A light/dark theme is
   switched with [data-theme="dark"] on <html>.
   ========================================================================== */

:root {
  --bg: #f4f5f3;
  --paper: #ffffff;
  --paper-2: #eceeeb;

  --ink: #141a18;
  --muted: #5c6663;
  --faint: #8b9491;

  --line: #dcdedb;
  --line-dk: #b8bdba;

  --coral: #e0485f;
  --coral-dk: #b22e45;
  --ok: #2f7d5b;

  --header-bg: rgba(244, 245, 243, 0.92);
  --screen-bar-bg: rgba(255, 255, 255, 0.55);
  --shadow: rgba(20, 26, 24, 0.28);

  --rail: clamp(0px, 4vw, 64px);
  --pad: clamp(20px, 3vw, 40px);
  --frame-w: 1200px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", Times, serif;
  --display: "Didot", "Bodoni 72", "Bodoni MT", Georgia, "Times New Roman", Times, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0f1312;
  --paper: #171c1a;
  --paper-2: #1c2220;

  --ink: #e9edeb;
  --muted: #a2aca8;
  --faint: #6e7874;

  --line: rgba(233, 237, 235, 0.13);
  --line-dk: rgba(233, 237, 235, 0.26);

  --coral: #f2637c;
  --coral-dk: #f2637c;
  --ok: #7bd3a6;

  --header-bg: rgba(15, 19, 18, 0.92);
  --screen-bar-bg: rgba(23, 28, 26, 0.62);
  --shadow: rgba(0, 0, 0, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(224, 72, 95, 0.2);
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

kbd {
  padding: 0.08em 0.4em;
  border: 1px solid var(--line-dk);
  border-bottom-width: 2px;
  background: var(--paper);
  color: var(--ink);
  font: 600 0.8em/1 var(--mono);
  white-space: nowrap;
}

.nowrap {
  white-space: nowrap;
}

/* ==========================================================================
   The line grid
   ========================================================================== */

.sec {
  position: relative;
  padding-inline: var(--rail);
  border-bottom: 2px solid var(--line);
}

.sec.last {
  border-bottom: 0;
}

.frame {
  position: relative;
  width: 100%;
  max-width: var(--frame-w);
  margin-inline: auto;
  padding-inline: var(--pad);
  border-inline: 2px solid var(--line);
}

.block {
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

/* square nail where a rail meets a section rule */
.dia {
  position: absolute;
  bottom: -6px;
  z-index: 4;
  width: 10px;
  height: 10px;
  background: var(--bg);
  border: 2px solid var(--line-dk);
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--coral);
}

.dia.bl {
  left: -6px;
}

.dia.br {
  right: -6px;
}

@media (max-width: 720px) {
  .dia {
    display: none;
  }
}

/* texture */
.pat {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  color: var(--line-dk);
  pointer-events: none;
}

.pat.dots {
  opacity: 0.55;
}

.pat.hatch {
  opacity: 0.4;
}

.pat.stripes {
  opacity: 0.55;
}

.fade-radial {
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, rgba(0, 0, 0, 0.4) 52%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, #000 0%, rgba(0, 0, 0, 0.4) 52%, transparent 100%);
}

.fade-down {
  -webkit-mask-image: linear-gradient(#000c, #0001);
  mask-image: linear-gradient(#000c, #0001);
}

.frame > :not(.dia):not(.pat) {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Header
   ========================================================================== */

.head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  color: var(--ink);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.head-in {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  padding: 2px;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.brand-name {
  font-family: var(--sans);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-left: auto;
}

.nav a {
  position: relative;
  padding: 0.35rem 0;
  color: var(--muted);
  font: 500 0.66rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.18s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease);
}

.nav a:hover {
  color: var(--ink);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  margin: auto;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 2px solid var(--line-dk);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}

.theme-toggle:hover {
  border-color: var(--ink);
}

.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}

.theme-sun {
  display: none;
}

[data-theme="dark"] .theme-sun {
  display: block;
}

[data-theme="dark"] .theme-moon {
  display: none;
}

.head .btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.head .btn-primary:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 600 0.82rem/1 var(--sans);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn-lg {
  padding: 0.95rem 1.5rem;
  font-size: 0.92rem;
}

.btn-sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.76rem;
}

.btn-note {
  font: 500 0.66rem/1 var(--mono);
  color: var(--faint);
}

.btn-primary .btn-note {
  color: inherit;
  opacity: 0.65;
}

.btn-primary:hover .btn-note {
  opacity: 0.85;
}

/* ==========================================================================
   Hero — left: the argument. right: the product.
   ========================================================================== */

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2.5rem, 5vw, 5.5rem);
  align-items: center;
  padding-block: clamp(4rem, 8vw, 7rem);
}

.hero-copy {
  max-width: 540px;
}

.hero-kicker {
  margin-bottom: 1.4rem;
  color: var(--coral);
  font: 600 0.66rem/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* One family, one size: the italic second line carries the hierarchy. */
.hero-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 5.4vw, 5rem);
  letter-spacing: -0.03em;
  line-height: 1.03;
  color: var(--ink);
}

.hero-title-a,
.hero-title-b {
  display: block;
}

.hero-title-b {
  font-style: italic;
}

.hero-lead {
  max-width: 46ch;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.1vw, 1.06rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font: 600 0.9rem/1 var(--sans);
  transition: color 0.18s, border-color 0.18s;
}

.link-arrow span {
  transition: transform 0.18s var(--ease);
}

.link-arrow:hover {
  color: var(--coral);
  border-color: var(--coral);
}

.link-arrow:hover span {
  transform: translateX(4px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin-top: 1.3rem;
  color: var(--faint);
  font: 500 0.62rem/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-meta li + li::before {
  content: "·";
  margin-right: 0.9rem;
  color: var(--line-dk);
}

/* Right: the product screen. */
.hero-media {
  min-width: 0;
  align-self: center;
}

.hero-media .hero-screen {
  margin: 0;
  border: 2px solid var(--line-dk);
  background: var(--paper);
  box-shadow: 0 30px 60px -40px var(--shadow);
}

.screen-ph .ph-play {
  width: 68px;
  height: 68px;
}

.screen-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--screen-bar-bg);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--faint);
  font: 500 0.6rem/1 var(--mono);
  letter-spacing: 0.04em;
}

.screen-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-dk);
}

.screen-bar span {
  margin-left: 8px;
}

/* ==========================================================================
   Media placeholders (replace .media-ph with a <video>)
   ========================================================================== */

.media {
  position: relative;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  overflow: hidden;
  border: 2px solid var(--line-dk);
  background: var(--paper);
}

.media-hero {
  aspect-ratio: 16 / 9;
}

.media-wide {
  aspect-ratio: 16 / 6;
}

.media-capture,
.media-memory,
.media-privacy {
  aspect-ratio: 4 / 3;
}

.media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
}

.media-ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--paper) 0%, transparent 72%);
}

.ph-corners {
  position: absolute;
  inset: 10px;
  pointer-events: none;
}

.ph-corners::before,
.ph-corners::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
}

.ph-corners::before {
  left: 0;
  top: 0;
  border-right: 0;
  border-bottom: 0;
}

.ph-corners::after {
  right: 0;
  bottom: 0;
  border-left: 0;
  border-top: 0;
}

.ph-play {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.ph-play::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-left: 16px solid var(--coral);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.ph-label {
  position: relative;
  z-index: 1;
  margin-top: 0.35rem;
  color: var(--ink);
  font: 600 0.64rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ph-note {
  position: relative;
  z-index: 1;
  color: var(--faint);
  font: 400 0.62rem/1.4 var(--mono);
}

/* ==========================================================================
   Section heads
   ========================================================================== */

.sec-head {
  max-width: 680px;
}

.sec-head.center {
  margin-inline: auto;
  text-align: center;
}

.kicker {
  color: var(--coral);
  font: 600 0.64rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  margin-right: 0.6rem;
  background: var(--coral);
  vertical-align: middle;
}

h2 {
  margin-top: 1.1rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.2vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1.04;
  text-wrap: balance;
}

.sec-lead {
  margin-top: 1rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.15vw, 1.06rem);
  line-height: 1.65;
}

.sec-head.center .sec-lead {
  max-width: 58ch;
  margin-inline: auto;
}

/* ==========================================================================
   Shared-border grids
   ========================================================================== */

.grid {
  display: grid;
  border-top: 2px solid var(--line-dk);
  border-left: 2px solid var(--line-dk);
  background: var(--paper);
}

.grid > * {
  position: relative;
  padding: clamp(1.3rem, 2.4vw, 1.8rem);
  border-right: 2px solid var(--line-dk);
  border-bottom: 2px solid var(--line-dk);
  transition: background 0.18s;
}

.grid > *:hover {
  background: var(--paper-2);
}

/* corner brackets on hover */
.grid > *::before,
.grid > *::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--coral);
  opacity: 0;
  transition: opacity 0.15s;
}

.grid > *::before {
  left: -2px;
  top: -2px;
  border-right: 0;
  border-bottom: 0;
}

.grid > *::after {
  right: -2px;
  bottom: -2px;
  border-left: 0;
  border-top: 0;
}

.grid > *:hover::before,
.grid > *:hover::after {
  opacity: 1;
}

/* steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 2px solid var(--line-dk);
  border-left: 2px solid var(--line-dk);
  background: var(--paper);
}

.steps li {
  position: relative;
  padding: clamp(1.4rem, 2.6vw, 2rem);
  border-right: 2px solid var(--line-dk);
  border-bottom: 2px solid var(--line-dk);
}

.steps li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -15px;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  transform: translateY(-50%);
  border: 2px solid var(--line-dk);
  background: var(--bg);
  color: var(--coral);
  font: 700 13px/1 var(--mono);
}

.num {
  display: inline-block;
  padding: 3px 7px;
  background: var(--ink);
  color: var(--bg);
  font: 600 0.62rem/1 var(--mono);
  letter-spacing: 0.1em;
}

.steps h3 {
  margin-top: 1rem;
  font: 600 1.1rem/1.2 var(--sans);
  letter-spacing: -0.02em;
}

.steps p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* action cards */
.action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.action-tag {
  color: var(--coral);
  font: 600 0.62rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.action-grid h3 {
  margin-top: 0.8rem;
  font: 600 1.02rem/1.35 var(--sans);
  letter-spacing: -0.02em;
}

.action-ex {
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.ex-before {
  color: var(--faint);
  font-size: 0.85rem;
  line-height: 1.5;
}

.ex-after {
  position: relative;
  margin-top: 0.5rem;
  padding-left: 0.8rem;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.55;
}

.ex-after::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 2px;
  background: var(--coral);
}

/* ==========================================================================
   Split sections
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split.reverse .split-copy {
  order: 2;
}

.split.reverse .media {
  order: 1;
}

.split h2 {
  margin-top: 1rem;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
}

.split .media {
  margin-top: 0;
}

.ticks {
  margin-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.ticks li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.4rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.12rem;
  width: 6px;
  height: 6px;
  background: var(--coral);
}

.ticks b {
  color: var(--ink);
  font-weight: 600;
}

/* ==========================================================================
   Divider band
   ========================================================================== */

.divider {
  height: clamp(40px, 6vw, 64px);
}

.divider .frame {
  height: 100%;
}

/* ==========================================================================
   Privacy
   ========================================================================== */

.privacy .frame {
  background: var(--paper-2);
}

.privacy-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.privacy h2 {
  margin-top: 1rem;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
}

.privacy .media-privacy {
  margin-top: 0;
}

.privacy .spec {
  grid-column: 1 / -1;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.stamp {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.4rem 0.6rem;
  border: 2px solid var(--coral);
  color: var(--coral);
  font: 700 0.6rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.spec {
  border-top: 2px solid var(--line-dk);
}

.spec-row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: baseline;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--line);
}

.spec-row dt {
  color: var(--faint);
  font: 600 0.6rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.spec-row dd {
  color: var(--ink);
  font: 400 0.78rem/1.5 var(--mono);
  overflow-wrap: anywhere;
}

.spec-flag {
  color: var(--coral);
  font: 600 0.58rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ==========================================================================
   AI activity — the local request log
   ========================================================================== */

.log-panel {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border: 2px solid var(--line-dk);
  background: var(--paper);
}

.log-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.log-path {
  color: var(--muted);
  font: 500 0.68rem/1.4 var(--mono);
  overflow-wrap: anywhere;
}

.log-badge {
  flex: none;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--coral);
  color: var(--coral);
  font: 600 0.56rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.log-head,
.log-entry > summary {
  display: grid;
  grid-template-columns: 5.5rem 7rem minmax(0, 1fr) 4.5rem 3.5rem 1.25rem;
  gap: 1rem;
  align-items: center;
}

.log-head {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font: 600 0.56rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.log-entry {
  border-bottom: 1px solid var(--line);
}

.log-entry:last-child {
  border-bottom: 0;
}

.log-entry > summary {
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s;
}

.log-entry > summary::-webkit-details-marker {
  display: none;
}

.log-entry > summary:hover,
.log-entry[open] > summary {
  background: var(--paper-2);
}

.log-time,
.log-provider,
.log-model,
.log-latency,
.log-status {
  font: 400 0.78rem/1.4 var(--mono);
  overflow-wrap: anywhere;
}

.log-time {
  color: var(--faint);
}

.log-provider {
  color: var(--ink);
  font-weight: 600;
}

.log-model {
  color: var(--muted);
}

.log-latency {
  color: var(--muted);
}

.log-status.is-ok {
  color: var(--ok);
  font-weight: 600;
}

.log-status.is-error {
  color: var(--coral);
  font-weight: 600;
}

.log-caret {
  position: relative;
  width: 12px;
  height: 12px;
  justify-self: end;
}

.log-caret::before,
.log-caret::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform 0.18s var(--ease);
}

.log-caret::before {
  left: 0;
  right: 0;
  top: 5px;
  height: 2px;
}

.log-caret::after {
  top: 0;
  bottom: 0;
  left: 5px;
  width: 2px;
}

.log-entry[open] .log-caret::after {
  transform: scaleY(0);
}

.log-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: 0 1rem 1.2rem;
  border-top: 1px dashed var(--line);
  background: var(--paper-2);
}

.log-detail > div {
  padding-top: 1rem;
}

.log-label {
  margin-bottom: 0.6rem;
  color: var(--coral);
  font: 600 0.56rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.log-kv {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
}

.log-kv dt {
  color: var(--faint);
  font: 400 0.68rem/1.5 var(--mono);
}

.log-kv dd {
  color: var(--ink);
  font: 400 0.7rem/1.5 var(--mono);
  overflow-wrap: anywhere;
}

.log-note {
  margin-top: 1rem;
  color: var(--faint);
  font: 400 0.7rem/1.6 var(--mono);
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.faq-inner .sec-head {
  position: sticky;
  top: 6rem;
}

.faq-list {
  border-top: 2px solid var(--line-dk);
}

.faq {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  color: var(--ink);
  font: 600 0.98rem/1.3 var(--sans);
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--ink);
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--ink);
}

.faq-icon::before {
  left: 3px;
  right: 3px;
  top: 5px;
  height: 2px;
}

.faq-icon::after {
  top: 3px;
  bottom: 3px;
  left: 5px;
  width: 2px;
  transition: transform 0.18s var(--ease);
}

.faq[open] .faq-icon::after {
  transform: scaleY(0);
}

.faq p {
  padding: 0 2rem 1.2rem 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

/* ==========================================================================
   Download
   ========================================================================== */

.download .frame {
  text-align: center;
}

.download-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.download-icon {
  width: 76px;
  height: 76px;
  margin-bottom: 1.4rem;
  padding: 2px;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.download h2 {
  margin-top: 1rem;
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
}

.download .sec-lead {
  margin-top: 1rem;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.fineprint {
  margin-top: 1.4rem;
  color: var(--faint);
  font: 400 0.72rem/1.5 var(--mono);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  padding-block: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-mark {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-dk);
}

.footer-name {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-tag {
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-left: auto;
}

.footer-nav a {
  color: var(--muted);
  font: 500 0.62rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.18s;
}

.footer-nav a:hover {
  color: var(--ink);
}

.footer-copy {
  color: var(--faint);
  font: 400 0.62rem/1.5 var(--mono);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Anchors + reveal
   ========================================================================== */

#how,
#capture,
#memory,
#actions,
#privacy,
#logs,
#faq,
#download {
  scroll-margin-top: 5rem;
}

.js .rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js .rv.in {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .hero-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  .hero-copy {
    max-width: 100%;
  }

  .split,
  .privacy-inner,
  .faq-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  .split.reverse .split-copy,
  .split.reverse .media {
    order: 0;
  }

  .split .media,
  .privacy .media {
    max-width: 560px;
  }

  .faq-inner .sec-head {
    position: static;
  }

  .action-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps li:not(:last-child)::after {
    content: "↓";
    right: auto;
    left: 50%;
    top: auto;
    bottom: -15px;
    transform: translateX(-50%);
  }

  .media-wide {
    aspect-ratio: 16 / 9;
  }

  .media-hero {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 760px) {
  .log-head {
    display: none;
  }

  .log-entry > summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem 1rem;
    padding: 0.8rem 0.9rem;
  }

  .log-time {
    grid-column: 1;
    grid-row: 1;
  }

  .log-provider {
    grid-column: 1;
    grid-row: 2;
  }

  .log-model {
    grid-column: 1;
    grid-row: 3;
  }

  .log-status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .log-latency {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .log-caret {
    grid-column: 2;
    grid-row: 3;
  }

  .log-detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .log-kv {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }

  .nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: var(--pad);
    right: var(--pad);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem;
    border: 2px solid var(--line-dk);
    background: var(--paper);
    box-shadow: 6px 6px 0 rgba(23, 33, 31, 0.12);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 0.8rem 0.7rem;
    border-bottom: 1px solid var(--line);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .nav a::after {
    display: none;
  }

  .nav-toggle {
    display: block;
    margin-left: 0;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .head .btn-sm {
    display: none;
  }

  .head-in {
    gap: 0.75rem;
  }

  .footer-in {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-nav {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .hero-title {
    font-size: clamp(2.9rem, 11vw, 4rem);
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-meta {
    margin-top: 1.2rem;
  }

  .screen-bar {
    padding: 8px 12px;
    font-size: 0.55rem;
  }

  .screen-ph .ph-play {
    width: 54px;
    height: 54px;
  }

  .hero-actions .btn,
  .download-actions .btn {
    width: 100%;
  }

  .hero-actions {
    gap: 1rem;
  }

  .ph-play {
    width: 52px;
    height: 52px;
  }

  .spec-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem 1rem;
  }

  .spec-row dd {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .spec-flag {
    grid-row: 1;
    grid-column: 2;
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .nav a::after,
  .grid > *,
  .faq-icon::after {
    transition: none;
  }
}
