/* Kinddesk — desk-comfort manual. Graphite / chartreuse / ivory. System fonts only. */

:root {
  --paper: #f6f3ea;
  --paper-2: #ece8da;
  --ink: #232527;
  --ink-2: #3d4043;
  --muted: #62666b;
  --line: #cbc6b5;
  --lime: #cfe93a;
  --lime-soft: #eef4c4;
  --lime-deep: #56650a;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 56px);
  --gap: clamp(72px, 10vw, 128px);
  --ease: 180ms ease-out;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
p { margin: 0 0 1em; }
a { color: inherit; }
ul { padding-left: 1.2em; }
li { margin-bottom: 0.4em; }

:focus-visible { outline: 3px solid var(--lime-deep); outline-offset: 3px; border-radius: 2px; }
.checklist :focus-visible { outline-color: var(--lime); }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 20;
  padding: 10px 14px; background: var(--ink); color: var(--paper); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- masthead + nav ---------- */

.masthead {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--pad);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -0.01em; text-decoration: none; font-size: 1.05rem;
}
.brand-mark {
  width: 22px; height: 22px; background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 5px 5px 5px 5px; background: var(--lime);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 45% 100%, 0 100%);
}

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  display: inline-flex; gap: 8px; align-items: baseline;
  padding: 8px 12px; text-decoration: none; font-size: 0.95rem; border-radius: 3px;
  transition: background var(--ease);
}
.site-nav a b { font-family: var(--mono); font-weight: 500; font-size: 0.75rem; color: var(--lime-deep); }
.site-nav a:hover { background: var(--paper-2); }
.site-nav .nav-cta { background: var(--ink); color: var(--paper); }
.site-nav .nav-cta b { color: var(--lime); }
.site-nav .nav-cta:hover { background: var(--ink-2); }

.nav-toggle {
  display: none; align-items: center; gap: 10px;
  padding: 8px 12px; background: none; border: 1px solid var(--ink); border-radius: 3px;
  font: inherit; font-size: 0.95rem; color: var(--ink); cursor: pointer;
}
.nav-toggle-bar {
  width: 18px; height: 2px; background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { box-shadow: none; transform: rotate(45deg); }

/* ---------- hero ---------- */

.hero, .contents, .guide, .about, .checklist-head, .checklist-groups, .foot-grid {
  max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad);
}

.hero {
  display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: end;
  padding-block: clamp(40px, 6vw, 72px) clamp(32px, 4vw, 56px);
}

.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--lime-deep);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.8rem, 6.4vw, 5.4rem); line-height: 0.96; letter-spacing: -0.035em; margin-bottom: 28px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(transparent 55%, var(--lime) 55%, var(--lime) 92%, transparent 92%);
}

.lede { max-width: 34em; font-size: 1.15rem; line-height: 1.5; color: var(--ink-2); margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

.btn {
  display: inline-flex; align-items: center; padding: 12px 20px; border-radius: 3px;
  font: inherit; font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer;
  border: 1px solid var(--ink); transition: background var(--ease), color var(--ease);
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--lime); }

.hero-figure { margin: 0; border-left: 1px solid var(--line); padding-left: 24px; }
.hero-figure svg { width: 100%; height: auto; display: block; }
.hero-figure figcaption {
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-top: 12px;
}
.fig-floor, .fig-dim { stroke: var(--line); stroke-width: 1.5; }
.fig-dim { stroke: var(--lime-deep); stroke-dasharray: 3 4; }
.fig-desk, .fig-stand, .fig-screen { fill: var(--ink); }
.fig-leg { stroke: var(--ink); stroke-width: 6; }
.fig-screen-face { fill: var(--lime); }
.fig-head { fill: none; stroke: var(--ink); stroke-width: 4; }
.fig-body { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.fig-label { font-family: var(--mono); font-size: 11px; fill: var(--ink-2); }

/* ---------- contents strip ---------- */

.contents {
  list-style: none; margin: 0 auto; padding-block: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 24px;
}
.contents li { margin: 0; border-top: 2px solid var(--ink); }
.contents a { display: block; padding: 14px 0 22px; text-decoration: none; font-weight: 600; }
.contents a span {
  display: block; font-family: var(--mono); font-weight: 500; font-size: 0.75rem; color: var(--lime-deep);
  margin-bottom: 8px;
}
.contents a small { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.contents a:hover span { color: var(--ink); }

/* ---------- guides ---------- */

.guide {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 40px clamp(32px, 6vw, 96px);
  padding-block: calc(var(--gap) * 0.6) 0; margin-top: calc(var(--gap) * 0.6);
  border-top: 1px solid var(--line);
}
.guide-alt { background: linear-gradient(90deg, var(--lime-soft), transparent 55%); }

.guide-rail { position: sticky; top: 92px; align-self: start; }
.guide-num { font-family: var(--mono); font-size: 0.8rem; color: var(--lime-deep); margin: 0 0 12px; }
.guide h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 28px; }

.glance { margin: 0; border-top: 1px solid var(--ink); }
.glance div {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line);
}
.glance dt { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); padding-top: 3px; }
.glance dd { margin: 0; font-weight: 600; font-size: 0.95rem; }

