/* /compare and /alternatives/<app> (src/compare-pages.mjs writes the pages). The home page's type and
   device pictures, on a plain page: flat grey cards, with a soft shadow only under the price card, the
   devices and Reprise's column in the hub's chart. The Worker's CSP allows no style attributes, so
   every style is here, the price bars' widths included (the block at the end). */
:root {
  color-scheme: light dark;
  --bg: #fff;
  --text: #000;
  --soft: #3a3a3c;            /* body copy under a heading */
  --muted: #6c6c70;
  --blue-text: #0066cc;
  --surface: #f5f5f7;
  --card: #fff;
  --card-edge: 0 0 0 .5px rgba(0, 0, 0, .08), 0 8px 24px rgba(20, 30, 60, .10);
  --pill-edge: 0 0 0 .5px rgba(0, 0, 0, .08), 0 4px 14px rgba(20, 30, 60, .10);
  --rule: rgba(60, 60, 67, .12);
  --rule-strong: rgba(60, 60, 67, .3);
  --bar: #aeaeb2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000; --text: #f5f5f7; --soft: #d1d1d6; --muted: #a1a1a6; --blue-text: #4da3ff;
    --surface: #1c1c1e; --card: #1c1c1e;
    --card-edge: inset 0 1px 0 rgba(255, 255, 255, .10), 0 0 0 .5px rgba(0, 0, 0, .6), 0 8px 24px rgba(0, 0, 0, .4);
    --pill-edge: inset 0 1px 0 rgba(255, 255, 255, .10), 0 0 0 .5px rgba(0, 0, 0, .6);
    --rule: rgba(235, 235, 245, .14); --rule-strong: rgba(235, 235, 245, .3);
    --bar: #636366;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* A column at least the window's height, so the footer sits at the bottom of a short page. */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
i { display: block; font-style: normal; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--blue-text); text-decoration: none; }
main :focus-visible { outline: 3px solid var(--blue-text); outline-offset: 3px; border-radius: 4px; }
/* Read by screen readers, not shown: the name of a table's first column. */
.hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

section { max-width: 1028px; margin: 0 auto; padding: 88px 24px 0; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem); line-height: 1.12; font-weight: 700; letter-spacing: -.022em; text-align: center; text-wrap: balance; }

/* The opening: a small label, the headline, a line under it. */
.top { padding-top: 72px; text-align: center; }
.eyebrow { margin-bottom: 14px; font-size: 15px; font-weight: 600; color: var(--muted); }
h1, h2, h3 { -webkit-hyphens: auto; hyphens: auto; }
h1 { max-width: 820px; margin: 0 auto; font-size: clamp(2.5rem, 1.3rem + 4.6vw, 4rem); line-height: 1.05; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; }
.lede { max-width: 640px; margin: 22px auto 0; font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); line-height: 1.4; color: var(--soft); text-wrap: pretty; }
.fine { font-size: 14px; color: var(--muted); }
.checked { margin-top: 16px; font-size: 14px; color: var(--muted); text-align: center; }

/* Apple's badges, unaltered and all at one height, as on the home page. */
.get { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 20px; margin-top: 32px; }
.get-stack { flex-direction: column; gap: 14px; }
.badge { display: block; border-radius: 9px; }
.badge img { display: block; width: auto; height: 54px; }

/* The two yearly prices as bars drawn to scale, both prices in the same type so size stands for cost.
   The row keeps room on the right for the longest price any language writes ("95,88 $ US"), and the
   bars take their share of what is left. */
