/* obdtrip.com — the front page only. Shared chrome (header, footer, buttons,
   the legal pages) is in site.css; this is everything the long page adds.
   No inline styles anywhere: the Worker's CSP is style-src 'self'. */

/* ------------------------------------------------------------ screenshots --- */

/* A screenshot in a plain phone outline. The image is the whole screen as the
   Simulator captured it; the outline only rounds it off and gives it an edge. */
.shot {
  margin: 0;
  position: relative;
  border-radius: 13.5% / 6.2%;
  padding: 2.2%;
  background: #04070d;
  box-shadow: 0 0 0 1px rgba(150, 175, 215, 0.22), 0 30px 70px rgba(1, 4, 12, 0.6);
}
.shot img { display: block; width: 100%; height: auto; border-radius: 11.6% / 5.35%; }
.shot.land { border-radius: 6.2% / 13.5%; }
.shot.land img { border-radius: 5.35% / 11.6%; }
.shot.car { border-radius: 4.2%; padding: 1.6%; }
.shot.car img { border-radius: 3%; }
a.zoom { display: block; cursor: zoom-in; border-radius: inherit; }
a.zoom:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }

.cap { color: var(--ink-faint); font-size: 0.86rem; line-height: 1.5; margin-top: 12px; }
.cap b { color: var(--ink-dim); font-weight: 600; }

/* ----------------------------------------------------------------- hero --- */

.hero { padding-top: clamp(44px, 8vw, 96px); }
.hero .wrap { align-items: start; }
@media (min-width: 940px) { .hero .wrap { grid-template-columns: 1.1fr 0.9fr; } }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.7rem); max-width: 15ch; }
.hero .lede { margin-top: 22px; }
.hero .facts {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none;
  color: var(--ink-faint); font-size: 0.88rem;
}
.hero .facts li { border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }
.hero-shots { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; max-width: 520px; margin-inline: auto; }
.hero-shots .shot:nth-child(2) { margin-top: 64px; }
@media (max-width: 520px) { .hero-shots { gap: 12px; } .hero-shots .shot:nth-child(2) { margin-top: 36px; } }

/* --------------------------------------------------------------- morning --- */

.drive { display: grid; gap: clamp(40px, 6vw, 72px); }
.step { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) {
  .step { grid-template-columns: 300px 1fr; gap: 56px; }
  .step.flip { grid-template-columns: 1fr 300px; }
  .step.flip > :first-child { order: 2; }
  .step.wide { grid-template-columns: 1fr; }
}
.step .when {
  font-family: var(--mono); font-size: 0.8rem; color: var(--green); letter-spacing: 0.02em;
  display: inline-block; margin-bottom: 10px;
}
.step h3 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-bottom: 12px; }
.step p { color: var(--ink-dim); }
.step .shot { max-width: 300px; margin-inline: auto; }
.step .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 620px; }
.step .landrow { display: grid; gap: 22px; }
@media (min-width: 860px) { .step .landrow { grid-template-columns: 1.6fr 1fr; align-items: center; } }

/* ------------------------------------------------------------------ tour --- */

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.tabs button {
  font: inherit; font-size: 0.92rem; color: var(--ink-dim); background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer;
}
.tabs button:hover { color: var(--ink); border-color: rgba(122, 155, 205, 0.4); }
.tabs button[aria-selected='true'] { color: #05101f; background: var(--blue); border-color: var(--blue); }
.js .panel[hidden] { display: none; }
.panel + .panel { margin-top: 70px; }
.js .panel + .panel { margin-top: 0; }
.panel h3 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-bottom: 14px; }
.panel .intro { color: var(--ink-dim); max-width: 64ch; }
.gallery { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin: 30px 0 34px; }
.gallery figure { margin: 0; }
.gallery .shot { max-width: 260px; }
.notes { display: grid; gap: 14px 40px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 0; padding: 0; list-style: none; }
.notes li { color: var(--ink-dim); font-size: 0.96rem; padding-left: 16px; border-left: 2px solid var(--line); }
.notes li b { color: var(--ink); font-weight: 620; }

/* ---------------------------------------------------------------- casebook --- */

