:root {
  --bg: #f5f6f3;
  --panel: #ffffff;
  --ink: #141a16;
  --mut: #5c6b62;
  --line: #e3e6df;
  --brand: #17663a;
  --brand-ink: #0d3d22;
  --ok-bg: #e7f5ec;
  --ok-ink: #14532d;
  --bad-bg: #fdeceb;
  --bad-ink: #991b1b;
  --warn-bg: #fdf3e3;
  --warn-ink: #92400e;
  --info-bg: #e9eefc;
  --info-ink: #1e3a8a;
  --mut-bg: #eef0ec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.15rem; margin: 0 0 0.7rem; letter-spacing: -0.01em; }
h3 { font-size: 1rem; margin: 1rem 0 0.4rem; }
p { margin: 0 0 0.8rem; }
a { color: var(--brand); }
code { font-family: var(--mono); font-size: 0.85em; background: var(--mut-bg); padding: 0.1em 0.35em; border-radius: 5px; }

main { max-width: 1180px; margin: 0 auto; padding: 0 20px 64px; }

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 20px; max-width: 1180px; margin: 0 auto;
}
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.brand span { color: var(--brand); }
.top nav { display: flex; gap: 16px; margin-left: auto; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--mut); font-size: 0.95rem; }
.top nav a.on, .top nav a:hover { color: var(--ink); }

/* ---------- buttons & badges ---------- */
.btn {
  display: inline-block; background: var(--brand); color: #fff; text-decoration: none;
  border: 0; border-radius: 10px; padding: 11px 18px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--brand-ink); }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn.small { padding: 7px 12px; font-size: 0.85rem; }
.btn.ghost.small { border-color: var(--line); color: var(--ink); }
.btn:disabled { opacity: 0.5; cursor: default; }

.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  border-radius: 999px; padding: 2px 9px; background: var(--mut-bg); color: var(--mut);
  text-transform: none; vertical-align: middle;
}
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.info { background: var(--info-bg); color: var(--info-ink); }
.badge.test { background: #fff7db; color: #7a5b00; border: 1px solid #f0e0a8; }

/* ---------- hero & sections ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 32px; align-items: start; padding: 34px 0 10px; }
.kicker { text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.76rem; font-weight: 700; color: var(--brand); margin-bottom: 10px; }
.lede { font-size: 1.08rem; color: #2b352e; max-width: 46ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }
.fine { font-size: 0.84rem; color: var(--mut); }
.small { font-size: 0.85rem; }
.mut { color: var(--mut); }
.strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }

.hero-shot img, .shot-grid img { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
figure { margin: 0; }
figcaption { font-size: 0.82rem; color: var(--mut); margin-top: 8px; }

.band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 28px 0 6px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat .n { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.stat .l { font-size: 0.9rem; font-weight: 600; }
.stat .s { font-size: 0.8rem; color: var(--mut); }

.section { padding: 22px 0; }
.section.narrow { max-width: 720px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 26px 0; }
.steps { padding-left: 20px; margin: 0; }
.steps li { margin-bottom: 10px; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding-left: 22px; position: relative; margin-bottom: 8px; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

.shots { padding: 20px 0 30px; }
.shot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.pricing { text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 34px 22px; margin: 20px 0; box-shadow: var(--shadow); }
.pricing h2 { font-size: 1.6rem; }
.pricing p { max-width: 62ch; margin: 0 auto 16px; }

/* ---------- panels, tables, cards ---------- */
.grid2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 18px; overflow-x: auto; }
.panel.side { max-height: none; }
.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.row label { font-size: 0.85rem; color: var(--mut); display: flex; flex-direction: column; gap: 4px; }
.grow { flex: 1; }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 14px; }

table.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.table th { text-align: left; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mut); border-bottom: 1px solid var(--line); padding: 6px 8px; white-space: nowrap; }
table.table td { border-bottom: 1px solid #f0f1ed; padding: 8px; vertical-align: top; overflow-wrap: break-word; }
table.table tr:last-child td { border-bottom: 0; }
table.compact td, table.compact th { padding: 5px 6px; }
td.seq { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); }
td.ts, .ts { font-variant-numeric: tabular-nums; color: var(--mut); white-space: nowrap; font-size: 0.8rem; }
.access { font-size: 0.82rem; color: var(--info-ink); background: var(--info-bg); display: inline-block; border-radius: 6px; padding: 1px 7px; margin-top: 3px; }
.refused { color: var(--bad-ink); font-weight: 600; }

.callout { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--line); background: #fbfbf9; }
.callout.ok { background: var(--ok-bg); border-color: #c7e6d2; }
.callout.bad { background: var(--bad-bg); border-color: #f3c9c6; }
.callout h3 { margin-top: 0; }
.timeline { list-style: none; padding: 0; margin: 8px 0 0; }
.timeline li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; flex-wrap: wrap; border-bottom: 1px dashed #e7e9e4; }
.timeline li:last-child { border-bottom: 0; }

.daybar { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 0 4px; }
.tab { text-decoration: none; color: var(--mut); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; }
.tab.on { color: #fff; background: var(--brand); border-color: var(--brand); font-weight: 600; }

/* ---------- field app ---------- */
.field .panel { margin-bottom: 0; }
.stoplist { list-style: none; padding: 0; margin: 0; }
.stop { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: start; padding: 10px 8px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.stop:hover { background: #f7f8f5; }
.stop.on { border-color: #cfe3d6; background: #f2f8f4; }
.stop .seq { font-weight: 700; color: var(--brand); }
.stoplist li + li { border-top: 1px solid #f0f1ed; }

.form label { display: block; font-size: 0.85rem; color: var(--mut); margin-bottom: 10px; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: var(--ink);
}
.form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.form legend { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mut); padding: 0 4px; }
.checks-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 0.85rem; color: var(--ink); margin: 0; background: #fff; }
.chip input { width: auto; margin: 0; }
.sigpad { width: 100%; max-width: 520px; height: auto; border: 1px dashed #c8cdc4; border-radius: 10px; background: #fff; touch-action: none; }
.switch { display: inline-flex; gap: 6px; align-items: center; font-size: 0.9rem; color: var(--mut); }
.switch input { width: auto; }

.queuelist { list-style: none; padding: 0; margin: 0; }
.queue-item { padding: 9px 0; border-bottom: 1px solid #f0f1ed; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.queue-item:last-child { border-bottom: 0; }

/* ---------- report sheet ---------- */
.sheet { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.sheet-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; border-bottom: 2px solid var(--brand); padding-bottom: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 22px; margin-bottom: 12px; }
.sheet-grid .l { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mut); }
.sheet-media { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 16px; }
.sheet-media img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sheet-foot { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 12px; }
.download { background: #fff; }
.download .sheet { border: 0; box-shadow: none; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--panel); margin-top: 30px; padding: 22px 20px 34px; }
.foot { max-width: none; }
.foot > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.foot .links { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px auto; }
.foot a { color: var(--brand); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .shot-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 20px; }
  .cols, .grid2 { grid-template-columns: 1fr; }
  .band { grid-template-columns: repeat(2, 1fr); }
  .sheet-media { grid-template-columns: 1fr; }
  .sheet-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.6rem; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .shot-grid { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; gap: 10px; }
  .top nav { order: 3; width: 100%; }
  .stop { grid-template-columns: 28px 1fr; }
  main { padding: 0 14px 48px; }
}
