:root {
  --bg: #f4f1ec;
  --paper: #fffcf8;
  --ink: #2c2926;
  --muted: #756f68;
  --line: #e5dfd6;
  --field: #f7f4ef;
  --danger: #8d3b32;
  --serif: "EB Garamond", "Iowan Old Style", Palatino, "Times New Roman", serif;
  --sans: "Onest", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--bg);
  background-image: url("/static/stripes.svg?v=3");
  background-repeat: repeat;
  background-size: 1200px 640px;
  animation: wave-drift 18s linear infinite;
}
@keyframes wave-drift {
  from { background-position: 0 0; }
  to { background-position: -600px 0; }
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.wrap { width: min(840px, calc(100% - 40px)); margin: 0 auto; }
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; min-height: 72px; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.mark { width: 28px; height: 28px; display: block; }
nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0;
}
nav a.is-active { color: var(--ink); }
nav a:hover { color: var(--ink); }

.hero { padding: 28px 0 8px; }
h1 {
  margin: 0 0 12px;
  max-width: 16ch;
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.lead { margin: 0 0 22px; max-width: 48ch; color: var(--muted); font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}
.chip-icon { width: 14px; height: 14px; display: block; }
.chip.is-on { color: var(--ink); border-color: var(--line); background: var(--paper); }

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.field { display: flex; gap: 8px; }
label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
input[type="url"], input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--field);
  padding: 12px 14px;
  outline: none;
}
textarea { min-height: 128px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #cfc6ba; background: #fff; }
button, .download {
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #f7f4ef;
  padding: 12px 18px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
button:hover, .download:hover { background: #443f3b; }
button:disabled { opacity: 0.5; cursor: wait; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.check input { margin-top: 3px; accent-color: #2c2926; }
.check a { color: var(--ink); text-underline-offset: 2px; }
.error { color: var(--danger); font-size: 14px; }
.fine, .meta { color: var(--muted); font-size: 14px; }

.result-card { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.result-head { display: grid; grid-template-columns: 168px 1fr; gap: 14px; align-items: start; }
.result-head img { width: 168px; height: 94px; object-fit: cover; border-radius: 8px; background: var(--field); }
.result-card h2 { margin: 2px 0 4px; font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1.15; }
.badge { margin: 0; color: var(--muted); font-size: 13px; }
.controls { display: grid; gap: 8px; margin-top: 14px; }
.progress b { display: block; height: 3px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--ink); }
.progress span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }

.notes { padding: 28px 0 48px; }
.band { background: var(--paper); border-top: 1px solid var(--line); }
.band:last-child { border-bottom: 1px solid var(--line); }
.band-row {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 12px 24px;
  align-items: baseline;
  padding: 18px 0;
}
.notes h2 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 500; }
.notes p { margin: 0; color: var(--muted); font-size: 15px; }

.page { padding: 28px 0 56px; }
.page .article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.article h1 { max-width: 18ch; font-size: clamp(36px, 5vw, 48px); margin-bottom: 10px; }
.article h2 { margin: 28px 0 6px; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.article p, .article li { color: var(--muted); }
.stub {
  display: inline-block;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.facts { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 18px 0 24px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.map {
  margin: 0 0 24px;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 18px;
}
.footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 22px 0 32px;
  color: var(--muted);
  font-size: 13px;
}
.footer .wrap { display: grid; gap: 8px; }
.footer nav { gap: 8px 18px; }
.footer p { margin: 0; }
.footer a { color: var(--ink); }
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 720px) {
  .band-row, .result-head, .facts { grid-template-columns: 1fr; }
  .result-head img { width: 100%; height: 180px; }
  .field { flex-direction: column; }
  .top .wrap { padding: 16px 0; }
  .hero { padding-top: 8px; }
}
