/*
 * Volcanic Minerals portal.
 *
 * Built from the parts of the Volcanic Minerals site: the same palette, the same two type families,
 * the same top bar. Two grounds: Earth-Dark for the door (sign-in, the terms), Stratum paper inside.
 * Gold is a thread, never a fill. Near-square corners, hairline rules, no shadows to speak of.
 * A single committed look: the portal does not follow the viewer's dark mode.
 */

@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/EBGaramond-Regular.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/EBGaramond-Medium.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/EBGaramond-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/EBGaramond-Italic.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('fonts/EBGaramond-MediumItalic.woff2') format('woff2'); }

:root {
  color-scheme: light;
  /* Palette (tokens/volcanic-palette.css) */
  --ink: #0F0C0A;
  --basalt: #241E1B;
  --umber: #5A4632;
  --ash: #6E665C;
  --silver: #C6C0B4;
  --gold: #B89020;        /* on dark */
  --gold-d10: #93730F;    /* on paper */
  --gold-d20: #6E5609;
  --sage: #6B8E5C;
  --sage-d: #4F6E42;
  --magma: #8B3122;
  /* Screen values */
  --page: #F3EEE4;
  --panel: #F7F3EC;
  --field: #FCFAF6;
  --rule: #DAD6CC;
  --rule-soft: #E5E0D6;
  --line-strong: #C5BEB2;
  --body: #2A2521;
  --secondary: #6B6B68;
  --on-dark: #F6F1E8;
  --on-dark-2: #D9D3C7;
  --nav-dark: #CFC9BE;
  --rule-dark: #6E6A63;
  --rule-dark-soft: #3A3531;
  --door: #0B0806;
  --door-panel: #15110E;
  /* Type */
  --garamond: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --grotesque: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --t-body: 18.5px;
  --t-small: 16.5px;
  --t-meta: 13.5px;
  --t-label: 11px;
  --t-nav: 12.5px;
  --t-heading: clamp(24px, 2.3vw, 31px);
  --t-display: clamp(31px, 4.2vw, 58px);
  --t-standfirst: clamp(17px, 1.35vw, 20.5px);
  /* Space */
  --maxw: 1300px;
  --gutter: clamp(20px, 6vw, 120px);
  --radius: 3px;
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Whatever takes focus stays clear of the bars fixed to the top and foot of the page. The bars' own
   controls are left alone: a margin on them would move the page each time one took focus. */
main :where(a, button, input, textarea, select, summary, h1, h2, h3, [tabindex]) { scroll-margin-top: 150px; scroll-margin-bottom: 96px; }
.viewer-bar :where(a, button, input), .savebar :where(a, button, input) { scroll-margin: 0; }
body {
  margin: 0;
  overflow-wrap: break-word;
  background: var(--page);
  color: var(--body);
  font-family: var(--garamond);
  font-size: var(--t-body);
  line-height: 1.5;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.on-door { background: var(--door); color: var(--on-dark); }
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
h1:focus, h2:focus { outline: none; }
::selection { background: rgba(184, 144, 32, .26); color: inherit; }
p, li, dd { text-wrap: pretty; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap {
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ------------------------------------------------------------------ type */

.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--grotesque); font-size: var(--t-label); font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase; color: var(--ash);
}
.eyebrow::before { content: ''; width: 34px; height: 2px; background: var(--gold-d10); flex: none; }
.on-door .eyebrow { color: var(--on-dark-2); }
.on-door .eyebrow::before { background: var(--gold); }

.display { font-size: var(--t-display); font-weight: 500; line-height: 1.06; letter-spacing: -.012em; color: var(--ink); text-wrap: balance; }
.heading { font-size: var(--t-heading); font-weight: 500; line-height: 1.18; color: var(--ink); text-wrap: balance; }
.subheading { font-size: 21px; font-weight: 600; line-height: 1.25; color: var(--ink); }
.standfirst { font-size: var(--t-standfirst); color: var(--umber); max-width: var(--measure); }
.on-door .display, .on-door .heading, .on-door .subheading { color: var(--on-dark); }
.on-door .standfirst { color: var(--on-dark-2); }
.door-steps { margin: 0; padding: 0; list-style: none; counter-reset: door-step; display: grid; gap: 12px; max-width: var(--measure); }
.door-steps li { counter-increment: door-step; display: grid; grid-template-columns: 30px minmax(0, 1fr); font-size: var(--t-standfirst); color: var(--on-dark-2); }
.door-steps li::before { content: counter(door-step) '.'; color: var(--gold); }
.standfirst-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

.label {
  font-family: var(--grotesque); font-size: var(--t-label); font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ash);
}
.meta { font-family: var(--grotesque); font-size: var(--t-meta); line-height: 1.45; color: var(--secondary); }
.small { font-size: var(--t-small); }
.fine { font-family: var(--grotesque); font-size: 12px; line-height: 1.5; color: var(--secondary); }
.on-door .label, .on-door .meta, .on-door .fine { color: var(--on-dark-2); }
.num { font-variant-numeric: lining-nums tabular-nums; }
.prose { max-width: var(--measure); display: grid; gap: .8em; }
.muted { color: var(--secondary); }
.on-door .muted { color: var(--on-dark-2); }

.link {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold-d10);
  text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: pointer;
  background: none; border: 0; padding: 0; transition: color .14s, text-decoration-color .14s;
}
.link:hover { color: var(--gold-d20); text-decoration-color: var(--gold-d20); }
.on-door .link { color: var(--on-dark); text-decoration-color: var(--gold); }
.on-door .link:hover { color: #fff; }
.link-quiet { text-decoration-color: var(--line-strong); }
.on-door .link-quiet { text-decoration-color: var(--rule-dark); color: var(--on-dark-2); }

/* ------------------------------------------------------------------ controls */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  font-family: var(--grotesque); font-size: var(--t-nav); font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  background: var(--ink); color: var(--on-dark); border: 1px solid var(--ink); border-radius: var(--radius);
  cursor: pointer; transition: background-color .14s, color .14s, border-color .14s;
}
.btn:hover { background: var(--basalt); border-color: var(--basalt); }
.btn:active:not([disabled]) { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled='true'] { background: transparent; color: var(--ash); border-color: var(--line-strong); cursor: not-allowed; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-line:hover { background: transparent; border-color: var(--ink); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 11.5px; }
.btn-danger { background: transparent; color: var(--magma); border-color: var(--magma); }
.btn-danger:hover { background: var(--magma); color: var(--on-dark); border-color: var(--magma); }
.on-door .btn { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.on-door .btn:hover { background: #fff; border-color: #fff; }
.on-door .btn[disabled] { background: transparent; color: var(--rule-dark); border-color: var(--rule-dark-soft); }
.on-door .btn-line { background: transparent; color: var(--on-dark); border-color: var(--rule-dark); }
.on-door .btn-line:hover { border-color: var(--on-dark); background: transparent; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.icon { width: 17px; height: 17px; flex: none; }
/* On the door the one way forward is marked as such. */
.on-door .door-col .btn:not(.btn-line)::after { content: ''; width: 7px; height: 7px; margin-left: 2px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .18s ease; }
.on-door .door-col .btn:not(.btn-line):hover:not([disabled])::after { transform: translateX(3px) rotate(45deg); }

.field { display: grid; gap: 8px; }
.field > label, .field > .field-label { font-family: var(--grotesque); font-size: var(--t-meta); font-weight: 600; color: var(--ink); line-height: 1.4; }
.on-door .field > label { color: var(--on-dark-2); font-weight: 500; letter-spacing: .02em; }
.field .hint { font-family: var(--grotesque); font-size: 12.5px; color: var(--secondary); line-height: 1.45; }
.field .error, .error-line { font-family: var(--grotesque); font-size: 12.5px; color: var(--magma); font-weight: 600; }
.on-door .field .error, .on-door .error-line { color: #E0A294; }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: 10px 14px;
  background: var(--field); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-family: var(--garamond); font-size: var(--t-body); line-height: 1.4;
  transition: border-color .14s;
}
.textarea { min-height: 96px; resize: vertical; }
/* An answer is shown whole: the box grows with what is written in it, where the browser can do that. */
.textarea:not([readonly]) { field-sizing: content; max-height: 70vh; }
.input:hover, .textarea:hover, .select:hover { border-color: var(--ash); }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.input[aria-invalid='true'], .textarea[aria-invalid='true'] { border-color: var(--magma); }
.input[disabled], .textarea[disabled] { background: transparent; color: var(--secondary); }
.on-door .input { background: transparent; color: var(--on-dark); border-color: var(--rule-dark); font-size: 20px; min-height: 54px; padding-block: 9px 11px; }
.on-door .input:hover { border-color: var(--silver); }
.on-door .input:focus-visible { outline-color: var(--on-dark); border-color: var(--on-dark); }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; cursor: pointer; }
.check input { appearance: none; width: 22px; height: 22px; margin: 3px 0 0; border: 1px solid var(--ash); border-radius: 2px; background: var(--field); cursor: pointer; display: grid; place-items: center; }
.check input[type='radio'] { border-radius: 50%; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ''; width: 10px; height: 5px; border-left: 2px solid var(--on-dark); border-bottom: 2px solid var(--on-dark); transform: translateY(-1px) rotate(-45deg); }
.check input[type='radio']:checked::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--on-dark); transform: none; }
.check input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.on-door .check input { background: transparent; border-color: var(--silver); }
.on-door .check input:checked { background: var(--on-dark); border-color: var(--on-dark); }
.on-door .check input:checked::after { border-color: var(--ink); }
.on-door .check input[type='radio']:checked::after { background: var(--ink); }
.on-door .check input:focus-visible { outline-color: var(--on-dark); }

.alert { border-left: 2px solid var(--magma); padding: 4px 0 4px 16px; color: var(--magma); font-size: var(--t-small); max-width: var(--measure); }
.alert strong { font-weight: 600; }
.on-door .alert { color: #E9B5A8; border-color: #C0563F; }
.notice { border-left: 2px solid var(--gold-d10); padding: 4px 0 4px 16px; font-size: var(--t-small); color: var(--umber); max-width: var(--measure); }
.on-door .notice { border-color: var(--gold); color: var(--on-dark-2); }

/* ------------------------------------------------------------------ status: always a word, with a shape */

.status { display: inline-flex; align-items: center; gap: 9px; font-family: var(--grotesque); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: var(--ink); white-space: nowrap; }
.status::before { content: ''; flex: none; width: 9px; height: 9px; position: relative; top: -1px; }
.status[data-tone='waiting']::before { border: 1.5px solid var(--ash); border-radius: 50%; }
.status[data-tone='action']::before { width: 8px; height: 8px; background: var(--gold-d10); transform: rotate(45deg); }
.status[data-tone='complete']::before { background: var(--sage); border-radius: 50%; }
.status[data-tone='closed']::before { height: 2px; width: 11px; background: var(--ash); }
.status[data-tone='late'] { color: var(--magma); }
.status[data-tone='late']::before { width: 8px; height: 8px; background: var(--magma); transform: rotate(45deg); }
@media (prefers-reduced-motion: no-preference) {
  .status[data-tone='waiting'][data-live]::before { animation: pulse 2.6s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .35; } }
  .rise { animation: rise .26s ease-out both; }
  @keyframes rise { from { opacity: .35; transform: translateY(6px); } }
  /* The door arrives in order: the plate first and slowly, then each line of the column. */
  .door-plate::before { animation: plate 1.4s ease-out both; }
  @keyframes plate { from { opacity: 0; transform: scale(1.03); } }
  .door-col.rise { animation: none; }
  .door-col.rise > * { animation: rise .42s cubic-bezier(.2, .7, .2, 1) both; }
  .door-col.rise > :nth-child(2) { animation-delay: .05s; }
  .door-col.rise > :nth-child(3) { animation-delay: .1s; }
  .door-col.rise > :nth-child(4) { animation-delay: .15s; }
  .door-col.rise > :nth-child(n + 5) { animation-delay: .2s; }
}

/* ------------------------------------------------------------------ the top bar (site contract) */

.chrome { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; }
.topbar { background: var(--ink); color: var(--nav-dark); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; }
.lockup img { height: 32px; width: auto; }
.lockup { display: block; flex: none; border-radius: 2px; }
.topbar .lockup:focus-visible { outline-color: var(--on-dark); }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 34px); }
.nav a, .nav button {
  font-family: var(--grotesque); font-size: var(--t-nav); font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--nav-dark); text-decoration: none; background: none; border: 0; padding: 6px 0; cursor: pointer;
  border-bottom: 2px solid transparent; transition: color .14s, border-color .14s; white-space: nowrap;
}
.nav a:hover, .nav button:hover { color: #fff; }
.nav a[aria-current='page'] { color: #fff; border-bottom-color: var(--gold); }
.nav a:focus-visible, .nav button:focus-visible, .menu-btn:focus-visible { outline-color: var(--on-dark); }
.nav .nav-out { color: var(--silver); padding-left: clamp(14px, 2.2vw, 34px); border-left: 1px solid var(--rule-dark-soft); border-bottom: 0; }
.menu-btn { display: none; font-family: var(--grotesque); font-size: var(--t-nav); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark); background: none; border: 1px solid var(--rule-dark); border-radius: var(--radius); padding: 9px 14px; cursor: pointer; }
@media (max-width: 1080px) {
  .lockup img { height: 24px; }
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); border-top: 1px solid var(--rule-dark-soft); flex-direction: column; align-items: stretch; gap: 0; padding: 6px max(var(--gutter), env(safe-area-inset-right, 0px)) 18px max(var(--gutter), env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a, .nav button { padding: 14px 0; border-bottom: 1px solid var(--rule-dark-soft); text-align: left; }
  .nav a[aria-current='page'] { border-bottom-color: var(--gold); }
  .nav .nav-out { border-left: 0; padding-left: 0; }
}
@media (max-width: 520px) { .lockup img { height: 20px; } }

/* ------------------------------------------------------------------ the door (Earth-Dark) */

/* The page fills the window, so that the foot sits at the foot however little is on the page. */
#app { min-height: 100dvh; display: flex; flex-direction: column; }
.door { flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; position: relative; isolation: isolate; }
/* The plate: the Volcanic Minerals gold photograph (VC-0030, the colour original of the site's home
   image), toned to the house gold and laid across the whole door. The way in sits on a dark panel under a
   gold rule, so no text ever sits on the photograph itself. The corner behind the lockup is darkened. */
.door-plate { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.door-plate::before { content: ''; position: absolute; inset: 0; background: url('art/imagery/VC-0030_gold-nuggets-house-gold.webp') 62% 40% / cover no-repeat; }
.door-plate::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(70% 60% at 0% 0%, rgba(11, 8, 6, .88) 0%, rgba(11, 8, 6, .55) 45%, rgba(11, 8, 6, 0) 100%),
    radial-gradient(120% 90% at 78% 38%, rgba(11, 8, 6, 0) 0%, rgba(11, 8, 6, .1) 45%, rgba(11, 8, 6, .55) 100%),
    linear-gradient(180deg, rgba(11, 8, 6, .7) 0%, rgba(11, 8, 6, 0) 20%, rgba(11, 8, 6, 0) 72%, rgba(11, 8, 6, .9) 100%);
}
@media (max-width: 900px) {
  /* On a phone the gold is a band above the panel, fading into the ground. */
  .door-plate::before {
    inset: 0 0 auto 0; height: 340px; background-position: 50% 30%;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
  }
  .door-plate::after { background: linear-gradient(180deg, rgba(11, 8, 6, .86) 0px, rgba(11, 8, 6, .6) 70px, rgba(11, 8, 6, .08) 130px, rgba(11, 8, 6, 0) 340px); }
}
.door-head { padding-block: clamp(28px, 6vh, 64px) 0; }
.door-head .lockup img { height: 38px; }
.door-main { padding-block: clamp(28px, 6vh, 64px) 56px; }
.door-col {
  max-width: 556px; display: grid; gap: 28px; padding: 44px 44px 40px;
  background: rgba(14, 11, 8, .86); border-top: 1px solid var(--gold); box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(10px) saturate(1.1); backdrop-filter: blur(10px) saturate(1.1);
}
.door-col.wide { max-width: 748px; }
@media (max-width: 900px) {
  .door-main { padding-block: 132px 40px; }
  .door-col { padding: 28px 22px 26px; box-shadow: none; background: rgba(14, 11, 8, .9); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.door-col .display { font-size: clamp(31px, 3.6vw, 46px); }
/* The privacy notice at the entrance: read inside the door panel, in the door's own colours. */
.privacy-draft { font-family: var(--grotesque); font-size: var(--t-meta); color: var(--on-dark-2); border-left: 2px solid var(--gold); padding: 2px 0 2px 16px; }
.privacy-doc { display: grid; grid-template-columns: minmax(0, 1fr); }
.privacy-doc .clause { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: 0 6px; padding: 22px 0; border-top: 1px solid var(--rule-dark-soft); }
.privacy-doc .clause:first-child { border-top: 0; padding-top: 4px; }
.privacy-doc .clause > .num { font-family: var(--garamond); font-size: 19px; color: var(--gold); line-height: 1.35; }
.privacy-doc h3 { font-family: var(--garamond); font-size: 21px; font-weight: 500; color: var(--on-dark); line-height: 1.35; }
.privacy-doc p { font-family: var(--garamond); font-size: 17.5px; line-height: 1.6; color: var(--on-dark-2); max-width: 66ch; }
.privacy-doc .para > .pn { color: var(--silver); opacity: .7; }
@media (max-width: 560px) {
  .privacy-doc .clause { display: block; padding: 18px 0; }
  .privacy-doc .clause > .num { float: left; margin-right: .45em; }
  .privacy-doc h3 { margin-bottom: 4px; }
  .privacy-doc p { font-size: 16.5px; }
}
.door-foot { padding-block: 22px 28px; border-top: 1px solid rgba(110, 106, 99, .34); }
.door-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; }
.door-foot p { max-width: 70ch; }
/* The notice's text starts on the panel's own text column (its 44px padding; 22px on a phone) and ends
   on the same right edge, with the lock hanging in the margin to its left. */
.door-notice { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; max-width: 512px; }
.door-foot .door-notice { max-width: 512px; }
.door-notice .icon { margin-top: 1px; color: var(--gold); justify-self: end; }
@media (max-width: 900px) {
  .door-notice { grid-template-columns: 14px minmax(0, 1fr); gap: 8px; max-width: none; }
  .door-foot .door-notice { max-width: none; padding-right: 22px; }
  .door-notice .icon { width: 14px; height: 14px; }
}
.steps { display: inline-flex; gap: 6px; align-items: center; flex: none; }
.eyebrow.stepped::before { display: none; }
.invited { border-left: 2px solid var(--rule-dark); padding-left: 16px; gap: 18px; }
.invited dt { margin-bottom: 5px; }
.door-links { display: flex; flex-wrap: wrap; gap: 8px 0; }
.door-links > * + * { margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--rule-dark); }
.steps span { width: 22px; height: 2px; background: var(--rule-dark); }
.steps span[data-on] { background: var(--gold); }
.code-row { display: flex; gap: 10px; }
.code-row input {
  width: 100%; max-width: none; flex: 1 1 0; min-width: 0; height: 70px; text-align: center; padding: 0 0 2px;
  font-family: var(--garamond); font-size: 32px; font-variant-numeric: lining-nums tabular-nums;
  background: transparent; color: var(--on-dark); border: 1px solid var(--rule-dark); border-radius: var(--radius);
}
.code-row input:focus-visible { outline: 2px solid var(--on-dark); outline-offset: 1px; border-color: var(--on-dark); }
.code-row .gap { width: 8px; flex: none; }
/* A reference or date in boxes of fixed length (Check a Supplier Notice). */
.seg-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg-field > legend { padding: 0; margin-bottom: 8px; font-family: var(--grotesque); font-size: var(--t-meta); font-weight: 600; color: var(--ink); line-height: 1.4; }
.on-door .seg-field > legend { color: var(--on-dark-2); font-weight: 500; letter-spacing: .02em; }
.seg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.seg-fixed { font-family: var(--garamond); font-size: 22px; letter-spacing: .02em; color: var(--on-dark-2); font-variant-numeric: lining-nums; }
.seg-box {
  width: calc(var(--chars) * 0.72em + 28px); height: 54px; padding: 0 12px; text-align: center;
  font-family: var(--garamond); font-size: 22px; letter-spacing: .08em; font-variant-numeric: lining-nums tabular-nums;
  background: transparent; color: var(--on-dark); border: 1px solid var(--rule-dark); border-radius: var(--radius);
}
.seg-box::placeholder { color: var(--on-dark-3, rgba(243, 238, 230, .32)); letter-spacing: .08em; }
.seg-box:hover { border-color: var(--silver); }
.seg-box:focus-visible { outline: 2px solid var(--on-dark); outline-offset: 1px; border-color: var(--on-dark); }
.seg-row { flex-wrap: nowrap; }
@media (max-width: 560px) {
  .seg-row { gap: 6px; }
  .seg-fixed { font-size: 19px; }
  .seg-box { font-size: 19px; height: 50px; padding: 0 6px; letter-spacing: .04em; width: calc(var(--chars) * 0.66em + 16px); }
}
.terms-panel { background: var(--door-panel); border: 1px solid var(--rule-dark-soft); border-radius: var(--radius); max-height: min(52vh, 560px); overflow-y: auto; padding: 28px clamp(20px, 3vw, 36px); display: grid; gap: 18px; }
.terms-panel:focus-visible { outline: 2px solid var(--on-dark); outline-offset: 2px; }
.terms-panel h3 { font-size: var(--t-body); font-weight: 600; color: var(--on-dark); }
.terms-panel p { color: var(--on-dark-2); font-size: 17.5px; line-height: 1.55; }
.terms-panel .clause { display: grid; grid-template-columns: 2.2em 1fr; gap: 0 6px; }
.terms-panel .clause > .num { color: var(--gold); font-weight: 500; }
.terms-paper { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 28px clamp(20px, 3vw, 36px); display: grid; gap: 18px; max-width: 820px; }
.terms-paper .clause { display: grid; grid-template-columns: 2.2em 1fr; gap: 0 6px; }
.terms-paper h3 { font-size: var(--t-body); font-weight: 600; color: var(--ink); }
.terms-paper .clause > .num { color: var(--gold-d10); }
/* The paper holds its own ink, so it reads the same on the door (the privacy notice) as inside. */
.terms-paper { color: var(--body); }
.terms-paper p { color: var(--body); }
/* The terms of access as a sheet over the door (first sign-in, and whenever the version changes). */
.terms-modal { position: fixed; inset: 0; z-index: 40; background: rgba(6, 4, 3, .8); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: clamp(10px, 3vh, 36px) max(12px, env(safe-area-inset-right, 0px)) max(clamp(10px, 3vh, 36px), env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.terms-modal { -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.terms-sheet { width: min(100%, 880px); max-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; background: var(--door-panel); border: 1px solid var(--rule-dark); border-top: 2px solid var(--gold); border-radius: var(--radius); box-shadow: 0 30px 90px rgba(0, 0, 0, .6); overflow: hidden; animation: rise .32s ease both; }
.terms-sheet-head { padding: clamp(18px, 3vw, 30px) clamp(18px, 3.4vw, 40px) 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.terms-sheet-head .standfirst { font-size: 18px; }
.terms-read { background: var(--panel); color: var(--body); overflow-y: auto; overscroll-behavior: contain; padding: 26px clamp(18px, 3.4vw, 40px) 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-content: start; min-height: 150px; }
.terms-read:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.terms-read { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.terms-progress { height: 2px; background: var(--rule-dark-soft); overflow: hidden; }
.terms-progress span { display: block; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left center; transition: transform .12s linear; }
.terms-read .clause { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 0 6px; }
.terms-read .clause > .num { color: var(--gold-d10); font-weight: 500; }
.terms-read h3 { font-size: var(--t-body); font-weight: 600; color: var(--ink); }
.terms-read p { color: var(--body); font-size: 17px; line-height: 1.55; max-width: 66ch; }
.clause .para { display: grid; grid-template-columns: 2.7em minmax(0, 1fr); gap: 0 6px; margin-top: 8px; }
.clause .para > .pn { white-space: nowrap; font-family: var(--grotesque); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ash); padding-top: 5px; }
.clause h3 + p { margin-top: 8px; }
.terms-read .terms-end { font-family: var(--grotesque); font-size: var(--t-label); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ash); text-align: center; border-top: 1px solid var(--rule); padding-top: 18px; }
.terms-sheet-foot { position: relative; padding: 16px clamp(18px, 3.4vw, 40px) clamp(16px, 2.6vw, 26px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; border-top: 1px solid var(--rule-dark-soft); }
/* The text runs on under the foot until the end is reached. */
.terms-sheet-foot::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 44px; margin-bottom: 1px; pointer-events: none; background: linear-gradient(180deg, rgba(247, 243, 236, 0), rgba(247, 243, 236, .94)); transition: opacity .2s; }
.terms-sheet-foot:has(.terms-hint[data-done])::before { opacity: 0; }
.terms-hint[data-done] { color: var(--on-dark); }
/* The terms keep most of the screen: a compact head, and the choices, the tick and the buttons in few rows. */
.terms-sheet { width: min(100%, 980px); }
.terms-sheet-head { padding: clamp(16px, 2.2vw, 24px) clamp(18px, 3.4vw, 40px) 16px; gap: 6px; }
.terms-sheet-head .heading { font-size: clamp(24px, 2.4vw, 30px); }
.terms-sheet-head .standfirst { font-size: 17px; line-height: 1.45; }
.terms-sheet-foot { padding-top: 14px; padding-bottom: clamp(14px, 2vw, 20px); gap: 10px; }
.terms-capacity { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 32px; }
.terms-capacity > .field { flex: 1 0 100%; }
.terms-confirm { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 32px; }
.terms-confirm .actions { flex-wrap: nowrap; }
.terms-read .terms-note { font-family: var(--grotesque); font-size: 12.5px; line-height: 1.5; text-align: center; color: var(--ash); max-width: 62ch; margin: -8px auto 0; }
@media (max-width: 760px) { .terms-confirm { grid-template-columns: minmax(0, 1fr); } .terms-confirm .actions { flex-wrap: wrap; } }
.terms-sheet-head .standfirst { max-width: none; text-wrap: pretty; }
/* The text column is centred in the sheet, so that no wide empty band sits beside it. */
.terms-read > * { width: min(100%, 800px); justify-self: center; }
.terms-read p { max-width: 72ch; }
@media (min-width: 761px) {
  /* The two choices side by side, under their legend. */
  .terms-sheet .terms-capacity { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 32px; }
  .terms-sheet .terms-capacity > legend { margin-bottom: 6px; }
}
/* On a tablet in landscape, a laptop or larger the choices move to a column beside the text, so the
   terms take the full height of the sheet below its head. */
@media (min-width: 900px) {
  .terms-sheet { width: min(100%, 1200px); height: 100%; grid-template-columns: minmax(0, 1fr) clamp(280px, 27vw, 330px); grid-template-rows: auto 2px minmax(0, 1fr); grid-template-areas: "head head" "bar bar" "read side"; }
  .terms-sheet-head { grid-area: head; }
  .terms-progress { grid-area: bar; }
  .terms-read { grid-area: read; }
  .terms-sheet-foot { grid-area: side; border-top: 0; border-left: 1px solid var(--rule-dark-soft); align-content: start; gap: 16px; padding: 26px 28px; overflow-y: auto; }
  .terms-sheet-foot::before { display: none; }
  .terms-sheet .terms-capacity { display: grid; gap: 10px; }
  .terms-confirm { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .terms-confirm .actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .terms-confirm .actions .btn { width: 100%; }
}
@media (max-width: 560px) {
  .terms-modal { padding-top: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
  .terms-sheet-head { padding: 14px 16px 12px; gap: 6px; }
  .terms-sheet-head .eyebrow { display: none; }
  .terms-sheet-head .heading { font-size: 24px; }
  .terms-sheet-head .standfirst { font-size: 15.5px; line-height: 1.4; }
  .terms-read { padding: 18px 16px 16px; gap: 18px; }
  .terms-read p { font-size: 16px; }
  .terms-read .clause, .terms-paper .clause { display: block; }
  .terms-read .clause > .num, .terms-paper .clause > .num { float: left; margin-right: .45em; line-height: 1.5; }
  .terms-read .clause h3, .terms-paper .clause h3 { margin-bottom: 4px; }
  .terms-paper { padding: 20px 16px; }
  .clause .para { grid-template-columns: 2.3em minmax(0, 1fr); }
  .terms-sheet-foot { padding: 12px 16px 14px; gap: 10px; }
  .terms-sheet-foot .fine:last-child { display: none; }
  .terms-sheet-foot .check { font-size: 16px; line-height: 1.35; }
  .terms-sheet-foot .actions { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; }
  .terms-sheet-foot .actions .btn { min-width: 0; padding: 12px 8px; letter-spacing: .08em; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .terms-sheet { animation: none; } .terms-progress span { transition: none; } }

/* ------------------------------------------------------------------ inside (Stratum) */

.inside { flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; }
.page { padding-block: clamp(36px, 6vh, 72px) 80px; display: grid; gap: clamp(32px, 5vh, 56px); align-content: start; }
.page-head { display: grid; gap: 14px; }
.page-head .display { margin-top: 6px; }
.back { font-family: var(--grotesque); font-size: var(--t-meta); white-space: nowrap; }
.page-head > .back { margin-bottom: 10px; }
.section { display: grid; gap: 20px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.section:has(> .attention) { gap: 0; }
.section:has(> .attention) > .section-head { border-bottom: 0; }
/* A table carries its own rule under its column heads, so the heading above it has none. */
.section:has(> .table-wrap) { gap: 8px; }
.section:has(> .table-wrap) > .section-head { border-bottom: 0; padding-bottom: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.cols > * { min-width: 0; display: grid; gap: clamp(32px, 5vh, 52px); }
@media (max-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(20px, 2.6vw, 32px); display: grid; gap: 18px; }
/* A sheet of paper laid on the page: a letter, a receipt. Lighter than the page, with a gold thread at its head. */
.paper { position: relative; background: var(--field); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(24px, 3vw, 44px); box-shadow: 0 1px 0 rgba(15, 12, 10, .03), 0 22px 44px -30px rgba(15, 12, 10, .3); }
.paper::before { content: ''; position: absolute; top: -1px; left: clamp(24px, 3vw, 44px); width: 34px; height: 2px; background: var(--gold-d10); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 18px clamp(24px, 4vw, 48px); align-items: start; }
@container (max-width: 520px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
/* On one column the contact follows the letter, as it reads on a wide screen. */
@media (max-width: 900px) { .cols.home > * { display: contents; } .cols.home .contact { order: 2; } }
.stack { display: grid; gap: 14px; }
.stack-l { display: grid; gap: 28px; }
.row { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: baseline; }
.spread { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: baseline; justify-content: space-between; }
.kv { display: grid; grid-template-columns: minmax(120px, 13em) minmax(0, 1fr); gap: 8px 24px; }
.kv dt { font-family: var(--grotesque); font-size: var(--t-meta); color: var(--secondary); padding-top: 4px; }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 10px; } }
/* In a narrow panel the same list stacks, whatever the width of the page. */
.panel { container-type: inline-size; }
@container (max-width: 470px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 10px; } .kv dd:last-child { margin-bottom: 0; } }

/* the stage: a band on the page grid, the rail on the left and its sentence on the right */
.stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 6px; }
.stage .standfirst { font-size: var(--t-body); color: var(--umber); }
.cols.home { margin-top: 18px; }
@media (max-width: 900px) { .cols.home { margin-top: 6px; } }
/* stage rail */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; max-width: 820px; }
.rail li { position: relative; padding-top: 26px; font-family: var(--grotesque); font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ash); }
.rail li::before { content: ''; position: absolute; top: 6px; left: 0; right: 0; height: 1px; background: var(--line-strong); }
.rail li:last-child::before { right: auto; width: 0; }
.rail li::after { content: ''; position: absolute; top: 1px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--page); border: 1.5px solid var(--line-strong); }
.rail li[data-state='done'] { color: var(--ink); }
.rail li[data-state='done']::after { background: var(--ink); border-color: var(--ink); }
.rail li[data-state='done']::before { background: var(--ink); height: 2px; top: 5.5px; }
.rail li[data-state='current'] { color: var(--ink); }
.rail li[data-state='current']::after { top: 0; width: 13px; height: 13px; border-color: var(--gold-d10); background: radial-gradient(circle, var(--gold-d10) 0 3px, var(--page) 3.6px); }
@media (max-width: 640px) {
  .rail { grid-auto-flow: row; gap: 14px; }
  .rail li { padding: 0 0 0 26px; }
  .rail li::before { display: none; }
  .rail li::after { top: 2px; }
  .rail li[data-state='current']::after { top: 1px; }
}

/* numbered attention list */
.attention { counter-reset: n; display: grid; }
.attention li { counter-increment: n; position: relative; display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--rule-soft); }
.attention li:first-child { border-top: 1px solid var(--rule-soft); }
.attention .what .link { text-decoration-color: transparent; }
.attention .what .link::after { content: ''; position: absolute; inset: 0; }
.attention li:hover .what .link, .attention .what .link:focus-visible { text-decoration-color: var(--gold-d10); }
.attention li > span:empty { align-self: center; width: 9px; height: 9px; border-top: 1.5px solid var(--gold-d10); border-right: 1.5px solid var(--gold-d10); transform: rotate(45deg); transition: transform .18s ease; }
.attention li:hover > span:empty { transform: translateX(4px) rotate(45deg); }
.attention .what:not(:has(a)) { color: var(--ink); }
.attention li::before { content: counter(n) '.'; font-variant-numeric: lining-nums tabular-nums; color: var(--gold-d10); font-weight: 500; }
.attention .what { font-size: 20px; }
.attention .detail { grid-column: 2; }
.attention li[data-done] .what .link { text-decoration-color: transparent; color: var(--secondary); }
@media (max-width: 640px) {
  .attention li > .status { grid-column: 2; grid-row: 2; justify-self: start; margin-top: 2px; }
  .attention li:has(> .status) .detail { grid-row: 3; }
}

/* letter */
.letter { display: grid; gap: 1em; max-width: var(--measure); font-size: 19px; line-height: 1.56; }
.letter .label { margin-bottom: .4em; }
.letter .signature { margin-top: .4em; display: grid; gap: 2px; }
.letter .signature .name { font-style: italic; font-size: 24px; color: var(--ink); }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.table th { text-align: left; font-family: var(--grotesque); font-size: var(--t-label); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ash); padding: 10px 18px 10px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; vertical-align: bottom; }
.table td { padding: 18px 18px 18px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: baseline; }
.table td .meta { overflow-wrap: anywhere; }
.table .title + * { margin-top: 3px; }
.table td:last-child:has(> .link) { padding-left: 14px; text-align: right; }
@media (min-width: 1100px) { .table .title { min-width: 12em; } }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table .group td { padding: 56px 0 14px; border-bottom: 1px solid var(--ink); font-size: 23px; font-weight: 500; line-height: 1.2; color: var(--ink); }
.table .group:first-child td { padding-top: 34px; }
/* Where a table is in parts, the strong rule belongs to each part's heading and the column heads are quiet. */
.table:has(.group) th { border-bottom-color: var(--rule); }
.table td:last-child > .link { display: inline-flex; align-items: center; gap: 9px; text-decoration-color: transparent; font-family: var(--grotesque); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.table td:last-child > .link::after { content: ''; width: 7px; height: 7px; border-top: 1.5px solid var(--gold-d10); border-right: 1.5px solid var(--gold-d10); transform: rotate(45deg); transition: transform .18s ease; }
.table tr:hover td:last-child > .link::after { transform: translateX(3px) rotate(45deg); }
.table td:last-child > .link:hover { text-decoration-color: var(--gold-d20); }
.table .title { font-size: 20px; color: var(--ink); line-height: 1.3; }
.table .title a { text-decoration: none; }
.table .title a:hover { text-decoration: underline; text-decoration-color: var(--gold-d10); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.table .no { font-variant-numeric: lining-nums tabular-nums; color: var(--gold-d10); font-weight: 500; white-space: nowrap; width: 3.4em; }
.nowrap { white-space: nowrap; }
@media (max-width: 520px) { .btn { white-space: normal; max-width: 100%; padding: 12px 20px; text-align: center; line-height: 1.35; } .btn-small { padding: 9px 14px; } }
.table tr.earlier td { background: transparent; color: var(--secondary); }
.table tr.earlier .title { font-size: var(--t-small); color: var(--secondary); }
@media (max-width: 760px) {
  .table.stacking thead { display: none; }
  .table.stacking tr { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); padding: 14px 0; border-bottom: 1px solid var(--rule-soft); }
  .table.stacking tr.group { display: block; padding: 0; border: 0; }
  .table.stacking td { border: 0; padding: 2px 0; grid-column: 2; }
  .table.stacking td.no { grid-column: 1; grid-row: 1; }
  .table.stacking td[data-label]::before { content: attr(data-label); font-family: var(--grotesque); font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--ash); }
  /* Each labelled line is a label and its value on two fixed columns, so the values stand under one another. */
  .table.stacking td[data-label] { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 0 6px; align-items: baseline; padding-top: 6px; }
  .table.stacking td[data-label] > * { grid-column: 2; }
  /* A table with no index number has no number column to keep. */
  .table.stacking tr:not(:has(td.no)) { grid-template-columns: minmax(0, 1fr); }
  .table.stacking tr:not(:has(td.no)) td { grid-column: 1; }
  .table.stacking td:last-child:has(> .link) { padding: 10px 0 2px; text-align: left; }
  .table.stacking tr { padding: 18px 0; }
  .table.stacking tr.group { padding: 0; }
  .table.stacking .group td { padding-top: 40px; }
}

/* lists of records */
.records { display: grid; }
.record { display: grid; gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--rule-soft); }
.records > .record:first-child { border-top: 1px solid var(--rule); }
.record .head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: baseline; }
.record > .title.quoted { margin-top: 8px; }
@media (max-width: 640px) {
  .record .head { grid-template-columns: minmax(0, 1fr); }
  .record .head:has(> .meta:first-child) > .status { order: -1; justify-self: start; }
}
.record .title { font-size: 21px; color: var(--ink); }
.answer { border-left: 2px solid var(--gold-d10); padding-left: 18px; margin-top: 8px; display: grid; gap: 4px; }
.quoted { white-space: pre-wrap; overflow-wrap: anywhere; }

