/* The new look of every other page type (SPEC section 3): guides, calculators, rules, deals and text pages, and the
   parts every page shares below its top: the sections, the price history, the column charts, the facts and the
   questions, the tables that are not offer tables, the notes, the lists of other pages. These pages keep their layout
   and take the tokens, the type, the buttons, the tables and the cards of the new look: white, hairline cards with
   round corners, ink lines, the site's tint for fills, yellow for the one thing to press or the one point to see.
   Every selector stands in :where(), so a rule here weighs nothing: it still wins over the old rules (they are in a
   layer), and a rule of look.css, look-compare.css or look-start.css about the same element wins over it, wherever the
   files are folded together. Logical properties only: a page read from right to left mirrors by itself. */

/* ==================================================================================================================
   Tokens the old themes still paint with. The sign pages' small corners, eSIM's green for "cheapest", the friendly
   skin's own card, hairline, corner and shadow: each takes the new look's value, on every site.
   ================================================================================================================== */

:where(:root) {
  --radius: 12px;
  --best: var(--ink);
  --best-tint: var(--signal-soft);
}

:where(.soft) {
  --card: var(--paper);
  --hair: var(--line);
  --r: 20px;
  --shade: none;
  --row-tint: var(--signal-soft);
}

/* ==================================================================================================================
   Sections: one rhythm on every site. The heading in the type of look.css, an optional quiet line under it. The
   values below are those of the comparison pages' sections in look-compare.css, so a section reads the same there.
   ================================================================================================================== */

:where(.part, .soft .part) {
  padding-block-start: 56px;
}

:where(.part > h2, .part__head h2) {
  color: var(--ink);
  text-wrap: balance;
}

:where(.part__note) {
  max-width: 72ch;
  margin-block-start: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
}

:where(.part__note + .part__note) {
  margin-block-start: 6px;
}

