@import url("/fonts/fonts.css");

/* ---------------------------------------------------------------
   The page is laid out as a document with an apparatus column:
   a narrow left column carrying labels, statuses and short notes,
   and a wider right column carrying the text. Rows are formed by
   grid auto-placement — a column-1 item and a column-3 item sit on
   the same row. Below 900px the apparatus folds above its block.
   --------------------------------------------------------------- */

:root {
  --paper:      #FCFCFA;
  --ink:        #16181A;
  --ink-2:      #4A5056;
  --ink-3:      #767C82;
  --rule:       #D9D7D0;
  --rule-firm:  #B4B0A6;
  --accent:     #2F4858;

  --apparatus:  11rem;
  --gutter:     2.5rem;
  --measure:    33em;

  --serif: "Source Serif 4", Charter, "Bitstream Charter", Cambria, Georgia, serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.62;
  font-variation-settings: "opsz" 14;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- links ------------------------------------------------------ */

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.5px;
}
a:hover { text-decoration-thickness: 1.5px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  padding: 0.6rem 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  z-index: 10;
}
.skip:focus { left: 0; }

/* --- the sheet --------------------------------------------------- */

.sheet {
  max-width: calc(var(--apparatus) + var(--gutter) + var(--measure) + 4rem);
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

.band {
  display: grid;
  grid-template-columns: var(--apparatus) var(--gutter) minmax(0, var(--measure));
  align-items: start;
  padding-top: 3.5rem;
}

.band > * { grid-column: 3; }

/* apparatus column ------------------------------------------------ */

.label,
.note {
  grid-column: 1;
  text-align: right;
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin: 0;
  padding-top: 0.45rem;
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

.note {
  text-transform: none;
  letter-spacing: 0.02em;
}

/* text column ------------------------------------------------------ */

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.24;
  margin: 0 0 0.9rem;
  letter-spacing: -0.005em;
}

h1 {
  font-size: 2.1rem;
  font-variation-settings: "opsz" 40;
  letter-spacing: -0.015em;
}

h2 {
  font-size: 1.45rem;
  font-variation-settings: "opsz" 28;
}

h3 {
  font-size: 1.1rem;
  font-variation-settings: "opsz" 20;
  margin-bottom: 0.5rem;
}

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: 1.24rem;
  font-variation-settings: "opsz" 32;
  line-height: 1.45;
  color: var(--ink);
}

.quiet { color: var(--ink-2); }

.divider {
  grid-column: 1 / -1;
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3.5rem 0 0;
  height: 0;
}

/* --- masthead ------------------------------------------------------ */

.masthead { padding-top: 5rem; }

.masthead h1 { margin-bottom: 1.4rem; }

.standfirst {
  font-size: 1.16rem;
  font-variation-settings: "opsz" 26;
  line-height: 1.5;
}
.standfirst span { display: block; }
.standfirst span + span { margin-top: 0.35rem; }

/* --- contents ------------------------------------------------------- */

.contents {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
.contents li { border-top: 1px solid var(--rule); }
.contents li:last-child { border-bottom: 1px solid var(--rule); }
.contents a {
  display: block;
  padding: 0.5rem 0;
  text-decoration: none;
  color: var(--ink-2);
}
.contents a:hover { color: var(--accent); }

/* --- tools ----------------------------------------------------------- */

.tool { border-top: 1px solid var(--rule-firm); padding-top: 1.4rem; }
.tool + .tool { margin-top: 0; }

.tool h3 { font-size: 1.25rem; font-variation-settings: "opsz" 24; }

.tool dl { margin: 0; }
.tool dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-top: 1.05rem;
}
.tool dd { margin: 0.3rem 0 0; }

