/* ---------------------------------------------------------------------------
 * shell.css — the app shell in the Highlighter world (roll 611, dark paper):
 * My analyses (leak_analyses/index), sign-in and verify, the account page,
 * the unsubscribe page, and the Phlex UI components (flash, consent panel,
 * empty state, kbd). Artboards: Upload, Upload-Empty, Phone-Upload, Login,
 * Verify, Account.
 *
 * Tokens only (tokens.css). Shared primitives (keys, fields, the card, the
 * chrome) live in tailwind/application.css and are never restyled here —
 * where a class here sits on a primitive it only adds layout or size.
 *
 * Plain CSS, unlayered, loaded after Tailwind by all three layouts: a rule
 * here beats any utility on the same element. Nothing here sets `display`
 * on a node a controller shows and hides with the `hidden` utility.
 *
 * Roles: the violet marker (--amber, dark text on it) = the one action and
 * the figure that matters; green (--mint) = done; pink (--sev-3) = failed,
 * wrong, destructive. Square corners; hard offset shadows only.
 *
 * sh-page, sh-head, sh-title, sh-h2, sh-facts, sh-key-danger and
 * sh-section__actions are also used by the admin console: change them with
 * that in mind. Everything under `.sh-page--app` is this area's alone.
 * ------------------------------------------------------------------------- */

/* ── Page frame (shared with the admin console) ─────────────────────────── */
.sh-page {
  width: 100%;
  max-width: 56rem;
  margin-inline: auto;
  padding: var(--space-xl) var(--space-md) var(--space-2xl);
}
.sh-page--narrow { max-width: 44rem; }
@media (min-width: 640px) { .sh-page { padding-inline: var(--space-lg); } }
@media (min-width: 1024px) { .sh-page { padding-top: var(--space-2xl); } }

.sh-head { margin-bottom: var(--space-lg); }

.sh-title {
  font-family: var(--pl-font-display);
  font-weight: var(--pl-weight-display);
  font-style: normal;
  text-transform: var(--pl-case-display);
  letter-spacing: var(--pl-tracking-display);
  line-height: var(--pl-lh-display);
  font-size: clamp(2.5rem, 2.8vw + 1.4rem, 3.75rem);
  color: var(--ink);
  text-wrap: balance;
}
.sh-lede {
  margin-top: var(--space-sm);
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.sh-h2 {
  font-family: var(--pl-font-display);
  font-weight: var(--pl-weight-display);
  font-style: normal;
  text-transform: var(--pl-case-display);
  letter-spacing: var(--pl-tracking-display);
  font-size: clamp(1.5rem, 0.8vw + 1.2rem, 1.875rem);
  line-height: 1.05;
  color: var(--ink);
  text-wrap: balance;
}

/* Label / value pairs (admin user page). */
.sh-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px var(--space-lg);
  margin: 0;
  font-size: 0.9375rem;
}
.sh-facts dt { font-size: 0.8125rem; color: var(--muted); }
.sh-facts dd {
  min-width: 0;
  margin: 0 0 var(--space-sm);
  color: var(--ink);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 640px) {
  .sh-facts {
    grid-template-columns: 10rem minmax(0, 1fr);
    row-gap: var(--space-sm);
    align-items: baseline;
  }
  .sh-facts dt { font-size: 0.875rem; }
  .sh-facts dd { margin: 0; }
}

.sh-section__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-md); }

/* A destructive key: a pink ghost (admin). */
.sh-key-danger {
  background-color: transparent;
  border-color: color-mix(in oklab, var(--destructive) 70%, var(--rule));
  color: var(--destructive);
}
.sh-key-danger:hover {
  background-color: var(--pl-destructive-surface);
  border-color: var(--destructive);
}

/* ── This area's frame: a tool's width, the app-screen h1 ──────────────────── */
/* An app screen is a tool: 1024px of content, dense enough that the work
   (the list, the report) starts in the first screen. */
