/* The new look of the start pages (SPEC section 6). First what all sites share: the line of counts in the strip, the
   hero (the heading, the first sentence with its notes and figures, and on a phone the chooser right under the
   sentence), the chooser card, the sections of cards below. Markup in engine/render/look-start.ts; chooser.js marks
   the choices that lead to a page. These rules hang on the classes of these parts (.start, .chooser, .figures,
   .shelf, .pcard, .strip__sum), so no other page changes; where a site's own element is drawn the same (the first
   sentence of four sites, eSIM's currency field), its selector joins the shared rule. The hero and the sections start
   clean (all: revert), so no old rule leaks into them; the buttons and the drawings keep theirs.
   Then one section per group of sites (AHK, Tinten and Tusz; Protein and Booster; Lampen and eSIM) for what their
   start pages keep of their own: their lists and fields under the hero, their links, their prices and eSIM's
   languages. Those rules hang on html[data-site] and on classes that only the start pages carry. */

:where(.start, .start *:not(svg, svg *, .btn), .shelf, .shelf *:not(svg, svg *, .btn)) {
  all: revert;
  box-sizing: border-box;
}

/* The line at the start of the strip: the counts and what the site compares. It takes the room the state leaves and
   wraps inside it; where both do not fit beside each other, the state goes under it. */
.strip__sum {
  flex: 1 1 520px;
  min-width: 0;
  margin: 0;
  padding-block: 14px;
}

@media (max-width: 719px) {
  .strip__sum {
    padding-block: 12px 8px;
  }
}

/* ==================================================================================================================
   The hero: the text and the chooser side by side from 1040px, the chooser under the text below.
   ================================================================================================================== */

.start {
  display: grid;
  gap: 40px;
  padding-block: 32px 56px;
}

.start__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  min-width: 0;
}

.start h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.5rem, 5.6vw, 4.75rem);
  font-weight: 800;
  font-stretch: 78%;
  line-height: 0.95;
  letter-spacing: -0.02em;
  /* The lines as drawn: each as full as it goes (look.css balances the other headings). */
  text-wrap: wrap;
}

/* The first sentence. Four sites keep the element it had before the look and draw it the same: the ink sites'
   .hero__answer, Protein's and Booster's .home__answer, eSIM's first .homehead__lede (the one right after the
   heading). */
.start__text .answer__text,
html:is([data-site="tinte"], [data-site="ink"]) .start__text .hero__answer,
:is(html[data-site="protein"], html[data-site="cards"]) .start__text .home__answer,
html[data-site="esim"] .start__text > h1 + .homehead__lede {
  max-width: 560px;
  margin: 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 26px;
}

.start__text .answer__text strong,
html:is([data-site="tinte"], [data-site="ink"]) .start__text .hero__answer strong,
:is(html[data-site="protein"], html[data-site="cards"]) .start__text .home__answer strong,
html[data-site="esim"] .start__text > h1 + .homehead__lede strong {
  color: var(--ink);
  font-weight: 700;
}

.start__note {
  margin: -12px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}

.figures {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.figures li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}

.figures strong {
  color: var(--ink);
  font-size: 34px;
  font-weight: 800;
  font-stretch: 82%;
  line-height: 42px;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 720px) {
  .start__text .answer__text,
  html:is([data-site="tinte"], [data-site="ink"]) .start__text .hero__answer,
  :is(html[data-site="protein"], html[data-site="cards"]) .start__text .home__answer,
  html[data-site="esim"] .start__text > h1 + .homehead__lede {
    font-size: 19px;
    line-height: 29px;
  }
}

@media (min-width: 1040px) {
  .start {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 56px;
  }

  .start--alone {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A phone: the chooser comes right after the heading and the first sentence, before the notes and the figures. The
   text hands its parts to the hero's grid (display: contents), so the card can stand between them while the HTML keeps
   its order; the grid's rows keep the text's 24px between its parts, and the card has 32px above and below it. */
@media (max-width: 719px) {
  .start:not(.start--alone) {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
  }

  .start:not(.start--alone) > .start__text {
    display: contents;
  }

  .start:not(.start--alone) > .chooser {
    order: 1;
    margin-block: 8px;
  }

  .start:not(.start--alone) > .start__text > :not(h1, h1 + *) {
    order: 2;
  }

  /* The first part after the card keeps the card's distance instead of moving up to the sentence (a note's -12px). */
  .start:not(.start--alone) > .start__text > h1 + * + * {
    margin-block-start: 0;
  }
}

/* ==================================================================================================================
   The chooser card: the site's tint, the title and the object, a white card with the groups and the bar.
   ================================================================================================================== */

.chooser {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 28px;
  border-radius: 28px;
  background: var(--tint);
}

.chooser__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 92px;
}

.chooser__title {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  font-weight: 800;
  font-stretch: 82%;
  line-height: 40px;
}

.chooser__sub {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  line-height: 18px;
}

/* The object is taller than its row and reaches into the card's padding, as drawn. */
.chooser__object {
  display: block;
  flex: none;
  width: 150px;
  height: 123px;
  margin-block: -16px;
  object-fit: contain;
}

.chooser__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border-radius: 20px;
  background: var(--paper);
}

