@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("fonts/BarlowCondensed-Black.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SourceSerif4-Regular.woff2") format("woff2");
}

:root {
  --ink: #111111;
  --ink-soft: #454545;
  --paper: #f1f2ed;
  --white: #ffffff;
  --line: #bfc2ba;
  --line-dark: #777b73;
  --blue: #1546d2;
  --blue-dark: #0a2a82;
  --yellow: #f5d31f;
  --red: #d43722;
  --green: #187657;
  --display: "Barlow Condensed", "Arial Narrow", "Arial Black", sans-serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Charter, Georgia, "Times New Roman", serif;
  --mono: "Courier New", Courier, monospace;
  --shell: 1260px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.58;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::selection {
  color: var(--ink);
  background: var(--yellow);
}

a {
  color: inherit;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  margin-bottom: 14px;
  line-height: 1.04;
  letter-spacing: 0;
}

h1,
h2 {
  font-family: var(--display);
}

h3,
h4 {
  font-family: var(--sans);
}

h2 {
  max-width: 760px;
  font-size: 3.25rem;
}

h3 {
  font-size: 1.42rem;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  font-family: var(--sans);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 4px;
}

.content-shell {
  width: min(calc(100% - 48px), var(--shell));
  margin-inline: auto;
}

/* Header */

.topbar {
  position: sticky;
  z-index: 100;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  min-height: var(--header-height);
  padding: 7px max(24px, calc((100vw - var(--shell)) / 2));
  color: var(--ink);
  background: var(--white);
  border-bottom: 3px solid var(--ink);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-family: var(--sans);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 900;
}

.brand > span:last-child {
  display: flex;
  gap: 5px;
  align-items: baseline;
  white-space: nowrap;
}

.brand strong {
  font-size: 0.86rem;
}

.brand small {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
}

.topbar nav {
  display: flex;
  gap: 23px;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
}

.topbar nav a {
  padding: 6px 0 3px;
  border-bottom: 3px solid transparent;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.topbar nav a:hover,
.topbar nav a:focus-visible {
  border-color: var(--blue);
}

.header-action {
  padding: 9px 12px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 900;
  text-decoration: none;
}

.header-action:hover {
  color: var(--white);
  background: var(--blue);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: var(--white);
  border: 2px solid var(--ink);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

/* Opening */

.console-intro {
  color: var(--white);
  background: var(--blue);
  border-bottom: 3px solid var(--ink);
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  min-height: 610px;
  border-right: 1px solid rgba(255, 255, 255, 0.35);
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.intro-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 48px 54px 44px;
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 40px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.intro-meta span {
  padding: 3px 14px 3px 0;
  margin-right: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.55);
}

.intro-meta span:last-child {
  border-right: 0;
}

.console-intro h1 {
  display: flex;
  flex-direction: column;
  margin: 0 0 30px;
  font-size: 5.4rem;
  line-height: 0.88;
  text-transform: uppercase;
}

.console-intro h1 strong {
  color: var(--yellow);
  font-family: var(--display);
  font-size: 6.6rem;
  font-weight: 900;
}

.intro-lede {
  max-width: 610px;
  margin: auto 0 24px;
  font-size: 1.28rem;
  line-height: 1.45;
}

.intro-start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 2px solid var(--white);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.intro-start span:last-child {
  color: var(--yellow);
  font-size: 1.5rem;
}

.trust-map {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 48px 46px 34px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.trust-map figcaption {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 18px;
  align-items: start;
  font-family: var(--sans);
}

.trust-map figcaption span {
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 900;
}

.trust-map figcaption strong {
  max-width: 340px;
  font-size: 1.05rem;
  line-height: 1.3;
}

.trust-map-plot {
  position: relative;
  flex: 1;
  min-height: 410px;
  margin: 20px 0 16px;
}

.map-core {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 154px;
  height: 154px;
  place-content: center;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 50%;
  text-align: center;
  transform: translate(-50%, -50%);
}

.map-core small,
.map-core b {
  font-family: var(--mono);
  font-size: 0.58rem;
}

.map-core strong {
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
}

.map-label {
  position: absolute;
  z-index: 2;
  padding: 4px 0;
  border-bottom: 2px solid var(--white);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 900;
}

.map-owner { top: 7%; left: 5%; }
.map-policy { top: 8%; right: 3%; }
.map-audit { right: 0; bottom: 10%; }
.map-app { bottom: 8%; left: 3%; }
.map-data { top: 47%; right: 1%; }

.map-line {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 42%;
  height: 1px;
  background: rgba(255, 255, 255, 0.72);
  transform-origin: left center;
}

.map-line::after {
  position: absolute;
  right: 0;
  width: 9px;
  height: 9px;
  content: "";
  background: var(--red);
  border: 2px solid var(--white);
  border-radius: 50%;
  transform: translateY(-4px);
}

.line-owner { transform: rotate(216deg); }
.line-policy { transform: rotate(318deg); }
.line-audit { transform: rotate(37deg); }
.line-app { transform: rotate(142deg); }
.line-data { width: 36%; transform: rotate(0deg); }

.trust-map-note {
  max-width: 420px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  line-height: 1.42;
}

.opening-register {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  color: var(--ink);
  background: var(--white);
  border: 3px solid var(--ink);
  border-bottom: 0;
}

.opening-register p {
  display: grid;
  min-height: 126px;
  padding: 15px 17px;
  margin: 0;
  border-right: 1px solid var(--ink);
}

.opening-register p:last-child {
  border-right: 0;
}

.opening-register span,
.opening-register small {
  font-family: var(--mono);
  font-size: 0.64rem;
}

.opening-register span {
  color: var(--blue);
  font-weight: 900;
}

.opening-register strong {
  align-self: end;
  font-family: var(--sans);
  font-size: 1rem;
}

.opening-register small {
  color: var(--ink-soft);
}

/* Shared editorial structure */

.section {
  padding: 100px 0 112px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 70px;
  align-items: end;
  padding-top: 18px;
  margin-bottom: 58px;
  border-top: 4px solid var(--ink);
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-heading > p {
  max-width: 440px;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.section-index,
.tool-label,
.detail-label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.section-index {
  margin-bottom: 15px !important;
  color: var(--blue);
}

.light-heading {
  border-color: currentColor;
}

.light-heading,
.light-heading > p {
  color: var(--white);
}

.light-heading .section-index {
  color: var(--yellow);
}

.button,
.icon-button {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.button {
  padding: 10px 15px;
}

.button-primary {
  color: var(--white);
  background: var(--blue);
}

.button-primary:hover {
  color: var(--ink);
  background: var(--yellow);
}

.button-secondary {
  color: var(--ink);
  background: var(--white);
}

.button-secondary:hover {
  color: var(--white);
  background: var(--ink);
}

.icon-button {
  width: 44px;
  padding: 0;
  color: var(--ink);
  background: var(--yellow);
  font-size: 1.2rem;
}

.icon-button:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

/* Inventory */

.inventory-section {
  background: var(--white);
}

.inventory-baseline {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 24px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.inventory-baseline span {
  padding: 11px 8px;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 900;
  text-align: center;
}

.inventory-baseline span:last-child {
  border-right: 0;
}

.inventory-workbench,
.decision-tool,
.envelope-tool,
.rotation-checklist,
.incident-timeline {
  min-width: 0;
  max-width: 100%;
}

.inventory-workbench {
  border-top: 8px solid var(--blue);
  border-bottom: 2px solid var(--ink);
}

.tool-heading {
  display: flex;
  gap: 28px;
  align-items: start;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--ink);
}

.tool-heading h3 {
  margin-bottom: 0;
}

.tool-heading > p {
  max-width: 370px;
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.tool-label,
.detail-label {
  margin-bottom: 8px;
  color: var(--blue);
}

#inventory-form {
  padding: 28px 0 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 28px;
}

.field-grid label,
.placement-controls label {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.field-grid input,
.field-grid select,
.placement-controls select {
  width: 100%;
  min-height: 46px;
  padding: 9px 4px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 500;
  text-transform: none;
}

.field-grid input:focus,
.field-grid select:focus,
.placement-controls select:focus {
  background: #fff9ce;
  outline: 0;
}

.wide-field {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 25px 0;
}

#inventory-status {
  margin-left: 8px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
}

.inventory-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border-top: 2px solid var(--ink);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  font-family: var(--sans);
  font-size: 0.78rem;
}

.status-badge {
  display: inline-block;
  padding: 2px 0;
  color: var(--green);
  border-bottom: 2px solid currentColor;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 900;
}

.status-badge.is-warning {
  color: #7a5a00;
}

.status-badge.is-revoked {
  color: var(--red);
}

.remove-record {
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--red);
  background: transparent;
  border: 0;
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
}

.tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 18px;
}

.tool-footer p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 900;
}

.tool-footer > div {
  display: flex;
  gap: 8px;
}

.key-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
  margin-top: 78px;
  border-bottom: 2px solid var(--ink);
}

.key-type-grid article {
  display: grid;
  grid-template-columns: 64px minmax(0, 0.6fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 22px 0;
  border-top: 1px solid var(--ink);
}

.key-type-grid span {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 900;
}

.key-type-grid h3,
.key-type-grid p {
  margin: 0;
}

.key-type-grid h3 {
  font-size: 1.05rem;
}

.key-type-grid p {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.distinction-note {
  display: grid;
  grid-template-columns: minmax(200px, 0.45fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  margin-top: 70px;
  padding: 26px 0 0 24px;
  border-top: 2px solid var(--ink);
  border-left: 12px solid var(--yellow);
}

.distinction-note strong {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.05;
}

.distinction-note p {
  margin: 0;
}

/* Lifecycle */

.lifecycle-section {
  color: var(--white);
  background: var(--ink);
}

.lifecycle-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin-bottom: 34px;
  border-top: 2px solid var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}

.lifecycle-map button {
  min-height: 92px;
  padding: 16px 8px 13px;
  color: var(--white);
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: left;
}

.lifecycle-map button:last-child {
  border-right: 0;
}

.lifecycle-map button span {
  display: block;
  margin-bottom: 18px;
  color: #a6aaa4;
  font-family: var(--mono);
  font-size: 0.62rem;
}

.lifecycle-map button[aria-selected="true"] {
  color: var(--ink);
  background: var(--yellow);
}

.lifecycle-map button[aria-selected="true"] span {
  color: var(--blue-dark);
}

.lifecycle-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(150px, 0.55fr) minmax(150px, 0.55fr) minmax(210px, 0.75fr);
  gap: 0;
  border-top: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}

.lifecycle-detail > div {
  min-width: 0;
  padding: 25px 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.32);
}

.lifecycle-detail > div:first-child {
  padding-left: 0;
}

.lifecycle-detail > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.lifecycle-detail .tool-label,
.lifecycle-detail .detail-label {
  color: var(--yellow);
}

.lifecycle-detail h3 {
  font-family: var(--display);
  font-size: 1.8rem;
}

.lifecycle-detail p {
  margin-bottom: 0;
  color: #d8dbd5;
  font-size: 0.9rem;
}

.stage-question {
  display: flex;
  gap: 14px;
  align-items: start;
}

.stage-question span {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 50%;
  font-family: var(--display);
}

.ownership-map {
  display: grid;
  grid-template-columns: minmax(230px, 0.38fr) minmax(0, 1fr);
  gap: 52px;
  margin-top: 62px;
  padding-top: 18px;
  border-top: 4px solid var(--white);
}

.ownership-map .tool-label {
  color: var(--yellow);
}

.ownership-map table {
  color: var(--white);
}

.ownership-map th,
.ownership-map td {
  border-color: #5f625e;
}

/* Storage */

.storage-section {
  background: var(--paper);
}

.storage-matrix {
  border-top: 4px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.storage-matrix article {
  display: grid;
  grid-template-columns: 130px minmax(160px, 0.45fr) minmax(0, 1fr) minmax(220px, 0.55fr);
  gap: 28px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-dark);
}

.storage-matrix article:last-child {
  border-bottom: 0;
}

.storage-matrix span,
.storage-matrix small {
  font-family: var(--mono);
  font-size: 0.68rem;
}

.storage-matrix span {
  color: var(--blue);
  font-weight: 900;
}

.storage-matrix h3,
.storage-matrix p,
.storage-matrix small {
  margin: 0;
}

.storage-matrix h3 {
  font-size: 1.25rem;
}

.storage-matrix p {
  font-size: 0.9rem;
}

.storage-matrix small {
  color: var(--ink-soft);
  line-height: 1.55;
}

.decision-tool {
  margin-top: 78px;
  padding: 0 34px 34px;
  color: var(--white);
  background: var(--blue);
  border-top: 10px solid var(--yellow);
}

.decision-tool .tool-heading {
  border-color: rgba(255, 255, 255, 0.6);
}

.decision-tool .tool-heading > p,
.decision-tool .tool-label {
  color: var(--white);
}

.placement-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
  padding: 30px 0;
}

.placement-controls select {
  color: var(--white);
  border-color: var(--white);
}

.placement-controls select:focus {
  color: var(--ink);
}

.placement-result {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 32px;
  padding-top: 26px;
  border-top: 2px solid var(--white);
}

.placement-result > span {
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 900;
}

.placement-result h4 {
  margin-bottom: 9px;
  font-family: var(--display);
  font-size: 1.55rem;
}

.placement-result p {
  max-width: 760px;
  margin: 0;
}

.risk-banner {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 22px;
  align-items: start;
  margin-top: 50px;
  padding-top: 18px;
  border-top: 4px solid var(--red);
}

.risk-banner > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border-radius: 50%;
  font-family: var(--display);
}

