@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4ecdc;
  --paper-2: #ebe1cc;
  --ink: #1b1712;
  --ink-soft: #4a4338;
  --rule: #2a241c;
  --seal: #9d2c22;
  --seal-deep: #6e1c16;
  --ok: #1f6b45;
  --warn: #8a4b12;
  --shadow: 0 18px 40px rgba(40, 28, 14, 0.08);
  --serif: "Newsreader", "Songti SC", "Noto Serif SC", "STSong", "PMingLiU", serif;
  --mono: "SFMono-Regular", "ui-monospace", "Sarasa Mono SC", "Source Han Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, var(--seal) 0 10px, transparent 10px),
    repeating-linear-gradient(0deg, transparent, transparent 27px, rgba(27, 23, 18, 0.045) 28px),
    var(--paper);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}

a { color: inherit; }
a:hover { color: var(--seal); }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: var(--paper);
  padding: 0.4rem 0.7rem;
}
.skip:focus { top: 12px; }

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem 1rem 1.8rem;
  border-bottom: 1px solid var(--rule);
}
.mark {
  text-decoration: none;
  font-weight: 650;
  font-size: 1.7rem;
  letter-spacing: 0.08em;
}
.domain {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

.wrap {
  width: min(1080px, calc(100% - 2.4rem));
  margin: 0 auto;
  padding: 2.2rem 0 4rem;
}

.kicker {
  margin: 0 0 0.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--seal);
}

h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.lede {
  max-width: 42rem;
  margin: 0 0 1.8rem;
  color: var(--ink-soft);
  font-size: 1.2rem;
}

.catalog {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.catalog a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem 1rem;
  padding: 1.15rem 1rem 1.2rem 0;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.catalog li:nth-child(odd) a { padding-right: 1.4rem; border-right: 1px solid var(--rule); }
.catalog li:nth-child(even) a { padding-left: 1.2rem; }
.num {
  font-family: var(--mono);
  color: var(--seal);
  font-size: 0.85rem;
  padding-top: 0.35rem;
}
.catalog h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.catalog p { margin: 0.2rem 0 0; color: var(--ink-soft); font-size: 1rem; }

.crumb {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
.crumb a { text-decoration: none; border-bottom: 1px solid transparent; }
.crumb a:hover { border-bottom-color: var(--seal); }

.bench {
  background: rgba(255, 252, 246, 0.72);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin: 0 0 2rem;
}
.bench label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0.2rem 0 0.35rem;
}
textarea, input[type="text"], select {
  width: 100%;
  border: 1px solid var(--rule);
  background: #fffdf8;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.5;
  padding: 0.7rem 0.75rem;
}
textarea { min-height: 180px; resize: vertical; }
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.7rem 0; }
.row input[type="text"], .row select { width: auto; flex: 1; min-width: 10rem; }
button, .button {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1rem;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  text-decoration: none;
}
button.ghost, .button.ghost { background: transparent; color: var(--ink); }
button:hover, .button:hover { background: var(--seal); border-color: var(--seal); color: #fffaf3; }
button:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
}
.status { min-height: 1.4em; margin: 0.4rem 0 0; font-family: var(--mono); font-size: 0.82rem; }
.status.ok { color: var(--ok); }
.status.bad { color: var(--seal-deep); }

.note, .faq, .related { max-width: 46rem; }
h2 { font-size: 1.55rem; margin: 1.6rem 0 0.5rem; }
.faq details { border-top: 1px solid var(--rule); padding: 0.7rem 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { margin: 0.4rem 0 0.2rem; color: var(--ink-soft); }
.related ul { padding-left: 1.1rem; }
.related a { text-decoration: none; border-bottom: 1px solid rgba(157, 44, 34, 0.35); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.2rem, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.stat {
  border: 1px solid var(--rule);
  padding: 0.6rem 0.7rem;
  background: #fffdf8;
}
.stat b { display: block; font-size: 1.4rem; letter-spacing: -0.03em; }
.stat span { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--ink-soft); }

.match {
  font-family: var(--mono);
  font-size: 0.85rem;
  white-space: pre-wrap;
  background: #fffdf8;
  border: 1px solid var(--rule);
  padding: 0.7rem;
  min-height: 4rem;
}

.foot {
  border-top: 1px solid var(--rule);
  padding: 1rem 1.4rem 1.4rem 1.8rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.foot p { margin: 0.2rem 0; }

@media (max-width: 800px) {
  .catalog { grid-template-columns: 1fr; }
  .catalog li:nth-child(odd) a,
  .catalog li:nth-child(even) a {
    border-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .stats { grid-template-columns: 1fr 1fr; }
  body { font-size: 1.05rem; }
}