/* A group: its label on a line of its own (a floated legend is laid out as one of the group's items), then the chips. */
.chooser__group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.chooser__group > legend {
  float: inline-start;
  width: 100%;
  margin: 0 0 2px;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* The chip is the target; its radio stays in the page for the keyboard and for screen readers, out of sight. */
.chooser .chip {
  position: relative;
}

.chooser .chip > input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

.chooser .chip:has(> input:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* A choice that leads nowhere with the one just made. */
.chooser .chip:has(> input:disabled) {
  border-color: var(--line);
  background: var(--field);
  color: var(--faint);
  cursor: not-allowed;
}

/* A group with many choices: one select field. eSIM's currency field under the first sentence (.altcur) shares its
   frame, its weight and its states; its size and its arrow are its own (the eSIM section). */
.chooser__select,
html[data-site="esim"] .start .altcur select {
  margin: 0;
  padding-block: 0;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--ink);
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.chooser__select {
  display: block;
  width: 100%;
  min-height: 48px;
  padding-inline: 16px 44px;
  background: var(--paper);
  font-family: inherit;
  font-size: 16px;
  line-height: 20px;
}

.chooser__group:has(> .chooser__select) {
  position: relative;
}

.chooser__group:has(> .chooser__select)::after {
  content: "";
  position: absolute;
  inset-block-end: 21px;
  inset-inline-end: 18px;
  width: 10px;
  height: 6px;
  background: var(--ink);
  -webkit-mask: var(--chevron) center / contain no-repeat;
  mask: var(--chevron) center / contain no-repeat;
  pointer-events: none;
}

.chooser__select:hover,
html[data-site="esim"] .start .altcur select:hover {
  border-color: var(--ink);
}

.chooser__select:focus-visible,
html[data-site="esim"] .start .altcur select:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* The bar: what the choice leads to, its lowest price, the main button. */
.chooser__result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
  padding-inline: 20px 16px;
  border-radius: 16px;
  background: var(--ink);
}

.chooser__pick {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  margin: 0;
}

.chooser__pick > span {
  color: var(--faint);
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}

.chooser__pick > strong {
  color: var(--paper);
  font-size: 28px;
  font-weight: 800;
  font-stretch: 82%;
  line-height: 34px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chooser .btn--main {
  flex: none;
  box-sizing: border-box;
  min-height: 52px;
  padding-block: 0;
  padding-inline: 22px;
  font-size: 16px;
  line-height: 20px;
}

.chooser .btn--main:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
}

/* A phone: the card a little tighter, the object smaller, the button under what it leads to, at full width. */
@media (max-width: 719px) {
  .chooser {
    padding: 16px;
    border-radius: 24px;
  }

  .chooser .chip {
    padding-inline: 13px;
  }

  .chooser__head {
    min-height: 0;
  }

  .chooser__title {
    font-size: 26px;
    line-height: 32px;
  }

  .chooser__object {
    width: 96px;
    height: 79px;
    margin-block: -8px;
  }

  .chooser__body {
    padding: 16px;
  }

  .chooser__result {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
}

/* ==================================================================================================================
   The sections below the hero: the heading with a link at the end of its row, then the cards.
   ================================================================================================================== */

.shelf {
  display: block;
  padding-block-start: 8px;
}

.shelf + .shelf {
  padding-block-start: 64px;
}

.shelf__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-block-end: 24px;
}

.shelf__head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  font-stretch: 82%;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.shelf__more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 18px;
  text-decoration: underline 1px;
  text-underline-position: from-font;
}

.shelf__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A card: the picture on the tint's soft shade with the photo on a white tile, then name, line and price; a product's
   line to its shop at the foot, so the cards of a row end together. */