.risk-banner p {
  margin: 0;
}

/* Envelope encryption */

.envelope-section {
  background: var(--white);
}

.envelope-tool {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr);
  border-top: 5px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.envelope-visual {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  min-height: 410px;
  padding: 42px 32px 112px 0;
}

.data-object,
.dek-object,
.cipher-object {
  display: grid;
  aspect-ratio: 1;
  place-content: center;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  text-align: center;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.data-object span,
.dek-object span,
.cipher-object span {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 900;
}

.data-object strong,
.dek-object strong,
.cipher-object strong {
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.2;
}

.dek-object {
  color: var(--ink);
  background: var(--yellow);
}

.crypto-operation {
  color: var(--blue);
  font-family: var(--display);
  font-size: 2.25rem;
}

.kek-path {
  position: absolute;
  right: 36px;
  bottom: 30px;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  padding-top: 14px;
  border-top: 4px solid var(--blue);
  font-family: var(--sans);
  font-size: 0.72rem;
}

.kek-path span:last-child {
  text-align: right;
}

.kek-path strong {
  color: var(--blue);
}

.envelope-panel {
  display: flex;
  flex-direction: column;
  padding: 36px 32px;
  color: var(--ink);
  background: var(--yellow);
  border-left: 3px solid var(--ink);
}

.envelope-panel .tool-label {
  color: var(--blue-dark);
}

.envelope-panel h3 {
  font-family: var(--display);
  font-size: 1.9rem;
}

.envelope-panel p:not(.tool-label) {
  font-size: 0.94rem;
}

.step-controls {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
}

.step-controls .icon-button {
  background: var(--white);
}

.envelope-visual[data-step="2"] .data-object,
.envelope-visual[data-step="3"] .dek-object,
.envelope-visual[data-step="4"] .cipher-object {
  color: var(--white);
  background: var(--blue);
  transform: scale(1.06);
}

.envelope-visual[data-step="2"] .data-object span,
.envelope-visual[data-step="3"] .dek-object span,
.envelope-visual[data-step="4"] .cipher-object span {
  color: var(--yellow);
}

.separation-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 42px;
  margin-top: 68px;
}

