/* ==========================================================================
   LogEM Pro: the four features, the store badges, the Standard and Pro table
   with Pro's price, and the call to action, shared by the home page's Pro
   chapter and /pro (markup: scripts/build-pro-blocks.py). Loaded after
   style.css or pages.css, so it uses their tokens.

   The features are drawn for the page, not copied from the app's cards: real
   LogEM screens in a phone, and the scan and dictation built in HTML so they
   stay sharp at any size. Synthetic data only. The home page lays them out as
   a bento of four tiles; /pro gives each its own row.
   ========================================================================== */

/* ---------- the words that go with each feature ---------- */
.f-kicker { display: flex; align-items: center; gap: 0.5rem; font-size: var(--t-small); font-weight: 600; color: var(--ink-2); }
.pfi {
  flex: none;
  width: 18px;
  height: 18px;
  overflow: visible;
  fill: none;
  stroke: var(--orange);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pfi .cut { fill: var(--pfi-cut, #fff); stroke: none; }
.f-head {
  margin-top: 0.7rem;
  font-family: var(--display);
  font-weight: 600;
  font-optical-sizing: auto;
  font-style: normal;
  font-synthesis: none;
  font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.f-line { margin-top: 0.7rem; max-width: 30em; font-size: var(--t-body); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

/* ---------- the visuals: each is a size container, so what is inside scales with it ---------- */
.vis { container-type: inline-size; position: relative; overflow: hidden; background: #000; color: #fff; }
.vis svg { display: block; }
.ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* the scan, its banner shaded off above an orange crop line, as Pro anonymises a still */
.v-scan { aspect-ratio: 4 / 3; }
.v-scan img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v-scan .shade { position: absolute; inset: 0 0 auto; height: 12.5%; background: rgba(0, 0, 0, 0.78); border-bottom: 0.35cqi solid #EE6A2E; }
.v-scan .shade b { position: absolute; left: 3cqi; bottom: 1.4cqi; font-size: 1.9cqi; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.v-scan .handle { position: absolute; top: 12.5%; left: 50%; translate: -50% -50%; width: 9cqi; height: 4.2cqi; border-radius: 99px; border: 0.3cqi solid rgba(255, 255, 255, 0.9); background: #EE6A2E; display: grid; place-items: center; color: #fff; }
.v-scan .handle svg { width: 2.6cqi; height: 2.6cqi; }
.v-scan .pill { position: absolute; top: 19%; left: 50%; translate: -50% 0; display: flex; align-items: center; gap: 1cqi; padding: 1cqi 2.2cqi 1cqi 1.2cqi; border-radius: 99px; background: rgba(255, 255, 255, 0.95); color: #1A1816; font-size: clamp(0.6875rem, 2.3cqi, 1rem); font-weight: 600; white-space: nowrap; }
.v-scan .pill i, .v-dict .chips i { display: grid; place-items: center; border-radius: 50%; background: #2FA84F; color: #fff; }
.v-scan .pill i { width: 2.8cqi; height: 2.8cqi; min-width: 14px; min-height: 14px; }
.v-scan .pill i svg, .v-dict .chips i svg { width: 65%; height: 65%; stroke-width: 3.2; }

/* dictation: the waveform round the microphone, what was said, and the fields it filled */
.v-dict { aspect-ratio: 4 / 3; display: grid; align-content: center; gap: 1.25rem; padding: 6%; background: radial-gradient(60% 55% at 50% 40%, rgba(195, 60, 0, 0.32), rgba(0, 0, 0, 0) 70%), #000; }
.v-dict .wave { display: flex; align-items: center; justify-content: center; gap: 1.1cqi; height: 12cqi; }
.v-dict .wave i { display: block; width: 1.2cqi; border-radius: 1cqi; background: linear-gradient(#F08A54, #C33C00); }
.v-dict .mic { flex: none; width: 11cqi; height: 11cqi; margin: 0 1.6cqi; border-radius: 50%; background: #C33C00; display: grid; place-items: center; color: #fff; box-shadow: 0 0 0 1.6cqi rgba(195, 60, 0, 0.24), 0 0 0 3.2cqi rgba(195, 60, 0, 0.1); }
.v-dict .mic svg { width: 50%; height: 50%; }
.v-dict q { display: block; text-align: center; font-size: clamp(0.875rem, 4.2cqi, 1.375rem); line-height: 1.4; color: #F2F2F1; text-wrap: balance; }
.v-dict q::before { content: "\201C"; } .v-dict q::after { content: "\201D"; }
.v-dict .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.v-dict .chips span { display: flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.75rem; border-radius: 99px; background: #2A2826; font-size: clamp(0.75rem, 3cqi, 1rem); font-weight: 600; color: #EDEBE8; }
.v-dict .chips i { width: 1.1em; height: 1.1em; }
.v-dict .wave i:nth-of-type(1) { height: 28%; }
.v-dict .wave i:nth-of-type(2) { height: 54%; }
.v-dict .wave i:nth-of-type(3) { height: 41%; }
.v-dict .wave i:nth-of-type(4) { height: 56%; }
.v-dict .wave i:nth-of-type(5) { height: 58%; }
.v-dict .wave i:nth-of-type(6) { height: 53%; }
.v-dict .wave i:nth-of-type(7) { height: 75%; }
.v-dict .wave i:nth-of-type(8) { height: 43%; }
.v-dict .wave i:nth-of-type(9) { height: 81%; }
.v-dict .wave i:nth-of-type(10) { height: 24%; }
.v-dict .wave i:nth-of-type(11) { height: 72%; }
.v-dict .wave i:nth-of-type(12) { height: 25%; }
.v-dict .wave i:nth-of-type(13) { height: 61%; }
.v-dict .wave i:nth-of-type(14) { height: 33%; }
.v-dict .wave i:nth-of-type(15) { height: 49%; }
.v-dict .wave i:nth-of-type(16) { height: 31%; }
.v-dict .wave i:nth-of-type(17) { height: 61%; }
.v-dict .wave i:nth-of-type(18) { height: 22%; }
.v-dict .wave i:nth-of-type(19) { height: 72%; }
.v-dict .wave i:nth-of-type(20) { height: 28%; }
.v-dict .wave i:nth-of-type(21) { height: 80%; }
.v-dict .wave i:nth-of-type(22) { height: 47%; }
.v-dict .wave i:nth-of-type(23) { height: 72%; }
.v-dict .wave i:nth-of-type(24) { height: 56%; }
.v-dict .wave i:nth-of-type(25) { height: 55%; }
.v-dict .wave i:nth-of-type(26) { height: 58%; }
.v-dict .wave i:nth-of-type(27) { height: 39%; }
.v-dict .wave i:nth-of-type(28) { height: 55%; }

/* real screens in a phone, the bottom running off the frame */
.v-phones { display: flex; justify-content: center; align-items: flex-start; gap: 5%; padding: 8% 0 0; background: #F2F2F7; }
.v-phones .phone {
  --phone-w: 38cqi;
  position: relative;
  flex: none;
  width: var(--phone-w);
  padding: calc(var(--phone-w) * 0.028);
  border-radius: calc(var(--phone-w) * 0.155);
  background: #1C1B1A;
  box-shadow: inset 0 0 0 1px #3B3936, inset 0 0 0 2.5px #121110, 0 30px 60px -30px rgba(26, 24, 22, 0.55);
}
.v-phones.one .phone { --phone-w: 56cqi; }
.v-phones .phone-screen { position: relative; overflow: hidden; border-radius: calc(var(--phone-w) * 0.128); background: #fff; }
.v-phones .phone-screen img { display: block; width: 100%; height: auto; }
.v-phones .sb { height: calc(var(--phone-w) * 0.11); }
.v-phones .sb-sheet { background: #CCCCCC; }
.v-phones .sb-grouped { background: #F2F2F7; }
.v-phones .sb-white { background: #fff; }
.v-phones .sb-black { background: #000; }
.v-phones .phone-island { position: absolute; top: calc(var(--phone-w) * 0.052); left: 50%; transform: translateX(-50%); width: calc(var(--phone-w) * 0.28); height: calc(var(--phone-w) * 0.082); border-radius: 999px; background: #0B0A0A; }
/* a phone raised so the part that matters (the reply, the crop) is what shows */
.v-phones.lift { padding-top: 0; }
.v-phones.lift .phone { margin-top: calc(var(--phone-w) * -0.66); }
.v-phones .sync-badge { position: absolute; z-index: 2; top: 20cqi; left: 50%; translate: -50% 0; width: 11cqi; height: 11cqi; border-radius: 50%; background: #C33C00; color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 1.6cqi rgba(195, 60, 0, 0.25), 0 1.5cqi 4cqi rgba(0, 0, 0, 0.4); }
.v-phones .sync-badge > svg { width: 50%; height: 50%; stroke-width: 2.5; }
.v-phones .sync-badge span { position: absolute; right: -1.2cqi; bottom: -0.8cqi; width: 45%; height: 45%; border-radius: 50%; background: #fff; color: #C33C00; display: grid; place-items: center; box-shadow: 0 0 0 0.6cqi #000; }
.v-phones .sync-badge span svg { width: 60%; height: 60%; stroke-width: 2.75; }

/* ---------- the home page: a bento of four white tiles, words above, the visual below ---------- */
.bento { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1rem, 1.6vw, 1.5rem); }
.tile { display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px var(--hairline); }
.tile:nth-child(1), .tile:nth-child(4) { grid-column: span 7; }
.tile:nth-child(2), .tile:nth-child(3) { grid-column: span 5; }
.tile .words { padding: clamp(1.5rem, 2.4vw, 2.25rem) clamp(1.5rem, 2.4vw, 2.25rem) var(--s3); }
.tile .f-head { font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); }
.tile .vis { margin-top: auto; }
.tile .v-scan, .tile .v-dict { margin: 0 clamp(1rem, 1.6vw, 1.5rem) clamp(1rem, 1.6vw, 1.5rem); border-radius: 14px; }
.tile .v-phones { height: clamp(300px, 28vw, 400px); }
.tile:nth-child(4) .v-phones { background: linear-gradient(#fff, #F2F2F7); }

/* ---------- /pro: one feature at a time, the visual large beside its words ---------- */
.frows { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(4rem, 3rem + 5vw, 8rem); }
.frow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5.5rem); align-items: center; }
.frow:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.frow:nth-child(even) .words { order: 2; }
.frow .vis { border-radius: 26px; }
.frow .v-phones { height: clamp(360px, 38vw, 540px); background: var(--stone); }
.frow .f-head { font-size: clamp(1.9rem, 1.2rem + 2vw, 3rem); }

@media (max-width: 860px) {
  .tile:nth-child(n) { grid-column: 1 / -1; }
  .frow, .frow:nth-child(even) { grid-template-columns: 1fr; gap: var(--s3); }
  .frow:nth-child(even) .words { order: 0; }
  .tile .v-phones, .frow .v-phones { height: min(92vw, 520px); }
  .v-phones .phone { --phone-w: 42cqi; }
  .v-phones.one .phone { --phone-w: 62cqi; }
}

/* the saving, on one orange cell to match the edge */
.save {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--orange);
  padding: 0.32em 0.45em 0.34em;
  border-radius: var(--r-cell);
}
/* ---------- hero motion slot (home page) ----------
   A muted, inline clip in the hero phone, in the dashboard capture's place
   and at its size. The capture is the poster and the fallback: js/main.js
   swaps the clip in only once it is playing, and only when the video has a
   source and the visitor has not asked for reduced motion. */
.hero-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 780 / 1696;
  object-fit: cover;
  object-position: top;
}
.hero-video[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}
.phone-screen img[hidden] { display: none; }

/* ---------- Pro's own edge: the Pro column and the price panel sit on white,
   outlined in the site's one orange (Tom chose this "brand edge" on 25 Oct 2026) ---------- */
:root {
  --pro-fill: #FFFFFF;
  --pro-line: #ECEEEF;   /* rows inside the white column and panel */
  --pro-edge: 2px solid var(--orange);
}

/* ---------- store badges ---------- */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--s4);
}
.store-row-center { justify-content: center; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-badge);
  padding: 0.6rem 1.3rem 0.65rem 1.05rem;
  min-height: 58px;
  text-decoration: none;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), background-color 180ms var(--ease-out);
}
a.store-badge:hover { background: #2A2724; transform: translateY(-1px); box-shadow: var(--lift); }
a.store-badge:active { transform: translateY(0) scale(0.98); box-shadow: none; transition-duration: 80ms; }
a.store-badge:focus-visible { outline-offset: 4px; border-radius: var(--r-badge); }
.badge-glyph { width: 24px; height: 28px; fill: #fff; flex: none; }
.badge-glyph.play { fill: none; }
.badge-text { display: flex; flex-direction: column; line-height: 1.12; text-align: left; }
.badge-text small { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.01em; opacity: 0.86; }
.badge-text strong { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }

/* the Pro marker: the word in the grotesk, on one ink cell */
.pro-mark {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--ink);
  padding: 0.34em 0.5em 0.36em;
  border-radius: var(--r-cell);
  vertical-align: middle;
}

/* ---------- the tiers: the heading, the table, Pro's price beside it ---------- */
.tiers-line,
.plan-title,
.pro-cta-title {
  font-family: var(--display);
  font-weight: 600;
  font-optical-sizing: auto;
  font-style: normal;
  font-synthesis: none;
  font-size: clamp(1.375rem, 1.2rem + 0.55vw, 1.75rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.tiers-sub {
  margin-top: 0.6rem;
  max-width: 34em;
  font-size: var(--t-lede);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.tiers-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s5);
  align-items: start;
  margin-top: var(--s4);
}

/* the comparison: a real table. Rows between hairlines; the Pro column sits on
   white inside an orange edge, from header to last row. Marks are cells: ink with a tick, or
   empty with a dash, each with its words for screen readers. */
.mk-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--t-small);
  line-height: 1.35;
}
.compare th,
.compare td {
  padding: 0.85rem 0.75rem;
  border-top: 1px solid var(--hairline);
  text-align: center;
  vertical-align: middle;
}
.compare thead th { border-top: 0; padding-block: 0.8rem 0.85rem; font-weight: 600; }
.compare thead th:not(:first-child) { width: 6.5rem; }
.compare tbody th { padding-left: 0; text-align: left; font-weight: 500; text-wrap: pretty; }
.compare tr > :nth-child(3) { background: var(--pro-fill); border-top-color: var(--pro-line); border-left: var(--pro-edge); border-right: var(--pro-edge); }
.compare thead th:nth-child(3) { border-top: var(--pro-edge); }
.compare thead th:nth-child(3) { border-radius: var(--r-control) var(--r-control) 0 0; }
.compare tbody:last-of-type tr:last-child > :nth-child(3) { border-radius: 0 0 var(--r-control) var(--r-control); }
.compare tbody:last-of-type tr:last-child > * { border-bottom: 1px solid var(--hairline); }
.compare tbody:last-of-type tr:last-child > :nth-child(3) { border-bottom: var(--pro-edge); }
/* the group captions: quiet, so the rows carry the weight */
.compare .group th {
  padding: var(--s3) 0 0.45rem;
  text-align: left;
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}
.compare .group > * { border-top: 0; }
.compare tbody:first-of-type .group th { padding-top: var(--s2); }
/* "both" rows are the foundation, not the pitch: a touch tighter */
.compare tbody + tbody th[scope="row"],
.compare tbody + tbody td { padding-block: 0.6rem; }
.rec { display: block; margin-top: 0.4rem; font-size: 0.75rem; font-weight: 600; line-height: 1.2; color: var(--ink-2); }
.mk { display: block; width: 18px; height: 18px; margin: 0 auto; }

/* Pro's price, framed like Pro's column: the monthly equivalent carries all the
   weight, then exactly what is billed in plain text, then the monthly plan */
.plan-panel {
  padding: var(--s4);
  border-radius: 14px;
  background: var(--pro-fill);
  box-shadow: inset 0 0 0 2px var(--orange);
}
.plan-title { display: flex; align-items: center; gap: 0.6rem; margin-bottom: var(--s3); }
.plan-kind { font-size: var(--t-micro); font-weight: 600; letter-spacing: 0.01em; color: var(--ink-3); margin-bottom: 0.35rem; }
.plan-lead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.4rem; }
.plan-big {
  font-family: var(--display);
  font-weight: 600;
  font-optical-sizing: auto;
  font-synthesis: none;
  font-size: clamp(2.5rem, 2rem + 1.4vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}
.plan-unit { font-size: var(--t-small); font-weight: 500; color: var(--ink-2); }
.plan-billed { margin-top: 0.7rem; font-weight: 400; color: var(--ink-2); font-variant-numeric: lining-nums; }
.plan-save {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin-top: 0.6rem;
  font-size: var(--t-small);
  color: var(--ink-2);
}
.plan-alt {
  margin-top: var(--s3);
  padding-top: var(--s2);
  border-top: 1px solid var(--pro-line);
}
.plan-alt .plan-billed { margin-top: 0; }
.plan-trial { margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid var(--pro-line); font-size: var(--t-small); font-weight: 600; }

/* ---------- the call to action: download, then upgrade in the app ---------- */
.pro-cta-sub { margin-top: 0.5rem; color: var(--ink-2); }
.pro-cta .store-row { margin-top: var(--s3); }
.price-fine { margin-top: var(--s2); max-width: 26em; font-size: var(--t-small); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }

@media (max-width: 900px) {
  .tiers-grid { grid-template-columns: 1fr; gap: var(--s4); }
}
@media (max-width: 480px) {
  .compare th, .compare td { padding-inline: 0.5rem; }
  .compare thead th:nth-child(3) { width: 6rem; }
  .compare thead th:nth-child(2) { width: 4.75rem; font-size: 0.8125rem; }
  .compare tbody th { padding-left: 0; }
  .plan-panel { padding: var(--s3); }
}
@media (max-width: 420px) {
  .store-row { gap: 0.6rem; }
  .store-badge { min-height: 52px; padding: 0.5rem 1rem 0.55rem 0.85rem; gap: 0.55rem; }
  .badge-glyph { width: 21px; height: 25px; }
  .badge-text strong { font-size: 1.125rem; }
}
.nw { white-space: nowrap; }
.frow { --pfi-cut: var(--ground); }