/* footer */
.foot { border-top: 1px solid var(--rule); padding-block: 22px 30px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; align-items: baseline; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }

/* ------------------------------------------------------------------ the document viewer */

.viewer-bar { background: var(--panel); border-bottom: 1px solid var(--rule); }
.viewer-bar .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 14px 12px; }
.viewer-title { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.viewer-title > * { flex: none; }
.viewer-title .back { margin-right: 8px; }
.viewer-title .no { color: var(--gold-d10); font-weight: 500; font-variant-numeric: lining-nums tabular-nums; font-size: 19px; }
.viewer-title .name { flex: 0 1 auto; font-size: 21px; line-height: 1.25; color: var(--ink); min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; text-wrap: balance; }
.viewer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-family: var(--grotesque); font-size: var(--t-meta); color: var(--ink); }
.viewer-pager { display: flex; align-items: center; gap: 8px 12px; margin-right: auto; }
@media (max-width: 760px) {
  .viewer-bar .wrap { gap: 10px; padding-block: 12px 10px; }
  .viewer-title { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; }
  .viewer-title .back { grid-column: 1 / -1; justify-self: start; margin: 0 0 6px; }
  .viewer-title .name { display: block; overflow: visible; font-size: 19px; }
  .viewer-title .meta { grid-column: 2; }
  /* A page already fills a phone's width, so the two size buttons have nothing to do there. */
  .viewer-pager .tool { display: none; }
  /* The actions fill their lines, so the bar reads as one justified block. */
  .viewer-tools > .tool, .viewer-tools > span:has(> .tool) { flex: 1 1 auto; }
  .viewer-tools > span:has(> .tool) { display: flex; }
  .viewer-tools > span > .tool { flex: 1 1 auto; }
}
.tool { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; font-family: var(--grotesque); font-size: 12.5px; font-weight: 600; letter-spacing: .08em; color: var(--ink); transition: border-color .14s; }
.tool { gap: 8px; }
.tool .icon { width: 16px; height: 16px; color: var(--gold-d20); }
.tool:hover { border-color: var(--ink); }
.tool[disabled] { color: var(--line-strong); cursor: default; border-color: var(--rule); }
.page-jump { width: 4.4em; height: 38px; padding-top: 2px; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--field); font-family: var(--grotesque); font-size: var(--t-meta); font-variant-numeric: tabular-nums; }
.viewer-banner { background: var(--ink); color: var(--on-dark-2); font-family: var(--grotesque); font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-align: center; padding: 8px 16px; }
.viewer-stage { background: #E3DCCF; padding-block: 32px 72px; }
.viewer-pages { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; justify-items: center; }
.sheet { position: relative; width: min(100%, var(--sheet-width, 900px)); aspect-ratio: 210 / 297; background: #fff; border: 1px solid #D3CBBD; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 12, 10, .05), 0 18px 38px -26px rgba(15, 12, 10, .42); }
.sheet img { width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; }
.sheet .folio { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-family: var(--grotesque); font-size: 10.5px; letter-spacing: .12em; color: var(--ash); }
.sheet .mark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; overflow: hidden; }
.sheet .mark span { transform: rotate(-32deg); font-family: var(--grotesque); font-size: clamp(11px, 1.5vw, 15px); letter-spacing: .12em; text-transform: uppercase; color: rgba(15, 12, 10, .13); white-space: nowrap; }
.sheet .waiting { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--grotesque); font-size: var(--t-meta); color: var(--ash); }
.viewer-note { text-align: center; padding-top: 26px; }