.sh-page--app {
  max-width: calc(64rem + 2 * var(--space-lg));
  padding-top: var(--space-lg);
  padding-bottom: var(--space-2xl);
}
.sh-page--app .sh-head { margin-bottom: var(--space-md); }
.sh-page--app .sh-title { font-size: clamp(1.75rem, 1vw + 1.25rem, 2.25rem); line-height: 1.05; }
/* The head as one row: the title, and the page's secondary action at the end. */
.sh-head--row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-lg); }
.sh-page--app .sh-lede {
  margin-top: var(--space-xs);
  font-size: clamp(1rem, 0.4vw + 0.9rem, 1.25rem);
}
@media (min-width: 640px) { .sh-page--app .sh-lede { margin-top: 14px; } }

/* Text that acts: a button or link set as an underlined word, 44px tall. */
.sh-textlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  white-space: nowrap;
  cursor: pointer;
}
.sh-textlink:hover { text-decoration-color: var(--amber); }

/* A marker stroke behind dark text. */
.sh-mark {
  padding-inline: 6px;
  line-height: 1.4;
  background: linear-gradient(transparent 12%, var(--amber) 12%, var(--amber) 92%, transparent 92%);
  color: var(--amber-ink);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.sh-mark--critical {
  background: linear-gradient(transparent 12%, var(--sev-3) 12%, var(--sev-3) 92%, transparent 92%);
}

/* ── My analyses: the upload panel ───────────────────────────────────────── */
.sh-panel { overflow: hidden; }

/* The file strip: the panel's name, the formats it reads. */
.sh-panel__strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px var(--space-md);
  padding: 9px 14px;
  border-bottom: var(--pl-rule-strong-width) solid var(--rule-strong);
  background: var(--paper-2);
  font-size: 0.875rem;
}
@media (min-width: 640px) { .sh-panel__strip { padding: 10px var(--space-md); } }
.sh-panel__title { font-size: 0.9375rem; font-weight: 700; color: var(--ink); }
.sh-panel__formats { display: none; color: var(--muted); }
@media (min-width: 640px) { .sh-panel__formats { display: block; } }

.sh-panel__body {
  display: grid;
  gap: 18px;
  padding: var(--space-md);
}
@media (min-width: 640px) { .sh-panel__body { gap: var(--space-lg); padding: var(--space-lg); } }
@media (min-width: 900px) {
  .sh-panel__body { grid-template-columns: minmax(0, 1fr) minmax(15rem, 17rem); }
}
.sh-panel__side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}
@media (min-width: 640px) { .sh-panel__side { gap: var(--space-lg); } }
.sh-panel__key { width: 100%; }

/* The drop zone. The file input covers it whole (opacity 0), so a click
   anywhere opens the picker and a drop anywhere lands in the input. */
.sh-drop {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  min-width: 0;
  padding: 10px var(--space-sm);
  border: var(--pl-rule-strong-width) dashed var(--rule-strong);
  border-radius: var(--pl-radius-control);
  background: var(--paper);
  text-align: center;
  transition: background-color var(--pl-dur-fast) var(--pl-ease-out), border-color var(--pl-dur-fast) var(--pl-ease-out);
}
@media (min-width: 640px) {
  .sh-drop {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
    min-height: 8rem;
    padding: var(--space-md) var(--space-lg);
  }
}
.sh-drop:hover { background: var(--paper-2); }
.sh-drop.lf-drop-active {
  border-style: solid;
  border-color: var(--amber);
  background: var(--pl-tint-amber);
}
.sh-drop:has(.sh-drop__input:focus-visible) {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}
.sh-drop__input {
  position: absolute;
  inset: 0;
  z-index: var(--z-raised);
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.sh-drop__icon { display: inline-flex; color: var(--ink); }
.sh-drop__icon .pl-icon { width: 20px; height: 20px; }
@media (min-width: 640px) { .sh-drop__icon .pl-icon { width: 24px; height: 24px; } }
.lf-file-selected .sh-drop__icon { color: var(--mint); }
.sh-drop__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  font-size: 1rem;
  color: var(--ink);
}
.sh-drop__cta { font-weight: 800; white-space: nowrap; }
.sh-drop__or { display: none; }
@media (min-width: 640px) {
  .sh-drop__cta {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 16px;
    border: var(--pl-rule-strong-width) solid var(--rule-strong);
    border-radius: var(--pl-radius-control);
    background: var(--paper);
  }
  .sh-drop:hover .sh-drop__cta { background: var(--paper-2); }
  .sh-drop__or { display: inline; }
}
.sh-drop__hint {
  flex-basis: 100%;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}