.separation-points article {
  padding-top: 17px;
  border-top: 3px solid var(--ink);
}

.separation-points article:nth-child(2) {
  border-color: var(--blue);
}

.separation-points article:nth-child(3) {
  border-color: var(--red);
}

.separation-points h3 {
  font-size: 1.15rem;
}

.separation-points p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* Rotation */

.rotation-section {
  color: var(--ink);
  background: var(--yellow);
}

.rotation-section .light-heading,
.rotation-section .light-heading > p {
  color: var(--ink);
}

.rotation-section .light-heading .section-index {
  color: var(--blue);
}

.rotation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  gap: 56px;
  align-items: start;
}

.rotation-checklist {
  background: var(--white);
  border-top: 8px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.rotation-checklist .tool-heading {
  padding-inline: 24px;
}

.rotation-checklist output {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 900;
}

.progress-track {
  height: 9px;
  background: #d7d8d2;
  border-bottom: 1px solid var(--ink);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blue);
  transition: width 160ms ease;
}

.rotation-checklist > label {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 13px;
  align-items: start;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.86rem;
}

.rotation-checklist > label:last-child {
  border-bottom: 0;
}

.rotation-checklist input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

.rotation-notes {
  display: grid;
  gap: 40px;
}

.rotation-notes article {
  padding-top: 18px;
  border-top: 5px solid var(--ink);
}

