/* The iPhone and iPad comparison pages; everything shared lives in site.css. */

/* Where each part sits. The order of the parts in the page is the phone order. */
.tool.calc {
  grid-template-areas:
    "title"
    "sentence"
    "add"
    "stage"
    "answer"
    "actions";
}
@media (min-width: 1000px) {
  /* The sentence runs over the full width: a model's name is wider than a question column. */
  .tool.calc {
    grid-template-areas:
      "title title title title title title title title title title title title"
      "sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence sentence"
      "add add add add stage stage stage stage stage stage stage stage"
      "answer answer answer answer stage stage stage stage stage stage stage stage"
      "actions actions actions actions stage stage stage stage stage stage stage stage"
      "rest rest rest rest stage stage stage stage stage stage stage stage";
    grid-template-rows: repeat(5, auto) 1fr;
  }
}
.calc > .add { grid-area: add; justify-self: start; }
/* From 1000 px the sentence stands over both columns, so the wall needs its own distance from it. */
@media (min-width: 1000px) {
  .calc > .sentence { margin-bottom: 32px; }
}

/* A model is its name in its colour; the native select lies over it, invisible, so the phone's
   own picker opens and the name can wrap. */
.pick { position: relative; font-weight: 800; color: var(--ct); }
.pick-head, .pick-last {
  text-decoration: underline;
  text-decoration-color: var(--c);
  text-decoration-thickness: 0.1em;
  text-decoration-skip-ink: none;
  text-underline-offset: 0.14em;
}
.pick > select {
  position: absolute;
  inset: -6px -3px;
  width: calc(100% + 6px);
  height: calc(100% + 12px);
  opacity: 0;
  cursor: pointer;
  /* The browser draws the open list in the select's own type size. */
  font: 400 16px var(--font);
}
.pick:has(> select:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.nobr { white-space: nowrap; }
.chev-slot { display: inline-block; width: 0.5em; margin-left: 0.14em; color: var(--ink-soft); }
.chev-slot svg { display: block; width: 100%; height: 0.5em; }

.remove {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.3em;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-soft);
  vertical-align: 0.02em;
}
/* The 44 px hit area runs to the right of the cross, never back over the chevron of its name,
   and stays within its own line. */
.remove::before { content: ""; position: absolute; left: 0; top: 50%; width: 44px; height: 1lh; translate: 0 -50%; }
.remove svg { width: 0.5em; height: 0.5em; }
.remove:hover { color: var(--ink); }

#scene { display: block; width: 100%; }
.tape.on-glass { mix-blend-mode: normal; }
.tape-note text { font-variant-numeric: tabular-nums; }

.answer-line .swatch { margin-right: 0.45em; }
.actions { align-items: center; }
.footer-note { margin: 8px 0 0; }

/* The size table needs more than the text's 34em; the text keeps its measure. */
.explain-text { grid-column: 1 / span 8; max-width: none; }
.explain-text > :not(.table-scroll) { max-width: 34em; }
@media (max-width: 999px) {
  .explain-text { grid-column: 1; }
}

/* A remove button's hit area may reach past the end of a line; it must not widen the page. The
   clip edge sits 8 px outside the text, so focus outlines at either end stay whole. */
.sentence { overflow-x: clip; padding-inline: 8px; margin-inline: -8px; }