@media (min-width: 640px) { .sh-drop__hint { flex-basis: auto; font-size: 0.9375rem; } }
.sh-drop__hint code,
.sh-help code {
  font-family: var(--pl-font-code);
  font-size: 0.9em;
  color: var(--ink-2);
}
/* The chosen files, by name, on one line. */
.sh-drop__files {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--pl-font-code);
  font-size: 0.8125rem;
  color: var(--ink);
}
.sh-drop__files:empty { display: none; }

/* The quota: the analyses left as the figure, a marker bar for the share. */
.sh-quota__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.sh-quota__figure {
  font-family: var(--pl-font-display);
  font-weight: 900;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: var(--pl-tracking-display);
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
}
@media (min-width: 640px) { .sh-quota__figure { font-size: 2.25rem; } }
.sh-quota__label { font-weight: 700; color: var(--ink); }
.sh-meter {
  height: 10px;
  margin-top: 10px;
  border: var(--pl-rule-strong-width) solid var(--rule-strong);
  border-radius: var(--pl-radius-part);
  overflow: hidden;
}
@media (min-width: 640px) { .sh-meter { margin-top: 14px; } }
.sh-meter__fill { display: block; height: 100%; background: var(--amber); }
.sh-quota__meta {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 640px) { .sh-quota__meta { margin-top: var(--space-xs); font-size: 0.9375rem; } }

/* The window is full (or, in paid mode, the account is demo-only). */
.sh-limit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: var(--space-md);
  align-content: start;
  min-width: 0;
}
.sh-limit__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: var(--pl-rule-strong-width) solid var(--rule-strong);
  color: var(--ink);
}
.sh-limit__title {
  font-family: var(--pl-font-display);
  font-weight: 900;
  letter-spacing: var(--pl-tracking-display);
  font-size: clamp(1.375rem, 0.6vw + 1.2rem, 1.75rem);
  line-height: 1.05;
  color: var(--ink);
  text-wrap: balance;
}
.sh-limit__body,
.sh-limit__hint,
.sh-limit .sh-plans { grid-column: 1 / -1; }
.sh-limit__body { margin-top: var(--space-sm); max-width: 40rem; color: var(--ink-2); }
.sh-limit__hint { margin-top: 4px; max-width: 40rem; font-size: 0.9375rem; color: var(--muted); }

/* One row per Stripe plan (paid mode only): name, price, what it includes, key. */
.sh-plans {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: 0;
  border-top: var(--pl-rule-width) solid var(--rule);
}
.sh-plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name price"
    "meta meta"
    "key key";
  align-items: baseline;
  gap: 4px var(--space-md);
  padding-block: var(--space-md);
  border-bottom: var(--pl-rule-width) solid var(--rule);
}
.sh-plan:last-child { border-bottom: 0; padding-bottom: var(--space-xs); }
.sh-plan__name {
  grid-area: name;
  min-width: 0;
  font-family: var(--pl-font-display);
  font-weight: 900;
  font-size: 1.625rem;
  line-height: 1;
  color: var(--ink);
}
.sh-plan__price {
  grid-area: price;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.sh-plan__meta { grid-area: meta; font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.sh-plan__form { grid-area: key; margin-top: var(--space-xs); }
.sh-plan__form .cta-pill { width: 100%; }
@media (min-width: 640px) {
  .sh-plan {
    grid-template-columns: minmax(0, 1fr) auto 12rem;
    grid-template-areas:
      "name price key"
      "meta price key";
    align-items: center;
    column-gap: var(--space-lg);
  }
  .sh-plan__name { align-self: end; }
  .sh-plan__meta { align-self: start; }
  .sh-plan__form { margin-top: 0; }
}

/* Where to find the history: a disclosure on the panel's strong rule. */
.sh-help { border-top: var(--pl-rule-strong-width) solid var(--rule-strong); }
.sh-help__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding-inline: var(--space-md);
  font-weight: 700;
  color: var(--ink);
  user-select: none;
}
@media (min-width: 640px) { .sh-help__summary { padding-inline: var(--space-lg); } }
.sh-help__summary:hover { background: var(--paper-2); }
.sh-help__summary:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.sh-help__chevron { flex-shrink: 0; transition: transform var(--pl-dur-base) var(--pl-ease-out); }
.sh-help[open] .sh-help__chevron { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .sh-help__chevron { transition: none; } }
.sh-help__body {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 56px;
  padding: 0 var(--space-md) var(--space-lg);
  color: var(--ink-2);
}
@media (min-width: 640px) { .sh-help__body { padding: 0 var(--space-lg) var(--space-lg) 52px; } }
.sh-help__site { flex: 1 1 20rem; min-width: 0; }
.sh-help__site h3 { font-size: 1.0625rem; font-weight: 800; color: var(--ink); }
.sh-help__site ol {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
  padding-left: 22px;
  list-style: decimal;
}
.sh-help__site li::marker { color: var(--muted); }
.sh-help__path { overflow-wrap: anywhere; }

/* The demo, under the panel once the player has analyses of their own. */
.sh-demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
}
.sh-demo__note { font-size: 0.9375rem; color: var(--muted); }

