/* polcompass — shared style for index.html and chart.html. Graph-paper mono
   look, matching the bisks.net house style (plain, black on white, one
   readable mono, blue accent for interactive things). Copied from
   sites/quadrants. */

:root {
  --bg: #fffdf8;
  --ink: #14171a;
  --muted: #6b6b6b;
  --faint: #e2ddd0;
  --accent: #1a5fd0;
  --accent2: #d0461a;
  --card: #ffffff;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code",
    "Roboto Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--mono); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 720px; margin: 0 auto; padding: 2.5rem 1.25rem 6rem; }

header.top { margin-bottom: 2rem; }
header.top .home-link { font-size: 0.8rem; color: var(--muted); text-decoration: none; }
header.top .home-link:hover { color: var(--accent); }
header.top h1 {
  font-size: 1.7rem; margin: 0.4rem 0 0.3rem; font-weight: 700;
  letter-spacing: -0.01em;
}
header.top p.tag { color: var(--muted); margin: 0; font-size: 0.9rem; }

section { margin-bottom: 2.5rem; }
h2.section-title {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin: 0 0 0.9rem; border-bottom: 1px solid var(--faint);
  padding-bottom: 0.4rem;
}

label { display: block; font-size: 0.78rem; color: var(--muted); margin: 0 0 0.25rem; }
input[type="text"], textarea {
  width: 100%; font-family: var(--mono); font-size: 0.92rem; padding: 0.5rem 0.6rem;
  border: 1px solid var(--faint); border-radius: 6px; background: var(--card); color: var(--ink);
}
input[type="text"]:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

button {
  font-family: var(--mono); font-size: 0.85rem; padding: 0.55rem 1rem;
  border-radius: 6px; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  cursor: pointer;
}
button:hover { opacity: 0.85; }
button.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--faint); }
button.secondary:hover { border-color: var(--ink); opacity: 1; }
button:disabled { opacity: 0.45; cursor: default; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-bottom: 0.9rem; }
.field-grid.axes { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* --- the quadrant plot itself, shared between the create-preview and the
   live chart view --- */
.plotbox { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto 1fr auto; gap: 0.4rem; align-items: center; justify-items: center; margin: 1rem 0; }
.axis-label { font-size: 0.72rem; color: var(--muted); text-align: center; max-width: 9rem; }
.axis-label.top { grid-column: 2; grid-row: 1; }
.axis-label.bottom { grid-column: 2; grid-row: 3; }
.axis-label.left { grid-column: 1; grid-row: 2; writing-mode: vertical-rl; transform: rotate(180deg); }
.axis-label.right { grid-column: 3; grid-row: 2; writing-mode: vertical-rl; }
.plot-square { grid-column: 2; grid-row: 2; width: 100%; aspect-ratio: 1; position: relative; }
.plot-square svg { width: 100%; height: 100%; display: block; border: 1px solid var(--ink); border-radius: 8px; background:
  linear-gradient(var(--faint) 1px, transparent 1px), linear-gradient(90deg, var(--faint) 1px, transparent 1px);
  background-size: 12.5% 12.5%; background-color: var(--card); cursor: crosshair; }

.anchor-dot { fill: var(--muted); stroke: var(--card); stroke-width: 1.5; }
.anchor-label { font-size: 7.5px; fill: var(--muted); font-family: var(--mono); }
.pos-dot { stroke: var(--card); stroke-width: 1.5; cursor: pointer; }
.pos-dot.mine { stroke: var(--accent2); stroke-width: 2.5; }
.pos-dot.moot { stroke: #c9a227; stroke-width: 2.5; }

.anchor-row { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.4rem; }
.anchor-row input[type="text"] { flex: 1; }
.anchor-row .coords { font-size: 0.72rem; color: var(--muted); width: 4.5rem; text-align: right; }
.anchor-row button { padding: 0.3rem 0.55rem; font-size: 0.75rem; }
.hint { font-size: 0.78rem; color: var(--muted); margin: 0.4rem 0; }

.chart-list { display: flex; flex-direction: column; gap: 0; }
.chart-card-row { display: flex; align-items: center; gap: 0.6rem; border-top: 1px solid var(--faint); }
.chart-card-row:first-child { border-top: 1px solid var(--ink); }
.chart-card { display: block; flex: 1; min-width: 0; text-decoration: none; color: inherit; padding: 0.85rem 0; }
.chart-card:hover .chart-title { color: var(--accent); }
.chart-card-remove { flex-shrink: 0; padding: 0.3rem 0.55rem; font-size: 0.72rem; }
.chart-card.featured { border: 1px solid var(--ink); border-radius: 8px; padding: 0.9rem 1rem; }
.chart-card.featured:first-child { border-top: 1px solid var(--ink); }
.chart-title { font-weight: 600; font-size: 1rem; }
.chart-meta { color: var(--muted); font-size: 0.8rem; margin-top: 0.15rem; }
.empty { color: var(--muted); font-size: 0.85rem; }

.session-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.8rem; }
.session-row input[type="text"] { width: 14rem; }
.status { font-size: 0.8rem; color: var(--muted); min-height: 1.1em; margin-top: 0.4rem; }
.status.err { color: var(--accent2); }
.status.ok { color: #17795a; }

.share-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.8rem; }

footer { margin-top: 3rem; padding-top: 0.75rem; border-top: 1px solid var(--faint); color: var(--muted); font-size: 0.78rem; }
