:root {
  --bg: #EDEBE3;
  --bg-alt: #E2DFD3;
  --ink: #1C1B18;
  --ink-soft: #5B584E;
  --ink-faint: #8B8779;
  --line: #B9B4A6;
  --stamp: #9C2B20;
  --stamp-soft: #9C2B2014;
  --paper-shadow: rgba(28,27,24,0.08);
  color-scheme: light dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17171A;
    --bg-alt: #1E1E22;
    --ink: #E9E6DD;
    --ink-soft: #B4B0A3;
    --ink-faint: #7A776C;
    --line: #3A3934;
    --stamp: #D9584B;
    --stamp-soft: #D9584B1A;
    --paper-shadow: rgba(0,0,0,0.35);
  }
}
:root[data-theme="dark"] {
  --bg: #17171A;
  --bg-alt: #1E1E22;
  --ink: #E9E6DD;
  --ink-soft: #B4B0A3;
  --ink-faint: #7A776C;
  --line: #3A3934;
  --stamp: #D9584B;
  --stamp-soft: #D9584B1A;
  --paper-shadow: rgba(0,0,0,0.35);
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
* { box-sizing: border-box; }
html, body { height: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.sheet {
  max-width: 700px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.doc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.doc-head .form-no { color: var(--ink); font-weight: 600; }
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0 28px;
  border-bottom: 1px solid var(--line);
}
h1.title {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.15;
  margin: 0;
  max-width: 11ch;
  letter-spacing: -0.01em;
}
.subtitle {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  max-width: 34ch;
}
.stamp {
  flex: none;
  border: 2.5px solid var(--stamp);
  color: var(--stamp);
  border-radius: 3px;
  padding: 8px 14px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  transform: rotate(-6deg);
  white-space: nowrap;
  background: var(--stamp-soft);
  margin-top: 4px;
}
section { padding: 34px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }
.label {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 0 0 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.label .num {
  color: var(--ink-faint);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
}
p { margin: 0 0 14px; max-width: 62ch; }
p:last-child { margin-bottom: 0; }
.lede {
  font-size: 17px;
  line-height: 1.6;
  max-width: 56ch;
}
.lede .edit {
  background: var(--stamp-soft);
  border-bottom: 1px dashed var(--stamp);
  padding: 0 2px;
}
ul.lede-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 56ch;
}
ul.lede-list li {
  font-size: 17px;
  line-height: 1.5;
  padding: 0 0 12px 20px;
  position: relative;
}
ul.lede-list li:last-child { padding-bottom: 0; }
ul.lede-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-faint);
}

/* proof strip */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 200px));
  gap: 16px;
  justify-content: start;
}
.exhibit { margin: 0; }
.exhibit-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  background: var(--bg-alt);
}
.exhibit-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(11px) saturate(0.7) brightness(0.95);
  transform: scale(1.08);
  transition: filter 0.5s ease, transform 0.5s ease;
}
.exhibit-frame:hover img,
.exhibit-frame.revealed img {
  filter: blur(0) saturate(1) brightness(1);
  transform: scale(1);
}
.exhibit-frame:focus-visible {
  outline: 2px solid var(--stamp);
  outline-offset: 2px;
}
.exhibit-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #F4F3EE;
  background: rgba(20, 19, 16, 0.28);
  transition: opacity 0.4s ease;
  text-align: center;
  padding: 0 14px;
}
.exhibit-frame:hover .exhibit-hint,
.exhibit-frame.revealed .exhibit-hint {
  opacity: 0;
}
.exhibit figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
}
.proof-caption {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* fact table */
.facts {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.facts tr { border-top: 1px solid var(--line); }
.facts tr:first-child { border-top: none; }
.facts td { padding: 10px 0; vertical-align: top; }
.facts td:first-child {
  color: var(--ink-faint);
  white-space: nowrap;
  padding-right: 20px;
  width: 100px;
}

/* spec table */
.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.spec tr { border-top: 1px solid var(--line); }
.spec tr:first-child { border-top: none; }
.spec td { padding: 11px 0; }
.spec td:first-child {
  color: var(--ink-faint);
  width: 130px;
}
.spec .edit {
  background: var(--stamp-soft);
  border-bottom: 1px dashed var(--stamp);
}

/* submit section */
.submit-grid {
  display: grid;
  grid-template-columns: 176px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 520px) {
  .submit-grid { grid-template-columns: 1fr; }
}
.qr-box {
  width: 176px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.qr-frame {
  width: 176px;
  height: 176px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  padding: 6px;
}
.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.qr-link {
  font-size: 10.5px;
  text-align: center;
  line-height: 1.5;
  color: var(--ink-faint);
  word-break: break-all;
}
.qr-link a { color: var(--ink-soft); }
.rules { margin: 0; padding: 0; list-style: none; }
.rules li {
  padding: 9px 0 9px 20px;
  border-top: 1px solid var(--line);
  position: relative;
  font-size: 13.5px;
}
.rules li:first-child { border-top: none; padding-top: 0; }
.rules li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-faint);
}
.rules b { color: var(--ink); font-weight: 600; }

/* faq */
.faq-item { padding: 16px 0; border-top: 1px solid var(--line); }
.faq-item:first-child { border-top: none; padding-top: 0; }
.q {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 6px;
}
.a { margin: 0; color: var(--ink-soft); font-size: 13.5px; }

footer {
  padding-top: 28px;
  font-size: 11.5px;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

@media (prefers-reduced-motion: no-preference) {
  a { transition: opacity 0.15s ease; }
}
a { color: var(--ink); }
a:hover { opacity: 0.7; }
