/* =========================================================================
   Cabinhub News — review surface (additive)

   Loaded last, after css/tokens.css and the eight surface modules, so it
   inherits the newsroom palette instead of carrying a second one: every colour
   below resolves from the Ember tokens --paper --canvas --ink --ink-soft
   --ink-faint --rule --accent --focus, which already flip with the theme
   (html[data-theme], OS preference) in tokens.css. The hex values here are
   FALLBACKS only, for a host page that defines none of them; that is also what
   lets the standalone fixture page prove the block without the site shell.
   Never add a second palette: one token file decides light vs dark.

   Layout: one column at every width. The verdict row is a two-column grid
   (text | ring) at every breakpoint; on a phone the ring shrinks to 56px and
   stays beside the verdict rather than stacking above it, so the score and the
   sentence read as one judgement and neither is left alone on a line.

   Craft notes, each deliberate:
   - hairline rules (1px, --line) do the dividing; there are no cards, no
     shadows, no rounded panels. A review is a document, not a widget.
   - the ring is the only saturated element on the surface. Its track is
     --line, its arc is --accent, and the number is set in the same serif as
     the verdict so score and sentence read as one judgement.
   - pros and cons are NOT colour-coded green/red. Colour is this product's
     market-direction signal (.market__chg--down and .ticker__chg--down are
     ink/accent); reusing red for "a drawback" would teach the reader that a
     weakness is a price move. The heading and a 2px rule above each column
     carry the distinction instead.
   - the spec table uses th[scope=row], a fixed 1fr/1.6fr split and tabular
     figures, so a column of numbers lines up without a monospace font.
   - no motion at all: nothing here animates, so reduced-motion is respected
     by construction rather than by a media query.
   ========================================================================= */

/* ---------------------------------------------------------------- tokens --
   The Ember names are the contract; --r-* are the resolved values this file
   uses, so one place decides light vs dark and the rest of the file stays
   readable. tokens.css already flips the --* set on html[data-theme="dark"]
   and on the OS preference, so the second block below only repeats the
   values for a host page with no tokens at all (the fixture page). */
