:root {
  --bg: #f4f6f5;
  --paper: #fff;
  --ink: #1c2428;
  --muted: #3a474c;
  --line: #d5dbde;
  --brand: #0c5e5b;
  --brand-dark: #094844;
  --brand-soft: #e7f1f0;
  --danger: #8d2e2e;
  --white: #fff;
  --header-offset: 6.7rem;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.58;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-offset); }
body { margin: 0; overflow-x: clip; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p { text-wrap: pretty; }
h1, h2, h3 { line-height: 1.22; letter-spacing: -0.015em; font-weight: 650; }
h1 { margin: 0; font-size: clamp(2.125rem, 2.6vw, 2.5rem); }
h2 { margin: 0 0 0.7rem; font-size: clamp(1.55rem, 1.7vw, 1.8rem); }
h3 { margin: 0; font-size: 1.2rem; }
a { color: var(--brand-dark); }
a:hover { color: var(--brand); }
p { margin: 0.55rem 0 0; }

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  background: var(--white);
  padding: 0.4rem 0.7rem;
  z-index: 40;
}
.skip:focus { top: 0.5rem; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.wrap { width: min(1280px, calc(100% - 40px)); margin-inline: auto; }
.doc { width: min(760px, calc(100% - 40px)); }
.page { width: min(820px, 100%); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.4rem;
  padding: 0.45rem 0;
}
.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
}
.brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: 0; }
.brand-sub { font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.header-tools { display: flex; align-items: center; gap: 0.85rem; }
.header-phone { color: var(--ink); text-decoration: none; font-size: 0.95rem; white-space: nowrap; }
.nav-bar { background: #eef2f2; border-top: 1px solid var(--line); }
.nav-row { position: relative; }
.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.nav-toggle-label {
  display: none;
  border: 1px solid var(--brand);
  color: var(--brand-dark);
  background: var(--paper);
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font-size: 0.95rem;
}
.nav {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0;
}
.nav > a,
.menu-drop > a,
.menu-drop summary {
  display: inline-flex;
  align-items: center;
  padding: 0.62rem 0.85rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  background: transparent;
}
.nav > a[aria-current="page"] {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
}
.menu-drop { position: relative; display: flex; align-items: stretch; }
.menu-drop > a { padding-right: 0.2rem; }
.menu-drop.is-current { box-shadow: inset 0 -2px 0 var(--brand); }
.menu-drop.is-current > a { color: var(--brand-dark); }
.menu-drop summary { list-style: none; cursor: pointer; padding-left: 0.15rem; }
.menu-drop summary::-webkit-details-marker { display: none; }
.menu-drop summary::after {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.1rem) rotate(45deg);
}
.menu-drop ul {
  display: none;
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  z-index: 6;
  min-width: 18.5rem;
  margin: 0;
  padding: 0.3rem 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
}
.menu-drop [open] > ul { display: block; }
.menu-drop li a {
  display: block;
  padding: 0.45rem 0.85rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 0;
}
.menu-drop li a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }
.menu-drop li a:hover { background: var(--bg); }
a.card { color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--brand); }
.cards h2 { font-size: 1.2rem; margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  padding: 0.42rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--brand); color: var(--white); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); color: var(--white); }
.btn-secondary { background: transparent; color: var(--brand-dark); border-color: var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); color: var(--brand-dark); }

main { padding: 1.15rem 0 2.2rem; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  column-gap: 1.75rem;
  align-items: start;
}
.main-col, .layout > .prose { min-width: 0; }
.prose { max-width: 68ch; }
.layout > .prose { max-width: none; }
.layout .page-head,
.layout .lede,
.layout .block p,
.layout .block ul,
.layout .block ol,
.layout .note,
.layout .limit,
.layout .sample p { max-width: 68ch; }

