/* Session Notes web. Sizes in rem so the whole page reflows with the browser's
   text size; nothing pinned in pixels. */

:root {
  --fg: #111;
  --bg: #fff;
  --bg-soft: #f4f6f8;
  --accent: #0b5cad;
  --accent-fg: #fff;
  --muted: #555;
  --border: #ccd2d8;
  --focus: #ffbf00;
  --focus-halo: rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #f4f4f4;
    --bg: #121212;
    --bg-soft: #1c1f23;
    --accent: #66aaff;
    --accent-fg: #000;
    --muted: #bbb;
    --border: #3a3f45;
    --focus: #ffd23f;
    --focus-halo: rgba(0, 0, 0, 0.75);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.05rem/1.55 system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

header, main, footer { padding: 1rem 1.25rem; }
main { max-width: 74ch; width: 100%; }

/* Belt and braces: the hidden attribute must win over any display rule. */
[hidden] { display: none !important; }

h1 { margin: 0 0 0.75rem; font-size: 1.75rem; }
h2 { margin: 1.5rem 0 0.5rem; font-size: 1.15rem; white-space: pre-wrap; }

.brand { margin: 0; font-weight: 700; font-size: 1.4rem; }

footer { color: var(--muted); border-top: 1px solid var(--border); }
footer p { margin: 0; }

.skip-link {
  position: absolute;
  left: -999rem;
  top: 0;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.5rem 0.75rem;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; z-index: 10; }

.form-field { margin: 0 0 1rem; }
.form-field label { display: block; margin-bottom: 0.25rem; font-weight: 600; }
.form-field.check { display: flex; align-items: center; gap: 0.5rem; }
.form-field.check label { display: inline; margin: 0; font-weight: 400; }

input[type="text"], input[type="password"], textarea {
  width: 100%;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  padding: 0.5rem 0.6rem;
}

textarea { resize: vertical; white-space: pre; overflow: auto; font-family: inherit; }

button {
  font: inherit;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 0.3rem;
  background: var(--accent);
  color: var(--accent-fg);
  cursor: pointer;
}
button[disabled] { opacity: 0.6; cursor: default; }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.5rem; }
.toolbar .form-field { margin: 0; }

.note {
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  padding: 0.75rem 1rem 1rem;
  margin: 0 0 1rem;
  background: var(--bg-soft);
}
.note h2 { margin-top: 0; }

#summary { color: var(--muted); margin: 0 0 1rem; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--focus-halo);
}