.pcard {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
}

.pcard:has(> .pcard__link:hover) {
  border-color: var(--line-2);
}

.pcard__link {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  gap: 16px;
  padding: 16px 16px 20px;
  border-radius: 23px;
  color: var(--ink);
  text-decoration: none;
}

.pcard__link:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.pcard__pic {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 190px;
  border-radius: 14px;
  background: var(--tint-soft);
}

.pcard .thumb {
  display: block;
  width: 150px;
  height: 150px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--paper);
}

.pcard .thumb img,
.pcard .thumb svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* The drawings fill their box edge to edge: a little room on the white tile. */
.pcard .thumb--drawn {
  padding: 12px;
}

.pcard__body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px 12px;
  padding-inline: 6px;
}

.pcard__text {
  display: flex;
  flex: 1 1 150px;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pcard__name {
  font-size: 18px;
  font-weight: 700;
  line-height: 22px;
}

.pcard__meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}

.pcard__price {
  flex: none;
  font-size: 22px;
  font-weight: 800;
  font-stretch: 88%;
  line-height: 28px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* The line to the shop (engine/render/start-go.ts): the total with its shipping words, then the button. */
.pcard .board__shop {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 0 22px;
  padding-block: 14px 20px;
  border-block-start: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}

.pcard .board__shop .btn {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
  padding-block: 8px;
  padding-inline: 14px;
  font-size: 14px;
  line-height: 18px;
  white-space: normal;
}

.pcard .board__shop .btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* A phone: one card a row, the picture beside the text. */
@media (max-width: 719px) {
  .shelf + .shelf {
    padding-block-start: 48px;
  }

  .shelf__head {
    margin-block-end: 16px;
  }

  .shelf__list {
    gap: 12px;
  }

  .pcard {
    border-radius: 20px;
  }

  .pcard__link {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 19px;
  }

  .pcard__pic {
    flex: none;
    width: 96px;
    height: 96px;
    border-radius: 12px;
  }

  .pcard .thumb {
    width: 76px;
    height: 76px;
    border-radius: 12px;
  }

  .pcard .thumb--drawn {
    padding: 6px;
  }

  .pcard__body {
    flex: 1 1 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    padding-inline: 0;
  }

  .pcard__text {
    flex: none;
  }

  .pcard__name {
    font-size: 16px;
    line-height: 20px;
  }

  .pcard__price {
    font-size: 19px;
    line-height: 24px;
    white-space: normal;
  }

  .pcard .board__shop {
    margin: 0 12px;
    padding-block: 12px 14px;
  }
}

/* ==================================================================================================================
   AHK Charts, Tinten Charts and Tusz Charts (wave 4, F2): the steps chooser of all three; the links in the ink sites'
   first sentence (drawn with the others in the hero) and AHK's link to the cost page under it; the ink sites' bar,
   whose price carries its delivery words; the cost page's four points as tiles under AHK's hero.
   ================================================================================================================== */

/* A chip of a later step that no page has with the choices before it. */
.chooser[data-chooser="steps"] .chip[hidden] {
  display: none;
}

/* The links in the ink sites' first sentence and AHK's link to the cost page under it: ink, underlined, a little
   bolder. */
html:is([data-site="tinte"], [data-site="ink"]) .start__text .hero__answer a,
html[data-site="ahk"] .start__note a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline 1px;
  text-underline-position: from-font;
}

/* "ab 7,69 € mit Versand" is longer than a bare price: it wraps where the bar is narrow, in two even lines. */
html:is([data-site="tinte"], [data-site="ink"]) .chooser__pick > strong {
  white-space: normal;
  text-wrap: balance;
}

/* The four points as on AHK's comparison pages, whose tile rules draw them too (look-compare.css): the price links
   to the cost page, the lines under it. Here only their place under the hero. */
html[data-site="ahk"] .start-tiles {
  margin: -24px 0 48px;
  padding: 0;
  list-style: none;
}

@media (max-width: 719px) {
  html[data-site="ahk"] .start-tiles {
    margin: -32px 0 40px;
  }
}

/* ==================================================================================================================
   Protein Charts and Booster Charts (engine/render/protein/index-page.ts, engine/render/cards/index-page.ts): their
   first sentence keeps its class (home__answer) and is drawn with the others in the hero; protein's prices carry
   their unit, so they wrap; under the hero a quiet list (protein's comparisons, cards' products by game) before or
   after the cards, and on cards the search field with the jump links at the head of the list it narrows, each row
   with its link to the shop.
   ================================================================================================================== */

