/* Phone Settings Finder.
   Colors and fonts come from /assets/fts.css by token alone: nothing here names a color or a font family,
   so the tool follows the brand when the palette and type change.
   The action color is used for focus and hover only. The card is a ledger, ruled with hairlines, not a box. */

.ps-hero { padding-bottom: 28px; }
/* On a phone, once a card is showing (or a link has named one), the intro steps aside so the card's title is on the first screen. */
@media (max-width: 640px) {
  body.ps-has-card .ps-hero .lede, .ps-pending .ps-hero .lede { display: none; }
}
.ps { padding: 0 0 72px; }
@media (max-width: 640px) { .ps { padding-bottom: 52px; } }

/* ---------- picker ---------- */
.ps-pick { max-width: 520px; }
.ps-pick .field { margin-top: 0; }
.ps-pick select { min-height: 52px; }
.ps-help { margin-top: 10px; font-size: 15px; line-height: 1.55; color: var(--mut); max-width: 46ch; }
.ps-error { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--error); border-radius: 10px; font-size: 15px; line-height: 1.5; color: var(--error-text, var(--txt)); max-width: 52ch; }
.ps-noscript { margin-top: 20px; }
.ps [hidden] { display: none !important; }
/* A link that names a phone hides the index before the script draws the card, so the list never flashes. */
.ps-pending #ps-index { display: none; }

/* ---------- the card ---------- */
.ps-card { margin-top: 44px; padding-top: 26px; border-top: 2px solid var(--txt); scroll-margin-top: 84px; }
.ps-card:focus { outline: none; }
.ps-head h2 { max-width: none; }
.ps-sub { margin-top: 10px; font-size: 16.5px; line-height: 1.55; color: var(--dim); max-width: 62ch; }
.ps-intro { margin-top: 16px; max-width: 62ch; color: var(--dim); }
.ps-block { margin-top: 40px; }
.ps-block > h3 { font-size: 19px; }
.ps-blurb { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--mut); max-width: 68ch; }
.ps-howto { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--txt); max-width: 68ch; }

/* Lens map: a zoom scale. Equal distance is an equal zoom ratio, so the gaps between lenses show at a glance. */
.ps-scale { margin-top: 20px; max-width: 760px; }
.ps-track { position: relative; height: 92px; margin: 0 8px; }
.ps-track::before { content: ""; position: absolute; left: -8px; right: -8px; top: 45px; height: 0; border-top: 1px solid var(--line-strong); }
.ps-mark { position: absolute; top: 0; bottom: 0; width: 0; }
.ps-mark i { position: absolute; left: -7px; top: 38px; width: 15px; height: 15px; border-radius: 50%; background: var(--txt); border: 2px solid var(--txt); }
.ps-mark.is-crop i { background: var(--ground); }
.ps-mark em { font-style: normal; }
@media (max-width: 599px) { .ps-mark em { display: none; } }
.ps-mark b, .ps-mark span { position: absolute; left: 0; transform: translateX(-50%); white-space: nowrap; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ps-mark b { top: 12px; font-size: 15px; font-weight: 800; color: var(--txt); }
.ps-mark span { top: 61px; font-size: 12.5px; font-weight: 600; color: var(--dim); }
/* On a narrow screen two close lenses would print their labels on top of each other, so the second steps out. */
@media (max-width: 599px) {
  .ps-mark.is-low b { top: -4px; }
  .ps-mark.is-low span { top: 77px; }
}
.ps-mark.is-first b, .ps-mark.is-first span { transform: none; left: -8px; }
.ps-mark.is-last b, .ps-mark.is-last span { transform: none; left: auto; right: -8px; }
.ps-key { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--mut); }
.ps-key span { display: inline-flex; align-items: center; gap: 7px; }
.ps-key i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--dim); background: var(--dim); }
.ps-key i.is-crop { background: transparent; }

