/* aigolf.co — theme_05 Maritime Chartroom Workbench */
:root {
  --bg: #0c192c;
  --surface: #132640;
  --ink: #f1f5f9;
  --accent: #38bdf8;
  --muted: #94a3b8;
  --line: #1e3a5f;
  --good: #4ade80;
  --warn: #fbbf24;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 50% -10%, #16294a 0%, var(--bg) 60%),
    var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- horizon bar ---- */
.horizon {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, #0a1424 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.horizon-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.7rem 1.25rem;
}
.brand {
  font-weight: 800; font-size: 1.25rem; color: var(--ink); letter-spacing: 0.02em;
}
.brand-tld { color: var(--accent); }
.topnav { display: flex; gap: 1.1rem; margin-left: auto; flex-wrap: wrap; }
.topnav a { color: var(--muted); font-size: 0.92rem; }
.topnav a:hover { color: var(--ink); }

.disclosure-strip {
  max-width: 1080px; margin: 0 auto;
  padding: 0.45rem 1.25rem 0.6rem;
  font-size: 0.8rem; color: var(--muted);
  border-top: 1px dashed var(--line);
}
.disclosure-strip strong { color: var(--warn); }

main { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem 3rem; }

.hero { padding: 2.5rem 0 1.5rem; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 0.6rem; letter-spacing: -0.01em; }
.lede { max-width: 62ch; color: var(--muted); font-size: 1.05rem; margin: 0; }

h2 { font-size: 1.3rem; margin: 2.2rem 0 0.8rem; border-bottom: 1px solid var(--line); padding-bottom: 0.4rem; }
h3 { font-size: 1rem; margin: 0 0 0.8rem; color: var(--accent); }

/* ---- calculator strip ---- */
.workbench {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
  margin-top: 1rem;
}
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
  padding: 0.9rem;
  background: #0f2038;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 1.1rem;
}
.field { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.82rem; color: var(--muted); }
.field select, .field input[type="number"] {
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 0.45rem 0.55rem; font-size: 0.95rem;
}
.field input[type="range"] { width: 100%; accent-color: var(--accent); }
.field output { color: var(--ink); font-family: ui-monospace, monospace; }

/* ---- plot canvas ---- */
.plot-wrap { margin: 0 0 1.25rem; }
#plot {
  width: 100%; height: auto; display: block;
  background: #0a1526;
  border: 1px solid var(--line); border-radius: 8px;
}
.plot-caption { font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; }
.plot-grid line { stroke: var(--line); stroke-width: 1; }
.plot-axes line, .plot-axes path { stroke: var(--muted); stroke-width: 1.5; }
.plot-axes text { fill: var(--muted); font-size: 11px; font-family: ui-monospace, monospace; }
.plot-point circle { fill: var(--accent); fill-opacity: 0.75; stroke: var(--ink); stroke-width: 1; }
.plot-point text { fill: var(--ink); font-size: 10px; font-family: ui-monospace, monospace; }
.plot-active circle { fill: var(--warn); }

/* ---- results ---- */
.results-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
@media (max-width: 760px) { .results-grid { grid-template-columns: 1fr; } }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 1rem 1.15rem;
}
.metrics { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0; font-size: 0.92rem; }
.metrics dt { color: var(--muted); }
.metrics dd { margin: 0; font-family: ui-monospace, monospace; text-align: right; }

.checklist { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.checklist li {
  display: flex; gap: 0.55rem; align-items: baseline;
  padding: 0.4rem 0; border-bottom: 1px dashed var(--line);
}
.checklist li:last-child { border-bottom: none; }
.check-mark { font-family: ui-monospace, monospace; width: 1.4em; }
.check-pass .check-mark { color: var(--good); }
.check-fail .check-mark { color: var(--warn); }
.check-fail { color: var(--muted); }

/* ---- export ---- */
.export-bar {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
  margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line);
}
.export-bar button {
  background: var(--accent); color: #06202f; border: none;
  border-radius: 6px; padding: 0.5rem 0.9rem;
  font-weight: 700; font-size: 0.88rem; cursor: pointer;
}
.export-bar button:hover { filter: brightness(1.12); }
.export-bar button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sha-out {
  font-size: 0.75rem; color: var(--muted);
  word-break: break-all; flex: 1; min-width: 200px;
}

/* ---- reference tables ---- */
.reference p { color: var(--muted); max-width: 70ch; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.coord-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.coord-table th, .coord-table td {
  padding: 0.5rem 0.75rem; text-align: left;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.coord-table thead th { background: #0f2038; color: var(--accent); font-weight: 600; }
.coord-table tbody tr:last-child td { border-bottom: none; }
.coord-table tbody tr:hover { background: #16294a; }
.fineprint { font-size: 0.82rem; }

/* ---- footer ---- */
.footer {
  border-top: 1px solid var(--line);
  background: #081120;
  padding: 1.5rem 1.25rem 2rem;
}
.footer-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--muted);
}
.footer nav { display: flex; gap: 1rem; }
.footer nav a { color: var(--muted); }
.footer nav a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