.guide-body { max-width: 40em; }
.guide-body > p:first-child { font-size: 1.15rem; line-height: 1.5; }

.fold { border-top: 1px solid var(--ink); }
.fold:last-child { border-bottom: 1px solid var(--ink); }
.fold summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 4px; cursor: pointer; font-weight: 600; list-style: none;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after {
  content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 1.1rem; background: var(--lime); color: var(--ink); border-radius: 3px;
  transition: transform var(--ease);
}
.fold[open] summary::after { transform: rotate(45deg); }
.fold summary:hover { background: var(--paper-2); }
.fold > p, .fold > ul { margin: 0 4px 18px; color: var(--ink-2); }

/* ---------- checklist ---------- */

.checklist { background: var(--ink); color: var(--paper); margin-top: var(--gap); padding-block: var(--gap); }
.checklist .guide-num { color: var(--lime); }
.checklist-head { display: grid; grid-template-columns: 5fr 7fr; gap: 24px 48px; align-items: end; }
.checklist-head h2 { font-size: clamp(2rem, 4vw, 3.2rem); grid-column: 1; }
.checklist-intro { grid-column: 2; grid-row: 1 / 3; max-width: 34em; color: #cfcbbd; align-self: end; }

.progress {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center;
  margin-top: 24px; padding-top: 24px; border-top: 1px solid #4a4d50;
}
.progress-bar { height: 8px; background: #4a4d50; border-radius: 4px; overflow: hidden; }
.progress-bar span {
  display: block; height: 100%; width: 0; background: var(--lime); transition: width 240ms ease-out;
}
.progress-text { margin: 0; font-family: var(--mono); font-size: 0.85rem; }
.checklist .btn-ghost { color: var(--paper); border-color: var(--paper); }
.checklist .btn-ghost:hover { background: var(--lime); color: var(--ink); }

.checklist-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 48px; margin-top: 48px; }
.checklist-groups fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.checklist-groups legend {
  font-family: var(--mono); font-size: 0.78rem; color: var(--lime); padding: 0; margin-bottom: 10px;
}
.checklist-groups label {
  display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid #4a4d50;
  cursor: pointer;
}
.checklist-groups input {
  flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--lime); cursor: pointer;
}
.checklist-groups input:checked + span { color: #a9a596; text-decoration: line-through; }

/* ---------- about + footer ---------- */

.about { padding-block: var(--gap) 0; max-width: 780px; }
.about h2 { font-size: 1.4rem; margin-bottom: 16px; }
.about p { color: var(--ink-2); }

.foot { margin-top: var(--gap); border-top: 2px solid var(--ink); padding-block: 40px 56px; }
.foot-grid { display: grid; grid-template-columns: 4fr 3fr 5fr; gap: 32px; }
.foot-brand { font-weight: 700; margin-bottom: 6px; }
.foot-muted { color: var(--muted); font-size: 0.92rem; }
.foot nav { display: flex; flex-direction: column; gap: 6px; }
.foot nav a { text-decoration: none; font-size: 0.95rem; }
.foot nav a:hover { text-decoration: underline; text-decoration-color: var(--lime-deep); }
.foot-title { font-size: 0.78rem; font-family: var(--mono); font-weight: 500; margin-bottom: 8px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; align-items: start; min-height: 0; }
  .hero-figure { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; max-width: 480px; }
  .contents { grid-template-columns: 1fr 1fr; }
  .guide { grid-template-columns: 1fr; gap: 32px; }
  .guide-rail { position: static; }
  .guide-alt { background: linear-gradient(180deg, var(--lime-soft), transparent 40%); }
  .checklist-head { grid-template-columns: 1fr; }
  .checklist-head h2, .checklist-intro { grid-column: 1; grid-row: auto; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; padding: 8px var(--pad) 16px;
    background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 8px; border-top: 1px solid var(--line); border-radius: 0; font-size: 1.05rem; }
  .site-nav .nav-cta { margin-top: 8px; border-radius: 3px; border-top: 0; justify-content: center; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .hero { padding-top: 32px; }
  .hero h1 { font-size: clamp(2.6rem, 13vw, 3.4rem); }
  .lede { font-size: 1.05rem; }
  .contents { grid-template-columns: 1fr; }
  .contents a { padding: 12px 0 16px; }
  .glance div { grid-template-columns: 1fr; gap: 2px; }
  .checklist-groups { grid-template-columns: 1fr; gap: 24px; }
  .progress { grid-template-columns: 1fr auto; }
  .progress .btn { grid-column: 1 / -1; justify-content: center; }
  .foot-grid { grid-template-columns: 1fr; }
}

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

@media print {
  .masthead, .hero-actions, .progress .btn, .skip { display: none; }
  .checklist { background: none; color: var(--ink); }
  .fold { break-inside: avoid; }
}