/* A list before the cards keeps the rhythm of the sections. */
:is(html[data-site="protein"], html[data-site="cards"]) .part + .shelf {
  padding-block-start: 56px;
}

/* "ab 4,12 € pro 100 g Protein": too long for one line beside the button or in a narrow card. */
html[data-site="protein"] .chooser__pick > strong {
  font-size: 24px;
  line-height: 30px;
  white-space: normal;
  text-wrap: balance;
}

html[data-site="protein"] .pcard__price {
  white-space: normal;
}

/* The comparisons: the price with its unit under the name, as in the cards. */
html[data-site="protein"] .board a:not(:has(> .thumb)) {
  grid-template-columns: minmax(0, 1fr);
  row-gap: 2px;
}

html[data-site="protein"] .board a:not(:has(> .thumb)) .board__price {
  font-size: 16px;
  white-space: normal;
}

/* The search field (cards-start.js shows it), the status under it, the jump links as one row. A visitor who comes
   with a word in ?q= is brought to it, with some room over it. */
html[data-site="cards"] .cfind {
  max-width: 640px;
  margin-block-start: 64px;
  scroll-margin-top: 16px;
}

html[data-site="cards"] .cfind__form {
  margin: 0;
}

html[data-site="cards"] .cfind .finder__icon {
  top: 26px;
  inset-inline-start: 16px;
  width: 20px;
  height: 20px;
  color: var(--muted);
}

html[data-site="cards"] .cfind__input {
  height: 52px;
  padding-inline: 46px 16px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--paper);
  font-size: 16px;
  font-weight: 500;
}

html[data-site="cards"] .cfind__input::placeholder {
  color: var(--muted);
}

html[data-site="cards"] .cfind__input:hover {
  border-color: var(--ink);
}

html[data-site="cards"] .cfind__input:focus {
  border-color: var(--ink);
  background: var(--paper);
  box-shadow: none;
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

html[data-site="cards"] .cfind__status {
  margin-block-start: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 18px;
}

html[data-site="cards"] .cfind + .sizes {
  margin-block-start: 12px;
}

/* Without the script the field stays hidden and the jump links head the list. */
html[data-site="cards"] .cfind[hidden] + .sizes {
  margin-block-start: 64px;
}

html[data-site="cards"] .sizes + .part {
  padding-block-start: 40px;
}

/* A product row with its link to the shop: the link under the row's text, after the picture. */
html[data-site="cards"] .board li:has(> .board__go) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

html[data-site="cards"] .board .board__go {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  min-height: 32px;
  margin-block: -6px 12px;
  margin-inline-start: 72px;
  padding-inline: 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  text-decoration: none;
}

html[data-site="cards"] .board li:has(> a > .thumb--photo) > .board__go {
  margin-inline-start: 88px;
}

html[data-site="cards"] .board .board__go::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: var(--arrow-up) center / contain no-repeat;
  mask: var(--arrow-up) center / contain no-repeat;
}

html[data-site="cards"] .board .board__go:hover {
  border-color: var(--ink);
}

html[data-site="cards"] .board .board__go:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

@media (max-width: 719px) {
  html[data-site="cards"] .cfind,
  html[data-site="cards"] .cfind[hidden] + .sizes {
    margin-block-start: 48px;
  }
}

