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

:root {
  --paper: #f4f6f5;
  --sheet: #ffffff;
  --ink: #18283a;
  --ink-2: #4b5b6c;
  --rule: #c5d0da;
  --rule-soft: #e3e9ee;
  --stamp: #b3122e;
  --ok: #19724a;
  --warn: #8a5a00;
  --marker: #ffe25c;
  --focus: #1f5fd1;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --code: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --measure: 68ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1a24; --sheet: #16232f; --ink: #e6edf2; --ink-2: #9fb0bf; --rule: #2f4252; --rule-soft: #22313e;
    --stamp: #ff6b7f; --ok: #52c98d; --warn: #f0b64a; --marker: #6b5a00; --focus: #7aa7ff; color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); font-feature-settings: "tnum" 0; }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
code, .rid { font-family: var(--code); font-size: .88em; font-weight: 500; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 1rem; top: 1rem; background: var(--sheet); padding: .5rem 1rem; z-index: 9; }

.wrap { max-width: 72rem; margin: 0 auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

/* top bar */
.bar { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline; justify-content: space-between; padding-block: 1.1rem; border-bottom: 1px solid var(--rule); }
.brand { font: 700 1.35rem/1 var(--display); letter-spacing: .01em; text-decoration: none; }
.brand small { font: 600 .8rem/1 var(--body); color: var(--ink-2); margin-left: .5rem; letter-spacing: 0; }
.bar nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-weight: 600; font-size: .95rem; }
.bar nav a { text-decoration: none; padding-block: .25rem; }
.bar nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--ink); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); padding-block: clamp(1.5rem, 4vw, 2.75rem) 2.5rem; align-items: start; }
h1 { font: 700 clamp(2.3rem, 4.6vw, 3.6rem)/1.02 var(--display); margin: 0 0 .9rem; letter-spacing: -.005em; max-width: 22ch; text-wrap: balance; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 54ch; margin: 0 0 1.25rem; text-wrap: pretty; }
h2 { font: 700 clamp(1.6rem, 3vw, 2.15rem)/1.1 var(--display); margin: 0 0 .75rem; }
h3 { font: 600 1.25rem/1.2 var(--display); margin: 1.5rem 0 .5rem; }
p, li { max-width: var(--measure); }

/* the DIN 5008 sheet: fold marks at 105 mm / 210 mm of 297 mm, punch mark at 148.5 mm */
.sheet { position: relative; background: var(--sheet); border: 1px solid var(--rule); padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem) calc(clamp(1.25rem, 3vw, 2rem) + 14px); }
.sheet::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 14px;
  background:
    linear-gradient(var(--ink-2), var(--ink-2)) 0 35.35% / 9px 1px no-repeat,
    linear-gradient(var(--ink-2), var(--ink-2)) 0 50% / 13px 1px no-repeat,
    linear-gradient(var(--ink-2), var(--ink-2)) 0 70.7% / 9px 1px no-repeat; opacity: .55; }