/* ------------------------------------------------------------------ forms set as documents */

.form-doc { display: grid; gap: 40px; max-width: 900px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 900px) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.form-section { scroll-margin-top: 104px; }
.form-index { position: sticky; top: 112px; display: grid; justify-items: start; border-left: 1px solid var(--rule); }
.form-index-link { margin-left: -1px; padding: 9px 0 9px 20px; border: 0; border-left: 2px solid transparent; background: none; text-align: left; font: inherit; font-size: 17px; line-height: 1.3; color: var(--secondary); cursor: pointer; transition: color .14s, border-color .14s; }
.form-index-link:hover { color: var(--ink); }
.form-index-link[data-current] { color: var(--ink); border-left-color: var(--gold-d10); }
.form-index-link:focus-visible { outline: 2px solid var(--gold-d10); outline-offset: 2px; }
@media (max-width: 1180px) { .form-layout { grid-template-columns: minmax(0, 1fr); } .form-index { display: none; } }
.form-section { display: grid; gap: 4px; }
.form-section > .section-head { margin-bottom: 8px; }
.item { display: grid; align-items: first baseline; grid-template-columns: 3.4em minmax(0, 1fr); gap: 4px 10px; padding: 20px 0; border-bottom: 1px solid var(--rule-soft); }
.item > .no { font-variant-numeric: lining-nums tabular-nums; color: var(--gold-d10); font-weight: 500; }
.item > .body { display: grid; gap: 12px; min-width: 0; }
.item .q { font-size: 19px; color: var(--ink); line-height: 1.35; }
.item .q .flag { color: var(--gold-d20); font-weight: 600; margin-left: 4px; }
.item .given { white-space: pre-wrap; overflow-wrap: anywhere; }
.item .given.blank { color: var(--magma); font-style: italic; }
.item[data-error] > .no { color: var(--magma); }
.options { display: grid; gap: 10px; }
fieldset.options, .terms-capacity { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.options > legend, .terms-capacity > legend { padding: 0; margin-bottom: 8px; }
.terms-capacity { display: grid; gap: 10px; }
.panel.pending { border-left: 2px solid var(--gold-d10); }
.subtable { display: grid; gap: 14px; }
.subrow { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); padding: 14px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); }
.subrow .field > label { font-weight: 500; font-size: 12px; color: var(--secondary); }
.subrow .remove { justify-self: start; align-self: end; }
.savebar { position: sticky; bottom: 0; z-index: 5; background: var(--page); border-top: 1px solid var(--rule); box-shadow: 0 -16px 24px -24px rgba(15, 12, 10, .4); padding-block: 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
.savebar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.receipt { position: relative; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: clamp(22px, 3vw, 40px); display: grid; gap: 22px; max-width: 760px; background: var(--field); box-shadow: 0 1px 0 rgba(15, 12, 10, .03), 0 22px 44px -30px rgba(15, 12, 10, .3); }
.receipt::before { content: ''; position: absolute; top: -1px; left: clamp(22px, 3vw, 40px); width: 34px; height: 2px; background: var(--gold-d10); }
.receipt .ref { font-size: clamp(26px, 3vw, 36px); font-weight: 500; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.fingerprint { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; overflow-wrap: anywhere; color: var(--secondary); }
.timeline { display: grid; }
.timeline li { display: grid; grid-template-columns: 11px minmax(0, 1fr); gap: 0 calc(var(--box-pad, 32px) - 10px); padding-bottom: 22px; position: relative; }
.timeline li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); margin-top: 9px; }
.timeline li::after { content: ''; position: absolute; left: 4px; top: 22px; bottom: -6px; width: 1px; background: var(--line-strong); }
.timeline li:last-child::after { display: none; }
.timeline li:last-child { padding-bottom: 0; }
.gate { display: grid; gap: 10px; }
.gate li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.gate li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ash); justify-self: center; transform: translateY(-1px); }
.gate li[data-done]::before { background: var(--sage); border-color: var(--sage); }

