:root {
  --ink: #141816;
  --mute: #5c6a66;
  --porcelain: #f3efe6;
  --porcelain-2: #faf7f0;
  --kettle: #0e4a4e;
  --kettle-deep: #072e31;
  --cyan: #7ec8c9;
  --cyan-2: #c7ecec;
  --warn: #c45c26;
  --pass: #2f7a4a;
  --line: rgba(14, 74, 78, 0.16);
  --serif: "Noto Serif SC", "Songti SC", serif;
  --sans: "IBM Plex Sans", "PingFang SC", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --shadow: 0 18px 40px rgba(7, 46, 49, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 88px; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(126, 200, 201, 0.08), transparent 28%),
    var(--porcelain);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.app-link, .live { color: var(--kettle); border-bottom: 1px solid rgba(14, 74, 78, 0.35); }
footer .app-link { color: var(--cyan); border-bottom-color: rgba(126, 200, 201, 0.5); }
button { font-family: inherit; cursor: pointer; }
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--cyan-2);
  padding: 0.05em 0.35em;
}

.glaze {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0.11;
  background-image: url("images/texture.webp");
  background-size: 420px auto;
  mix-blend-mode: multiply;
}

.skip { position: absolute; left: -999px; }
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 80;
  background: var(--porcelain-2);
  padding: 8px 12px;
}

.kettle-rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 42px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding-top: 58px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, #f7f4ee 0 22%, #d9ecec 22% 48%, #9fd3d4 48% 72%, #0e4a4e 72% 100%);
}
.rail-mark {
  flex: 1;
  writing-mode: vertical-rl;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--kettle-deep);
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(20, 24, 22, 0.12);
}
.rail-mark[data-for="value"],
.rail-mark[data-for="rules"] { color: var(--porcelain-2); }

.nav {
  position: fixed;
  top: 0;
  left: 42px;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 22px;
  background: rgba(243, 239, 230, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
}
.brand small {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--mute);
}
.seal {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--kettle);
  color: var(--porcelain-2);
  font-family: var(--serif);
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--kettle);
  color: var(--kettle);
  padding: 6px 12px;
}
.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
}
.nav-links a { color: var(--mute); }
.nav-links a.is-active,
.nav-links a:hover { color: var(--kettle); }
.nav-links .live {
  padding: 6px 12px;
  border: 1px solid var(--kettle);
  color: var(--kettle);
}

