/* Shared by index.html (option 1 + native) and option-2.html. */
  /* Implementation tabs: one page per option. */
  .tabs { display: flex; justify-content: center; gap: 4px; padding: 10px 16px 0;
    background: var(--card); border-bottom: 1px solid var(--line); }
  .tabs a { padding: 8px 16px 10px; text-decoration: none; font-size: 15px; font-weight: 600; color: var(--muted);
    border-bottom: 3px solid transparent; }
  .tabs a small { display: block; font-size: 12px; font-weight: 400; }
  .tabs a:hover { color: var(--fg); }
  .tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--edge); }
  @media (max-width: 640px) {
    .tabs { padding: 4px 8px 0; gap: 0; }
    .tabs a { flex: 1 1 0; padding: 8px 6px 10px; text-align: center; font-size: 13.5px; line-height: 1.3; }
    .tabs a small { font-size: 11px; line-height: 1.25; margin-top: 2px; }
  }
  /* Four tabs don't leave room for subtitles on phones. */
  @media (max-width: 480px) {
    .tabs { padding: 2px 4px 0; }
    .tabs a { padding: 9px 3px 10px; font-size: 12.5px; }
    .tabs a small { display: none; }
  }

  p.aside { margin: 0 0 20px; padding: 10px 14px; border-radius: 10px; font-size: 14.5px; color: var(--muted);
    background: color-mix(in srgb, var(--edge) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--edge) 30%, var(--line)); }
  p.aside a, header.hero p a { color: var(--fg); font-weight: 600; }

  .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
  table.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
  table.compare th, table.compare td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
  table.compare thead th { font-size: 13px; color: var(--muted); font-weight: 600; background: color-mix(in srgb, var(--fg) 3%, var(--card)); }
  table.compare tbody th { font-weight: 600; }
  table.compare tr:last-child > * { border-bottom: 0; }
  table.compare .win { color: var(--accent); font-weight: 600; }
  /* Phones: one card per row, each value labelled with its option. */
  @media (max-width: 640px) {
    .table-wrap { overflow: visible; border: 0; background: none; }
    table.compare, table.compare tbody, table.compare tr, table.compare th, table.compare td { display: block; }
    table.compare thead { display: none; }
    table.compare tr { margin-bottom: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
    table.compare tbody th { padding: 10px 12px; font-size: 14.5px; background: color-mix(in srgb, var(--fg) 4%, var(--card)); border-bottom: 1px solid var(--line); }
    table.compare td { position: relative; padding: 8px 12px 8px 92px; border-bottom: 1px solid var(--line); }
    table.compare td::before { content: attr(data-label); position: absolute; left: 12px; top: 9px; color: var(--muted); font-weight: 600; font-size: 12.5px; }
    table.compare tr > td:last-child { border-bottom: 0; }
  }

  pre.code { margin: 0 0 20px; padding: 14px 16px; overflow-x: auto; border-radius: 12px; background: #0f172a; color: #e2e8f0;
    font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
  pre.code .c { color: #94a3b8; } pre.code .k { color: #7dd3fc; } pre.code .s { color: #86efac; }

  :root {
    --bg: #f6f7f9; --card: #fff; --fg: #0f172a; --muted: #5b6474; --line: #e3e7ee;
    --accent: #0f9d6b; --chirp: #1d9bf0; --guardian: #0f5132; --edge: #f38020; --bad: #c5221f;
    color-scheme: light dark;
  }
  @media (prefers-color-scheme: dark) {
    :root { --bg: #0d1117; --card: #161b22; --fg: #e6edf3; --muted: #8b949e; --line: #30363d; }
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  html:has(dialog[open]) { overflow: hidden; }
  body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
  a { color: inherit; }
  header.hero { padding: 56px 24px 32px; text-align: center; }
  header.hero h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 42px); line-height: 1.15; letter-spacing: -0.02em; }
  header.hero p { margin: 0 auto; max-width: 760px; color: var(--muted); font-size: 18px; }

  /* One row; scrolls sideways on narrow screens instead of wrapping over the content. */
  nav.toc { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
    padding: 10px 16px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  nav.toc::-webkit-scrollbar { display: none; }
  nav.toc a { flex: none; text-decoration: none; font-size: 14px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); white-space: nowrap; }
  nav.toc a:first-child { margin-left: auto; } nav.toc a:last-child { margin-right: auto; }
  nav.toc a:hover { border-color: var(--accent); }
  nav.toc a[aria-current="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

  main { max-width: 1180px; margin: 0 auto; padding: 8px 24px 80px; }
  section { margin-top: 56px; scroll-margin-top: 70px; }
  section > h2 { margin: 0 0 6px; font-size: 26px; line-height: 1.25; letter-spacing: -0.01em; }
  section > p.lead { margin: 0 0 22px; color: var(--muted); max-width: 820px; }

  .cast { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; margin: 28px 0 0; }
  .who { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; border-top: 4px solid var(--c); }
  .who b { display: block; font-size: 17px; }
  .who span { color: var(--muted); font-size: 14px; }

  .grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
  .grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
  figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
  figure button { all: unset; cursor: zoom-in; display: block; position: relative; border-bottom: 1px solid var(--line); background: #f4f6f8; -webkit-tap-highlight-color: transparent; }
  /* width/height attributes reserve space, so lazy images never shift the page while scrolling. */
  figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10.75; object-fit: cover; object-position: top center; }
  .tall figure button { max-height: 760px; overflow: hidden; }
  .tall figure img { aspect-ratio: auto; }
  figure button::after { content: "⤢"; position: absolute; right: 10px; bottom: 10px; width: 32px; height: 32px; display: grid; place-items: center;
    border-radius: 8px; background: rgb(15 23 42 / .72); color: #fff; font-size: 16px; opacity: 0; transition: opacity .15s; }
  figure button:hover::after, figure button:focus-visible::after { opacity: 1; }
  @media (hover: none) { figure button::after { opacity: .85; } }
  figcaption { padding: 14px 16px 16px; font-size: 14.5px; color: var(--muted); }
  figcaption strong { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; color: var(--fg); font-size: 15.5px; margin-bottom: 4px; }
  .n { flex: none; font: 600 12px/1 ui-monospace, monospace; padding: 4px 7px; border-radius: 6px; background: var(--fg); color: var(--bg); }
  .tag { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 8px; margin-left: auto; white-space: nowrap; }
  .tag.chirp { background: color-mix(in srgb, var(--chirp) 16%, transparent); color: var(--chirp); }
  .tag.guardian { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
  .tag.phosra { background: color-mix(in srgb, #7c3aed 16%, transparent); color: #8b5cf6; }
  .tag.edge { background: color-mix(in srgb, var(--edge) 18%, transparent); color: var(--edge); }

  .verdict { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin: 0 0 20px; }
  .verdict div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
  .verdict b { display: block; font-size: 22px; }
  .ok { color: var(--accent); } .no { color: var(--bad); }
  ul.benefits { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
  ul.benefits li { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--edge); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--muted); }
  ul.benefits b { display: block; color: var(--fg); font-size: 15px; margin-bottom: 2px; }

  ol.flow { counter-reset: s; list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
  ol.flow li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 10px 44px; position: relative; font-size: 14px; }
  ol.flow li::before { content: counter(s); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font: 600 12px/22px system-ui; text-align: center; }

  footer { max-width: 1180px; margin: 0 auto; padding: 24px; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line); }
  code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: color-mix(in srgb, var(--fg) 8%, transparent); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }

  /* Full-screen viewer: the image scrolls inside it; the page behind stays put. */
  dialog { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: #020617; color: #e2e8f0; }
  dialog[open] { display: flex; flex-direction: column; }
  dialog::backdrop { background: rgb(2 6 23 / .6); }
  dialog .bar { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; padding-top: max(10px, env(safe-area-inset-top)); font-size: 14px; }
  dialog .bar p { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  dialog .bar a { flex: none; font-size: 13px; color: #cbd5e1; }
  dialog .close { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgb(255 255 255 / .14); color: #fff; font: 24px/40px system-ui; text-align: center; }
  dialog .close:hover { background: rgb(255 255 255 / .28); }
  dialog .frame { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 12px max(12px, env(safe-area-inset-bottom)); }
  dialog img { display: block; width: 100%; max-width: 1280px; height: auto; margin: 0 auto; border-radius: 8px; background: #fff; cursor: zoom-in; }
  /* Tap to view at the screenshot's real pixel size; pan in both directions. */
  dialog .frame.zoomed img { width: auto; max-width: none; cursor: zoom-out; }
  dialog .hint { display: none; flex: none; padding: 0 18px 8px; font-size: 12.5px; color: #94a3b8; }

  @media (max-width: 640px) {
    header.hero { padding: 36px 16px 20px; }
    header.hero p { font-size: 16px; }
    .cast { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; text-align: left; }
    .who { padding: 12px; }
    .who b { font-size: 15px; }
    .who span { font-size: 13px; line-height: 1.4; }
    nav.toc { padding: 8px 12px; }
    nav.toc a { font-size: 13px; padding: 5px 11px; }
    main { padding: 4px 14px 56px; }
    section { margin-top: 40px; scroll-margin-top: 60px; }
    section > h2 { font-size: 21px; }
    section > p.lead { font-size: 15px; margin-bottom: 16px; }
    .grid { gap: 14px; }
    .tall figure button { max-height: 520px; }
    figcaption { padding: 12px 14px 14px; font-size: 14px; }
    .verdict { grid-template-columns: 1fr; gap: 8px; }
    .verdict div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 10px 12px; font-size: 13.5px; }
    .verdict b { font-size: 18px; }
    dialog .hint { display: block; }
    footer { padding: 20px 14px; }
    dialog .frame { padding: 0; }
    dialog img { border-radius: 0; }
  }
