/* The key ceremony's page (ceremony.html): style.css's colours and header, and this page's own parts. */
a.brand { color: inherit; text-decoration: none; }
.cer { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.cer > section { min-width: 0; }
.cer code { font-size: .92em; color: var(--text); }
.cer h2 { font-size: 26px; }
.sec-sub { color: var(--muted); margin: 6px 0 16px; max-width: 760px; }
.cer-sec { margin-top: 56px; }
.cer-sec > h2 + .cards, .cer-sec > h2 + .tbl-wrap { margin-top: 16px; }

/* the top */
.cer-hero { padding: 36px 0 0; }
.cer-hero h1 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.05; font-weight: 800; max-width: 820px; }
.cer-hero h1 span { background: linear-gradient(90deg, var(--ok), rgb(122 200 255)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cer-hero .lede { font-size: 16.5px; max-width: 780px; margin-top: 14px; }
.plan-note { margin: 18px 0 0; padding: 12px 16px; border-radius: 12px; border: 1px solid rgb(255 184 48 / .4); background: rgb(255 184 48 / .08); color: rgb(255 214 140); max-width: 820px; font-size: 14.5px; }
.plan-note a { color: rgb(255 214 140); }
.plan-note code { color: inherit; }

/* the chip, at each stage */
.life { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.life li { position: relative; padding: 14px 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgb(24 28 36 / .75); text-align: center; }
.life li.perm { border-color: rgb(255 92 84 / .45); }
.life li + li::before { content: "→"; position: absolute; left: -16px; top: 38%; color: var(--faint); font-size: 15px; }
.life svg { display: block; width: 100%; max-width: 128px; height: auto; margin: 0 auto 8px; }
.life b { display: block; font-size: 14px; }
.life small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 3px; }
.tag { display: inline-block; font: 700 11px/1 var(--mono); padding: 4px 6px 3px; border-radius: 6px; background: var(--raised); color: var(--text); margin-right: 7px; vertical-align: 2px; }
.tag.red { background: var(--bad-bar); color: #fff; }

.chip .pin { fill: #8b929c; }
.chip .pkg { fill: #1a1e25; stroke: var(--line); }
.chip .pkg-t { fill: var(--faint); font: 700 9px var(--mono); letter-spacing: .08em; text-anchor: middle; }
.chip .z, .chip .t { fill: none; stroke: var(--faint); stroke-dasharray: 3 2; }
.chip .z-t { fill: var(--muted); font: 600 9px system-ui, sans-serif; }
.chip .t-n { fill: var(--faint); font: 700 8px var(--mono); text-anchor: middle; }
.chip .rec { display: none; }
.chip .lk { fill: var(--faint); }
.chip .sh { fill: none; stroke: var(--faint); stroke-width: 1.6; }
.chip .sh-shut { display: none; }
/* rules locked: the config is set and its padlock shut; the slots are defined, still empty */
.chip:not(.st-factory) .cfg { fill: var(--raised); stroke: var(--line); stroke-dasharray: none; }
.chip:not(.st-factory) .cfg-lock .sh-open { display: none; }
.chip:not(.st-factory) .cfg-lock .sh-shut { display: inline; stroke: var(--text); }
.chip:not(.st-factory) .cfg-lock .lk { fill: var(--text); }
.chip:not(.st-factory) .t { stroke: var(--line); stroke-dasharray: none; }
/* data locked: zeros, the record, slot 8; slot 0 waits for a key */
.st-data .t.d, .st-key .t.d, .st-sealed .t.d { fill: var(--raised); stroke: none; }
.st-data .t.s8, .st-key .t.s8, .st-sealed .t.s8,
.st-data .otp, .st-key .otp, .st-sealed .otp { fill: rgb(122 146 255 / .3); stroke: var(--accent); stroke-dasharray: none; }
.st-data .rec, .st-key .rec, .st-sealed .rec { display: inline; fill: var(--text); font-family: var(--mono); }
.st-data .data-lock .sh-open, .st-key .data-lock .sh-open, .st-sealed .data-lock .sh-open { display: none; }
.st-data .data-lock .sh-shut, .st-key .data-lock .sh-shut, .st-sealed .data-lock .sh-shut { display: inline; stroke: var(--text); }
.st-data .data-lock .lk, .st-key .data-lock .lk, .st-sealed .data-lock .lk { fill: var(--text); }
.st-data .t.s0 { stroke: var(--ok); stroke-dasharray: 3 2; }
.st-data .n0 { fill: var(--ok); }
/* the key, then sealed */
.st-key .t.s0, .st-sealed .t.s0 { fill: var(--ok); stroke: var(--ok); }
.st-key .n0, .st-sealed .n0 { fill: #061e0c; }
.st-sealed .t.s0 { stroke: #fff; stroke-width: 2; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.cards.two-up { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
#keyc .tbl-wrap, #drill { margin-top: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.card h4 { margin: 0 0 8px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card p + p { margin-top: 8px; }
.trust .who { display: inline-block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.trust.yes .who { color: var(--ok); }
.trust.no .who { color: var(--faint); }
.trust.yes { border-top: 3px solid rgb(52 199 89 / .6); }
.perm-card { border-color: rgb(255 92 84 / .45); background: linear-gradient(140deg, rgb(200 38 38 / .1), var(--surface) 60%); }
ol.plain, ul.plain { margin: 6px 0 0; padding-left: 20px; color: var(--muted); font-size: 14.5px; display: flex; flex-direction: column; gap: 6px; }
ul.plain b, ol.plain b { color: var(--text); }
.card ul.plain + p { margin-top: 10px; }
#short .fine { font-size: 14px; margin-top: 12px; max-width: 820px; }

/* the steps */
.part-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.part-head p { color: var(--muted); margin: 0; }
.part-n { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; color: #0b0d14; background: var(--accent); padding: 4px 9px; border-radius: 999px; }
.part-n.opt { background: var(--raised); color: var(--text); }
.step { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 26px; padding: 18px; margin-bottom: 14px; border-radius: var(--r); border: 1px solid var(--line); background: rgb(24 28 36 / .7); align-items: start; }
.step.perm { border-color: rgb(255 92 84 / .5); background: linear-gradient(140deg, rgb(200 38 38 / .12), rgb(24 28 36 / .7) 55%); }
.step-k { margin: 2px 0 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.step.perm .step-k { color: var(--bad); }
h3.step-title { font-size: 21px; text-transform: none; letter-spacing: -.01em; color: var(--text); font-weight: 750; margin-bottom: 8px; }
.step-text > p { margin: 0 0 8px; color: var(--text); }
.step-text .fine { color: var(--faint); }
.step dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 12px 0 0; font-size: 14.5px; }
.step dt { color: var(--muted); font-weight: 600; }
.step dd { margin: 0; color: var(--muted); }
.screens { display: grid; gap: 12px; }
.screen { margin: 0; padding: 10px; background: #050608; border-radius: 14px; border: 1px solid #000; box-shadow: 0 0 0 1px rgb(255 255 255 / .05), 0 8px 24px rgb(0 0 0 / .3); }
.screen img { display: block; width: 100%; height: auto; border-radius: 2px; }
.screen figcaption { color: var(--faint); font-size: 12.5px; line-height: 1.4; margin: 8px 2px 0; }
.screen.small { width: 72%; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.pair.tight { gap: 10px; margin-top: 14px; }

/* keycaps */
.kbd { display: inline-block; font: 700 14px/1 var(--mono); padding: 6px 10px 5px; border-radius: 7px; background: var(--raised); color: var(--text); border-bottom: 2px solid #15181e; }
.kbd.del { background: var(--bad-bar); color: #fff; border-bottom-color: #7d1717; }
.kbd.sm { font-size: 12px; padding: 3px 6px 2px; vertical-align: 1px; }

/* tables and bytes */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { color: var(--muted); font-weight: 650; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.tbl td { color: var(--muted); }
.tbl td:first-child { color: var(--text); white-space: nowrap; font-weight: 600; }
.tbl td b { color: var(--text); }
.sw { display: inline-block; width: 12px; height: 9px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }
.sw.s0 { background: var(--ok); }
.sw.s8 { background: rgb(122 146 255 / .5); border: 1px solid var(--accent); }
.sw.d { background: var(--raised); }
.hex-box { margin-top: 12px; }
.hex-box summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; }
.hex { font: 12.5px/1.65 var(--mono); color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; margin: 10px 0 0; }
.hex b { font-weight: 700; }
.hex .h0 { color: var(--ok); }
.hex .h8 { color: var(--accent); }
.hex i { color: var(--faint); font-style: normal; }
#record { margin-top: 18px; }
#emu .btn { display: inline-block; margin-top: 16px; text-decoration: none; }

/* a branded key */
.brand-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 26px; align-items: start; margin-bottom: 16px; }
.brand-text > p { margin: 0 0 10px; }
.brand-text ul.plain { gap: 10px; }
.label { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; background: #f3f0e8; color: #15171b; border-radius: 10px; padding: 14px 16px; max-width: 440px; box-shadow: 0 12px 30px rgb(0 0 0 / .35); }
.label img { width: 96px; height: 96px; image-rendering: pixelated; border-radius: 4px; display: block; }
.label > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.label-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #555a62; }
.label b { font: 800 30px/1.05 var(--mono); }
.label .mono { font: 12px var(--mono); color: #3d4148; }
.label-warn { font-size: 13px; font-weight: 700; margin-top: 4px; }
.verdict-line { margin: 16px 0 0; padding: 14px 18px; border-radius: 12px; border: 1px solid rgb(122 146 255 / .4); background: rgb(122 146 255 / .07); color: var(--muted); }
.verdict-line b { color: var(--text); }

/* what ran, and what's next */
.when { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 12px; }
.when li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.when time { font: 700 13px var(--mono); color: var(--ok); padding-top: 2px; }
.when div { color: var(--muted); font-size: 14.5px; }
.when b { color: var(--text); }
.todo { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: todo; display: flex; flex-direction: column; gap: 8px; }
.todo li { counter-increment: todo; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: baseline; color: var(--muted); font-size: 14.5px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgb(24 28 36 / .6); }
.todo li::before { content: counter(todo); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 12.5px; background: var(--raised); color: var(--muted); align-self: center; }
.todo li.done::before { content: "✓"; background: var(--ok); color: #061e0c; }
.todo b { color: var(--text); }
.buy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; margin-top: 22px; padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); align-items: center; }
.buy h4 { margin: 0 0 6px; font-size: 16px; }
.buy p { margin: 0; color: var(--muted); font-size: 14.5px; }

@media (max-width: 980px) {
  .life { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .life li + li::before { display: none; }
  .step, .brand-grid, .buy { grid-template-columns: minmax(0, 1fr); }
  .step .screens { max-width: 520px; }
}
@media (max-width: 760px) {
  .cer { padding: 0 16px; }
  .cer-links { display: flex; gap: 14px; }
  .cer-links a:not(:first-child) { display: none; }
  .cer-sec { margin-top: 42px; }
  .cer h2 { font-size: 22px; }
  .life { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .screen.small { width: 100%; }
  .step { padding: 14px; gap: 16px; }
  .step dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .step dd { margin-bottom: 8px; }
  .when li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .label b { font-size: 26px; }
}