.drop { display: grid; place-content: center; justify-items: center; text-align: center; gap: .35rem; min-height: 10.5rem; border: 2px dashed var(--rule); border-radius: 4px; cursor: pointer; padding: 1.5rem; transition: border-color .15s, background-color .15s; }
.drop:hover, .drop.hover { border-color: var(--ink); background: color-mix(in srgb, var(--rule-soft) 45%, transparent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.drop strong { font: 600 1.35rem/1.2 var(--display); }
.drop .hint { color: var(--ink-2); font-size: .92rem; }
.samples { margin-top: 1rem; font-size: .95rem; color: var(--ink-2); }
.linkbtn { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .18em; cursor: pointer; }
.linkbtn:hover { text-decoration-color: currentColor; }
.privacy { margin: 1rem 0 0; font-size: .9rem; color: var(--ink-2); }

/* rule-set plate (the thing people need to trust) */
.plate { border-left: 4px solid var(--ink); padding: .25rem 0 .25rem 1.25rem; }
.plate dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .45rem 1.25rem; }
.plate dt { color: var(--ink-2); font-size: .92rem; }
.plate dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.plate .version { font: 700 2.2rem/1 var(--display); margin: .1rem 0 1rem; }
.plate p { font-size: .95rem; color: var(--ink-2); margin: 1rem 0 0; }

/* result + stamp */
.result { margin-top: 1.25rem; }
.result[hidden] { display: none; }
.stamp { display: inline-block; font: 700 1.9rem/1 var(--display); letter-spacing: .04em; padding: .45rem .9rem .35rem; border: 3px solid currentColor; border-radius: 6px; transform: rotate(-3deg); margin: .25rem 0 .75rem; }
.stamp.ok { color: var(--ok); } .stamp.bad { color: var(--stamp); } .stamp.neutral { color: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) {
  .stamp.land { animation: land .42s cubic-bezier(.2, 1.4, .4, 1) both; }
  @keyframes land { from { transform: rotate(-9deg) scale(1.6); opacity: 0; } to { transform: rotate(-3deg) scale(1); opacity: 1; } }
}
.meta { color: var(--ink-2); font-size: .92rem; margin: 0 0 1rem; }
.findings { list-style: none; padding: 0; margin: 0; }
.findings li { padding: .7rem 0; border-top: 1px solid var(--rule-soft); max-width: none; }
.findings .rid { display: inline-block; min-width: 8.5rem; font-weight: 600; }
.findings .lvl { font-size: .8rem; font-weight: 600; padding: .05rem .4rem; border-radius: 3px; margin-right: .5rem; border: 1px solid currentColor; }
.lvl.error, .lvl.fatal { color: var(--stamp); } .lvl.warning { color: var(--warn); } .lvl.information { color: var(--ink-2); }
.findings .loc { display: block; color: var(--ink-2); font-size: .82rem; font-family: var(--code); overflow-wrap: anywhere; margin-top: .2rem; }

/* sections */
section.block { padding-block: 2.5rem; border-top: 1px solid var(--rule); }
mark { background: var(--marker); color: inherit; padding: 0 .15em; }
.changes li { margin: .35rem 0; }

/* offers: deliberately unequal. Alerts is the product thesis, the API is the second door */
.offers { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.offer { padding: 1.5rem; }
.offer.primary { background: var(--sheet); border: 1px solid var(--rule); border-top: 5px solid var(--ink); }
.offer.secondary { border: 1px dashed var(--rule); }
.price { font: 700 2rem/1 var(--display); margin: .25rem 0; }
.price small { font: 400 1rem var(--body); color: var(--ink-2); }
.btn { display: inline-flex; align-items: center; gap: .5rem; font: 600 1rem/1 var(--body); background: var(--ink); color: var(--sheet); border: 0; border-radius: 4px; padding: .8rem 1.2rem; cursor: pointer; text-decoration: none; margin-top: .75rem; }
.btn:hover { background: color-mix(in srgb, var(--ink) 85%, var(--paper)); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }

/* forms */
form.signup { margin-top: 1.5rem; background: var(--sheet); border: 1px solid var(--rule); padding: 1.5rem; max-width: 40rem; }
form.signup[hidden] { display: none; }
.field { display: grid; gap: .3rem; margin: 0 0 1rem; font-weight: 600; font-size: .95rem; }
.field input, .field select { font: 400 1rem var(--body); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: .65rem .75rem; width: 100%; }
fieldset { border: 1px solid var(--rule); border-radius: 4px; padding: .75rem 1rem; margin: 0 0 1rem; }
legend { font-weight: 600; font-size: .95rem; padding: 0 .3rem; }
.choice { display: inline-flex; gap: .4rem; align-items: center; margin-right: 1.25rem; font-weight: 400; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; margin: 0 0 1rem; }
.consent input { margin-top: .3rem; }
.fine { font-size: .88rem; color: var(--ink-2); }
.err { color: var(--stamp); font-weight: 600; }
pre { background: var(--rule-soft); padding: 1rem; border-radius: 4px; overflow-x: auto; font: 500 .85rem/1.5 var(--code); }
pre.key { font-size: 1rem; }

/* FAQ */
details { border-top: 1px solid var(--rule-soft); padding: .9rem 0; max-width: 52rem; }
summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; }
details p { margin: .6rem 0 0; }

/* tables (log, rule index) */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .6rem .75rem .6rem 0; border-bottom: 1px solid var(--rule-soft); }
th { font-weight: 600; color: var(--ink-2); font-size: .85rem; }
.search { font: 400 1rem var(--body); padding: .65rem .75rem; border: 1px solid var(--rule); border-radius: 4px; width: min(100%, 28rem); background: var(--sheet); color: var(--ink); margin-bottom: 1rem; }

/* rule page */
.rulehead .rid { font-size: 1rem; }
.official { background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--ink); padding: 1rem 1.25rem; font-size: 1.1rem; max-width: 52rem; margin: 1rem 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; margin: 1rem 0; }
.facts dt { color: var(--ink-2); } .facts dd { margin: 0; font-weight: 600; }

footer { border-top: 1px solid var(--rule); padding-block: 2rem 3rem; color: var(--ink-2); font-size: .92rem; }
footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-bottom: .75rem; font-weight: 600; color: var(--ink); }

@media (max-width: 52rem) {
  .hero, .offers { grid-template-columns: minmax(0, 1fr); }
  .plate { border-left-width: 3px; }
}
.block.first { border-top: 0; }
.nw { white-space: nowrap; }
.plate { position: sticky; top: 1rem; }
