/* Light only: the page is a document the client reads and prints, and a dark repaint of it was
   never asked for. Declaring the scheme also keeps form controls and scrollbars light on a
   dark-mode OS, which a background colour alone does not do. */
:root {
  color-scheme: light;
  --ink: #14161a;
  --muted: #6b7280;
  --line: #e3e6ea;
  --bg: #ffffff;
  --panel: #f7f8fa;
  --accent: #1f5f4f;
  --answered: #2f7d5f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

input[type="text"], input[type="number"], textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  background: var(--bg);
  color: inherit;
}
input:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

button {
  padding: 9px 16px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button.secondary { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: default; }

.error { color: #b4232c; font-size: 14px; }

.bar { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar-inner { display: flex; align-items: baseline; gap: 16px; padding: 12px 20px; max-width: 1180px; margin: 0 auto; }
.progress { color: var(--muted); font-size: 14px; }
.saved { margin-left: auto; font-size: 13px; color: var(--answered); opacity: 0; transition: opacity .25s; }
.saved.show { opacity: 1; }

.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; max-width: 1180px; margin: 0 auto; padding: 20px; }

.nav { position: sticky; top: 62px; align-self: start; max-height: calc(100vh - 90px); overflow: auto; font-size: 14px; }
.nav a { display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; border-radius: 6px; color: inherit; text-decoration: none; }
.nav a:hover { background: var(--panel); }
.nav a span { color: var(--muted); font-variant-numeric: tabular-nums; }

.questions { min-width: 0; padding-bottom: 90px; }
.questions h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 34px 0 14px; }
.questions h2:first-child { margin-top: 0; }

.q { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; }
.q.answered { border-color: #cfe3d8; background: #fbfdfc; }
.q-title { font-weight: 600; margin: 0 0 12px; }
.q-title .num { color: var(--muted); font-weight: 400; margin-right: 6px; }

.opt { display: flex; gap: 9px; align-items: flex-start; padding: 5px 0; cursor: pointer; }
.opt input { margin-top: 4px; flex: none; }
.other { margin-top: 6px; }
.comment { margin-top: 10px; }
.comment textarea { min-height: 54px; resize: vertical; }
.field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }

table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 14px; }
th, td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
th { background: var(--panel); font-weight: 600; }
td input { padding: 5px 7px; }

.footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  background: var(--bg); border-top: 1px solid var(--line);
}
.note { color: var(--muted); font-size: 14px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .nav { position: static; max-height: none; }
}