.price { padding-top: 72px; }
.price-card { padding: 48px 32px 40px; border-radius: 32px; background: var(--card); box-shadow: var(--card-edge); }
.price-card h2 { font-size: clamp(2rem, 1.2rem + 2.8vw, 2.75rem); line-height: 1.1; }
.bars { display: flex; flex-direction: column; gap: 26px; max-width: 820px; margin: 32px auto 0; }
.bar-name { margin-bottom: 8px; font-size: 15px; font-weight: 600; color: var(--soft); }
.bar-line { display: flex; align-items: center; gap: 18px; padding-right: 14.5rem; }
.bar { flex: none; height: 56px; border-radius: 14px; background: var(--bar); }
.bar-ours { background: linear-gradient(#1a90ff, #0071db); }
.bar-price { font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -.025em; white-space: nowrap; }
.price-note { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 19px; line-height: 1.4; color: var(--soft); text-align: center; text-wrap: pretty; }

/* What you get: three plain columns, then the home page's devices in a row. */
.with h2 { font-size: clamp(2rem, 1.2rem + 2.8vw, 2.75rem); line-height: 1.1; }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 36px; margin-top: 40px; }
.three h3 { font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.014em; }
.three p { margin-top: 8px; font-size: 17px; line-height: 1.5; color: var(--soft); }
.dev { display: block; filter: drop-shadow(0 2px 3px rgba(20, 31, 61, .10)) drop-shadow(0 36px 46px rgba(20, 31, 61, .20)); }
.hdev { display: block; filter: drop-shadow(0 1px 2px rgba(20, 31, 61, .14)) drop-shadow(0 14px 22px rgba(20, 31, 61, .13)); }
.phone { position: relative; aspect-ratio: 675 / 1380; }
.phone-screen { position: absolute; left: 5.3%; top: 2.5%; width: 89.4%; height: 95%; object-fit: cover; border-radius: 9.6% / 4.4%; background: #fff; }
.phone-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lineup { position: relative; aspect-ratio: 1180 / 520; margin-top: 80px; }
.lineup-floor { position: absolute; left: 4%; width: 90%; bottom: -5%; height: 9%; background: radial-gradient(closest-side, rgba(20, 31, 61, .20), rgba(20, 31, 61, 0)); }
.lineup-mac { position: absolute; left: 21%; bottom: 7%; width: 62%; z-index: 1; }
.lineup-ipad { position: absolute; left: 1.5%; bottom: -.5%; width: 32%; z-index: 2; }
.lineup-phone { position: absolute; left: 76.5%; bottom: 0; width: 16%; z-index: 3; }

.duo { padding-top: 112px; text-align: center; }
.duo .lede { max-width: 600px; margin-top: 14px; font-size: 19px; line-height: 1.45; }
.duo .dev { width: 100%; max-width: 620px; margin: 44px auto 0; }

/* Tables: the alternative page's two columns and the hub's chart. Long words in other languages break
   with a hyphen, so a narrow column never pushes the table wider. */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 17px; line-height: 1.4; text-align: left; }
th, td { padding: 16px; vertical-align: top; border-bottom: 1px solid var(--rule); overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
thead th { padding: 12px 16px; font-weight: 600; color: var(--muted); border-bottom-color: var(--rule-strong); }
thead th.ours { font-weight: 700; color: var(--text); }
tbody th { font-weight: 400; color: var(--muted); }
tbody td { color: var(--soft); }
tbody td.ours { font-weight: 600; color: var(--text); }
tr > :first-child { padding-left: 0; }
tr > :last-child { padding-right: 0; }
tbody tr:last-child > * { border-bottom: 0; }
.side { max-width: 908px; }
.side table { min-width: 520px; margin-top: 28px; }
.side thead th:first-child { width: 28%; }

.better { max-width: 808px; padding-top: 80px; }
.better h2 { font-size: 28px; letter-spacing: -.018em; text-align: left; }
.better p { margin-top: 12px; font-size: 18px; line-height: 1.55; color: var(--soft); }

.start { padding-top: 96px; text-align: center; }
.start h2 { font-size: clamp(2rem, 1.2rem + 2.8vw, 2.75rem); line-height: 1.1; }
.start p { margin-top: 14px; font-size: 19px; color: var(--soft); }

.others { padding: 80px 24px 96px; }
.others h2 { font-size: 22px; letter-spacing: -.014em; }
.others ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }
.others a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 22px; background: var(--card); box-shadow: var(--pill-edge); color: var(--text); font-size: 16px; }
.others a:hover { color: var(--blue-text); }

/* The hub's chart: six columns of one width and rows of one height. Reprise's column alone sits on a
   white panel with a soft shadow; the chart itself has no card. The panel is drawn behind the table,
   and the scrolling box keeps room above and below so its shadow isn't cut off. */