/* A phone: the jump links scroll sideways to the screen's edge; the photo is smaller. */
@media (max-width: 599px) {
  html[data-site="cards"] .cfind + .sizes {
    flex-wrap: nowrap;
    margin-inline-end: calc(-1 * var(--page-gutter));
    padding-inline-end: var(--page-gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }

  html[data-site="cards"] .cfind + .sizes::-webkit-scrollbar {
    display: none;
  }

  html[data-site="cards"] .cfind + .sizes li {
    flex: none;
  }

  html[data-site="cards"] .cfind + .sizes a {
    white-space: nowrap;
  }

  html[data-site="cards"] .board li:has(> a > .thumb--photo) > .board__go {
    margin-inline-start: 80px;
  }
}

/* The rows where the board is too narrow for a name and its price side by side: on a phone, and in the two columns
   from 960px until 1180px, where every name keeps 60 % of its row beside the price. Every row as a row with a photo
   on a phone (site.css): the price on its own line under the name, above the grey line. Beside the name a price such
   as "ab 11,11 € pro Booster" left the name a word per line and ran over it. A word longer than the line breaks
   instead of running out of the row. */
@media (max-width: 599px), (min-width: 960px) and (max-width: 1179px) {
  html[data-site="cards"] .board a:not(:has(> .thumb)) {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-site="cards"] .board a:has(> .thumb:not(.thumb--photo)) {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  html[data-site="cards"] .board a > .thumb:not(.thumb--photo) {
    grid-row: 1 / span 3;
    align-self: center;
  }

  html[data-site="cards"] .board a:has(> .thumb:not(.thumb--photo)) .board__price {
    grid-column: 2;
  }

  html[data-site="cards"] .board__name {
    overflow-wrap: break-word;
  }
}

/* The two columns from 960px: the rows with a photo stacked too, the photo at its size beside the text. */
@media (min-width: 960px) and (max-width: 1179px) {
  html[data-site="cards"] .board a:has(> .thumb--photo) {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  html[data-site="cards"] .board a > .thumb--photo {
    grid-row: 1 / span 3;
    align-self: center;
  }

  html[data-site="cards"] .board a:has(> .thumb--photo) .board__price {
    grid-column: 2;
  }
}

/* A tablet held upright (up to 959px): one column, as from 600px, where every name and its price fit side by side;
   two columns there gave the names a third of their row and up to ten lines. The row before the last keeps its line,
   which the two columns take away (look-rest.css). */
@media (min-width: 760px) and (max-width: 959px) {
  html[data-site="cards"] .board {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-site="cards"] .board > li:nth-last-child(2):nth-child(odd) {
    border-block-end: 1px solid var(--line);
  }
}

/* ==================================================================================================================
   Lampen Charts and eSIM Charts: their start pages (engine/render/lampen/index-page.ts, esim/index-page.ts).
   Every rule hangs on html[data-site="lampen"] or html[data-site="esim"].
   ================================================================================================================== */

/* Lampen Charts: the approval line under the sentence links the makers' lists, ink and underlined as on the lamp
   pages, and keeps the sentence's measure. */
html[data-site="lampen"] .start__note {
  max-width: 560px;
}

html[data-site="lampen"] .start__note a,
html[data-site="esim"] .start__text a:not(.btn) {
  color: var(--ink);
  text-decoration: underline 1px;
  text-underline-position: from-font;
}

html[data-site="lampen"] .start__note a:hover,
html[data-site="esim"] .start__text a:not(.btn):hover {
  text-decoration-thickness: 2px;
}

html[data-site="lampen"] .start__note a:focus-visible,
html[data-site="esim"] .start__text a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* eSIM Charts: the first sentence keeps its element (p.homehead__lede, the first after the heading) and is drawn with
   the others in the hero; the lines under it (what the site is, the currency chooser, the provider comparison, the
   providers' pages) are notes. */
html[data-site="esim"] .start__text > .homehead__lede ~ :is(.homehead__lede, .altcur) {
  max-width: 560px;
  margin: -12px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

/* The provider comparison's button stands in its line with room above and below when the line wraps. */
html[data-site="esim"] .start__text > .homehead__lede .btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-block: 2px;
  padding-block: 4px;
  padding-inline: 12px;
  font-size: 14px;
  line-height: 18px;
  vertical-align: middle;
}

html[data-site="esim"] .start__text > .homehead__lede .btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* A second amount after the euros keeps to one line, as everywhere on the site; one the script may rewrite may break
   at its joiner. */
html[data-site="esim"] .start .alt {
  white-space: nowrap;
}

html[data-site="esim"] .start .alt[data-form] {
  white-space: normal;
}

/* The currency chooser (esim-currency.js fills it): its label, then the field, quiet as the language switch; the
   field's frame and states are the chooser's select field's (the chooser card above). It arrives hidden and stays so
   until the script shows it. */
html[data-site="esim"] .start .altcur {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

html[data-site="esim"] .start .altcur[hidden] {
  display: none;
}

html[data-site="esim"] .start .altcur select {
  flex: 1 1 160px;
  min-width: 0;
  max-width: max-content;
  min-height: 40px;
  padding-inline: 10px 28px;
  background: var(--paper) var(--arrow-down) right 10px center / 11px 11px no-repeat;
  font-size: 14px;
  text-overflow: ellipsis;
}

html[data-site="esim"][dir="rtl"] .start .altcur select {
  background-position: left 10px center;
}

/* The text beside the card is long here and longer in some languages (three lines of heading in Arabic): the card
   keeps its own height at the top of the row instead of stretching to the text's (the shared grid stretches it). */
html[data-site="esim"] .start > .chooser {
  align-self: start;
}

/* The destinations' select field: a long name is cut in the closed field, so the card never grows past a phone's
   width (the shared rule leaves the field as wide as its longest name). */
html[data-site="esim"] .chooser__select {
  min-width: 0;
  text-overflow: ellipsis;
}

/* The card's title is a word of each language's pack: the title takes the room the shared rule left beside the object.
   Only where a word leaves no room for the object does the object take a line of its own under the title, at its end,
   as a last resort instead of running past the screen. */
html[data-site="esim"] .chooser__head {
  flex-wrap: wrap;
}

html[data-site="esim"] .chooser__head > div {
  flex: 1 1 0;
}

html[data-site="esim"] .chooser__object {
  margin-inline-start: auto;
}

/* So the object stands beside the title on the smallest phones too: under 375px a Japanese title breaks between any
   two characters, not only between phrases ("旅行しますか？" is wider than the room), and under 360px the object is a
   little smaller and closer, so the longest words ("ταξιδεύετε;", "gidiyorsunuz?") fit beside it. */
@media (max-width: 374px) {
  html[data-site="esim"] .chooser__title:lang(ja) {
    word-break: normal;
  }
}

@media (max-width: 359px) {
  html[data-site="esim"] .chooser__head {
    gap: 8px;
  }

  html[data-site="esim"] .chooser__object {
    width: 72px;
    height: 59px;
  }
}

/* The bar's price has its language's word before the amount ("legolcsóbb 10,40 EUR", "a partir de € 10,40"): on a
   small phone it takes two lines instead of running out of the bar; the amount itself stays whole (its space does not
   break). */
html[data-site="esim"] .chooser__pick > strong {
  white-space: normal;
}

/* The button's words are each language's pack's ("Csomagok összehasonlítása", "Σύγκριση πακέτων"): where they do not
   fit one line they take two instead of running out of the button. */
html[data-site="esim"] .chooser .btn--main {
  white-space: normal;
}

/* The most asked destinations (site.css draws the cards), two side by side on the smallest phones: the flag moves onto
   the photo's corner and leaves the name the card's whole line, the text keeps the 10px of the foot under it, and the
   name is a little smaller at 320 (16px, 17px from 360), so the longest names ("Швейцария", "Törökország") fit whole.
   A name longer than the line breaks inside its word as a last resort instead of being cut. The shop button keeps 6px
   more for its words (8px at its sides, 4px to the arrow), so "RedteaGO" fits its line beside the arrow, and in
   Japanese the name may part from its particle ("RedteaGO" over "へ") instead of running out of the card. */
@media (max-width: 374px) {
  html[data-site="esim"] .placecard {
    position: relative;
  }

  html[data-site="esim"] .placecard__body {
    padding-inline: 10px;
  }

  html[data-site="esim"] .placecard__name {
    font-size: min(1.0625rem, 2.5vw + 8px);
    overflow-wrap: anywhere;
  }

  html[data-site="esim"] .placecard__name .flagdot {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-start: 10px;
    width: 24px;
    height: 24px;
    box-shadow: 0 0 0 2px var(--paper);
  }

  html[data-site="esim"] .placecard__go .gobtn {
    gap: 4px;
    padding-inline: 8px;
  }

  html[data-site="esim"] .placecard__go .gobtn:lang(ja) {
    word-break: normal;
  }
}

/* The smallest phones: the heading a step smaller, so the longest word of any language ("árösszehasonlítása") fits
   the line. */
@media (max-width: 359px) {
  html[data-site="esim"] .start h1 {
    font-size: 2.25rem;
  }
}

/* A phone: the button is as wide as the bar, so a narrower padding only gives its words room for one line. The note
   under the card keeps the card's distance (the shared phone rule of the hero), not a note's -12px. */
@media (max-width: 719px) {
  html[data-site="esim"] .chooser .btn--main {
    padding-inline: 12px;
  }

  html[data-site="esim"] .start:not(.start--alone) > .start__text > h1 + .homehead__lede + :is(.homehead__lede, .altcur) {
    margin-block-start: 0;
  }
}

@media (min-width: 760px) {
  html[data-site="esim"] .start .altcur select {
    min-height: 34px;
  }
}