.rotation-notes h3 {
  font-family: var(--display);
  font-size: 1.9rem;
}

.overlap-track {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin: 25px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.overlap-track span {
  padding: 10px 7px;
  border-right: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.61rem;
  font-weight: 900;
  text-align: center;
}

.overlap-track span:last-child {
  border-right: 0;
}

.overlap-track .overlap {
  color: var(--white);
  background: var(--blue);
}

.urgent-note {
  padding: 20px !important;
  color: var(--white);
  background: var(--red);
  border-top-color: var(--ink) !important;
}

.urgent-note .tool-label {
  color: var(--white);
}

.urgent-note p:last-child {
  margin-bottom: 0;
}

/* Incident */

.incident-section {
  background: var(--white);
}

.incident-timeline {
  border-top: 6px solid var(--red);
  border-bottom: 2px solid var(--ink);
}

.incident-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 2px solid var(--ink);
}

.incident-tabs button {
  min-height: 78px;
  padding: 14px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: left;
}

.incident-tabs button:last-child {
  border-right: 0;
}

.incident-tabs button span {
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.incident-tabs button[aria-selected="true"] {
  color: var(--white);
  background: var(--red);
}

.incident-tabs button[aria-selected="true"] span {
  color: var(--white);
}

.incident-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 58px;
  padding: 34px 0;
}