.review,
:root {
  --r-bg: var(--paper, #f7f5f2);
  --r-surface: var(--canvas, #ffffff);
  --r-fg: var(--ink, #1c1714);
  --r-fg-2: var(--ink-soft, #514942);
  --r-fg-3: var(--ink-faint, #6d6259);
  --r-line: var(--rule, #e2dcd4);
  --r-accent: var(--accent, #bc3e0d);
  --r-focus: var(--focus, #d64221);
}

:root[data-theme="dark"] .review,
:root[data-theme="dark"] {
  --r-bg: var(--paper, #15110e);
  --r-surface: var(--canvas, #1e1915);
  --r-fg: var(--ink, #f3eee9);
  --r-fg-2: var(--ink-soft, #c9bfb6);
  --r-fg-3: var(--ink-faint, #9f948a);
  --r-line: var(--rule, #3a3129);
  --r-accent: var(--accent, #fa8054);
  --r-focus: var(--focus, #ff9c6b);
}

/* ---------------------------------------------------------------- shell -- */
.review {
  /* Inherit the page's own type families when it sets them; the fallbacks are
     the reference client's two families. */
  --r-serif: var(--font-display, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif);
  --r-sans: var(--font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif);
  --r-mono: var(--font-mono, ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace);

  background: var(--r-surface);
  color: var(--r-fg);
  font-family: var(--r-sans);
  font-size: 1rem;
  line-height: 1.6;
  margin: 2.25rem 0 0;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--r-line);
  /* A review is a separate document inside the article: one notch up in
     elevation, no shadow. */
  border-radius: 0;
}

.review:lang(zh-Hans),
.review[lang="zh-Hans"] {
  --r-serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
  --r-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", var(--r-sans);
  line-height: 1.75;
}

@media (prefers-color-scheme: dark) {
  /* tokens.css covers the site (its own OS-preference block flips --paper,
     --canvas, --ink and friends). This block exists only for a host page that
     declares no theme attribute AND defines no tokens, e.g. the fixture page
     opened on a dark-set machine. */
  :root:not([data-theme]) .review {
    --r-bg: var(--paper, #15110e);
    --r-surface: var(--canvas, #1e1915);
    --r-fg: var(--ink, #f3eee9);
    --r-fg-2: var(--ink-soft, #c9bfb6);
    --r-fg-3: var(--ink-faint, #9f948a);
    --r-line: var(--rule, #3a3129);
    --r-accent: var(--accent, #fa8054);
    --r-focus: var(--focus, #ff9c6b);
  }
}

/* ------------------------------------------------------------- the top --
   Verdict text left, score ring right. The ring column is fixed so a long
   verdict does not squeeze it, and the ring is aligned to the first line of
   the verdict rather than to the block's centre. */
.review__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem 2rem;
  align-items: start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--r-line);
}

.review__verdict {
  min-width: 0;
}

.review__eyebrow {
  margin: 0 0 0.4rem;
  font-family: var(--r-sans);
  font-size: var(--fs-micro, 0.75rem);
  font-weight: 600;
  color: var(--r-fg-3);
}

.review__product {
  margin: 0;
  font-family: var(--r-serif);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.review__maker {
  font-family: var(--r-sans);
  font-size: 0.62em;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--r-fg-3);
  white-space: nowrap;
}

.review__sentence {
  margin: 0.6rem 0 0;
  max-width: 46ch;
  font-family: var(--r-serif);
  /* The review is a separate document inside the article, but its prose is
     still the story the reader opened: the reader's own size reaches it
     (css/tokens.css --reading-scale), the ring and the chrome do not. */
  font-size: calc(clamp(1.05rem, 0.98rem + 0.35vw, 1.28rem) * var(--reading-scale));
  line-height: 1.45;
  color: var(--r-fg);
  /* The verdict is a judgement: give it the weight and leave the prose to the
     article body. */
  font-weight: 400;
}

/* Attribution for the score and the judgement: the outlet, its own scale, and
   the tester. Smaller and quieter than the verdict on purpose — it is the
   footnote to the number, not a second opinion. */
.review__basis {
  margin: 0.5rem 0 0;
  max-width: 52ch;
  font-family: var(--r-sans);
  font-size: var(--fs-micro, 0.75rem);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  color: var(--r-fg-3);
}

/* Price and release date, as a description list so the pairing is real for a
   screen reader and not two spans that happen to sit next to each other. One
   column per fact: the key sits above its value, so a long price wraps inside
   its own column instead of pushing the release date out of line. */
.review__facts {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: auto auto;
  justify-content: start;
  gap: 0.1rem 1.5rem;
  margin: 0.9rem 0 0;
}

.review__fact-key {
  margin: 0;
  font-family: var(--r-sans);
  font-size: var(--fs-micro, 0.75rem);
  font-weight: 500;
  color: var(--r-fg-3);
}

.review__fact-val {
  margin: 0;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  color: var(--r-fg-2);
}

/* ----------------------------------------------------------- the ring -- */
.review__ring {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  flex: none;
}

.review__ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.review__ring-track {
  stroke: var(--r-line);
}

.review__ring-arc {
  stroke: var(--r-accent);
}

.review__ring-value {
  position: relative;
  font-family: var(--r-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--r-fg);
}

.review__ring-band {
  position: absolute;
  left: 50%;
  top: calc(100% + 0.35rem);
  transform: translateX(-50%);
  font-family: var(--r-sans);
  font-size: var(--fs-micro, 0.75rem);
  font-weight: 500;
  white-space: nowrap;
  color: var(--r-fg-3);
}

.review__ring--none {
  width: auto;
  height: auto;
  align-self: start;
  padding: 0.4rem 0.6rem;
  border: 1px dashed var(--r-line);
}

.review__ring-none {
  font-family: var(--r-sans);
  font-size: var(--fs-micro, 0.75rem);
  font-weight: 500;
  color: var(--r-fg-3);
}

/* ------------------------------------------------------- pros and cons --
   Two equal columns on a wide screen, stacked in reading order on a phone
   (pros first). The 2px top rule is the column's identity; the heading is the
   label. No green/red: see the header note. */
.review__lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
  margin: 1.75rem 0 0;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--r-line);
}

.review__col {
  border-top: 2px solid var(--r-line);
  padding-top: 0.75rem;
}

.review__col--pros {
  border-top-color: var(--r-accent);
}

.review__col-title {
  margin: 0 0 0.6rem;
  font-family: var(--r-sans);
  font-size: var(--fs-label, 0.8125rem);
  font-weight: 600;
  color: var(--r-fg-2);
}

.review__items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.review__item {
  position: relative;
  padding-left: 1.1rem;
  margin: 0 0 0.45rem;
  font-size: calc(0.95rem * var(--reading-scale));
  line-height: 1.5;
  color: var(--r-fg-2);
}

.review__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.45rem;
  height: 1px;
  background: var(--r-fg-3);
}

.review__col--pros .review__item::before {
  background: var(--r-accent);
}

/* --------------------------------------------------------------- specs --
   A description table, not a data grid: th on the row, td the value, one
   caption per section heading. Mobile keeps the same two columns because a
   spec name is short; only the gap tightens. */
.review__specs-section,
.review__whofor,
.review__availability,
.review__alts,
.review__refs {
  margin: 1.75rem 0 0;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--r-line);
}

.review__refs {
  border-bottom: 0;
  padding-bottom: 0;
}

.review__section-title {
  margin: 0 0 0.75rem;
  font-family: var(--r-sans);
  font-size: var(--fs-label, 0.8125rem);
  font-weight: 600;
  color: var(--r-fg-2);
}

.review__specs {
  width: 100%;
  border-collapse: collapse;
  font-size: calc(0.92rem * var(--reading-scale));
}

.review__spec-row + .review__spec-row {
  border-top: 1px solid var(--r-line);
}

.review__spec-name,
.review__spec-value {
  padding: 0.55rem 0;
  vertical-align: top;
  text-align: left;
}

.review__spec-name {
  width: 34%;
  padding-right: 1rem;
  font-weight: 500;
  color: var(--r-fg-3);
  hyphens: auto;
}

.review__spec-value {
  color: var(--r-fg);
  font-variant-numeric: tabular-nums;
}

/* The per-row provenance marker: a small raised number that jumps to the
   numbered reference list. Quiet by design — it must never compete with the
   figure it annotates — but it is a real link with a 24px tap area on touch
   (the padding is inside the inline box, so it does not shift the baseline). */
.review__spec-source {
  display: inline-block;
  min-width: 1.5rem;
  padding: 0.4rem 0.2em;
  vertical-align: super;
  text-align: center;
  font-family: var(--r-sans);
  font-size: var(--fs-micro, 0.75rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--r-fg-3);
  text-decoration: underline dotted var(--r-line);
  text-underline-offset: 2px;
}

.review__spec-source:hover,
.review__spec-source:focus-visible {
  color: var(--r-accent);
  text-decoration-color: var(--r-accent);
}

/* ------------------------------------------------------------ who / alts -- */
.review__whofor-text {
  margin: 0;
  max-width: 52ch;
  font-family: var(--r-serif);
  font-size: calc(1.02rem * var(--reading-scale));
  line-height: 1.6;
  color: var(--r-fg-2);
}

.review__alt-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.review__alt {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.6rem;
}

.review__alt-name {
  font-weight: 600;
  color: var(--r-fg);
}

.review__alt-why {
  color: var(--r-fg-3);
  font-size: 0.92rem;
}

/* -------------------------------------------------------------- refs --
   Numbered, because the spec rows link to these numbers. The host is shown
   beside the title so a reader knows where a click goes before making it. */
.review__ref-list {
  margin: 0;
  padding-left: 1.4rem;
  color: var(--r-fg-2);
}

.review__ref {
  margin: 0 0 0.4rem;
  font-size: calc(0.9rem * var(--reading-scale));
  line-height: 1.5;
}

.review__ref-link {
  /* An inline box is only as tall as its glyphs (~16px at 0.9rem), so a
     one-line citation was a 16px target on a 1440 desktop and a 21px one when
     it wrapped — measured 2026-11-10 by n3_revmeasure. Inline-block plus
     padding reaches 26px without moving the text: the negative margin cancels
     the padding back to the old rhythm. (That probe flags below 24px; the
     reader-control 44px rule is for touch surfaces, where the citation list is
     already full-width rows.) */
  display: inline-block;
  padding: 0.3rem 0.12em;
  margin: -0.3rem -0.12em;
  color: var(--r-fg-2);
  text-decoration: underline;
  text-decoration-color: var(--r-line);
  text-underline-offset: 0.18em;
}

.review__ref-link:hover,
.review__ref-link:focus-visible {
  color: var(--r-accent);
  text-decoration-color: var(--r-accent);
}

.review__ref-host {
  margin-left: 0.45rem;
  font-size: var(--fs-micro, 0.75rem);
  color: var(--r-fg-3);
}

/* The return link a cited entry owes the reader: quiet, on its own line under
   the citation, and 24px tall so it is a real target rather than a glyph. */
.review__ref-back {
  display: block;
  width: fit-content;
  margin: 0.3rem 0 0 0;
  padding: 0.25rem 0.35rem;
  font-family: var(--r-sans);
  font-size: var(--fs-micro, 0.75rem);
  color: var(--r-fg-3);
  text-decoration: underline;
  text-decoration-color: var(--r-line);
  text-underline-offset: 0.18em;
}

.review__ref-back:hover,
.review__ref-back:focus-visible {
  color: var(--r-accent);
  text-decoration-color: var(--r-accent);
}

/* wireJumps() lands focus on the entry; show it even where :focus-visible would
   not, and clear the 60px sticky toolbar when a jump scrolls to it. */
.review__ref:focus {
  outline: 2px solid var(--r-focus);
  outline-offset: 2px;
}

.review__ref,
.review__spec-source {
  scroll-margin-top: 76px;
}

/* -------------------------------------------------------------- focus -- */
.review a:focus-visible {
  outline: 2px solid var(--r-focus);
  outline-offset: 2px;
}

/* --------------------------------------------------------------- phone --
   One column for the lists; the verdict keeps its two-column shape with a
   smaller ring, because a 56px ring stacked above the verdict left the score
   sitting alone above the "Our verdict" label with no product next to it.
   At 390px the text column is still ~280px, which holds the verdict sentence
   in roughly 30 characters a line. */
@media (max-width: 640px) {
  .review {
    padding: 1.15rem 1rem 1.25rem;
    margin-top: 1.5rem;
  }

  .review__top {
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 0.35rem 0.9rem;
    align-items: start;
  }

  .review__ring {
    width: 56px;
    height: 56px;
    grid-row: 1;
    grid-column: 2;
    align-self: start;
  }

  .review__verdict {
    grid-row: 1;
    grid-column: 1;
  }

  .review__ring-value {
    font-size: 1.2rem;
  }

  /* The band label under a 56px ring collides with the verdict eyebrow; on a
     phone the ring's aria-label and the number carry the meaning. */
  .review__ring-band {
    display: none;
  }

  .review__lists {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem 0;
  }

  /* Three facts across a 326px column left each value ~92px, and the zh
     release date ("2026-11-05") broke at its own hyphen into "2026-11-" /
     "05" — measured on the 390 shot, 2026-11-10. Key beside value, one fact
     per row: the date never has to fit a third of the width. */
  .review__facts {
    grid-auto-flow: row;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: none;
    align-items: baseline;
    gap: 0.45rem 1rem;
  }

  .review__spec-name {
    width: 38%;
  }

  .review__specs {
    /* The phone step is one notch down from the desk step; it still carries
       the reader's own size (the ring's 1.2rem above does not — it is a
       graphic inside a fixed 56px circle). */
    font-size: calc(0.9rem * var(--reading-scale));
  }
}

/* ---------------------------------------------------------------- print --
   Paper has no colour signal, so the pros column's accent rule becomes a
   solid black rule and links print their URL. */
@media print {
  .review {
    border: 0;
    padding: 0;
    margin: 1rem 0 0;
  }

  .review__col--pros {
    border-top-color: #000;
  }

  .review__ref-link::after {
    content: " (" attr(href) ")";
    font-family: var(--r-mono);
    font-size: 0.75em;
    word-break: break-all;
  }
}

.review__ref:focus {outline:2px solid var(--accent);outline-offset:4px}
.review__ref-back {
  display:block;margin-top:.4rem;padding:.32rem .58rem;font:600 .78rem/1.4 var(--font-ui);
  border:1px solid var(--rule);border-radius:3px;background:var(--paper);color:var(--ink);cursor:pointer
}
@media(pointer:coarse){.review__ref-back {min-height:44px}}