/* ── My analyses: the list ───────────────────────────────────────────────── */
.sh-history { margin-top: var(--space-lg); }
@media (min-width: 640px) { .sh-history { margin-top: 56px; } }
.sh-history__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px var(--space-md);
}
.sh-history .sh-h2 { font-size: clamp(1.5rem, 1.2vw + 1rem, 2rem); line-height: 1; }
.sh-history__count { font-size: 0.9375rem; color: var(--muted); }

/* Status: a word on a chip. Green filled when done, pink filled when it
   failed, an outline while it waits or runs. Dark text on every fill. */
.sh-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--pl-radius-part);
  box-shadow: inset 0 0 0 2px var(--rule-strong);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
}
.sh-status[data-status="completed"] { background: var(--mint); box-shadow: none; color: var(--amber-ink); }
.sh-status[data-status="failed"] { background: var(--sev-3); box-shadow: none; color: var(--amber-ink); }

/* The table from 760px up. Never wider than the page: fixed columns, the file
   name takes what is left and truncates (the whole name is in its title). */
.sh-runs {
  margin-top: var(--space-xs);
}
.sh-runs__table { width: 100%; border-collapse: collapse; }
.sh-runs__name {
  font-family: var(--pl-font-code);
  font-size: 0.8125rem;
  color: var(--ink);
}
.sh-runs__more { margin-left: 6px; font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.sh-runs__num { text-align: right; font-variant-numeric: tabular-nums; }
.sh-runs__devs { font-weight: 800; }
.sh-runs__none { color: var(--muted); font-weight: 400; }
.sh-runs__open .sh-textlink { padding-inline: 4px; }

.sh-runs__fileline { display: flex; align-items: baseline; min-width: 0; }
.sh-runs__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-runs__more { flex-shrink: 0; }

/* Narrow: each row is two lines — the file and its status, then the facts and
   Open. The header row is kept for screen readers only. */
@media (max-width: 759.98px) {
  .sh-runs thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .sh-runs tbody,
  .sh-runs td { display: block; }
  .sh-runs tr {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "file file file status"
      "date hands devs open";
    align-items: center;
    column-gap: 12px;
    padding: 10px 0 4px;
    border-top: var(--pl-rule-width) solid var(--rule);
  }
  .sh-runs tbody tr:first-child { border-top: var(--pl-rule-strong-width) solid var(--rule-strong); }
  .sh-runs .sh-runs__file {
    grid-area: file;
    display: flex;
    min-width: 0;
  }
  .sh-runs__date { grid-area: date; font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
  .sh-runs__hands { grid-area: hands; }
  .sh-runs__devs { grid-area: devs; }
  .sh-runs__num { text-align: left; font-size: 0.875rem; font-weight: 400; color: var(--muted); white-space: nowrap; }
  .sh-runs__num strong { font-weight: 800; color: var(--ink); }
  .sh-runs__status { grid-area: status; justify-self: end; }
  .sh-runs__status .sh-status { font-size: 0.8125rem; padding: 1px 8px; }
  .sh-runs__open { grid-area: open; justify-self: end; }
  .sh-runs__wide,
  .sh-runs__none { display: none; }
}
@media (min-width: 760px) {
  .sh-runs {
    margin-top: var(--space-md);
    border: var(--pl-rule-strong-width) solid var(--rule-strong);
    border-radius: var(--pl-radius-card);
  }
  .sh-runs__table { table-layout: fixed; font-size: 0.9375rem; }
  /* Date, hands, deviations, status, open: sized to their content; the file gets the rest. */
  .sh-runs th:nth-child(2) { width: 8.5rem; }
  .sh-runs th:nth-child(3) { width: 5rem; }
  .sh-runs th:nth-child(4) { width: 6.5rem; }
  .sh-runs th:nth-child(5) { width: 8.5rem; }
  .sh-runs th:nth-child(6) { width: 4.5rem; }
  .sh-runs th {
    padding: 10px 14px;
    border-bottom: var(--pl-rule-strong-width) solid var(--rule-strong);
    background: var(--paper-2);
    font-size: 0.875rem;
    font-weight: 700;
    text-align: left;
    color: var(--ink);
    white-space: nowrap;
  }
  .sh-runs th.sh-runs__num { text-align: right; }
  .sh-runs td { padding: 4px 14px; white-space: nowrap; overflow: hidden; }
  .sh-runs tbody tr + tr td { border-top: var(--pl-rule-width) solid var(--rule); }
  .sh-runs tbody tr:hover td { background: var(--pl-hover); }
  .sh-runs__name { font-size: 0.875rem; }
  .sh-runs__date { color: var(--ink-2); }
  .sh-runs__open { text-align: right; }
  .sh-runs__narrow { display: none; }
}

/* First visit: no analysis yet, on ruled paper, and the demo one click away. */
.sh-empty-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: 20px;
  padding: var(--space-lg) var(--space-md);
  border: var(--pl-rule-strong-width) solid var(--rule-strong);
  border-radius: var(--pl-radius-card);
  background: repeating-linear-gradient(var(--paper) 0 27px, var(--pl-rule-hair) 27px 28px);
}
@media (min-width: 640px) { .sh-empty-box { padding: 36px 32px; } }
.sh-empty-box__text {
  max-width: 46ch;
  font-size: 1.0625rem;
  line-height: 28px;
  color: var(--ink-2);
}
@media (min-width: 640px) { .sh-empty-box__text { font-size: 1.25rem; } }
.sh-empty-box__text strong { font-weight: 800; color: var(--ink); }
.sh-empty-box__form .cta-pill { min-height: 3rem; }

/* ── Sign in and verify (auth layout) ────────────────────────────────────── */
.sh-auth {
  flex: 1 0 auto;
  width: 100%;
  max-width: calc(27.5rem + 2 * var(--space-md));
  margin-inline: auto;
  padding: var(--space-2xl) var(--space-md) var(--space-2xl);
}
@media (min-width: 640px) {
  .sh-auth {
    max-width: calc(27.5rem + 2 * var(--space-lg));
    padding: 80px var(--space-lg) var(--space-2xl);
  }
}
.sh-auth__title {
  font-family: var(--pl-font-display);
  font-weight: 900;
  letter-spacing: var(--pl-tracking-display);
  font-size: clamp(2.5rem, 1.6vw + 1.75rem, 3rem);
  line-height: 1;
  color: var(--ink);
  text-wrap: balance;
}
.sh-auth__lede {
  margin-top: var(--space-md);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink-2);
}
/* The address the code went to, under the marker. */
.sh-auth__lede strong {
  padding-inline: 4px;
  background: linear-gradient(transparent 12%, var(--amber) 12%, var(--amber) 92%, transparent 92%);
  color: var(--amber-ink);
  font-weight: 700;
  overflow-wrap: anywhere;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.sh-auth__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: 40px;
}
.sh-auth__form--code { margin-top: 36px; }
.sh-auth__key { width: 100%; min-height: 3.5rem; margin-top: var(--space-md); font-size: 1.125rem; }
.sh-auth__form--code .sh-auth__key { margin-top: 20px; }
.sh-auth__google { margin-top: 0; gap: 12px; font-weight: 700; }
.sh-auth__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px var(--space-lg);
  margin-top: 20px;
}
.sh-auth__resend { display: contents; }
.sh-or {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-block: 28px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--muted);
}
.sh-or::before,
.sh-or::after {
  content: "";
  flex: 1 1 auto;
  height: 2px;
  background: var(--rule);
}
.sh-auth__foot {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: var(--pl-rule-strong-width) solid var(--rule);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
}
.sh-auth__links + .sh-auth__foot { margin-top: var(--space-lg); }