.incident-detail h3 {
  font-family: var(--display);
  font-size: 2rem;
}

.incident-detail p {
  margin-bottom: 0;
}

.incident-detail ul {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: incident-actions;
}

.incident-detail li {
  position: relative;
  padding: 10px 0 10px 42px;
  border-top: 1px solid var(--ink);
  counter-increment: incident-actions;
  font-family: var(--sans);
  font-size: 0.85rem;
}

.incident-detail li::before {
  position: absolute;
  left: 0;
  color: var(--red);
  content: counter(incident-actions, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
}

.response-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 58px;
  margin-top: 72px;
  border-bottom: 2px solid var(--ink);
}

.response-controls article {
  display: grid;
  grid-template-columns: 110px minmax(180px, 0.55fr) minmax(0, 1fr);
  gap: 22px;
  padding: 20px 0;
  border-top: 1px solid var(--ink);
}

.response-controls span {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 900;
}

.response-controls h3,
.response-controls p {
  margin: 0;
}

.response-controls h3 {
  font-size: 1.06rem;
}

.response-controls p {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

/* Failure patterns */

.failures-section {
  color: var(--white);
  background: var(--blue);
}

.failure-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 90px;
  align-items: start;
}

.failure-layout > div {
  position: sticky;
  top: calc(var(--header-height) + 30px);
  padding-top: 18px;
  border-top: 4px solid var(--white);
}

.failure-layout .section-index {
  color: var(--yellow);
}

.failure-layout h2 {
  font-size: 3.75rem;
}