.chart { max-width: 1180px; padding-top: 36px; }
.chart .scroll { padding: 28px 0 44px; }
.chart-in { position: relative; }
.chart-ours { position: absolute; top: -10px; bottom: -10px; border-radius: 20px; background: var(--card); box-shadow: var(--card-edge); }
.chart table { position: relative; table-layout: fixed; font-size: 16px; }
.chart thead th { padding: 14px 16px; font-size: 16px; color: var(--text); }
.chart thead th.ours { font-size: 18px; }
.chart thead a { color: inherit; }
.chart thead a:hover { color: var(--blue-text); }
.chart tbody th, .chart tbody td { height: 104px; padding: 18px 16px; }
.chart tr > :first-child { padding-left: 0; }
.chart tr > :last-child { padding-right: 0; }
.chart .prices td { font-size: 22px; font-weight: 600; }
.chart .prices td.ours { font-weight: 700; }

.each { max-width: 1180px; padding-top: 60px; }
.each h2 { text-align: left; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-top: 28px; }
.cards a { display: block; height: 100%; padding: 24px 22px 26px; border-radius: 20px; background: var(--surface); color: var(--text); }
.cards a:hover strong { color: var(--blue-text); }
.card-kicker { display: block; font-size: 13px; color: var(--muted); }
.cards strong { display: block; margin-top: 2px; font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.016em; }
.card-line { display: block; margin-top: 10px; font-size: 16px; line-height: 1.45; color: var(--soft); }

/* Two outlined boxes side by side: the cheaper-alternative pages, and the pages for shut-down apps. */
.boxes { display: flex; flex-wrap: wrap; gap: 20px; max-width: 1180px; padding-top: 72px; }
.box { flex: 1 1 380px; min-width: 0; padding: 30px 32px 24px; border: 1px solid var(--rule-strong); border-radius: 22px; }
.box h2 { font-size: 26px; letter-spacing: -.016em; text-align: left; }
.box p { margin-top: 10px; font-size: 17px; line-height: 1.5; color: var(--soft); }
.box ul { margin-top: 12px; }
.box a { display: block; padding: 10px 0; font-size: 17px; }
.box a:hover { text-decoration: underline; }

/* The closing section sits clear of the footer. */
main > section:last-child { padding-bottom: 96px; }

@media (max-width: 760px) {
  section { padding-top: 64px; }
  .top { padding-top: 40px; }
  .price { padding-top: 48px; }
  .price-card { padding: 32px 20px 28px; border-radius: 26px; }
  .bar-line { gap: 10px; padding-right: 8.75rem; }
  .bar { height: 40px; border-radius: 11px; }
  .bar-price { font-size: 24px; }
  .price-note { margin-top: 28px; padding-top: 20px; font-size: 17px; }
  /* The home page's phone-width line-up: the Mac behind, the iPad and iPhone in front of its corners. */
  .lineup { aspect-ratio: 100 / 88; margin-top: 48px; }
  .lineup-mac { left: 7%; width: 86%; bottom: 31%; }
  .lineup-ipad { left: 0; width: 54%; bottom: 0; }
  .lineup-phone { left: auto; right: 1%; width: 29%; }
  .lineup-floor { display: none; }
  .duo { padding-top: 72px; }
  th, td { padding: 14px 12px; }
  /* The two apps' columns both fit a phone, so nothing waits off to the side. */
  .side table { min-width: 0; font-size: 15px; }
  .side thead th:first-child { width: 30%; }
  .others { padding-bottom: 72px; }
}
@media (max-width: 600px) {
  section, .others { padding-left: 16px; padding-right: 16px; }
}

/* bars:begin (written by scripts/compare-pages.mjs from src/compare-data.mjs) */
.bar-them { width: 100%; }
.bar-speechify { width: 28.8%; }
.bar-elevenreader { width: 40.4%; }
.bar-naturalreader { width: 50.6%; }
.bar-readwise-reader { width: 41.7%; }
.bar-instapaper { width: 66.7%; }
.chart-ours { left: 14.2857%; width: 14.2857%; }
.chart-in { min-width: 980px; }
/* bars:end */