.hero { padding: 0.15rem 0 0.2rem; }
.kicker {
  margin: 0 0 0.3rem;
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.lede { color: var(--muted); max-width: 62ch; margin: 0.45rem 0 0; }
.marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.4rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}
.marks li {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.22rem 0.5rem;
  font-size: 0.875rem;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.section { margin-top: 1.55rem; }
.section-link { margin-top: 0.7rem; }
.cards, .photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.75rem; }
.card, .side-card, .note, .limit, .trust, .admin-card {
  background: var(--paper);
  border: 1px solid var(--line);
}
.card { padding: 0.8rem 0.85rem 0.9rem; display: flex; flex-direction: column; gap: 0.4rem; }
.card p, .side-card p { margin: 0; color: var(--muted); }
.card p { flex: 1; }
.side {
  position: sticky;
  top: var(--header-offset);
  display: grid;
  gap: 0.75rem;
  align-self: start;
}
.side-card { padding: 0.8rem 0.85rem 0.9rem; }
.side-card h2 { font-size: 1.15rem; margin: 0 0 0.35rem; }
.side-card h2 a { color: inherit; text-decoration: none; }
.side-card h2 a:hover { color: var(--brand); }
.side-kicker { margin: 0 0 0.2rem; color: var(--brand); font-size: 0.875rem; font-weight: 700; }
.side-card .btn { margin-top: 0.7rem; }
.side-links { margin: 0.2rem 0 0; padding-left: 1.05rem; display: grid; gap: 0.35rem; }
.side-card img { display: block; width: 100%; height: auto; margin-bottom: 0.55rem; }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}
.step-no { color: var(--brand); font-weight: 700; font-variant-numeric: tabular-nums; width: 1.2rem; }
.steps p { margin: 0.2rem 0 0; color: var(--muted); }
.block { margin: 1.25rem 0; }
.prose ul, .limit ul { padding-left: 1.15rem; }
.prose li + li { margin-top: 0.35rem; }
.note, .limit, .trust { padding: 0.85rem 0.95rem; margin: 1.1rem 0; }
.note { border-left: 3px solid var(--brand); }
.limit { border-left: 3px solid var(--ink); }
.meta-line { color: var(--muted); font-size: 0.875rem; margin: 0.35rem 0 0; }
.crumb { color: var(--muted); font-size: 0.875rem; margin: 0 0 0.7rem; }
.crumb a { color: inherit; }
.page-head { margin-bottom: 0.4rem; }
.contact-note { margin: 1rem 0 1.3rem; }
.contact-note h2 { margin-top: 1rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--paper); }
table { width: 100%; border-collapse: collapse; min-width: 32rem; }
caption { text-align: left; padding: 0.65rem 0.75rem 0; color: var(--muted); font-size: 0.875rem; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.7rem; border-top: 1px solid var(--line); }
th { background: var(--brand); color: var(--white); border-top: 0; font-weight: 650; }
.schematic { margin: 0.6rem 0 0; background: var(--paper); border: 1px solid var(--line); padding: 0.45rem; max-width: 36rem; }
.schematic figcaption, .photo-slot figcaption { color: var(--muted); font-size: 0.875rem; margin-top: 0.4rem; }
.sample { margin-top: 1.3rem; }
.photo-slot {
  margin: 0;
  min-height: 7.5rem;
  display: grid;
  align-items: end;
  padding: 0.7rem;
  background: #e8eeed;
  border: 1px dashed #8ea09e;
}
.article-list { display: grid; gap: 0.15rem; }
.article-list article { border-top: 1px solid var(--line); padding: 0.75rem 0; }
.article-list h2 { font-size: 1.25rem; margin: 0.15rem 0 0; }
.article-list p { margin: 0.3rem 0 0; color: var(--muted); }