.failure-layout > div > p:last-child {
  max-width: 440px;
  margin-bottom: 0;
}

.failure-list {
  margin: 0;
  padding: 0;
  border-bottom: 2px solid var(--white);
  list-style: none;
}

.failure-list li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 18px;
  padding: 23px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.75);
}

.failure-list > li > span {
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 900;
}

.failure-list strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--sans);
  font-size: 1.08rem;
}

.failure-list p {
  margin: 0;
  color: #dce4ff;
  font-size: 0.9rem;
}

/* Playbooks */

.playbooks-section {
  background: var(--paper);
}

.playbook-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 3px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.playbook-tabs button {
  min-height: 72px;
  padding: 12px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.73rem;
  font-weight: 900;
  text-align: left;
}

.playbook-tabs button:last-child {
  border-right: 0;
}

.playbook-tabs button[aria-selected="true"] {
  color: var(--white);
  background: var(--ink);
  box-shadow: inset 0 -7px 0 var(--yellow);
}

.playbook-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 70px;
  padding: 42px 0 0;
}

.playbook-detail h3 {
  font-family: var(--display);
  font-size: 2.1rem;
}

.playbook-detail > div > p:last-child {
  margin-bottom: 0;
}

.playbook-detail dl {
  margin: 0;
  border-bottom: 2px solid var(--ink);
}

.playbook-detail dl > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 22px;
  padding: 17px 0;
  border-top: 1px solid var(--ink);
}