/* Lens table. Built from divs with table roles so it can stack on a phone and still read as a table. */
.ps-lenses { margin-top: 22px; border-top: 1px solid var(--line-strong); font-variant-numeric: tabular-nums; max-width: 860px; }
.ps-lrow { display: grid; grid-template-columns: 1.25fr 1fr .9fr 1.35fr; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ps-lhead { padding: 10px 0; border-bottom-color: var(--line-strong); }
.ps-lhead > div { font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--mut); }
.ps-lname { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.ps-lname b { font-size: 19px; font-weight: 800; line-height: 1.2; min-width: 2.6em; }
.ps-lname span { font-size: 15px; color: var(--dim); line-height: 1.35; }
.ps-lname.no-button span { font-weight: 700; color: var(--txt); }
.ps-lmm { font-size: 16.5px; font-weight: 700; line-height: 1.3; }
.ps-lmm small { font-size: 12.5px; font-weight: 500; color: var(--mut); margin-right: 5px; }
.ps-lmm.is-none { font-size: 15px; font-weight: 500; color: var(--mut); }
.ps-lap { font-size: 16.5px; font-weight: 600; line-height: 1.3; }
.ps-lap.is-none { font-size: 15px; font-weight: 500; color: var(--mut); }
.ps-lwhat { font-size: 15px; line-height: 1.4; color: var(--dim); }
.ps-lwhat span { display: inline-block; margin-left: 12px; color: var(--mut); white-space: nowrap; }
.ps-lenses.no-mm .ps-lrow { grid-template-columns: 1.25fr .9fr 1.35fr; }
@media (max-width: 599px) {
  .ps-lhead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; border: 0; }
  .ps-lrow { grid-template-columns: 1fr auto; gap: 4px 14px; padding: 13px 0; }
  .ps-lname { grid-column: 1; grid-row: 1; }
  .ps-lmm { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
  .ps-lap { grid-column: 2; grid-row: 2; text-align: right; font-size: 15px; color: var(--dim); }
  .ps-lwhat { grid-column: 1; grid-row: 2; }
  .ps-lname b { min-width: 2.4em; }
  .ps-lenses.no-mm .ps-lrow { grid-template-columns: 1fr auto; }
  .ps-lenses.no-mm .ps-lap { grid-row: 1; font-size: 16.5px; color: var(--txt); }
  .ps-lenses.no-mm .ps-lwhat { grid-column: 1 / -1; }
}

.ps-notes { list-style: none; margin-top: 16px; max-width: 68ch; }
.ps-notes li { font-size: 12.5px; line-height: 1.6; color: var(--mut); }
.ps-notes li + li { margin-top: 8px; }
.ps-src { margin-top: 12px; font-size: 12.5px; line-height: 1.6; color: var(--mut); max-width: 68ch; }
.ps-src a, .ps-notes a { text-decoration: underline; text-underline-offset: 3px; }
.ps-src a:hover { color: var(--txt); }
.ps-sim { margin-top: 22px; font-size: 16.5px; }
.ps-sim a { display: inline-block; padding: 10px 0; }

/* Settings ledger: one row per question, the menu path first. */
.ps-sets { margin-top: 16px; border-top: 1px solid var(--line-strong); max-width: 960px; }
.ps-set { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 20px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .ps-set { grid-template-columns: 230px minmax(0, 1fr); gap: 32px; } }
.ps-set dt { font-size: 16.5px; font-weight: 700; line-height: 1.35; color: var(--txt); }
.ps-set dd { min-width: 0; }
.ps-entry + .ps-entry { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.ps-name { font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--txt); margin-bottom: 6px; }
.ps-path { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; font-size: 16.5px; font-weight: 700; line-height: 1.45; color: var(--txt); }
.ps-path li { display: inline-flex; align-items: baseline; }
.ps-path li:not(:last-child)::after { content: "\203A"; margin: 0 9px; font-weight: 400; color: var(--mut); }
.ps-then { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--txt); max-width: 64ch; }
.ps-does { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--dim); max-width: 64ch; }
.ps-entry .ps-src { margin-top: 8px; }
.ps-entry.is-na .ps-name { color: var(--dim); }
.ps-tag { display: inline-block; margin-bottom: 6px; padding: 2px 9px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.5; color: var(--mut); }
.ps-entry.is-na .ps-does { margin-top: 0; }