.hero {
  position: relative;
  min-height: 100vh;
  margin-left: 42px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
  overflow: hidden;
  color: var(--porcelain-2);
  background: var(--kettle-deep);
}
.hero picture {
  position: absolute;
  inset: 0;
  display: block;
}
.hero picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 46, 49, 0.88) 0%, rgba(7, 46, 49, 0.42) 58%, rgba(7, 46, 49, 0.18) 100%),
    linear-gradient(180deg, transparent 38%, rgba(7, 46, 49, 0.72) 100%);
}
.hero-cut {
  position: relative;
  z-index: 1;
  padding: 18vh 6vw 10vh;
  max-width: 720px;
}
.kicker, .vlabel {
  letter-spacing: 0.28em;
  font-size: 12px;
  margin: 0 0 12px;
  color: var(--cyan);
}
.vlabel { color: var(--kettle); font-family: var(--mono); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.08; margin: 0 0 16px; }
h1 { font-size: clamp(44px, 7.6vw, 92px); letter-spacing: -0.03em; word-break: keep-all; }
h2 { font-size: clamp(28px, 3.6vw, 42px); }
h3 { font-size: 22px; }
.lead {
  font-size: 17px;
  max-width: 36em;
  color: rgba(250, 247, 240, 0.88);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.hero-id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
  border-left: 3px solid var(--cyan);
  padding-left: 12px;
}
.hero-id code { background: transparent; color: inherit; padding: 0; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.chip {
  border: 1px solid rgba(250, 247, 240, 0.35);
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid currentColor;
  font-size: 14px;
}
.btn-fill { background: var(--cyan); color: var(--kettle-deep); border-color: var(--cyan); }
.btn-ghost { background: transparent; color: inherit; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.disclaimer { font-size: 12px; color: rgba(250, 247, 240, 0.65); margin-top: 18px; }

.strata {
  position: relative;
  z-index: 1;
  align-self: end;
  margin: 0 6vw 10vh 0;
  padding: 0;
  list-style: none;
  width: min(280px, 32vw);
  border: 1px solid rgba(250, 247, 240, 0.25);
}
.strata li {
  padding: 18px 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
}
.strata .s1 { background: rgba(250, 247, 240, 0.88); color: var(--kettle-deep); }
.strata .s2 { background: rgba(126, 200, 201, 0.55); }
.strata .s3 { background: rgba(14, 74, 78, 0.72); }
.strata .s4 { background: rgba(196, 92, 38, 0.85); }

.wrap { width: min(1120px, calc(100% - 88px)); margin: 0 auto; padding: 96px 0; }
.section-head {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.section-head p:last-child { color: var(--mute); margin: 0; }
.need-grid, .bench-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.slab {
  background: var(--porcelain-2);
  border: 1px solid var(--line);
  padding: 22px 22px 18px;
  min-height: 220px;
  box-shadow: inset 0 8px 0 var(--cyan-2);
}
.slab.warn { box-shadow: inset 0 8px 0 rgba(196, 92, 38, 0.45); }
.stamp {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.16em;
  font-family: var(--mono);
  color: var(--kettle);
  border: 1px solid var(--kettle);
  padding: 2px 8px;
  margin-bottom: 10px;
}
.slab ul, .io-grid ul, .rule-list { margin: 0; padding-left: 1.1em; }
.slab li, .io-grid li, .rule-list li { margin: 0.35em 0; }

.alt {
  background:
    linear-gradient(180deg, #e4eceb 0%, var(--porcelain) 100%);
  margin-left: 42px;
}
#need, #bench, #rules { margin-left: 42px; }

.layer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 80px;
  padding-top: 12px;
  border-top: 8px solid var(--cyan-2);
}
.layer.flip { direction: rtl; }
.layer.flip > * { direction: ltr; }
.num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--kettle);
  display: block;
  margin-bottom: 8px;
}
figure { margin: 0; }
figure img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  box-shadow: var(--shadow);
}
figcaption { margin-top: 10px; font-size: 13px; color: var(--mute); }

.mini-table { margin: 16px 0 0; }
.mini-table div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed var(--line);
  padding: 6px 0;
  font-size: 13px;
}
.mini-table dt { color: var(--mute); }
.mini-table dd { margin: 0; font-family: var(--mono); }

.demo {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px dashed var(--kettle);
  background: rgba(126, 200, 201, 0.12);
}
.demo-title { margin: 0 0 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--kettle); }
.wash-bars { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; list-style: none; padding: 0; margin: 8px 0; }
.wash-bars li { height: 14px; background: rgba(14, 74, 78, 0.15); }
.wash-bars li.done { background: var(--kettle); }
.lock-demo .btn-fill[disabled] { background: var(--warn); border-color: var(--warn); color: #fff; opacity: 1; }
.lock-demo.is-open .btn-fill { background: var(--pass); border-color: var(--pass); color: #fff; opacity: 1; cursor: pointer; }

.rule-list { font-size: 16px; max-width: 52em; }
.io-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.io-grid > div {
  background: var(--porcelain-2);
  border-left: 8px solid var(--kettle);
  padding: 20px 24px;
}

footer {
  margin-left: 42px;
  background: var(--kettle-deep);
  color: var(--porcelain-2);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 36px 0;
  font-size: 13px;
}

@media (max-width: 960px) {
  .kettle-rail { display: none; }
  .nav, .hero, .alt, #need, #bench, #rules, footer { margin-left: 0; }
  .nav { left: 0; }
  .hero, .layer, .section-head, .need-grid, .bench-grid, .io-grid, .footer-inner {
    grid-template-columns: 1fr;
  }
  .hero-cut { padding: 120px 24px 48px; }
  .wrap { width: min(1120px, calc(100% - 32px)); }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 45;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 18px;
    background: var(--porcelain-2);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .hero { min-height: 100svh; }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(7, 46, 49, 0.28) 0%, rgba(7, 46, 49, 0.55) 42%, rgba(7, 46, 49, 0.94) 100%);
  }
  .hero picture img { opacity: 0.9; }
  .strata { width: auto; margin: 0 24px 40px; }
  figure img { height: 240px; }
}