.playbook-detail dt {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.playbook-detail dd {
  margin: 0;
  font-size: 0.9rem;
}

/* Sources */

.resources-section {
  color: var(--white);
  background: var(--ink);
}

.resource-grid {
  border-top: 4px solid var(--white);
  border-bottom: 2px solid var(--white);
}

.resource-grid a {
  position: relative;
  display: grid;
  grid-template-columns: 160px minmax(230px, 0.55fr) minmax(0, 1fr) 34px;
  gap: 28px;
  align-items: start;
  padding: 23px 0;
  border-bottom: 1px solid #686868;
  text-decoration: none;
}

.resource-grid a:last-child {
  border-bottom: 0;
}

.resource-grid a:hover {
  color: var(--yellow);
}

.resource-grid span {
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 900;
}

.resource-grid strong {
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.25;
}

.resource-grid p {
  margin: 0;
  color: #cfd0cc;
  font-size: 0.88rem;
}

.resource-grid i {
  color: var(--yellow);
  font-family: var(--sans);
  font-size: 1.3rem;
  font-style: normal;
  text-align: right;
}

.review-note {
  max-width: 900px;
  margin: 40px 0 0;
  color: #bfc1bb;
  font-family: var(--sans);
  font-size: 0.78rem;
}

/* Footer */

footer {
  color: var(--ink);
  background: var(--yellow);
  border-top: 3px solid var(--ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) 0.55fr 0.75fr minmax(250px, 0.9fr);
  gap: 42px;
  padding-top: 48px;
  padding-bottom: 42px;
}

.footer-grid > div {
  display: flex;
  flex-direction: column;
  align-items: start;
}

.footer-grid > div > strong,
.footer-grid > div > a:not(.brand) {
  font-family: var(--sans);
  font-size: 0.78rem;
}

.footer-grid > div > strong {
  margin-bottom: 12px;
}

.footer-grid > div > a:not(.brand) {
  margin-bottom: 7px;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.footer-brand {
  margin-bottom: 18px;
}

.footer-brand + p {
  max-width: 340px;
  margin: 0;
  font-size: 0.94rem;
}

.privacy-footer {
  padding-left: 20px;
  border-left: 4px solid var(--ink);
}

.privacy-footer span {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 900;
}

.privacy-footer p {
  margin: 9px 0 0;
  font-size: 0.86rem;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  padding-bottom: 18px;
  border-top: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.67rem;
}

.footer-bottom p {
  margin: 0;
}

/* Responsive */

@media (max-width: 1100px) {
  .topbar nav {
    gap: 14px;
  }

  .intro-layout {
    grid-template-columns: 1fr 0.85fr;
  }

  .intro-copy,
  .trust-map {
    padding-inline: 32px;
  }

  .console-intro h1 {
    font-size: 4.35rem;
  }

  .console-intro h1 strong {
    font-size: 5.2rem;
  }

  .key-type-grid article {
    grid-template-columns: 54px 1fr;
  }

  .key-type-grid article p {
    grid-column: 2;
  }

  .lifecycle-detail {
    grid-template-columns: repeat(3, 1fr);
  }

  .lifecycle-detail > div:first-child {
    grid-column: 1 / -1;
    padding-left: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  }

  .storage-matrix article {
    grid-template-columns: 100px minmax(150px, 0.45fr) minmax(0, 1fr);
  }

  .storage-matrix small {
    grid-column: 2 / -1;
  }

  .response-controls {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 0.6fr 0.8fr;
  }

  .privacy-footer {
    grid-column: 1 / -1;
    padding: 18px 0 0;
    border-top: 2px solid var(--ink);
    border-left: 0;
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 62px;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .nav-toggle {
    display: block;
    grid-column: 3;
    grid-row: 1;
  }

  .header-action {
    display: none;
  }

  .topbar nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 8px 24px 18px;
    background: var(--white);
    border-bottom: 3px solid var(--ink);
  }

  .topbar nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar nav a {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .intro-layout {
    grid-template-columns: 1fr;
    border-right: 0;
    border-left: 0;
  }

  .intro-copy {
    min-height: 580px;
    padding: 42px 0 38px;
  }

  .trust-map {
    min-height: 560px;
    padding: 40px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.45);
    border-left: 0;
  }

  .opening-register {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    overflow-x: auto;
  }

  .section {
    padding: 82px 0 90px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-heading > p {
    max-width: 680px;
  }

  .inventory-baseline,
  .lifecycle-map,
  .incident-tabs,
  .playbook-tabs {
    overflow-x: auto;
  }

  .inventory-baseline {
    grid-template-columns: repeat(7, minmax(130px, 1fr));
  }

  .lifecycle-map {
    grid-template-columns: repeat(8, minmax(120px, 1fr));
  }

  .field-grid,
  .placement-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .key-type-grid {
    grid-template-columns: 1fr;
  }

  .distinction-note,
  .ownership-map,
  .placement-result,
  .envelope-tool,
  .rotation-layout,
  .incident-detail,
  .failure-layout,
  .playbook-detail {
    grid-template-columns: 1fr;
  }

  .ownership-map {
    gap: 24px;
  }

  .storage-matrix article {
    grid-template-columns: 100px 1fr;
  }

  .storage-matrix p,
  .storage-matrix small {
    grid-column: 2;
  }

  .envelope-panel {
    min-height: 300px;
    border-top: 3px solid var(--ink);
    border-left: 0;
  }

  .incident-tabs {
    grid-template-columns: repeat(5, minmax(140px, 1fr));
  }

  .playbook-tabs {
    grid-template-columns: repeat(6, minmax(140px, 1fr));
  }

  .failure-layout {
    gap: 50px;
  }

  .failure-layout > div {
    position: static;
  }

  .resource-grid a {
    grid-template-columns: 140px minmax(220px, 0.7fr) minmax(260px, 1fr) 30px;
  }

  .resource-grid {
    overflow-x: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > div:first-child,
  .privacy-footer {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .content-shell {
    width: min(calc(100% - 28px), var(--shell));
  }

  .topbar {
    padding-inline: 14px;
  }

  .brand > span:last-child {
    display: none;
  }

  .intro-copy {
    min-height: 530px;
  }

  .intro-meta {
    margin-bottom: 32px;
  }

  .intro-meta span {
    padding-right: 9px;
    margin-right: 9px;
    font-size: 0.58rem;
  }

  .console-intro h1 {
    font-size: 3.25rem;
  }

  .console-intro h1 strong {
    font-size: 4.3rem;
  }

  .intro-lede {
    font-size: 1.08rem;
  }

  .trust-map {
    min-height: 510px;
  }

  .trust-map figcaption {
    grid-template-columns: 64px 1fr;
  }

  .trust-map-plot {
    min-height: 370px;
  }

  .map-core {
    width: 126px;
    height: 126px;
  }

  .map-data {
    top: 52%;
  }

  h2,
  .failure-layout h2 {
    font-size: 2.35rem;
  }

  .section {
    padding: 68px 0 76px;
  }

  .section-heading {
    margin-bottom: 40px;
  }

  .field-grid,
  .placement-controls,
  .separation-points {
    grid-template-columns: 1fr;
  }

  .wide-field {
    grid-column: auto;
  }

  .tool-heading,
  .tool-footer {
    align-items: start;
    flex-direction: column;
  }

  .tool-footer > div {
    width: 100%;
  }

  .tool-footer .button {
    flex: 1;
  }

  .key-type-grid {
    margin-top: 56px;
  }

  .key-type-grid article {
    grid-template-columns: 48px 1fr;
  }

  .distinction-note {
    gap: 18px;
    padding-left: 16px;
  }

  .lifecycle-detail {
    grid-template-columns: 1fr;
  }

  .lifecycle-detail > div,
  .lifecycle-detail > div:first-child,
  .lifecycle-detail > div:last-child {
    padding: 20px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  }

  .lifecycle-detail > div:last-child {
    border-bottom: 0;
  }

  .ownership-map {
    overflow-x: auto;
  }

  .ownership-map table {
    min-width: 620px;
  }

  .storage-matrix article {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .storage-matrix p,
  .storage-matrix small {
    grid-column: auto;
  }

  .decision-tool {
    padding-inline: 20px;
  }

  .placement-result {
    gap: 14px;
  }

  .envelope-visual {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-height: 520px;
    padding: 30px 0 145px;
  }

  .data-object,
  .dek-object,
  .cipher-object {
    min-width: 0;
    padding: 10px;
  }

  .cipher-object {
    grid-column: 3;
    grid-row: 2;
  }

  .envelope-visual > .crypto-operation:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
  }

  .kek-path {
    right: 0;
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .kek-path span:last-child {
    text-align: left;
  }

  .separation-points {
    gap: 30px;
  }

  .rotation-notes h3,
  .incident-detail h3,
  .playbook-detail h3 {
    font-size: 1.7rem;
  }

  .response-controls article {
    grid-template-columns: 90px 1fr;
  }

  .response-controls p {
    grid-column: 2;
  }

  .failure-list li {
    grid-template-columns: 48px 1fr;
  }

  .resource-grid a {
    grid-template-columns: 1fr 28px;
    gap: 10px 18px;
  }

  .resource-grid span,
  .resource-grid strong,
  .resource-grid p {
    grid-column: 1;
  }

  .resource-grid i {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 34px 20px;
  }

  .footer-bottom {
    display: grid;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --paper: #fff;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 10pt;
  }

  .topbar,
  .intro-start,
  .nav-toggle,
  .form-actions,
  .tool-footer,
  .step-controls,
  .playbook-tabs,
  .incident-tabs,
  footer {
    display: none !important;
  }

  .console-intro,
  .lifecycle-section,
  .failures-section,
  .resources-section,
  .rotation-section,
  .decision-tool,
  .urgent-note {
    color: #000 !important;
    background: #fff !important;
  }

  .section {
    padding: 30px 0;
    break-inside: avoid;
  }

  .intro-layout,
  .section-heading,
  .lifecycle-detail,
  .ownership-map,
  .envelope-tool,
  .rotation-layout,
  .incident-detail,
  .failure-layout,
  .playbook-detail {
    grid-template-columns: 1fr;
  }

  .trust-map {
    display: none;
  }

  .intro-copy {
    min-height: 0;
    padding: 30px 0;
  }

  .console-intro h1,
  .console-intro h1 strong,
  .section-heading,
  .section-heading > p,
  .light-heading,
  .light-heading > p,
  .failure-layout .section-index,
  .lifecycle-detail p {
    color: #000 !important;
  }

  a {
    text-decoration: none;
  }
}
