:root {
  color-scheme: dark;
  --lime: #a1fa3d;
  --amber: #fabf24;
  --bg: #101110;
  --panel: #181b18;
  --line: #363e34;
  --text: #f5f7f0;
  --muted: #b6c0b2;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 "Inter", system-ui, sans-serif; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.top, .footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px 0; }
.top { border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 760; letter-spacing: -.025em; }
.mark { position: relative; display: inline-block; width: 24px; height: 24px; border: 2px solid var(--lime); border-radius: 50%; flex: none; }
.mark::after { content: ""; position: absolute; top: 4px; left: 9px; height: 6px; width: 5px; border-left: 2px solid var(--lime); border-bottom: 2px solid var(--lime); }
.nav { color: var(--muted); font-size: .875rem; text-decoration: none; }
.nav:hover { color: var(--lime); }
.hero { display: grid; grid-template-columns: 1.04fr 1fr; gap: clamp(28px, 6vw, 86px); align-items: center; padding-block: clamp(46px, 8vw, 100px); }
.eyebrow, .clock-label, legend { font-size: .72rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow { color: var(--lime); display: flex; gap: 10px; align-items: center; }
.eyebrow span { width: 18px; height: 2px; background: currentColor; }
h1 { font-size: clamp(3.65rem, 7.5vw, 7rem); line-height: .97; letter-spacing: -.085em; margin: 20px 0 26px; }
h1 em { color: var(--lime); font-style: normal; }
.lede { color: var(--muted); max-width: 31ch; font-size: clamp(1rem, 2vw, 1.2rem); margin: 0 0 28px; }
.primary, #toggle { background: var(--lime); color: #141b0d; font-weight: 800; border: 1px solid transparent; }
.primary { display: inline-flex; align-items: center; gap: 24px; text-decoration: none; padding: 12px 18px; border-radius: 9px; }
.primary:hover, #toggle:hover { background: #bbff71; }
.board { scroll-margin-top: 24px; min-width: 0; padding: clamp(16px, 3vw, 28px); border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(ellipse at 50% 35%, #283322, var(--panel) 70%); box-shadow: 0 20px 64px #0005; }
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.board-head h2 { font-size: .94rem; margin: 0; }
#status { font-size: .74rem; color: var(--amber); border: 1px solid #5a4d28; border-radius: 99px; padding: 2px 10px; }
.dial { --progress: 100%; width: min(254px, 92%); aspect-ratio: 1; margin: 28px auto; border-radius: 50%; padding: 4px; background: conic-gradient(var(--lime) var(--progress), #40503a 0); }
.face { display: grid; place-content: center; text-align: center; height: 100%; border: 8px solid #232b21; background: #141913; border-radius: 50%; }
.clock-label { color: var(--muted); margin: 0; }
#time { color: var(--lime); font: 700 clamp(2.75rem, 6vw, 4.5rem)/1.18 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: -.09em; padding-right: .09em; }
#activity { margin: 3px 0 0; font-weight: 650; }
.controls, .presets { display: grid; gap: 8px; }
.controls { grid-template-columns: 2fr 1fr; }
.controls button, .presets button { min-height: 44px; border-radius: 8px; }
#reset, .presets button { color: var(--text); border: 1px solid var(--line); background: #151815; }
#reset:hover, .presets button:hover { background: #282f25; }
fieldset { min-width: 0; margin: 18px 0 0; padding: 0; border: 0; }
legend { padding: 0 0 8px; color: var(--muted); }
.presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.presets button { padding: 8px 4px; font-size: .78rem; font-weight: 650; }
.presets small { display: block; font-size: .72rem; color: var(--muted); }
.presets [aria-pressed="true"] { border-color: var(--lime); color: var(--lime); }
.workflow { border-block: 1px solid var(--line); padding-block: 30px; display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.workflow h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); letter-spacing: -.05em; line-height: 1.12; margin: 0; }
.workflow p { color: var(--muted); max-width: 38ch; margin: 0; }
@media (max-width: 740px) {
  .wrap { width: calc(100% - 36px); }
  .hero { grid-template-columns: 1fr; }
  .board { width: 100%; max-width: 530px; }
  .workflow { flex-direction: column; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.top nav { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; }
.nav[aria-current="page"] { color: var(--lime); }
.intro-link { display: inline-block; margin: 16px 0 0 14px; }
.inner { padding-block: clamp(36px, 7vw, 80px); }
.page-heading { margin-bottom: 32px; }
.page-heading h1 { font-size: clamp(2.8rem, 7vw, 5.8rem); }
.page-heading .lede { max-width: 53ch; }
.guide-layout, .builder-layout { display: grid; align-items: start; gap: 24px; }
.guide-layout { grid-template-columns: 215px minmax(0, 1fr); }
.builder-layout { grid-template-columns: minmax(0, 1.75fr) minmax(250px, 1fr); }
.guide-nav, .sheet, .guide-content section { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: clamp(16px, 3vw, 26px); }
.guide-nav { display: grid; gap: 12px; }
.guide-content, .editor { display: grid; gap: 16px; min-width: 0; }
.guide-content section { scroll-margin-top: 18px; }
.guide-content li + li, dd + dt { margin-top: 10px; }
.guide-content dt { font-weight: 750; }
.guide-content dd { margin: 4px 0 0; }
.guide-content a, .guide-nav a, .exports a { color: var(--lime); text-underline-offset: 3px; }
.inner h2 { margin: 0 0 12px; letter-spacing: -.035em; font-size: clamp(1.35rem, 3vw, 1.85rem); }
.inner h3 { margin: 10px 0 4px; font-size: 1rem; }
.inner ol { padding-left: 22px; }
.inner ol, .inner dd, .exports p { color: var(--muted); }
.inner strong { color: var(--text); }
.sheet label { display: grid; gap: 5px; align-content: start; font-size: .875rem; font-weight: 650; margin-bottom: 12px; min-width: 0; }
.sheet label small { color: var(--muted); font-weight: 400; }
.fields, .equipment-row { display: grid; gap: 10px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.equipment-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 90px auto; align-items: start; padding-top: 10px; }
.equipment-row button { align-self: end; margin-bottom: 12px; }
.sheet input, .sheet select, .sheet textarea { display: block; width: 100%; min-height: 44px; padding: 8px 10px; background: #101310; color: var(--text); border: 1px solid #535c50; border-radius: 8px; font: inherit; }
.sheet textarea { resize: vertical; }
.activity-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.activity-card legend { color: var(--amber); padding-inline: 6px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.secondary { min-height: 44px; padding: 7px 10px; border: 1px solid #535c50; border-radius: 8px; background: #121612; color: var(--text); font-size: .875rem; }
.secondary:hover { background: #2a3425; }
.secondary:disabled { opacity: .48; cursor: default; }
.remove { color: #ffc6c6; }
.exports .primary, .exports .secondary { width: 100%; justify-content: center; }
.exports .secondary + .secondary { margin-top: 8px; }
.exports p { font-size: .9rem; }
.exports .total { color: var(--lime); font-weight: 750; }
.exports hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
#builder-status { color: var(--amber); }
[hidden] { display: none !important; }
@media (max-width: 850px) {
  .equipment-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .guide-layout, .builder-layout { grid-template-columns: minmax(0, 1fr); }
  .top nav { gap: 6px 12px; }
  .top .brand { font-size: .9rem; }
}
