/* The seal pages. 14 Nov 2026 (docs/design/DECISIONS.md; design refresh, lane D9).

   The page file for templates/seal/: /seal, /seal/new, /seal/verify, /seal/docs,
   /seal/account, /seal/storage, /seal/capsule, /seal/capsule/open, /seal/recover and
   a seal's receipt. The pages are built from the shared parts (the page head, the
   label, the mark's shapes, the button, the field, the fold, the tabs, the counter,
   the scrolling table). This file holds what they add: the receipt beside its
   checks, a row of buttons, the place files are dropped, a choice with its
   sentence, the line a script reports into, and a command. Colours, sizes and
   widths come from tokens.css. A thing is set apart by a rule or by space. */

/* A row of buttons or links. It wraps; each keeps its own height. */
.seal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-block: var(--space-4);
}

.page-head + .seal-actions {
  margin-top: calc(var(--space-5) * -1);
  margin-bottom: var(--space-5);
}

/* The example on /seal stands directly under the head, so a first screen holds it. */
.seal-example {
  padding-bottom: var(--space-7);
}

.seal-example > h2 {
  font: var(--type-lede);
  font-weight: 700;
}

.seal-example > .seal-checked {
  margin-top: var(--space-3);
}

/* The family's tabs stand above the page head and keep a step of air from it. */
.tabs + .page-head {
  padding-top: var(--space-5);
}

/* The receipt, checked: what the receipt says, then what a program checked of it.
   One column on a phone, with the checks under the facts; from 960px the two sit
   side by side, 5 to 7, as on a plate. Ink rules above and below. */
.seal-checked {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  margin-block: var(--space-5);
  padding-top: var(--space-4);
  border-top: var(--rule);
}

.seal-checked > div > * + * {
  margin-top: var(--space-3);
}

@media (min-width: 960px) {
  .seal-checked {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: var(--gutter);
  }
}

/* A fact: its name over it on a phone, beside it from 720px. */
.seal-facts > div {
  padding-block: var(--space-2);
  border-top: var(--rule-hair);
}

.seal-facts dt {
  font: var(--type-small);
  color: var(--ink-2);
}

.seal-facts dd {
  font: var(--type-line);
}

.seal-facts--wide {
  max-width: var(--reading);
  margin-bottom: var(--space-4);
}

.seal-facts--wide dt {
  font-weight: 600;
  color: var(--ink);
}

.seal-facts--wide dd {
  font: var(--type-body);
}

@media (min-width: 720px) {
  .seal-facts > div {
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr);
    column-gap: var(--space-4);
  }

  .seal-facts--wide > div {
    display: block;
  }
}

/* A root, a fingerprint, an address: a program's value. It breaks anywhere, so 64
   characters never push a phone sideways. */
.seal-hash {
  font: var(--type-line);
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* One check: the shape, then the sentence, then the value it is about. */
.seal-checks {
  list-style: none;
  padding: 0;
}

.seal-checks__row {
  display: grid;
  grid-template-columns: var(--space-4) minmax(0, 1fr);
  column-gap: var(--space-2);
  align-items: baseline;
  padding-block: var(--space-2);
  border-top: var(--rule-hair);
}

.seal-checks__row p {
  font: var(--type-small);
}

.seal-checks__row .seal-hash {
  font: var(--type-line);
}

/* What it costs: two columns from 720px, a rule above each. */
.seal-plans {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5) var(--gutter);
  margin-bottom: var(--space-5);
}

.seal-plan {
  padding-top: var(--space-4);
  border-top: var(--rule);
}

.seal-plan > * + * {
  margin-top: var(--space-3);
}

.seal-plan h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.seal-plan__price {
  font: var(--type-body);
  font-weight: 700;
}

.seal-plan ul {
  list-style: none;
  padding: 0;
}

.seal-plan li {
  padding-block: var(--space-2);
  border-top: var(--rule-hair);
}