:where(.part__count) {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

:where(.hero__note, .status__note) {
  color: var(--muted-2);
  font-size: 15px;
  line-height: 1.5;
}

/* A source line under a fact, a rule or a value: small and quiet. */
:where(.source) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

:where(.source a) {
  color: inherit;
}

/* ==================================================================================================================
   The price history (engine/render/trend.ts): a card with the line in ink, the grid in hairlines, the last price as
   the one yellow point. The drawing keeps its own geometry; only its paint changes here.
   ================================================================================================================== */

:where(.trend, .soft .trend) {
  margin-block-start: 20px;
  padding-block: 24px 20px;
  padding-inline: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
}

:where(.trend__plot line) {
  stroke: var(--line);
}

/* The bottom line is the axis: a shade firmer than the grid. */
:where(.trend__plot line[stroke]) {
  stroke: var(--line-2);
}

:where(.trend__plot polyline) {
  stroke: var(--ink);
}

:where(.trend__plot circle) {
  fill: var(--ink);
  stroke: var(--paper);
}

:where(.trend__plot circle:last-of-type) {
  fill: var(--signal);
  stroke: var(--ink);
}

:where(.trend text) {
  fill: var(--muted);
  font-size: 12px;
}

/* The last price's label stands out of the line in a wide edge of the card's white: on a phone it covers half the
   width of the drawing, and a step of the line there would run through its letters. */
:where(.trend .trend__now) {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 700;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 9px;
  stroke-linejoin: round;
}

:where(.trend figcaption) {
  margin-block-start: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* Two drawings on one page (a pair of products) each under its own small heading. */
:where(.part > h3) {
  margin-block-start: 24px;
  font-size: 18px;
  line-height: 24px;
}

/* Every day of the history, folded under the drawing (eSIM): the fold as the drawing's "show more" bar. */
:where(.trend__all) {
  margin-block-start: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

:where(.trend__all summary, .curs__all summary) {
  min-height: 56px;
  background: var(--field);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

:where(.trend__all summary:hover, .curs__all summary:hover) {
  background: var(--line);
}

:where(.trend__days) {
  border-block-start: 0;
}

:where(.trend__days thead th) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

:where(.trend__days tbody tr) {
  border-block-start: 1px solid var(--line);
}

/* ==================================================================================================================
   The column charts (what one page, one watt peak or one gigabyte costs): a card, the columns in the site's tint,
   the cheapest in yellow with an ink edge, its value on a yellow plate.
   ================================================================================================================== */

:where(.cols, .soft .cols) {
  padding-block: 28px 20px;
  padding-inline: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
}

:where(.col__plot, .soft .col__plot) {
  border-block-end: 1px solid var(--line-2);
}

:where(.col__bar, .soft .col__bar) {
  background: var(--tint);
  border-radius: 8px 8px 0 0;
  box-shadow: none;
}

:where(.col--lead .col__bar) {
  background: var(--signal);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

:where(.col__value) {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 800;
  font-stretch: 88%;
  font-variant-numeric: tabular-nums;
}

:where(.col--lead .col__value span) {
  padding-block: 2px;
  padding-inline: 7px;
  background: var(--signal);
  border-radius: 6px;
  color: var(--ink);
}

:where(.col__foot) {
  color: var(--ink-2);
  font-size: 13px;
}

:where(.col__foot small) {
  color: var(--muted);
  font-size: 12px;
}

/* The sentence beside a chart: in the type of the answer sentence. */
:where(.unit) {
  margin-block-start: 24px;
}

:where(.unit__say) {
  max-width: 34ch;
  font-size: 19px;
  font-weight: 400;
  font-stretch: 100%;
  line-height: 29px;
}

:where(.unit__say strong) {
  font-weight: 700;
}

/* A phone holds four columns; with more the chart scrolls sideways (site.css). It does so across the whole width of
   the screen, without the card, so the columns that follow show at the edge. */
@media (max-width: 599px) {
  :where(.cols:not(.cols--gb)) {
    margin-inline: calc(-1 * var(--page-gutter));
    padding-block: 8px 12px;
    padding-inline: var(--page-gutter);
    background: none;
    border: 0;
    border-radius: 0;
  }
}

/* eSIM's gigabyte chart on its side on a phone: the bars as long as their share, in the same paint. */
@media (max-width: 759px) {
  :where(.cols--gb .col__bar) {
    border-radius: 0;
    border-start-end-radius: 6px;
    border-end-end-radius: 6px;
  }
}

/* ==================================================================================================================
   Facts and questions, as on the comparison pages (look-compare.css): a card per fact, two to a row where there is
   room; the questions on one card, one below the other on hairlines.
   ================================================================================================================== */

:where(.facts, .soft .facts) {
  gap: 16px;
  margin-block-start: 20px;
  border-block-start: 0;
}

:where(.fact, .soft .fact) {
  padding-block: 20px;
  padding-inline: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
}

:where(.fact h3, .faq h3) {
  font-size: 18px;
  font-weight: 700;
  font-stretch: 100%;
  line-height: 24px;
}

:where(.fact p, .faq p) {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}

:where(.fact p.source, .fact .source) {
  color: var(--muted);
  font-size: 13px;
}

:where(.faq, .soft .faq) {
  display: block;
  max-width: 880px;
  margin-block-start: 20px;
  padding-block: 4px;
  padding-inline: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
}

:where(.faq > div, .soft .faq > div) {
  padding-block: 20px;
  padding-inline: 0;
  background: none;
  border: 0;
  border-block-end: 1px solid var(--line);
  border-radius: 0;
}

:where(.faq > div:last-child) {
  border-block-end: 0;
}

/* The printers past the first six of a fit list, folded. */
:where(.fact .omore summary) {
  font-size: 15px;
  font-weight: 700;
}

/* ==================================================================================================================
   Lists of other pages: the related pages as small cards and the jump links as pills, the boards on a card with
   hairlines (the related pages and the boards as on the comparison pages, look-compare.css).
   ================================================================================================================== */

:where(.plates) {
  gap: 10px;
  margin-block-start: 20px;
}

:where(.plates a) {
  min-height: 52px;
  padding-inline: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
}

:where(.plates a:hover) {
  background: var(--paper);
  border-color: var(--ink);
}

:where(.sizes a, .soft .sizes a) {
  min-height: 40px;
  padding-inline: 15px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
}

:where(.sizes a:hover, .soft .sizes a:hover) {
  background: var(--paper);
  border-color: var(--ink);
}

:where(.sizes a span) {
  color: var(--muted);
  font-weight: 500;
}

/* A board of the sign pages: its rows on hairlines inside one card, the last row without one. The friendly skin's
   boards are a card per row already. */
:where(.board:not(.soft .board)) {
  padding-inline: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
}

:where(.board:not(.soft .board) > li:last-child, .board:not(.soft .board) > li:nth-last-child(2):nth-child(odd)) {
  border-block-end: 0;
}

@media (min-width: 760px) {
  :where(.board:not(.soft .board)) {
    column-gap: 32px;
  }
}

@media (max-width: 759px) {
  :where(.board:not(.soft .board) > li:nth-last-child(2):nth-child(odd)) {
    border-block-end: 1px solid var(--line);
  }
}

:where(.board__name) {
  font-size: 18px;
  font-weight: 700;
  font-stretch: 100%;
  line-height: 24px;
}

:where(.board__price) {
  font-size: 18px;
  font-weight: 800;
  font-stretch: 88%;
}

:where(.board__meta) {
  color: var(--muted);
  font-size: 13px;
}

/* The friendly skin's other pages as small cards: the name, then the lowest price in the ink of the prices. */
:where(.destcard, .soft .destcard) {
  border-color: var(--line);
  border-radius: 16px;
}

:where(.destcard:hover, .soft .destcard:hover) {
  border-color: var(--ink);
  box-shadow: none;
}

:where(.destcard__name) {
  font-size: 15px;
  line-height: 20px;
}

:where(.destcard__price) {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  font-stretch: 88%;
}

/* A drawn picture stands on the site's tint, as the pictures of the drawings do. */
:where(.thumb--drawn) {
  background: var(--tint-soft);
  border-color: transparent;
}

/* ==================================================================================================================
   A product's data (label and value on hairlines), and eSIM's provider facts: one card.
   ================================================================================================================== */

:where(.specs, .soft .specs) {
  margin-block-start: 20px;
  padding-block: 8px;
  padding-inline: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
}

:where(.specs div, .soft .specs div) {
  margin-block-end: 0;
  border-block-end: 1px solid var(--line);
}

:where(.specs div:last-child) {
  border-block-end: 0;
}

@media (min-width: 760px) {
  :where(.specs div:nth-last-child(2):nth-child(odd)) {
    border-block-end: 0;
  }
}

:where(.specs dt, .about__list dt) {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

/* ==================================================================================================================
   Tables that are not offer tables: the solar figures and pairs, eSIM's provider wins, the deals, the guides. Labels
   over the columns, a hairline between rows, the row's name in bold.
   ================================================================================================================== */

:where(.calc-table, .deals-scroll) {
  margin-block-start: 20px;
}

:where(.calc-table th, .calc-table td, .deals-table th, .deals-table td) {
  padding-block: 14px;
  border-block-end: 1px solid var(--line);
}

:where(.calc-table thead th, .deals-table thead th) {
  padding-block: 0 10px;
  border-block-end: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

:where(.calc-table tbody th) {
  color: var(--ink);
  font-weight: 700;
}

:where(.calc-table td.num strong, .calc-table td strong) {
  font-weight: 800;
}

:where(.calc-table small, .deals-table small) {
  color: var(--muted);
}

/* eSIM's provider wins are wider than a phone in most languages: the table scrolls sideways in its own box (site.css),
   which reaches to the screen's edges as the path in the strip does, and fades at the edge where columns hide
   (look.css, fade-start and fade-end). Where the table fits, nothing changes. */
@media (max-width: 719px) {
  .calc-table--wins {
    margin-inline: calc(-1 * var(--page-gutter));
    padding-inline: var(--page-gutter);
  }
}

@supports (animation-timeline: scroll()) {
  .calc-table--wins {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
    mask-image: linear-gradient(to right, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
    animation: fade-start auto linear both, fade-end auto linear both;
    animation-timeline: scroll(self inline), scroll(self inline);
    animation-range: 0 24px, calc(100% - 24px) 100%;
  }

  [dir="rtl"] .calc-table--wins {
    -webkit-mask-image: linear-gradient(to left, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
    mask-image: linear-gradient(to left, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
  }
}

@media (max-width: 760px) {
  :where(.deals-table tr) {
    padding-block: 16px;
    border-block-end: 1px solid var(--line);
  }

  :where(.deals-table th, .deals-table td) {
    padding-block: 2px;
    border: 0;
  }
}

/* ==================================================================================================================
   The solar calculator and its case pages: the form on a white card with the new fields, the result on the dark box
   of the new look, the payback on a yellow plate; the formulas as quiet lines, the rules numbered on hairlines.
   ================================================================================================================== */

:where(.calc) {
  gap: 20px;
  margin-block-start: 56px;
}

:where(.calc__form) {
  gap: 16px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
}

:where(.calc__field label) {
  margin-block-end: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

:where(.calc__field select, .calc__field input) {
  height: 48px;
  padding-inline: 14px;
  background-color: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}

:where(.calc__field select) {
  padding-inline-end: 40px;
  background-image: var(--chevron);
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 10px 6px;
  -webkit-appearance: none;
  appearance: none;
}

:where([dir="rtl"] .calc__field select) {
  background-position: left 16px center;
}

:where(.calc__field select:hover, .calc__field input:hover) {
  border-color: var(--ink);
}

:where(.calc__field select:focus, .calc__field input:focus) {
  border-color: var(--ink);
  box-shadow: none;
  outline: 2px solid var(--ink);
  outline-offset: 0;
}

:where(.calc__result) {
  padding: 28px;
  background: var(--ink);
  border-radius: 20px;
  color: var(--paper);
}

:where(.calc__result h2) {
  color: var(--paper);
}

:where(.calc__figures) {
  margin-block-start: 16px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.24);
}

:where(.calc__figures > div) {
  padding-block: 14px;
  border-block-end: 1px solid rgba(255, 255, 255, 0.14);
}

:where(.calc__figures > div:last-child) {
  border-block-end: 0;
  padding-block-end: 0;
}

:where(.calc__figures dt) {
  color: #c5ccd2;
  font-size: 15px;
}

:where(.calc__figures dd) {
  font-size: 22px;
  font-weight: 800;
  font-stretch: 88%;
  line-height: 28px;
}

:where(.calc__figures [data-calc="payback"]) {
  padding-block: 2px;
  padding-inline: 8px;
  background: var(--signal);
  border-radius: 6px;
  color: var(--ink);
}

@media (max-width: 719px) {
  :where(.calc__form, .calc__result) {
    padding: 20px;
  }
}

:where(.calc-how) {
  gap: 8px;
  margin-block-start: 20px;
}

:where(.calc-how li) {
  padding-block: 12px;
  padding-inline: 16px;
  background: var(--field);
  border-inline-start: 0;
  border-radius: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

:where(.solar-rules__list) {
  margin-block-start: 20px;
  border-block-start: 1px solid var(--line);
}

:where(.solar-rules__list > li) {
  column-gap: 14px;
  padding-block: 18px;
  border-block-end: 1px solid var(--line);
}

:where(.solar-rules__list > li)::before {
  border: 0;
  background: var(--tint);
  color: var(--ink);
}

:where(.solar-rules__list > li > p:not(.source)) {
  color: var(--ink-2);
  line-height: 1.55;
}

:where(.solar-rules .source) {
  margin-block-start: 6px;
}

/* The AHK cost page's sentences after the first. */
:where(.summary) {
  color: var(--ink-2);
  line-height: 1.6;
}

/* ==================================================================================================================
   Deals pages (engine/deals/page.ts): the heading and the sentence, the providers' codes as cards with the code on a
   dashed voucher plate, the table of prices then and now.
   ================================================================================================================== */

:where(.deals-lede) {
  padding-block-start: 16px;
}

:where(.deals-answer) {
  max-width: 62ch;
  margin-block-start: 20px;
  font-size: 19px;
  font-weight: 400;
  font-stretch: 100%;
  line-height: 29px;
}

:where(.deals-answer strong) {
  font-weight: 700;
}

:where(.deals-tally) {
  margin-block-start: 14px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

:where(.deals-codes__list) {
  gap: 12px;
}

:where(.deals-code) {
  gap: 8px;
  padding-block: 20px;
  padding-inline: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
}

:where(.deals-code__name) {
  font-size: 22px;
  font-weight: 800;
  font-stretch: 88%;
  line-height: 28px;
}

:where(.deals-code__code code) {
  padding-block: 6px;
  padding-inline: 12px;
  background: var(--field);
  border: 1.5px dashed var(--line-2);
  border-radius: 10px;
  color: var(--ink);
}

:where(.deals-code__note, .deals-code__source) {
  color: var(--muted);
  font-size: 13px;
}

:where(.deals-code__source) {
  border-block-start-color: var(--line);
}

:where(.deals-name a) {
  color: var(--ink);
  font-weight: 700;
}

:where(.deals-today strong) {
  font-size: 17px;
  font-weight: 800;
}

:where(.deals-down) {
  color: var(--ok);
}

/* ==================================================================================================================
   Text pages (about, how we compare, legal notice, privacy): one calm column on white, the same on every site.
   ================================================================================================================== */

:where(.prose, main > .prose) {
  max-width: 68ch;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

:where(.prose p, .prose li, .prose address) {
  color: var(--ink-2);
  line-height: 1.6;
}

:where(.prose h2) {
  margin-block-start: 40px;
  color: var(--ink);
}

:where(.prose a) {
  color: var(--ink);
  font-weight: 600;
}

/* ==================================================================================================================
   eSIM Charts' guides, their hub, the phone check and the data calculator (engine/render/esim/guide.ts, esim-guide.js).
   ================================================================================================================== */

:where(.guide__answer) {
  max-inline-size: 62ch;
  margin-block-start: 18px;
  color: var(--ink);
  font-size: 19px;
  line-height: 29px;
}

:where(.guide__part > p, .guide__intro, .guide__list) {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}

:where(.guide__part > p.source, .guide__intro > p.source, .gmaker > p.source) {
  color: var(--muted);
  font-size: 13px;
}

:where(.guide__table th, .guide__table td) {
  border-block-end-color: var(--line);
}

:where(.gmaker > h3) {
  font-size: 22px;
  line-height: 28px;
}

/* The model list and the tables of the calculator page: a card each, the labels over the columns. */
:where(.gdevices, .gtable) {
  border-color: var(--line);
  border-radius: 16px;
}

:where(.gdevices thead th, .gtable thead th) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

:where(.gdevices caption) {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 699px) {
  :where(.gdevices tbody) {
    border-color: var(--line);
    border-radius: 16px;
  }

  :where(.gtable td[data-label])::before {
    color: var(--muted);
    font-size: 12px;
  }
}

/* The calculator: one card without a shadow, the steppers and the list in the new controls, the result on the dark
   box of the new look (the chooser's result bar), the button the page's one yellow button. */
:where(.gcalc__card) {
  background: var(--paper);
  border-color: var(--line);
  border-radius: 20px;
  box-shadow: none;
}

:where(.gcalc__label) {
  color: var(--muted);
}

:where(.gcalc__stepper) {
  border-color: var(--line-2);
}

:where(.gcalc__number) {
  border-inline-color: var(--line-2);
}

:where(.gcalc__step:enabled:hover) {
  background: var(--line);
}

:where(.gcalc__result) {
  background: var(--ink);
  border-color: var(--ink);
  border-radius: 16px;
  color: var(--paper);
}

:where(.gcalc__lead, .gcalc__reserve) {
  color: #c5ccd2;
}

:where(.gcalc__size) {
  color: var(--paper);
  font-weight: 800;
  letter-spacing: -0.01em;
}

:where(.gcalc__select) {
  border-color: var(--line-2);
  border-radius: 12px;
}

:where(.gcalc__select:hover) {
  border-color: var(--ink);
}

/* The hub of the guides: a card each. */
:where(.guidehub__item) {
  padding-block: 22px 24px;
  padding-inline: 24px;
  border-color: var(--line);
  border-radius: 20px;
}

:where(.guidehub__item:hover) {
  border-color: var(--ink);
}

:where(.guidehub__item p) {
  color: var(--muted-2);
}

/* eSIM's provider page: who stands behind it, on one card. */
:where(.about__list) {
  border-radius: 20px;
}
