:root {
  --fog: #d9ece6;
  --ice: #f3f7f6;
  --graph: #2c3333;
  --graph-soft: #4a5353;
  --line: #b7c9c3;
  --input: #ffffff;
  --bad: #b42318;
  --ok: #1f6b4a;
  --sans: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  --serif: "IBM Plex Serif", "Georgia", serif;
  --mono: "IBM Plex Mono", "Consolas", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fog);
  color: var(--graph);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
}

body.sheet-lock { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--graph); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }

:focus-visible {
  outline: 2px dashed var(--graph);
  outline-offset: 3px;
}

.skip-spec {
  position: absolute;
  left: -80em;
}
.skip-spec:focus {
  left: 12px;
  top: 12px;
  z-index: 80;
  background: var(--ice);
  padding: 6px 10px;
  border: 1px solid var(--graph);
}

.sheet-mast {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--ice);
  border-bottom: 1px solid var(--line);
}

.sheet-mast.is-offset {
  box-shadow: 0 1px 0 var(--graph);
}

.mast-grid {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 20px;
  align-items: center;
  min-height: 64px;
}

.ref-logo {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--graph);
  border: 1px solid var(--graph);
  padding: 4px 8px;
}

.ref-logo span { font-weight: 500; }

.spec-drawer {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
}

.spec-drawer a {
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spec-drawer a[aria-current="page"] {
  border-bottom: 1px solid var(--graph);
}

.mast-tel {
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.spec-burger {
  display: none;
  width: 40px;
  height: 36px;
  border: 1px solid var(--graph);
  background: var(--ice);
  cursor: pointer;
  position: relative;
}

.spec-burger span,
.spec-burger::before,
.spec-burger::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 1px;
  background: var(--graph);
}

.spec-burger::before { top: 10px; }
.spec-burger span { top: 17px; display: block; }
.spec-burger::after { bottom: 10px; }

.sheet {
  width: min(1080px, calc(100% - 32px));
  margin: 28px auto 0;
  background: var(--ice);
  border: 1px solid var(--line);
}

.doc-head {
  display: grid;
  grid-template-columns: 160px 1fr;
  border-bottom: 1px solid var(--line);
}

.doc-meta {
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  background: var(--fog);
}

.doc-meta dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graph-soft);
  margin: 12px 0 2px;
}

.doc-meta dd {
  margin: 0;
  font-family: var(--serif);
}

.doc-lead {
  padding: 28px 32px 36px;
}

.doc-lead h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 14px;
  max-width: 18ch;
}

.fig-block {
  display: grid;
  grid-template-columns: 1fr 200px;
  border-bottom: 1px solid var(--line);
}

.fig-block img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.75);
}

.fig-cap {
  padding: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graph-soft);
  border-left: 1px solid var(--line);
}

.spec-btn {
  display: inline-block;
  border: 1px solid var(--graph);
  background: var(--ice);
  color: var(--graph);
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.spec-btn:hover { background: var(--fog); }

.row-table {
  width: 100%;
  border-collapse: collapse;
}

.row-table th,
.row-table td {
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
}

.row-table th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  width: 140px;
  color: var(--graph-soft);
  background: var(--fog);
}

.row-table h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
}

.pad {
  padding: 28px 32px 40px;
}

.pad h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  margin: 0 0 12px;
}

.split-fig {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.split-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
  filter: saturate(0.7);
}

.quote-spec {
  margin: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.quote-spec p {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 0 0 6px;
}

.quote-spec footer {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graph-soft);
}

.inner-doc h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  margin: 0 0 10px;
}

.contact-sheet {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
}

.spec-cell { margin: 0 0 14px; }

.spec-cell label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.spec-cell input,
.spec-cell textarea {
  width: 100%;
  background: var(--input);
  border: 1px solid #9aa8a4;
  border-radius: 0;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--graph);
}

.spec-cell textarea { min-height: 128px; resize: vertical; }

.spec-cell.is-bad input,
.spec-cell.is-bad textarea {
  border-color: var(--bad);
}

.spec-cell .fail {
  display: none;
  color: var(--bad);
  font-size: 13px;
  margin: 4px 0 0;
}

.spec-cell.is-bad .fail { display: block; }

.spec-check { display: flex; gap: 10px; align-items: flex-start; }
.spec-check input { width: auto; margin-top: 3px; }

.spec-ok {
  margin-top: 12px;
  padding: 10px 12px;
  background: #e3f4ec;
  border: 1px solid var(--ok);
  color: #164832;
}

.sheet-colophon {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto 40px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--ice);
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0;
}

.sheet-colophon > * {
  padding: 24px;
  border-right: 1px solid var(--line);
}

.sheet-colophon > *:last-child { border-right: 0; }

.sheet-colophon nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sheet-colophon a { text-decoration: none; font-family: var(--mono); font-size: 12px; }

.legal-line {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto 48px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--graph-soft);
}

.pref-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--ice);
  border-top: 1px solid var(--graph);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.pref-notice p {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
}

.fade-row {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-row.is-live {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .fade-row { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 840px) {
  .mast-tel { display: none; }
  .spec-burger { display: block; }
  .mast-grid { grid-template-columns: 1fr auto; }
  .spec-drawer {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--ice);
    flex-direction: column;
    padding: 24px;
    transform: translateY(-110%);
    transition: transform 0.28s ease;
    border-top: 1px solid var(--line);
  }
  .spec-drawer.is-open { transform: none; }
  .doc-head,
  .fig-block,
  .split-fig,
  .contact-sheet,
  .sheet-colophon { grid-template-columns: 1fr; }
  .doc-meta { border-right: 0; border-bottom: 1px solid var(--line); }
  .fig-cap { border-left: 0; border-top: 1px solid var(--line); }
  .sheet-colophon > * { border-right: 0; border-bottom: 1px solid var(--line); }
  .pref-notice { flex-direction: column; align-items: stretch; }
}