/* ---------- card actions ---------- */
.ps-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 32px; }
.ps-btn { font: inherit; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--txt); background: transparent; border: 1.5px solid var(--field-stroke); border-radius: 12px; padding: 12px 18px; min-height: 48px; cursor: pointer; transition: border-color .25s var(--ease-out, ease); }
.ps-btn:hover { border-color: var(--accent); }
.ps-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ps-status { flex: 1 0 100%; min-height: 1.5em; font-size: 15px; line-height: 1.5; color: var(--dim); }
.ps-link { margin-top: 4px; font-size: 12.5px; line-height: 1.6; color: var(--mut); overflow-wrap: anywhere; }
@media (max-width: 480px) { .ps-btn { flex: 1 1 100%; } }

/* ---------- index of phones ---------- */
.ps-index { margin-top: 56px; }
.ps-index .body { margin-top: 10px; font-size: 15px; }
.ps-brand { margin-top: 30px; }
.ps-brand h3 { font-size: 15px; font-weight: 700; color: var(--mut); margin-bottom: 6px; }
.ps-models { list-style: none; border-top: 1px solid var(--line-strong); columns: 1; column-gap: 40px; }
@media (min-width: 480px) { .ps-models { columns: 2; } }
@media (min-width: 900px) { .ps-models { columns: 3; } }
.ps-models li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.ps-models a { display: flex; align-items: center; min-height: 48px; padding: 8px 0; font-size: 16.5px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.ps-models a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.ps-other { margin-top: 26px; font-size: 16.5px; }
.ps-other a { display: inline-block; padding: 10px 0; }

.ps-how .obj .src a[href^="/"] { color: var(--dim); }

/* ---------- print: the card alone, on one sheet ---------- */
@media print {
  /* Paper is white whatever the brand's ground is, so the tokens are pointed at the system's own paper colors. */
  :root { color-scheme: light; --ground: Canvas; --surface: Canvas; --raised: Canvas; --txt: CanvasText; --dim: CanvasText; --mut: CanvasText; --line: GrayText; --line-strong: CanvasText; --field-stroke: GrayText; }
  @page { margin: 9mm; }
  html, body { background: Canvas; color: CanvasText; font-size: 8pt; line-height: 1.3; }
  header.nav, footer, .ps-hero, .ps-pick, .ps-index, .ps-how, #signup, .ps-actions, .ps-sim, .ps-entry .ps-src, .ps-general, noscript, .sticky-cta { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .ps { padding: 0; }
  body.ps-has-card .ps-card { display: block !important; margin: 0; padding-top: 0; border-top: 0; }
  body:not(.ps-has-card) .ps-pick, body:not(.ps-has-card) .ps-hero, body:not(.ps-has-card) .ps-index { display: block !important; }
  a { text-decoration: none; }

  .ps-head h2 { font-size: 16pt; line-height: 1.1; }
  .ps-sub { font-size: 9pt; margin-top: 2pt; max-width: none; }
  .ps-intro { font-size: 8.5pt; margin-top: 4pt; max-width: none; }
  .ps-block { margin-top: 6pt; }
  .ps-block > h3 { font-size: 10.5pt; }
  .ps-blurb { font-size: 7.5pt; line-height: 1.35; margin-top: 2pt; max-width: none; }
  .ps-howto { font-size: 8pt; line-height: 1.3; margin-top: 2pt; max-width: none; }

  /* Lens map: the scale beside the table. */
  .ps-lensblock { display: grid; grid-template-columns: 34% minmax(0, 1fr); column-gap: 8mm; align-items: start; }
  .ps-lensblock > h3, .ps-lensblock > .ps-notes, .ps-lensblock > .ps-src { grid-column: 1 / -1; }
  .ps-lensblock > .ps-scale { grid-column: 1; margin-top: 5pt; max-width: none; }
  .ps-lensblock > .ps-lenses { grid-column: 2; margin-top: 3pt; max-width: none; }
  .ps-lensblock.no-scale > .ps-lenses { grid-column: 1 / -1; }
  .ps-track { height: 56pt; margin: 0 5pt; }
  .ps-track::before { top: 27pt; left: -5pt; right: -5pt; border-top-color: CanvasText; }
  .ps-mark i { top: 22.5pt; width: 9pt; height: 9pt; left: -4.5pt; border-width: 1.5pt; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .ps-mark b { top: 7pt; font-size: 8.5pt; }
  .ps-mark span { top: 37pt; font-size: 7.5pt; }
  .ps-mark em { display: none; }
  .ps-mark.is-first b, .ps-mark.is-first span { left: -5pt; }
  .ps-mark.is-last b, .ps-mark.is-last span { right: -5pt; }
  .ps-key { font-size: 7pt; line-height: 1.35; margin-top: 0; gap: 1pt 10pt; }
  .ps-key i { width: 6.5pt; height: 6.5pt; border-width: 1.5pt; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .ps-lhead { position: static; width: auto; height: auto; clip: auto; overflow: visible; padding: 2.5pt 0; border-bottom: 1px solid CanvasText; }
  .ps-lhead > div { font-size: 7pt; }
  .ps-lrow { display: grid; grid-template-columns: 1.5fr 1fr .8fr 1.6fr; gap: 7pt; padding: 2pt 0; break-inside: avoid; }
  .ps-lenses.no-mm .ps-lrow { grid-template-columns: 1.5fr .8fr 1.6fr; }
  .ps-lname, .ps-lmm, .ps-lap, .ps-lwhat, .ps-lenses.no-mm .ps-lap, .ps-lenses.no-mm .ps-lwhat { grid-column: auto; grid-row: auto; text-align: left; }
  .ps-lname { gap: 5pt; flex-wrap: nowrap; }
  .ps-lname span { white-space: nowrap; }
  .ps-lname b { font-size: 10pt; min-width: 2.4em; }
  .ps-lname span, .ps-lwhat, .ps-lap, .ps-lmm, .ps-lenses.no-mm .ps-lap, .ps-lap.is-none, .ps-lmm.is-none { font-size: 8.5pt; }
  .ps-lmm small { font-size: 7pt; margin-right: 3pt; }
  .ps-lwhat span { margin-left: 6pt; }
  .ps-notes { margin-top: 4pt; max-width: none; }
  .ps-notes li { font-size: 7pt; line-height: 1.35; }
  .ps-notes li + li { margin-top: 1.5pt; }
  .ps-src { font-size: 7pt; line-height: 1.35; margin-top: 2pt; max-width: none; }

  /* Settings in two columns. */
  .ps-sets { margin-top: 4pt; max-width: none; columns: 2; column-gap: 9mm; border-top: 0; }
  .ps-set { display: block; padding: 2.5pt 0; border-bottom: 0; border-top: 1px solid GrayText; }
  .ps-set dt { font-size: 8.5pt; margin-bottom: 1.5pt; break-after: avoid; }
  .ps-entry { break-inside: avoid; }
  .ps-entry + .ps-entry { margin-top: 2pt; padding-top: 2pt; }
  .ps-name { font-size: 8pt; margin-bottom: 0.5pt; }
  .ps-path { font-size: 8.3pt; line-height: 1.27; }
  .ps-path li:not(:last-child)::after { margin: 0 3.5pt; }
  .ps-then, .ps-does { font-size: 7.5pt; line-height: 1.27; margin-top: 0.5pt; max-width: none; }
  .ps-tag { font-size: 7pt; padding: 0 4pt; margin-bottom: 1pt; }
  .ps-link { font-size: 7pt; margin-top: 4pt; }
}
