:root {
  color-scheme: light;
  --ink: #18211e;
  --muted: #5e6c66;
  --soft: #eef1ea;
  --paper: #f8f4e8;
  --panel: #fffaf0;
  --line: #cbd5cf;
  --green: #234b3d;
  --green-2: #2f7256;
  --brass: #a87931;
  --red: #9d4b3f;
  --blue: #315f83;
  --shadow: 0 18px 70px rgba(15, 25, 20, .18);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --serif: ui-serif, "Iowan Old Style", "Songti SC", "Noto Serif CJK SC", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}
a { color: inherit; }
button, textarea { font: inherit; }

.hero, .subhero {
  display: grid;
  grid-template-rows: auto 1fr;
  position: relative;
  overflow: hidden;
  color: #fffaf0;
  background: #17211d url("/assets/glass-gear-workbench.png") center / cover no-repeat;
}
.hero { min-height: 78vh; }
.subhero { min-height: 52vh; }
.hero::after, .subhero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 15, 13, .84), rgba(10, 15, 13, .46) 46%, rgba(10, 15, 13, .10)),
    linear-gradient(0deg, rgba(10, 15, 13, .58), transparent 40%);
  pointer-events: none;
}
.tools-hero::after {
  background:
    linear-gradient(90deg, rgba(20, 28, 25, .86), rgba(49, 95, 131, .44) 52%, rgba(10, 15, 13, .16)),
    linear-gradient(0deg, rgba(10, 15, 13, .56), transparent 40%);
}
.bench-hero::after {
  background:
    linear-gradient(90deg, rgba(20, 28, 25, .86), rgba(157, 75, 63, .36) 52%, rgba(10, 15, 13, .12)),
    linear-gradient(0deg, rgba(10, 15, 13, .56), transparent 40%);
}

.nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}
.gear-mark {
  width: 28px;
  height: 28px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.gear-mark span {
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: block;
}
.nav-links {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 250, 240, .32);
  background: rgba(24, 33, 30, .34);
  backdrop-filter: blur(12px);
}
.nav-links a {
  text-decoration: none;
  padding: 8px 12px;
  font-size: 13px;
  color: rgba(255, 250, 240, .78);
}
.nav-links a:hover {
  color: #fffaf0;
  background: rgba(255, 250, 240, .12);
}

.hero-inner, .subhero-inner {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  align-self: end;
}
.hero-inner { padding: 70px 0 92px; }
.subhero-inner { padding: 52px 0 70px; }
.kicker, .eyebrow {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 13px;
}
.kicker { color: rgba(255, 250, 240, .72); }
.eyebrow {
  color: var(--brass);
  text-transform: lowercase;
}
h1 {
  margin: 0;
  max-width: 820px;
  font-family: var(--serif);
  font-size: 76px;
  line-height: .95;
  letter-spacing: 0;
}
.subhero h1 { font-size: 58px; line-height: 1.02; }
h1 span { display: block; }
.hero-copy {
  max-width: 680px;
  margin: 24px 0 0;
  font-size: 19px;
  line-height: 1.8;
  color: rgba(255, 250, 240, .82);
  overflow-wrap: anywhere;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 250, 240, .4);
  background: rgba(255, 250, 240, .12);
  color: #fffaf0;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}
.button.alt {
  border-color: rgba(255, 250, 240, .18);
  color: rgba(255, 250, 240, .76);
  background: rgba(20, 28, 25, .28);
}

.section { padding: 68px 0; }
.section.dark {
  background:
    linear-gradient(135deg, var(--green), #1c2f3b 60%, #4d2f2a);
  color: var(--paper);
}
.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 42px;
  align-items: start;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}
.note {
  margin: 12px 0 0;
  max-width: 640px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.dark .note { color: rgba(248, 244, 232, .68); }

.status-board, .meter {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, .72);
  padding: 20px;
  min-height: 100%;
}
.signal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.signal:last-child { border-bottom: 0; }
.signal b {
  font-family: var(--serif);
  font-size: 16px;
}
.signal span {
  color: var(--muted);
  text-align: right;
  line-height: 1.5;
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tile {
  min-height: 210px;
  border: 1px solid rgba(248, 244, 232, .24);
  padding: 18px;
  background: rgba(248, 244, 232, .06);
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}
.tile:hover {
  transform: translateY(-3px);
  background: rgba(248, 244, 232, .10);
}
.tag {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(248, 244, 232, .56);
}
.tile h3 {
  margin: 34px 0 10px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}
.tile p {
  margin: 0;
  color: rgba(248, 244, 232, .72);
  line-height: 1.7;
  font-size: 14px;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 20px;
  align-items: stretch;
}
.tool {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 20px;
}
.tool label, .tool-title {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 10px;
}
textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 1px solid var(--line);
  background: #fffdf7;
  color: var(--ink);
  padding: 14px;
  line-height: 1.7;
  outline: none;
}
textarea:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(47, 114, 86, .16);
}
.status {
  margin-top: 14px;
  min-height: 42px;
  padding: 12px 14px;
  border-left: 4px solid var(--green-2);
  background: var(--soft);
  color: var(--muted);
  line-height: 1.6;
}
.status.warn {
  border-left-color: var(--red);
  color: #58302a;
  background: #f6e8e2;
}

.log-list, .note-stack, .bench-list {
  display: grid;
  gap: 12px;
}
.log-row, .note-entry, .bench-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.note-entry, .bench-item {
  grid-template-columns: 170px minmax(0, 1fr);
}
.log-row time, .note-entry time {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 13px;
}
.log-row h3, .note-entry h2, .bench-item h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0;
}
.log-row p, .note-entry p, .bench-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}
.bench-item {
  grid-template-columns: 120px minmax(0, 1fr);
}
.bench-item .tag {
  color: var(--blue);
  padding-top: 4px;
}
dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}
dl div {
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, .66);
  padding: 12px;
}
dt {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12px;
}
dd {
  margin: 6px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

footer {
  padding: 30px 0 42px;
  background: #16201d;
  color: rgba(248, 244, 232, .62);
  font-family: var(--mono);
  font-size: 12px;
}

@media (max-width: 760px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }
  .nav-links {
    width: 100%;
    overflow-x: auto;
  }
  h1, .subhero h1 {
    max-width: 340px;
    font-size: 34px;
    line-height: 1.04;
  }
  .hero-copy, .note, .tile p, .log-row p, .note-entry p, .bench-item p {
    width: 100%;
    max-width: 320px;
    word-break: break-word;
  }
  .hero {
    min-height: 82vh;
    background-position: 42% center;
  }
  .subhero {
    min-height: 58vh;
    background-position: 42% center;
  }
  .hero-inner { padding: 56px 0 74px; }
  .subhero-inner { padding: 44px 0 58px; }
  .hero-copy { font-size: 17px; }
  .section-head, .intro-grid, .workbench, .grid, .log-row, .note-entry, .bench-item, dl {
    grid-template-columns: 1fr;
  }
  .section-head { display: grid; }
  .grid { display: grid; }
  .log-row, .note-entry, .bench-item { gap: 8px; }
}