.sh-label { font-size: 0.875rem; font-weight: 700; color: var(--ink); }
.sh-note { font-size: 0.9375rem; line-height: 1.5; color: var(--muted); }
.sh-input {
  width: 100%;
  height: 52px;
  padding-inline: var(--space-md);
  font-size: 1.0625rem;
}
.sh-input::placeholder { color: var(--muted); opacity: 1; }

/* What went wrong, right under what it is about: the icon and the words on
   a pink marker stroke. Never colour alone. */
.sh-alert,
.sh-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
  margin-top: var(--space-md);
  font-weight: 700;
  color: var(--ink);
}
.sh-alert > .pl-icon,
.sh-notice > .pl-icon { flex-shrink: 0; margin-top: 2px; }
.sh-alert > .pl-icon { color: var(--sev-3); }
.sh-alert__text {
  padding-inline: 6px;
  background: linear-gradient(transparent 12%, var(--sev-3) 12%, var(--sev-3) 92%, transparent 92%);
  color: var(--amber-ink);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.sh-notice { font-weight: 400; color: var(--ink-2); }
.sh-notice > .pl-icon { color: var(--mint); }
.sh-auth__title + .sh-alert,
.sh-auth__title + .sh-notice { margin-top: var(--space-lg); }

/* The six boxes and the one input over them. The digits are the input's own
   text, in a monospace face (0.6em per glyph), tracked so each lands in the
   middle of its box: period p = box + gap, letter-spacing p − 0.6em, and a
   start indent of half a box less half a glyph. The input runs one period
   past the last box so the sixth digit never scrolls it; the clip hides that. */
.sh-code {
  --sh-code-gap: 10px;
  position: relative;
  container-type: inline-size;
}
.sh-code__boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--sh-code-gap);
}
.sh-code__boxes > span {
  height: 64px;
  border: var(--pl-rule-strong-width) solid var(--rule-strong);
  border-radius: var(--pl-radius-control);
  background: var(--paper);
  transition: box-shadow var(--pl-dur-fast) var(--pl-ease-out);
}
.sh-code:focus-within .sh-code__boxes > span { box-shadow: 0 0 0 3px var(--amber); }
/* clip, not hidden: focus would scroll a hidden box to the caret. */
.sh-code__clip { position: absolute; inset: 0; overflow: clip; }
.sh-code__input {
  --sh-code-p: calc((100cqw + var(--sh-code-gap)) / 6);
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100cqw + var(--sh-code-p));
  height: 100%;
  margin: 0;
  padding: 0 0 0 calc((var(--sh-code-p) - var(--sh-code-gap) - 0.6em) / 2);
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--pl-font-code);
  font-weight: 500;
  font-size: 1.75rem;
  letter-spacing: calc(var(--sh-code-p) - 0.6em);
  color: var(--ink);
  caret-color: var(--amber);
}