.case { display: grid; gap: 34px; }
@media (min-width: 900px) { .case { grid-template-columns: 1fr 1fr; align-items: start; } }
.case .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.case ol { color: var(--ink-dim); padding-left: 20px; display: grid; gap: 12px; margin: 18px 0 0; }
.case ol b { color: var(--ink); font-weight: 620; }

/* ---------------------------------------------------------------- tables --- */

.specs { display: grid; gap: 40px; }
@media (min-width: 900px) { .specs { grid-template-columns: 1fr 1fr; } }
table.plain { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
table.plain caption { text-align: left; font-weight: 620; color: var(--ink); padding-bottom: 10px; font-size: 1.02rem; }
table.plain th, table.plain td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain th { color: var(--ink); font-weight: 560; width: 42%; }
table.plain td { color: var(--ink-dim); }
table.plain .yes { color: var(--green); }

.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.plans .card ul { margin: 12px 0 0; padding-left: 18px; color: var(--ink-dim); font-size: 0.95rem; display: grid; gap: 6px; }

/* -------------------------------------------------------------- footnote --- */

.about-shots {
  border: 1px dashed rgba(122, 155, 205, 0.3); border-radius: 16px; padding: 20px 22px;
  color: var(--ink-dim); font-size: 0.93rem; max-width: 80ch;
}
.about-shots strong { color: var(--ink); }
.about-shots code { font-family: var(--mono); font-size: 0.86em; color: var(--ink); }

/* -------------------------------------------------------------- lightbox --- */

dialog.viewer {
  border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible;
}
dialog.viewer::backdrop { background: rgba(3, 6, 12, 0.88); backdrop-filter: blur(4px); }
dialog.viewer img { display: block; max-width: 96vw; max-height: 86vh; width: auto; height: auto; border-radius: 18px; }
dialog.viewer p { color: var(--ink-dim); text-align: center; margin: 12px auto 0; max-width: 60ch; font-size: 0.92rem; }
dialog.viewer button {
  position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 1.1rem; cursor: pointer;
}

.sub-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.9rem; margin-top: 18px; }
.sub-nav a { color: var(--ink-dim); }
.sub-nav a:hover { color: var(--ink); }

/* --------------------------------------------------------------- changes --- */

ol.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 80ch; }
ol.log li { display: grid; grid-template-columns: 70px 1fr; gap: 16px; color: var(--ink-dim); font-size: 0.96rem; }
ol.log time { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-faint); padding-top: 2px; }

section.band.slim { padding: 10px 0 30px; }
.step .shot { max-width: 270px; }
@media (min-width: 860px) {
  .step { grid-template-columns: 270px 1fr; }
  .step.flip { grid-template-columns: 1fr 270px; }
}

/* A screenshot cut short: the top of the Home Screen, where the widget and
   the Dynamic Island are. Square corners at the cut. */
.shot.top { border-radius: 13.5% 13.5% 0 0 / 15.5% 15.5% 0 0; padding-bottom: 0;
  -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.shot.top img { border-radius: 11.6% 11.6% 0 0 / 13.3% 13.3% 0 0; }
.gallery .shot.car, .gallery .shot.land, .gallery .shot.top { max-width: none; }
.gallery figure:has(.car), .gallery figure:has(.land), .gallery figure:has(.top) { grid-column: span 2; }
@media (max-width: 460px) { .gallery figure:has(.car), .gallery figure:has(.land), .gallery figure:has(.top) { grid-column: auto; } }

/* Two screenshots a row on a phone, rather than one long column. */
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr 1fr; gap: 16px; }
  .gallery figure:has(.car), .gallery figure:has(.land), .gallery figure:has(.top) { grid-column: span 2; }
  .cap { font-size: 0.8rem; }
}

/* What's new: one card per version, the latest open and earlier ones folded.
   The lists are generated from appstore/whats-new.md. */
.updates { display: grid; gap: 16px; max-width: 760px; }
.updates .card ul { margin: 12px 0 0; padding-left: 18px; color: var(--ink-dim); font-size: 0.97rem;
  display: grid; gap: 8px; }
.updates details.card summary { cursor: pointer; list-style: none; }
.updates details.card summary::-webkit-details-marker { display: none; }
.updates details.card summary h3 { display: inline; margin: 0; }
.updates details.card summary::after { content: " +"; color: var(--ink-dim); }
.updates details.card[open] summary::after { content: " \2212"; }
