:root {
  --paper: #f2ebe0;
  --ink: #1c1917;
  --muted: #5c564e;
  --line: #d4c8b8;
  --amber: #b8894a;
  --sheet: #fffdf8;
  --font-h: "IBM Plex Serif", Georgia, serif;
  --font-b: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-b);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, #e8dcc8 0%, transparent 55%),
    linear-gradient(180deg, #ebe3d6 0%, var(--paper) 40%, #e7dfd2 100%);
  min-height: 100vh;
}

.ledger {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-h);
  font-weight: 600;
  font-size: 1.15rem;
}
.brand small {
  display: block;
  font-family: var(--font-b);
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}
.nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.nav a:hover { color: var(--ink); }

.pair {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.75rem;
  padding: 2rem 0 1.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .pair { grid-template-columns: 1fr; }
}

.pair h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-h);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.45rem);
  line-height: 1.18;
  max-width: 16ch;
}
.lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 38ch;
}

.mail {
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 1.1rem 1.15rem 1.2rem;
  max-width: 26rem;
}
.mail h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-h);
  font-size: 1.1rem;
  font-weight: 600;
}
.mail > p {
  margin: 0 0 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.field { display: block; margin-bottom: 0.75rem; }
.field span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.field input {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  color: var(--ink);
}
.btn {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.75rem 1.1rem;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.consent {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}
.consent a { color: var(--ink); }
.err { color: #9b2c2c; font-size: 0.85rem; min-height: 1.2em; }

.scan {
  position: relative;
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 1.15rem 1.2rem 1.3rem;
  box-shadow: 8px 10px 0 rgba(28, 25, 23, 0.06);
  overflow: hidden;
}
.scan-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
}
.scan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
}
.scan-grid article {
  padding: 0.65rem 0;
  border-top: 1px dashed var(--line);
}
.scan-grid .src {
  display: block;
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.scan-grid .dst {
  font-family: var(--font-h);
  font-size: 0.98rem;
}
.beam {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  animation: sweep 3.2s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.7;
}
@keyframes sweep {
  0% { top: 18%; }
  50% { top: 78%; }
  100% { top: 18%; }
}

.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 0.5rem 0 2rem;
}
@media (max-width: 700px) {
  .strip { grid-template-columns: 1fr; }
}
.strip div {
  background: var(--sheet);
  padding: 1.1rem 1.15rem;
}
.strip b {
  display: block;
  font-family: var(--font-h);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}
.strip span { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }

.limits {
  padding: 0.5rem 0 2rem;
}
.limits h2 {
  font-family: var(--font-h);
  font-size: 1.35rem;
  margin: 0 0 1rem;
}
.limits ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}
.limits li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
}
.limits li em {
  font-style: normal;
  font-family: var(--font-h);
  color: var(--amber);
  font-weight: 600;
}
.limits strong { display: block; margin-bottom: 0.2rem; }
.limits span { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }

.foot {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}
.foot a { color: var(--ink); }
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 0.75rem;
}

.cookie {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 420px;
  background: var(--ink);
  color: var(--paper);
  padding: 0.9rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  z-index: 40;
  font-size: 0.85rem;
}
.cookie[hidden] { display: none !important; }
.cookie a { color: #e8d4a8; }
.cookie button {
  margin-left: auto;
  border: 0;
  background: var(--amber);
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  z-index: 50;
  font-size: 0.9rem;
}
.toast[hidden] { display: none !important; }

.prose {
  max-width: 40rem;
  padding: 1.5rem 0 2rem;
  line-height: 1.55;
}
.prose h1 { font-family: var(--font-h); }