@media (min-width: 720px) {
  .seal-plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* A tool page: its sections follow one another closely, each a numbered step. */
.seal-tool > .section {
  padding-block: var(--space-6);
}

.seal-tool .section > * + * {
  margin-top: var(--space-4);
}

.seal-tool .section > h2 {
  margin-bottom: 0;
}

/* Where files are dropped. A field's edge and ground; the edge turns to the hand's
   colour while a file is held over it. */
.seal-drop {
  padding: var(--space-4);
  border: var(--rule-control);
  background: var(--sunk);
}

.seal-drop.over {
  border-color: var(--hand);
}

.seal-drop .seal-actions {
  margin-block: var(--space-3);
}

/* A file chooser drawn as a button. The input is in the page for a keyboard; the
   label takes its focus ring. */
.seal-pick:focus-within {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}

/* A choice and the sentence that says what it does. */
.seal-choices > * + * {
  margin-top: var(--space-2);
}

.seal-choices > p + .seal-choice {
  margin-top: var(--space-4);
}

.seal-choice {
  display: grid;
  grid-template-columns: var(--target-min) minmax(0, 1fr);
  column-gap: var(--space-2);
  align-items: start;
  min-height: var(--target);
  padding-block: var(--space-2);
  font-weight: 600;
  cursor: pointer;
}

.seal-choice input {
  width: var(--target-min);
  height: var(--target-min);
  margin: 0;
  accent-color: var(--ink);
}

.seal-choices > p {
  padding-inline-start: calc(var(--target-min) + var(--space-2));
  max-width: var(--measure);
}

/* A field of several lines, and a choice from a list. */
.seal-area {
  height: auto;
  min-height: calc(var(--control) * 2);
  padding-block: var(--space-3);
  resize: vertical;
}

.seal-tool select.field__input {
  appearance: auto;
}

.seal-tool .field,
.seal-tool .fold {
  max-width: var(--measure);
}

/* The line a script reports into. A result carries the tick or the cross before
   its words (static/seal.js), in the mark's own colour; the words stay ink. */
.seal-status {
  min-height: 1lh;
  font: var(--type-line);
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.seal-status[data-tone="good"],
.seal-status[data-tone="bad"] {
  color: var(--ink);
}

/* A notice: set apart by an inset rule, not a tint. */
.seal-note {
  max-width: var(--measure);
  margin-block: var(--space-4);
  padding-inline-start: var(--space-4);
  border-inline-start: var(--rule-inset);
}

/* What a script shows when it is done: a rule above, then the words. */
.seal-done {
  max-width: var(--reading);
  padding-top: var(--space-4);
  border-top: var(--rule);
}

.seal-done > * + * {
  margin-top: var(--space-3);
}

.seal-reveal {
  max-width: var(--reading);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: var(--rule);
}

.seal-reveal > * + * {
  margin-top: var(--space-4);
}

/* Tables on the seal pages: values in the apparatus face, a button at rest height. */
.seal-table td,
.seal-table th {
  font: var(--type-small);
}

.seal-table td.seal-hash,
.seal-table td.apparatus,
.seal-table td.ident {
  font: var(--type-line);
}

.seal-table td.seal-hash {
  min-width: 14rem;
}

.seal-table input[type="checkbox"] {
  width: var(--target-min);
  height: var(--target-min);
  accent-color: var(--ink);
}

/* A list of files or links, each with what it is. */
.seal-files {
  list-style: none;
  padding: 0;
  max-width: var(--reading);
}

.seal-files > li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  min-height: var(--target);
  padding-block: var(--space-2);
  border-top: var(--rule-hair);
  overflow-wrap: anywhere;
}

.seal-files > li > span {
  font: var(--type-small);
  color: var(--ink-2);
}

/* A command to copy. Long lines scroll inside the block; the block takes focus so a
   keyboard can scroll it. */
.seal-cmd {
  max-width: var(--reading);
  margin-block: var(--space-4);
  white-space: pre;
}

.seal-newkey {
  max-width: var(--reading);
  margin-top: var(--space-5);
}

.layout-reading .section > .seal-hash,
.layout-reading .section > .t-line {
  margin-top: var(--space-3);
}

.layout-reading .section > .counter + .prose,
.layout-reading .section > .seal-hash + .prose,
.layout-reading .section > form + .prose {
  margin-top: var(--space-4);
}

/* A seal's id in a headline breaks where it must, so a phone never moves sideways. */
.seal-tool .page-head h1 .ident {
  overflow-wrap: anywhere;
}

.section > .prose + .prose {
  margin-top: var(--space-4);
}

/* Fields that follow one another keep a step of air; the chosen one of two ways is
   drawn pressed: an inset rule under it, as the chosen tab has. */
.seal-tool .field + .field,
.seal-tool .field + .seal-choices,
.seal-tool .seal-choices + .field {
  margin-top: var(--space-4);
}

.seal-tool .btn[aria-pressed="true"] {
  border-bottom: var(--rule-inset);
  font-weight: 700;
}

/* A time, an id or a count in a table stays on one line; a table too wide for a
   phone scrolls inside its own box instead of breaking a date into four lines. */
.seal-table th,
.seal-table td.apparatus,
.seal-table td.ident {
  white-space: nowrap;
}

/* Words kept for a screen reader inside a table cell are placed from the cell, so
   they scroll with the table and never widen the page behind it. */
.seal-table th,
.seal-table td {
  position: relative;
}