.status {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

/* --- tier table -------------------------------------------------------- */

/* The specification table is the one element allowed to break the prose
   measure: it spans the apparatus column too, because it is a table and
   needs the width. */
.tiers-wrap {
  grid-column: 1 / -1;
  overflow-x: auto;
  margin-top: 1.6rem;
}
table.tiers colgroup .c-tier { width: 9.5rem; }
table.tiers colgroup .c-assurance { width: 21rem; }

table.tiers {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  margin: 0.4rem 0 0;
}
table.tiers th, table.tiers td {
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 1rem 0.85rem 0;
  border-top: 1px solid var(--rule);
}
table.tiers thead th {
  border-top: 0;
  border-bottom: 1px solid var(--rule-firm);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  padding-bottom: 0.5rem;
}
table.tiers tbody th {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding-right: 1.4rem;
  color: var(--accent);
}
table.tiers .assurance {
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--ink-2);
}

/* --- the function-not-product block ------------------------------------ */

.core {
  grid-column: 3;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule-firm);
  padding: 1.1rem 0 1.2rem;
  margin-top: 2.2rem;
}
.core p { margin-bottom: 0; }
.core p + p { margin-top: 0.8rem; }

/* --- sequence (safe change) --------------------------------------------- */

ol.sequence {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}
ol.sequence li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  border-top: 1px solid var(--rule);
  padding: 0.95rem 0;
}
ol.sequence li::before {
  content: counter(step);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  padding-top: 0.28rem;
}
ol.sequence li:last-child { border-bottom: 1px solid var(--rule); }
/* Everything after the counter shares the second column; without this the
   paragraph wraps back into the 2.2rem number column. */
ol.sequence li > * { grid-column: 2; }
ol.sequence h3 { margin-bottom: 0.15rem; }
ol.sequence p { margin: 0; font-size: 0.97rem; }

/* --- figures (evidence page) --------------------------------------------- */

table.figures {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
  margin: 0.4rem 0 0;
}
table.figures th, table.figures td {
  text-align: left;
  vertical-align: baseline;
  padding: 0.6rem 1rem 0.6rem 0;
  border-top: 1px solid var(--rule);
}
table.figures thead th {
  border-top: 0;
  border-bottom: 1px solid var(--rule-firm);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
table.figures td.num,
table.figures th.num {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-right: 0;
  white-space: nowrap;
}
table.figures tbody th { font-weight: 400; }

code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: rgba(47, 72, 88, 0.06);
  padding: 0.1em 0.32em;
  border-radius: 2px;
}

blockquote {
  margin: 1.4rem 0;
  padding-left: 1.2rem;
  border-left: 2px solid var(--rule-firm);
  color: var(--ink-2);
}
blockquote p:last-child { margin-bottom: 0; }

/* --- footer --------------------------------------------------------------- */

.colophon {
  border-top: 1px solid var(--rule-firm);
  padding-top: 1.3rem;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.colophon .signature {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin-top: 1.6rem;
}

.standing-notice {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.7rem 0;
  margin-top: 1.6rem;
}

/* --- narrow --------------------------------------------------------------- */

@media (max-width: 900px) {
  body { font-size: 17px; }

  .tiers-wrap, .core { grid-column: 1; }
  table.tiers colgroup .c-tier,
  table.tiers colgroup .c-assurance { width: auto; }
  table.tiers { min-width: 34rem; }

  .sheet { padding: 0 1.4rem 4rem; max-width: 40rem; }

  .band {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 2.6rem;
  }
  .band > * { grid-column: 1; }

  .label, .note {
    text-align: left;
    margin-bottom: 0.7rem;
    border-top: 1px solid var(--rule);
    padding-top: 0.6rem;
  }
  .note { margin-top: 1.2rem; }
  /* The section divider already separates bands; a second rule under it
     directly above the section label reads as a mistake. */
  .band > .label:first-child { border-top: 0; padding-top: 0; }

  .masthead { padding-top: 3rem; }
  .masthead .label { border-top: 0; padding-top: 0; }

  h1 { font-size: 1.8rem; }
  .lede { font-size: 1.12rem; }

  table.tiers, table.figures { font-size: 0.88rem; }
  table.tiers tbody th { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  body { background: #fff; font-size: 11pt; }
  .contents, .skip { display: none; }
}
