/* Hallmark · pre-emit critique: P5 H5 E4 S5 R5 V5 · genre: editorial utility · tone: calm/direct · anchor: warm umber · macrostructure: Long Document · navigation: N9 · footer: Ft2 · no motion or illustration · responsive rules present; rendered viewport check unavailable */
:root {
  color-scheme: light dark;
  --font-display: "Songti SC", STSong, "Noto Serif CJK SC", serif;
  --font-body: "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-family: var(--font-body);
  line-height: 1.65;
  --bg: #f7f4ed;
  --surface: #fffdf8;
  --text: #29251f;
  --muted: #6d665c;
  --border: #ded7ca;
  --accent: #835c31;
  --notice: #fff2c8;
  --notice-ink: #4d3d13;
  --focus: #9b651e;
  --accent-ink: #fffdf8;
  --space-3xs: 4px;
  --space-2xs: 8px;
  --space-xs: 12px;
  --space-sm: 16px;
  --space-md: 20px;
  --space-lg: 24px;
  --space-xl: 28px;
  --space-2xl: 32px;
  --space-3xl: 40px;
  --space-4xl: 48px;
  --space-5xl: 64px;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 1rem; }
a { color: var(--accent); text-underline-offset: 0.2em; }
.site-header, main, footer { width: min(calc(100% - var(--space-2xl)), 760px); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); padding-block: var(--space-xl) var(--space-md); }
.brand { color: var(--text); font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.header-action { border: 1px solid var(--border); border-radius: 999px; padding: var(--space-2xs) var(--space-xs); text-decoration: none; white-space: nowrap; }
main { max-width: 75ch; padding-block: var(--space-md) var(--space-5xl); }
h1, h2 { font-family: var(--font-display); }
h1, h2 { min-width: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1.15; letter-spacing: -0.025em; margin: var(--space-3xl) 0 var(--space-lg); }
h2 { font-size: 1.25rem; line-height: 1.35; margin: 0 0 var(--space-xs); }
.lede { color: var(--muted); font-size: 1.05rem; }
section { margin-top: var(--space-3xl); padding-top: var(--space-xl); border-top: 1px solid var(--border); }
.card { margin-top: var(--space-md); padding: var(--space-md); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.notice { padding: var(--space-xs) var(--space-sm); background: var(--notice); color: var(--notice-ink); border-radius: 12px; }
.directory { margin-top: var(--space-md); color: var(--muted); }
.directory summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; width: fit-content; color: var(--accent); }
.directory nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-md); padding-block: var(--space-2xs) var(--space-xs); }
.directory a { white-space: nowrap; }
.card-heading { display: flex; align-items: start; justify-content: space-between; gap: var(--space-sm); }
.badge { flex: none; padding: var(--space-3xs) var(--space-2xs); border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 0.8rem; }
dl { display: grid; grid-template-columns: minmax(7rem, 0.35fr) minmax(0, 1fr); gap: var(--space-2xs) var(--space-sm); margin-bottom: 0; }
dt { color: var(--muted); font-weight: 600; }
dd { margin: 0; overflow-wrap: anywhere; }
form { display: grid; gap: var(--space-2xs); max-width: 45rem; }
label { font-weight: 600; }
input, button { min-height: 48px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
input { width: 100%; padding-inline: var(--space-xs); outline: 2px solid transparent; background: var(--surface); color: var(--text); }
button { width: fit-content; padding-inline: var(--space-sm); background: var(--accent); color: var(--accent-ink); cursor: pointer; }
form + [role="status"] { min-height: 1lh; }
footer { padding-block: var(--space-lg) var(--space-4xl); border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
a:focus-visible, summary:focus-visible, input:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input:active { border-color: var(--accent); }
button:active, .header-action:active { background: var(--text); color: var(--surface); }
input:disabled, button:disabled { opacity: 0.55; cursor: not-allowed; background: var(--border); }

@media (hover: hover) {
  a:hover, summary:hover { text-decoration-thickness: 2px; }
  input:hover { border-color: var(--accent); }
  button:hover { background: var(--text); color: var(--surface); }
}

@media (max-width: 560px) {
  .site-header, main, footer { width: min(calc(100% - var(--space-lg)), 760px); }
  section, .card { padding: var(--space-sm); }
  section { padding-inline: 0; }
  dl { grid-template-columns: minmax(0, 1fr); gap: var(--space-3xs); }
  dd { margin-bottom: var(--space-2xs); }
}

@media (prefers-color-scheme: dark) {
  :root { --bg: #171512; --surface: #211e19; --text: #f5efe5; --muted: #c3b9aa; --border: #443d34; --accent: #e4b878; --accent-ink: #211e19; --notice: #3d3216; --notice-ink: #f8e5a8; --focus: #efc07b; }
}
