/* Gideon Lantern. Blue is the brand; red is kept for real warnings and errors. */
:root {
  --blue: #013ea9;
  --blue-dark: #012f80;
  --blue-tint: #eef3fc;
  --blue-line: #c9d6f2;
  --red: #d01326;
  --red-dark: #a50f1e;
  --red-tint: #fdeced;
  --red-line: #f3b7bd;
  --ink: #1d2433;
  --muted: #545e70;
  --line: #dfe4ee;
  --bg: #f6f8fb;
  --card: #ffffff;
  --radius: 12px;
  --focus: 0 0 0 3px #ffffff, 0 0 0 5px var(--blue);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Helvetica, Arial, sans-serif;
}
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; margin-top: 1.4em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

header.site { background: #fff; border-bottom: 1px solid var(--line); }
header.site .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.brand img { display: block; }
header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: .95rem; }
header nav a { color: var(--ink); text-decoration: none; padding: 6px 2px; }
header nav a[aria-current="page"] { color: var(--blue); font-weight: 600; box-shadow: inset 0 -2px 0 var(--blue); }
header nav a:hover { color: var(--blue); }
header nav form { margin: 0; }

main { padding-top: 28px; padding-bottom: 56px; min-height: 60vh; }
footer.site { border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .9rem; padding: 24px 0; }
footer.site p { margin: 0 0 .5em; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0 0 18px; }
.card > :last-child { margin-bottom: 0; }
.card.tint { background: var(--blue-tint); border-color: var(--blue-line); }
.card.warn { background: var(--red-tint); border-color: var(--red-line); }

.btn, button {
  font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border-radius: 10px; border: 2px solid var(--blue);
  background: var(--blue); color: #fff; cursor: pointer; text-decoration: none; line-height: 1.2;
}
.btn:hover, button:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn.secondary, button.secondary { background: #fff; color: var(--blue); }
.btn.secondary:hover, button.secondary:hover { background: var(--blue-tint); color: var(--blue-dark); }
.btn.danger, button.danger { background: var(--red); border-color: var(--red); }
.btn.danger:hover, button.danger:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.big, button.big { min-height: 56px; font-size: 1.1rem; padding: 14px 28px; }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: .95rem; }
button.link { background: none; border: none; color: var(--ink); padding: 6px 2px; min-height: 0; font-weight: 400; }
button.link:hover { color: var(--blue); background: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
form.inline { display: inline; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .92rem; margin-top: 2px; }
input[type=text], input[type=email], input[type=password], textarea, select {
  font: inherit; width: 100%; padding: 11px 12px; border: 1px solid #b9c2d3; border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus { border-color: var(--blue); }
select.compact { width: auto; max-width: 15rem; padding: 6px 8px; }
textarea { min-height: 320px; resize: vertical; line-height: 1.55; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 12px 0; }
.check input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--blue); }
.counter { text-align: right; font-size: .85rem; color: var(--muted); margin-top: 4px; }

.flash { border-radius: 10px; padding: 12px 16px; margin: 0 0 20px; border: 1px solid var(--blue-line); background: var(--blue-tint); }
.flash.error, .error-box { border: 1px solid var(--red-line); background: var(--red-tint); color: #6b0710; }
.error-box { border-radius: 10px; padding: 12px 16px; margin: 0 0 16px; }

/* Status */
.status { border-radius: var(--radius); padding: 22px; margin-bottom: 18px; border: 1px solid var(--blue-line); background: var(--blue-tint); }
.status.urgent { background: var(--red-tint); border-color: var(--red-line); }
.status.quiet { background: #fff; border-color: var(--line); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px; background: var(--blue); color: #fff; }
.urgent .badge, .badge.red { background: var(--red); }
.quiet .badge, .badge.grey { background: #5b6577; }
.status h1 { font-size: 1.6rem; margin-top: 12px; }
.status .lead { font-size: 1.08rem; }

dl.facts { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 10px 18px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; }
dl.facts dd small { font-weight: 400; display: block; }
@media (max-width: 560px) {
  dl.facts { grid-template-columns: 1fr; gap: 2px; }
  dl.facts dd { margin-bottom: 10px; }
  h1 { font-size: 1.6rem; }
}

ol.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
ol.steps li { counter-increment: s; position: relative; padding: 0 0 16px 46px; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue-tint); color: var(--blue); font-weight: 700; display: flex; align-items: center; justify-content: center; border: 1px solid var(--blue-line); }
ol.steps li.done::before { content: "✓"; background: var(--blue); color: #fff; border-color: var(--blue); }

ol.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--blue-line); }
ol.timeline li { position: relative; padding: 0 0 14px 20px; }
ol.timeline li::before { content: ""; position: absolute; left: -8px; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; }
ol.timeline li.warn::before { background: var(--red); }
ol.timeline .when { font-weight: 700; display: block; }

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.table-wrap { overflow-x: auto; }
@media (max-width: 640px) {
  table.stack thead { position: absolute; left: -9999px; }
  table.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.stack td { display: block; border: none; padding: 2px 0; }
  table.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .85rem; }
}
.pill { display: inline-block; font-size: .82rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: #fff; white-space: nowrap; }
.pill.ok { border-color: var(--blue-line); background: var(--blue-tint); color: var(--blue-dark); }
.pill.bad { border-color: var(--red-line); background: var(--red-tint); color: #6b0710; }

.hero { padding: 24px 0 8px; }
.hero h1 { font-size: 2.4rem; max-width: 18ch; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 40ch; }
@media (max-width: 560px) { .hero h1 { font-size: 2rem; } }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.price { font-size: 2.2rem; font-weight: 800; color: var(--blue); }
.preview-frame { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
pre.plain { white-space: pre-wrap; word-wrap: break-word; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; font-size: .92rem; }
details summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { header.site, footer.site, .actions, form { display: none !important; } }
.flush { margin-top: 0; }
.spaced { margin-top: 1em; margin-bottom: 1em; }
ul.tight { padding-left: 1.1em; margin: 0 0 .6em; }
.narrow.wide { max-width: 680px; }