.faq-list { display: grid; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list summary { cursor: pointer; padding: 0.55rem 0; font-weight: 650; }
.faq-list details p { margin: 0 0 0.7rem; color: var(--muted); }

.lead-form, .stack-form { display: grid; gap: 0.35rem; }
fieldset { border: 0; margin: 0 0 1rem; padding: 0; }
legend { font-weight: 700; padding: 0 0 0.45rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 0.9rem; }
.span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field > span, legend { font-size: 0.95rem; }
input, select, textarea {
  font: inherit;
  color: inherit;
  background: var(--white);
  border: 1px solid #b7c0c3;
  border-radius: 0;
  padding: 0.45rem 0.55rem;
  width: 100%;
}
textarea { min-height: 7rem; resize: vertical; }
.note-short { min-height: 4.2rem; }
.brief-more { margin: 0.2rem 0 0.8rem; }
.brief-more summary { cursor: pointer; font-weight: 650; }
.checks { display: grid; gap: 0.35rem; }
.check { display: flex; gap: 0.5rem; align-items: flex-start; }
.check input { width: 1.05rem; height: 1.05rem; margin-top: 0.2rem; }
.hint, .fine { color: var(--muted); font-size: 0.875rem; }
.field-error { color: var(--danger); font-size: 0.875rem; }
[aria-invalid="true"] { border-color: var(--danger); }
.form-errors { background: var(--paper); border: 1px solid var(--danger); padding: 0.65rem 0.75rem; margin-bottom: 0.7rem; }
.form-actions { display: grid; gap: 0.45rem; justify-items: start; }
.hp { position: absolute; left: -10000px; height: 1px; width: 1px; overflow: hidden; }

.admin-head, .filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; justify-content: space-between; }
.filters { margin: 1rem 0; }
.count-list { display: flex; flex-wrap: wrap; gap: 0.55rem 1rem; padding: 0; list-style: none; }
.status { display: inline-block; background: var(--paper); border: 1px solid var(--line); padding: 0.05rem 0.4rem; }
.note-inline, .note-block { background: var(--paper); border: 1px solid var(--line); padding: 0.7rem 0.8rem; }
.note-block { white-space: pre-wrap; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem 1rem; margin: 0 0 1rem; }
.facts div { border-top: 1px solid var(--line); padding-top: 0.4rem; }
.facts dt { font-size: 0.875rem; color: var(--muted); }
.facts dd, .note-block, td { overflow-wrap: anywhere; }
.admin-card { padding: 1rem; }
code { font-family: Consolas, "Courier New", monospace; font-size: 0.92em; }

.site-footer { background: #1b272c; color: #e4eaec; margin-top: 2rem; padding: 1.4rem 0 0.8rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1.1rem 1.4rem; }
.footer-name, .footer-title { margin: 0 0 0.35rem; font-weight: 700; color: var(--white); font-size: 0.95rem; }
.site-footer a { color: var(--white); }
.site-footer a:focus-visible { outline-color: var(--white); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.site-footer p { margin: 0.25rem 0; font-size: 0.95rem; }
.legal-line { border-top: 1px solid rgba(255, 255, 255, 0.18); margin-top: 1rem; padding-top: 0.6rem; }
.legal-line p { color: #d5dee1; font-size: 0.875rem; }

@media (max-height: 680px) {
  .side { position: static; }
}

@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr) 280px; column-gap: 1.5rem; }
}

@media (max-width: 899px) {
  :root { --header-offset: 4.4rem; }
  .wrap { width: min(1280px, calc(100% - 32px)); }
  .nav-toggle-label { display: inline-flex; }
  .header-phone { display: none; }
  .nav-bar { background: transparent; border-top: 0; }
  .nav { display: none; flex-direction: column; align-items: stretch; padding: 0.25rem 0 0.55rem; }
  .nav-toggle:checked ~ .nav { display: flex; background: #eef2f2; border-top: 1px solid var(--line); }
  .nav > a, .menu-drop > a, .menu-drop summary { border-bottom: 0; padding: 0.55rem 0.15rem; }
  .menu-drop { display: block; width: 100%; }
  .menu-drop > a { display: flex; padding-right: 2.2rem; }
  .menu-drop summary { position: absolute; top: 0; right: 0; height: 2.4rem; }
  .menu-drop ul { position: static; min-width: 0; width: auto; border: 0; padding: 0 0 0.3rem 0.7rem; background: transparent; }
  .menu-drop.is-current { box-shadow: none; }
  .menu-drop.is-current > a { box-shadow: inset 0 -2px 0 var(--brand); }
  .layout, .cards, .photo-grid, .footer-grid, .form-grid, .facts { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .side { position: static; }
  .brand-sub { display: none; }
  .brand-name { font-size: 0.92rem; }
  .header-top { gap: 0.4rem; }
  .header-cta { white-space: nowrap; font-size: 0.82rem; padding: 0.35rem 0.5rem; }
  h1 { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