/* ── Account ─────────────────────────────────────────────────────────────── */
.sh-set {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-2xl);
  padding-block: var(--space-lg);
  border-top: var(--pl-rule-strong-width) solid var(--rule-strong);
}
@media (min-width: 640px) { .sh-set { padding-block: 28px; } }
.sh-set:last-child { padding-bottom: 0; }
.sh-set__intro { flex: 0 1 20rem; min-width: 0; }
.sh-set__title {
  font-family: var(--pl-font-display);
  font-weight: 900;
  letter-spacing: var(--pl-tracking-display);
  font-size: clamp(1.5rem, 0.6vw + 1.25rem, 1.75rem);
  line-height: 1.1;
  color: var(--ink);
}
.sh-set__desc { margin-top: var(--space-xs); font-size: 0.9375rem; color: var(--muted); }
.sh-set__body { flex: 1 1 35rem; min-width: 0; margin: 0; }
.sh-set__text { max-width: 60ch; color: var(--ink-2); }
.sh-set__note { margin-top: 4px; font-size: 0.875rem; color: var(--muted); }
.sh-set__key { min-height: 3rem; }
.sh-set__text + .sh-set__key,
.sh-set__ack + .sh-set__key { margin-top: var(--space-md); }

.sh-set__facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px var(--space-lg);
  align-items: center;
}
.sh-set__facts dt { font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.sh-set__facts dd { margin: 0 0 var(--space-sm); font-size: 1.125rem; color: var(--ink); }
.sh-set__facts dd:last-child { margin-bottom: 0; }
@media (min-width: 640px) {
  .sh-set__facts { grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr); row-gap: 14px; }
  .sh-set__facts dd { margin: 0; }
}
.sh-set__email { font-weight: 700; overflow-wrap: anywhere; }
.sh-set__method { display: flex; align-items: center; gap: 10px; }