/* ------------------------------------------------------------------ dialog */

.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(11, 8, 6, .62); display: grid; place-items: center; padding: 20px; }
.dialog { width: min(100%, 560px); max-height: 100%; overflow-y: auto; background: var(--field); color: var(--body); border: 1px solid var(--line-strong); border-top: 2px solid var(--gold-d10); border-radius: var(--radius); padding: clamp(22px, 4vw, 38px); display: grid; gap: 20px; box-shadow: 0 34px 80px -34px rgba(0, 0, 0, .55); }
.dialog.wide { width: min(100%, 780px); }

/* ------------------------------------------------------------------ Volcanic's own area */

.desk-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.desk-grid > * { min-width: 0; display: grid; gap: 32px; }
/* Every single-column stack names its column, so that long content wraps inside it instead of widening the page. */
:where(.prose, .field, .door-col, .terms-panel, .terms-paper, .page, .page-head, .section, .cols > *, .panel, .stack, .stack-l, .attention, .letter, .records, .record, .answer, .form-doc, .form-section, .item > .body, .options, .subtable, .receipt, .timeline, .gate, .desk-grid > *, .note-internal, .decisions, .decision .inner) { grid-template-columns: minmax(0, 1fr); }
.nowrap { white-space: nowrap; }
@media (max-width: 520px) { .btn { white-space: normal; max-width: 100%; padding: 12px 20px; text-align: center; line-height: 1.35; } .btn-small { padding: 9px 14px; } }
@media (max-width: 1000px) { .desk-grid { grid-template-columns: minmax(0, 1fr); } }
.note-internal { background: #EFE8D9; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 4px; }
.tag { display: inline-block; font-family: var(--grotesque); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; border: 1px solid var(--line-strong); border-radius: 2px; padding: 2px 7px; color: var(--ash); white-space: nowrap; }
.decisions { display: grid; gap: 12px; }
.decision { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); }
.decision > summary { cursor: pointer; padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; align-items: baseline; list-style: none; }
.decision > summary::-webkit-details-marker { display: none; }
.decision > summary .name { font-size: 19px; color: var(--ink); }
.decision[open] > summary { border-bottom: 1px solid var(--rule); }
.decision .inner { padding: 18px; display: grid; gap: 16px; }
.decision[data-closed] > summary { cursor: default; color: var(--secondary); }
.decision[data-closed] > summary .name { color: var(--secondary); }
.itempick { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }

/* ------------------------------------------------------------------ preview chrome: not part of the product */

.preview-strip { background: #2B2A28; color: #E8E6E1; font-family: var(--grotesque); font-size: 12px; border-bottom: 1px dashed #77736B; }
.preview-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding-block: 7px; }
.preview-strip strong { letter-spacing: .16em; text-transform: uppercase; font-size: 10.5px; color: #F4D98A; }
.preview-strip select, .preview-strip button { font-family: var(--grotesque); font-size: 12px; color: #E8E6E1; background: #3A3936; border: 1px solid #77736B; border-radius: 2px; padding: 5px 9px; cursor: pointer; }
.preview-strip button:hover, .preview-strip select:hover { border-color: #E8E6E1; }
.preview-strip .grow { flex: 1 1 auto; }
@media (max-width: 640px) { .preview-strip .grow { display: none; } .preview-strip select { flex: 1 1 150px; min-width: 0; } .preview-strip .wrap { gap: 6px 8px; } }
.preview-drawer { position: fixed; z-index: 70; right: 0; top: 0; bottom: 0; width: min(100%, 460px); background: #F4F3F0; color: #1D1C1A; border-left: 1px dashed #77736B; padding: calc(18px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 24px 20px; overflow-y: auto; display: grid; gap: 16px; align-content: start; font-family: var(--grotesque); font-size: 13px; }
.preview-drawer h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.preview-drawer .mail { background: #fff; border: 1px solid #D2D0CA; border-radius: 4px; padding: 14px 16px; display: grid; gap: 8px; }
.preview-drawer .mail pre { margin: 0; white-space: pre-wrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.preview-drawer button { font: inherit; padding: 7px 12px; border: 1px solid #1D1C1A; background: #1D1C1A; color: #fff; border-radius: 2px; cursor: pointer; justify-self: start; }
.preview-drawer button.plain { background: transparent; color: #1D1C1A; }
.system-sheet { width: min(100%, 420px); background: #F4F3F0; color: #1D1C1A; border-radius: 12px; padding: 26px; display: grid; gap: 14px; font-family: var(--grotesque); font-size: 14px; text-align: center; border: 1px dashed #77736B; }
.system-sheet .glyph { width: 54px; height: 54px; border-radius: 50%; border: 2px solid #1D1C1A; margin: 0 auto; position: relative; }
.system-sheet .glyph::after { content: ''; position: absolute; inset: 12px; border-radius: 50%; border: 2px solid #1D1C1A; border-bottom-color: transparent; }
.system-sheet button { font: inherit; font-weight: 600; padding: 11px; border-radius: 8px; border: 1px solid #1D1C1A; background: #1D1C1A; color: #fff; cursor: pointer; }
.system-sheet button.plain { background: transparent; color: #1D1C1A; }
.system-sheet .fine { color: #5F5C55; }

/* ------------------------------------------------------------------ print: A4, the ink lockup at the head */

.print-head { display: none; }
@media print {
  @page { size: A4; margin: 18mm 16mm; }
  body, body.on-door { background: #fff; color: #000; font-size: 11.5pt; }
  .chrome, .foot nav, .actions, .savebar, .form-index, .preview-strip, .preview-drawer, .viewer-bar, .back, .btn, .no-print { display: none !important; }
  .print-head { display: block; margin-bottom: 10mm; }
  .print-head img { height: 11mm; }
  .wrap { padding: 0; max-width: none; }
  .page { padding: 0; gap: 8mm; }
  .panel, .receipt, .paper { background: #fff; box-shadow: none; }
  .door-plate { display: none; }
  a { text-decoration: none; }
}

/* ------------------------------------------------------------------ entrance review, 21 Nov 2026 */
/* One height for every control in an entrance column (fields and boxes are 54px). */
.on-door .btn { min-height: 54px; }
/* Hints legible on the dark panel (7:1), in the same family of greys as the notes. */
.on-door .field .hint, .on-door .seg-field .hint { color: #A39C90; }
/* A live region that is still empty takes no space in the column's rhythm. */
.door-col > :is([aria-live], [role="status"]):empty { margin-top: -28px; }
/* Short labels, hints and standfirsts break evenly, without a word alone on the last line. */
.field > label, .field .hint, .seg-field .hint, .standfirst, .door-col .fine { text-wrap: balance; }
.terms-sheet-foot .fine { max-width: 70ch; }
.eyebrow.stepped { align-items: flex-start; }
.eyebrow.stepped .steps { margin-top: .55em; }
@media (max-width: 900px) {
  .door-foot .wrap > p:last-child { padding-left: 22px; }
  .door-plate::before {
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 88%);
    mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 88%);
  }
}
@media (max-width: 560px) {
  /* Numbers, titles and clause text on two columns only: number at 0, everything else at 28px. */
  .privacy-doc .clause > .num, .terms-read .clause > .num { width: 28px; margin-right: 0; }
  .privacy-doc .clause .para, .terms-read .clause .para { grid-template-columns: 28px minmax(0, 1fr); column-gap: 0; }
}
@media (max-width: 520px) {
  .on-door .eyebrow { letter-spacing: .18em; }
  .door-links { flex-direction: column; gap: 6px; }
  .door-links > * + * { margin-left: 0; padding-left: 0; border-left: 0; }
  .door-links > * { padding-block: 6px; align-self: flex-start; }
}

/* ------------------------------------------------------------------ signed-in review, 21 Nov 2026 */
/* One inner padding for every box that stands in a column (panel, letter, receipt, decision), so that
   boxes stacked one above another start their text on the same line. */
:root { --box-pad: clamp(20px, 2.6vw, 32px); }
.panel, .paper, .receipt { padding: var(--box-pad); }
.paper::before, .receipt::before { left: var(--box-pad); }
.decision > summary { padding: 14px var(--box-pad); }
.decision .inner { padding: 18px var(--box-pad); }
/* Numbered steps: the text on the panel's text edge, the numbers hanging in its margin. */
.steps-list { list-style: decimal outside; padding-left: 0; }
.after-list { margin-top: 28px; }
.steps-list > li::marker { color: var(--gold-d10); font-variant-numeric: lining-nums tabular-nums; }
/* A small label beside a checkbox sits centred on the box. */
.check:has(> span > .meta, > span > .fine, > .meta, > .fine) input { margin-top: 2px; }
/* Reading measure for questions, descriptions and the personal-data lines. */
.item .q, .table td .muted { max-width: 72ch; }
.privacy-lines { max-width: 900px; }
.privacy-lines > p { max-width: var(--measure); }
/* The lead line of a numbered list of confirmations (6.1) set as an item of its own. */
.item.item-lead { border-bottom: 0; padding-bottom: 4px; }
/* File names: left-aligned like any text, fingerprints broken anywhere rather than cut off. */
button.link { text-align: left; }
.fingerprint { word-break: break-all; line-height: 1.5; }
/* Signature fields: the standard label, side by side when there is room. */
.sign-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 24px; }
/* Fine print under a rule keeps clear of it. */
.form-section > .section-head { margin-bottom: 12px; }
.form-section > .fine, .form-section > .meta { margin-top: 6px; }
/* The desk's clock: labels no wider than they need, so values keep to one line. */
.desk-grid .panel .kv { grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr); }
/* Account activity: date above time, so the record itself has room. */
.table td.when { min-width: 9.5em; }
/* A select with the house chevron instead of the browser's own. */
.select {
  appearance: none; -webkit-appearance: none; padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-d10) 50%), linear-gradient(135deg, var(--gold-d10) 50%, transparent 50%);
  background-position: right 22px center, right 16px center; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
/* "Waiting" reads as clearly as the other status marks. */
.status[data-tone='waiting']::before { width: 10px; height: 10px; border: 1.75px solid var(--umber); }
/* The eyebrow's rule stays on the first line when the label wraps. */
.eyebrow { align-items: flex-start; }
.eyebrow::before { margin-top: .55em; }
@media (max-width: 760px) {
  .tool, .btn-small { min-height: 44px; height: auto; }
}
@media (max-width: 560px) {
  /* Questions take the width: a narrow number column, and items without a number use both columns. */
  .item { grid-template-columns: 2.4em minmax(0, 1fr); gap: 4px 8px; }
  .item:not(:has(> .no)) > .body, .item > .no:empty + .body { grid-column: 1 / -1; }
  /* Stacked tables keep their rules, and their text column matches the attention list above. */
  .table.stacking tr { grid-template-columns: 56px minmax(0, 1fr); }
  .table.stacking tbody tr:first-child { border-top: 1px solid var(--rule-soft); }
  .table.stacking tbody tr.group:first-child { border-top: 0; }
  .table.stacking .group td { border-bottom: 1px solid var(--ink); padding-bottom: 10px; }
}

/* Labels centred on their capitals (src/web/button-label.ts). A browser centres the line box, which
   counts the space below the baseline, so capitals sat one to two pixels above the middle. Trimming the
   label's line to the capital height lets the control centre the letters themselves, in any font. */
.btn-text { text-box: trim-both cap alphabetic; }
.btn-text.sign { text-box: trim-both ex alphabetic; }
.menu-btn { align-items: center; justify-content: center; min-height: 36px; padding-block: 0; }
.tag { text-box: trim-both cap alphabetic; padding: 5px 7px; }
@supports not (text-box: trim-both cap alphabetic) {
  /* Browsers without trimming (older Firefox): the measured offset is about a tenth of the type size. */
  .btn-text { position: relative; top: .1em; }
  .btn-text.sign { top: 0; }
  .tag { padding: 2px 7px; }
}

/* ------------------------------------------------------------------ visual review, 21 November 2026 */

/* Terms on a phone: the reading hint is read aloud but not shown until the end is reached (the gold
   rule shows the progress), the two choices sit side by side, and on a short screen the standfirst
   gives its room to the text. */
@media (max-width: 560px) {
  .terms-hint:not([data-done]) { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .terms-sheet .terms-capacity { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; }
  .terms-sheet .terms-capacity > legend { margin-bottom: 4px; }
  .terms-sheet .terms-capacity > .field { flex: 1 0 100%; }
  .terms-sheet-foot .actions .btn { white-space: nowrap; }
}
@media (max-width: 560px) and (max-height: 720px) {
  .terms-sheet-head .standfirst { display: none; }
  .terms-sheet-head { padding-block: 12px 10px; }
}

/* Lines of reading text stay within a comfortable measure. */
.terms-read p { font-size: 18.5px; line-height: 1.6; max-width: 30em; }
@media (max-width: 560px) { .terms-read p { font-size: 16.5px; } }
details p { max-width: var(--measure, 68ch); }
.table td:last-child { max-width: 62ch; }
.page p.meta, .page p.fine { max-width: 75ch; }
details .table { table-layout: fixed; }
details .table th:first-child { width: 11em; }

/* A tick or a choice with a small line under its words sits on the first line of the words. */
.check:has(> .meta, > .fine, > span > .meta, > span > .fine) input { margin-top: -4px; }

/* At the door every button fills the panel's text column. */
.door-col .actions { display: grid; grid-template-columns: minmax(0, 1fr); }
.door-col .actions .btn { width: 100%; }
@media (max-width: 520px) { .on-door .btn { letter-spacing: .1em; } }
.door-col > [aria-live]:empty { align-self: start; }

/* A section whose records carry their own rules needs no rule under its head. */
.section:has(> .records) > .section-head { border-bottom: 0; padding-bottom: 0; }
.section:has(> .records) { gap: 8px; }

/* A table that fits needs no scroll box on a laptop (one would clip focus rings). */
@media (min-width: 761px) { .table-wrap { overflow-x: visible; } }

/* Titles break into balanced lines rather than leaving one word alone. */
.table .title, .attention .what, .terms-read h3, .record .title { text-wrap: balance; }

/* The dot between two eyebrow words is spaced evenly, not by the letter spacing. */
.eyebrow .sep { letter-spacing: 0; margin: 0 .5em; }
/* The terms' text column is centred in its pane at its reading measure, with no wide band to one side. */
.terms-read > * { width: min(100%, 680px); }

/* ---------------------------------------------------------------------------------------------
   Volcanic's own pages (the desk) are set on white, with neutral rules: a working surface, not a
   letter. A partner's and a supplier's pages keep their ground.
   --------------------------------------------------------------------------------------------- */
body.on-desk {
  --page: #FFFFFF;
  --panel: #F5F4F2;
  --field: #FFFFFF;
  --rule: #D6D4CF;
  --rule-soft: #E7E5E1;
  --line-strong: #BDBAB3;
}

/* ---------------------------------------------------------------------------------------------
   Documents (Volcanic): every document held, and who is given which. src/web/views/library.ts
   --------------------------------------------------------------------------------------------- */
.lib-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 22px 0; }
.lib-summary li { display: grid; gap: 8px; align-content: start; padding: 2px 20px 2px 18px; border-left: 1px solid var(--rule); }
.lib-summary li:first-child { border-left-color: var(--gold-d10); }
.lib-figure { font-size: clamp(34px, 3.4vw, 46px); font-weight: 500; line-height: 1; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.lib-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 16px 20px; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid var(--ink); }
.lib-filter { min-width: 280px; }
.lib-filter .select { min-height: 46px; font-size: var(--t-small); }

.lib-section { display: grid; gap: 0; margin-top: 18px; }
.lib-section-name { display: flex; align-items: center; gap: 14px; font-family: var(--grotesque); font-size: var(--t-label); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ash); padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.lib-section-name::before { content: ''; width: 34px; height: 2px; background: var(--gold-d10); flex: none; }
.lib-docs { display: grid; }
.lib-doc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px clamp(28px, 4vw, 64px); padding: 28px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.lib-doc-head { display: grid; gap: 8px; }
.lib-title { font-size: 23px; font-weight: 500; line-height: 1.22; color: var(--ink); text-wrap: balance; }
.lib-note { font-size: var(--t-small); font-style: italic; color: var(--umber); }
.lib-doc-acts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 4px; }

.lib-holdings { display: grid; }
.lib-holding { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) auto; gap: 6px 22px; align-items: start; padding: 13px 0 13px 16px; border-left: 2px solid var(--rule); }
.lib-holding + .lib-holding { margin-top: 10px; }
/* The one place gold is used on this page: a thread beside what a party can see. */
.lib-holding[data-on] { border-left-color: var(--gold-d10); }
.lib-party { display: grid; gap: 2px; }
.lib-party-name { font-size: 19px; line-height: 1.25; color: var(--ink); }
.lib-state { display: grid; gap: 3px; }
.lib-state-line { font-family: var(--grotesque); font-size: 13.5px; font-weight: 600; letter-spacing: .01em; color: var(--ink); line-height: 1.5; }
.lib-holding:not([data-on]) .lib-state-line { color: var(--secondary); font-weight: 500; }
.lib-waiting { color: var(--magma); }
.lib-switch { padding-top: 1px; }

/* A switch: square, in ink. On is a filled track; off is an open one. The word says it as well. */
.switch { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; margin: -10px 0; padding: 0; background: none; border: 0; cursor: pointer; color: var(--ink); }
.switch-track { position: relative; width: 46px; height: 24px; border: 1.5px solid var(--ash); border-radius: var(--radius); background: transparent; transition: background-color .16s ease, border-color .16s ease; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 1.5px; background: var(--ash); transition: transform .16s ease, background-color .16s ease; }
.switch[aria-checked='true'] .switch-track { background: var(--ink); border-color: var(--ink); }
.switch[aria-checked='true'] .switch-thumb { transform: translateX(22px); background: var(--page); }
.switch:hover .switch-track { border-color: var(--ink); }
.switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.switch-word { min-width: 2.2em; font-family: var(--grotesque); font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--secondary); text-align: left; }
.switch[aria-checked='true'] .switch-word, .lib-holding[data-on] .switch-word.fixed { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .switch-track, .switch-thumb { transition: none; } }

/* Preparing pages: one line saying where it has got to, and a hairline that fills. */
.lib-progress { display: grid; gap: 10px; }
.lib-bar { height: 2px; background: var(--rule); }
.lib-bar span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s ease; }

/* Adding a document. */
.lib-add { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px 32px; align-items: start; }
.lib-add-file { display: grid; gap: 16px; }
.lib-chooser { display: grid; gap: 12px; justify-items: start; }
.lib-chooser .btn { cursor: pointer; }
.lib-chooser input:focus-visible + .btn { outline: 2px solid var(--ink); outline-offset: 3px; }
.lib-preview { display: none; border: 1px solid var(--rule); background: var(--panel); padding: 10px; }
.lib-preview[data-shown] { display: block; }
.lib-first-page { display: block; width: 100%; height: auto; background: #FFFFFF; }
.lib-add-fields { display: grid; gap: 16px; }
.lib-give { border: 0; border-top: 1px solid var(--rule); margin: 0; padding: 18px 0 0; display: grid; gap: 12px; min-width: 0; }
.lib-give legend { padding: 0; float: left; width: 100%; font-family: var(--grotesque); font-size: var(--t-meta); font-weight: 600; color: var(--ink); }
.lib-give legend + * { clear: both; }

@media (max-width: 900px) {
  .lib-doc { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .lib-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib-summary li { padding-right: 10px; }
  .lib-tools { display: grid; grid-template-columns: minmax(0, 1fr); }
  .lib-tools .btn { width: 100%; }
  .lib-filter { min-width: 0; }
  .lib-title { font-size: 21px; }
  .lib-holding { grid-template-columns: minmax(0, 1fr) auto; }
  .lib-party { grid-column: 1; }
  .lib-state { grid-column: 1; grid-row: 2; }
  .lib-switch { grid-column: 2; grid-row: 1 / span 2; }
  .switch-word { display: none; }
  .lib-add { grid-template-columns: minmax(0, 1fr); }
  .lib-preview { max-width: 180px; }
}
