:root {
  color-scheme: light;
  --ink: #1d1a16;
  --muted: #6c6254;
  --paper: #fbf6e9;
  --panel: #fffdf7;
  --line: #2b2721;
  --soft-line: rgba(43, 39, 33, 0.24);
  --accent: #c7352c;
  --accent-pale: #f4ded1;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--paper); }

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(29, 26, 22, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 26, 22, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  font-family: Georgia, "Songti SC", "STSong", serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background: repeating-linear-gradient(0deg, rgba(29, 26, 22, 0.06) 0 1px, transparent 1px 5px);
  mix-blend-mode: multiply;
}

.page-shell {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 14px max(32px, env(safe-area-inset-bottom));
}

.hero,
.form-panel,
.thanks-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 7px 7px 0 rgba(29, 26, 22, 0.08);
}

.hero { padding: 20px 22px 22px; }

.brand-header {
  display: flex;
  align-items: center;
  min-height: 74px;
  margin: 0;
  padding: 2px 0;
  background: transparent;
}

.brand-mark-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 100px;
  height: 58px;
  flex: 0 0 auto;
  background: var(--ink);
}

.logo-mark svg {
  display: block;
  width: 88px;
  height: 50px;
}

.brand-copy { display: grid; gap: 5px; }
.brand-copy strong { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: 25px; font-weight: 900; }
.brand-copy span,
.eyebrow,
.kicker,
label span,
.topic-strip,
.section-heading > p,
.check-row span,
.form-message {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

.brand-copy span { color: var(--accent); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: 17px; font-weight: 900; }

.hero-rule {
  height: 5px;
  margin: 18px 0 22px;
  border-top: 1px solid var(--line);
  border-bottom: 3px double var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 620px;
  margin: 0 0 14px;
  font-size: clamp(42px, 11vw, 68px);
  line-height: 1.04;
  letter-spacing: 0;
}

.lead {
  max-width: 580px;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.55;
}

.topic-title {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(26px, 7vw, 42px);
  font-weight: 900;
  line-height: 1.25;
}

.intro {
  max-width: 620px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.form-panel { margin-top: 14px; padding: 20px 22px 22px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  border-top: 3px double var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.section-heading h2 { margin: 4px 0 0; font-size: 32px; line-height: 1.05; }
.section-heading > p { max-width: 170px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: right; }
.kicker { margin: 0; color: var(--accent); font-size: 12px; font-weight: 900; }

form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; }
label span { color: var(--ink); font-size: 13px; font-weight: 900; }

input, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  outline: none;
  transition: box-shadow 160ms ease, background 160ms ease;
}

textarea { resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #9a8e7c; }
input:focus, textarea:focus { background: #fffaf0; box-shadow: 3px 3px 0 var(--accent); }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.entries-field { display: grid; gap: 0; border-top: 3px double var(--line); border-bottom: 1px solid var(--line); padding: 12px 0 13px; }
.entries-heading { display: flex; justify-content: space-between; align-items: end; border-bottom: 1px solid var(--line); padding: 0 0 10px; }
.entries-heading > div { display: grid; gap: 3px; }
.entries-heading span { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: 13px; font-weight: 900; }
.entries-heading small { color: var(--muted); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: 11px; }
.entries-list { display: grid; counter-reset: entry-row; }
.entry-row { position: relative; display: grid; grid-template-columns: 0.8fr 1.2fr 1fr 24px; gap: 8px; align-items: end; border-bottom: 1px solid var(--soft-line); padding: 13px 0 10px 28px; counter-increment: entry-row; }
.entry-row::before { position: absolute; left: 0; bottom: 18px; color: var(--accent); content: counter(entry-row, decimal-leading-zero); font-family: Georgia, "Songti SC", serif; font-size: 12px; font-weight: 900; }
.entry-row label { gap: 5px; }
.entry-row label span { font-size: 11px; }
.entry-row input { min-height: 42px; border-color: var(--soft-line); padding: 9px; background: #fff; }
.remove-entry { width: 24px; height: 24px; border: 0; color: var(--muted); background: transparent; font-size: 24px; line-height: 1; cursor: pointer; }
.remove-entry:hover { color: var(--accent); }
.add-entry { justify-self: start; margin-top: 12px; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 7px 2px; color: var(--ink); background: transparent; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: 12px; font-weight: 900; cursor: pointer; }
.add-entry span { color: var(--accent); font-size: 17px; vertical-align: -1px; }

.check-row { grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: center; border-top: 1px solid var(--soft-line); padding-top: 13px; }
.check-row input {
  position: relative;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.check-row input:checked { border-color: var(--accent); background: var(--accent); }
.check-row input:checked::after {
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
}
.check-row input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(199, 53, 44, 0.2); }
.check-row span { color: var(--muted); font-size: 12px; line-height: 1.5; }

.submit-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 16px;
  color: #fffdf7;
  background: var(--accent);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
}

.submit-button { width: 100%; cursor: pointer; }
.submit-button:disabled { cursor: progress; opacity: 0.72; }
.form-message { min-height: 22px; margin: -2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.form-message[data-type="error"] { color: var(--accent); }
.form-message[data-type="success"] { color: #27633d; }

.thanks-page { display: grid; min-height: 100vh; place-items: center; padding: 18px; }
.thanks-card { width: min(100%, 460px); padding: 22px; }
.thanks-card .brand-line { margin: 0 0 18px; color: var(--accent); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-weight: 900; }
.thanks-card .eyebrow { border-top: 3px double var(--line); border-bottom: 1px solid var(--line); padding: 9px 0; }
.thanks-card h1 { font-size: 42px; }
.thanks-card p { color: var(--muted); line-height: 1.7; }
.ghost-link { justify-content: center; margin-top: 10px; }

@media (max-width: 560px) {
  .page-shell { padding-right: 10px; padding-left: 10px; }
  .hero, .form-panel { padding-right: 16px; padding-left: 16px; box-shadow: 4px 4px 0 rgba(29, 26, 22, 0.07); }
  .brand-header { min-height: 60px; padding: 0; }
  .brand-mark-block { gap: 10px; }
  .logo-mark { width: 72px; height: 42px; }
  .logo-mark svg { width: 64px; height: 36px; }
  .brand-copy { gap: 2px; }
  .brand-copy strong { font-size: 19px; }
  .brand-copy span { font-size: 13px; }
  .hero-rule { margin-top: 14px; margin-bottom: 18px; }
  h1 { margin-bottom: 12px; font-size: clamp(32px, 9vw, 44px); line-height: 1.12; }
  .topic-title { margin-bottom: 14px; font-size: clamp(24px, 7vw, 34px); }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .section-heading > p { max-width: none; text-align: left; }
  .field-pair { grid-template-columns: 1fr; }
  .entry-row { grid-template-columns: 1fr 1fr 1fr 24px; gap: 6px; padding: 10px 0 9px 24px; }
  .entry-row input { min-height: 42px; padding: 8px; font-size: 13px; }
  .entry-row label span { font-size: 10px; }
}