/* The language: two words on one segmented control, the current one filled. */
.sh-seg {
  display: inline-flex;
  border: var(--pl-rule-strong-width) solid var(--rule-strong);
  border-radius: var(--pl-radius-control);
}
.sh-seg form { display: contents; }
.sh-seg__opt {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 22px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.sh-seg form + form .sh-seg__opt { border-left: var(--pl-rule-strong-width) solid var(--rule-strong); }
.sh-seg__opt:hover { background: var(--paper-2); }
.sh-seg__opt[aria-pressed="true"] { background: var(--ink); color: var(--pl-on-invert); font-weight: 800; }
.sh-seg__opt:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* The consent log: when, what, the answer. */
.sh-set__sub { margin: 28px 0 var(--space-xs); font-size: 1.0625rem; font-weight: 800; color: var(--ink); }
.sh-log { list-style: none; margin: 0; padding: 0; }
.sh-log__row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--space-lg);
  padding-block: 10px;
  border-top: var(--pl-rule-width) solid var(--rule);
}
.sh-log__row:last-child { border-bottom: var(--pl-rule-width) solid var(--rule); }
.sh-log__date { flex: 0 0 12.5rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sh-log__purpose { flex: 1 1 10rem; color: var(--ink); }
.sh-log__state { font-weight: 700; color: var(--ink); }

.sh-set__ack {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-weight: 700;
  color: var(--ink);
}
.sh-set__check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  accent-color: var(--amber);
  cursor: pointer;
}
.sh-set__ack label { cursor: pointer; }

/* ── Unsubscribe ─────────────────────────────────────────────────────────── */
.sh-unsub > .sh-lede { margin-top: var(--space-md); max-width: 46rem; }
.sh-unsub__note { margin-top: var(--space-md); max-width: 46rem; font-size: 0.9375rem; color: var(--muted); }
.sh-unsub__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-xl); }

/* The auth layout's foot: the year. */
.sh-auth-foot { margin-top: 0; }
@media (min-width: 640px) {
  .sh-auth-foot .pl-colophon__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding-block: 22px 26px;
  }
}

/* ── Components ─────────────────────────────────────────────────────────── */

/* Ui::EmptyState's icon tile. */
.sh-empty__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: var(--pl-rule-strong-width) solid var(--rule-strong);
  border-radius: var(--pl-radius-card);
  background: var(--paper-2);
  color: var(--ink);
}

/* Flash: mint for a notice, pink for an alert; the icon carries the role
   too, so it never rests on colour alone. */
.sh-flash-stack {
  position: fixed;
  top: var(--space-md);
  left: 50%;
  z-index: var(--z-toast);
  display: grid;
  gap: var(--space-xs);
  width: calc(100% - 1.5rem);
  max-width: 28rem;
  transform: translateX(-50%);
}
@media (min-width: 640px) { .sh-flash-stack { top: var(--space-lg); } }
.sh-flash {
  --sh-tone: var(--mint);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 4px 4px 4px var(--space-md);
  border: var(--pl-rule-strong-width) solid var(--sh-tone);
  border-radius: var(--pl-radius-card);
  background: var(--paper-2);
  box-shadow: 4px 4px 0 var(--sh-tone);
  font-size: 0.875rem;
  color: var(--ink);
}
.sh-flash[data-tone="alert"] { --sh-tone: var(--sev-3); }
.sh-flash__icon { flex-shrink: 0; color: var(--sh-tone); }
.sh-flash__text { flex: 1 1 auto; min-width: 0; padding-block: 6px; line-height: 1.5; }

/* Keyboard key. */
.sh-kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 1px 6px;
  border: var(--pl-rule-width) solid var(--rule-strong);
  border-bottom-width: 2px;
  border-radius: var(--pl-radius-part);
  background: var(--paper-3);
  font-family: var(--pl-font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: var(--ink);
}
