/* Look and feel follow dev.hruzik.net: light, amber accent, navy text, pill buttons. All colours are tokens. */
:root {
  --accent: #ffb800;
  --on-accent: #111111;
  --bg: #f4f7fe;
  --text: #0b1b3a;
  --muted: #5b6b8c;
  --line: #d5def2;
  --card: #ffffff;
  --band: #0b1b3a;
  --band-text: #ffffff;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --font-head: 'Sora', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 14px 32px -20px rgba(11, 27, 58, 0.3);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

h1, h2, h3, .brand { font-family: var(--font-head); line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 0 0 1rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 0.75rem; }

a { color: var(--text); }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.brand::before {
  content: '';
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
nav a { text-decoration: none; font-weight: 500; padding: 0.2rem 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current='page'] { border-bottom-color: var(--accent); text-decoration: none; }
.who { color: var(--muted); font-size: 0.9rem; }

/* Page */
main { max-width: 64rem; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem; }
.lead { color: var(--muted); font-size: 1.05rem; margin-top: -0.5rem; }

.site-footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 1.5rem; }

/* Cards, tables */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin: 1.25rem 0;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.card.narrow { max-width: 28rem; margin-left: auto; margin-right: auto; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 1rem 0 2rem;
}
th, td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-head); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--bg); }
tr:last-child td { border-bottom: 0; }
.actions form, .actions details { margin-bottom: 0.4rem; }
.actions input { width: 9rem; }

/* Forms and buttons */
form { display: grid; gap: 0.9rem; }
form.inline { display: inline; margin: 0; }
label { display: grid; gap: 0.3rem; font-weight: 500; }
label.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; }

input, select {
  font: inherit;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  max-width: 100%;
}
input[type='checkbox'] { width: 1.1rem; height: 1.1rem; padding: 0; accent-color: var(--accent); }

button, .btn {
  font: inherit;
  font-weight: 600;
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  text-decoration: none;
  justify-self: start;
}
button:hover, .btn:hover { filter: brightness(0.96); text-decoration: none; }
.btn.ghost, button.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.google { display: inline-flex; align-items: center; gap: 0.6rem; background: #fff; border-color: var(--line); color: var(--text); }
button.link { background: none; border: 0; padding: 0; font-weight: 500; color: var(--text); text-decoration: underline; border-radius: 0; }
button.danger, button.link.danger { color: var(--danger); }

details summary { cursor: pointer; font-weight: 500; }
details[open] > :not(summary) { margin-top: 0.75rem; }

/* Notices, code, progress */
.notice { padding: 0.8rem 1rem; background: #fff8e1; border: 1px solid #ffe29a; border-radius: var(--radius-sm); }
.notice.error { background: var(--danger-bg); border-color: #fecdca; color: var(--danger); }

.code {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  background: var(--band);
  color: var(--band-text);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  text-align: center;
  user-select: all;
}

progress { width: 100%; height: 0.6rem; accent-color: var(--accent); }
.muted { color: var(--muted); }
.divider { text-align: center; color: var(--muted); margin: 1.25rem 0; }

/* Manual */
.toc ol { columns: 2; }
.refs { color: var(--muted); font-size: 0.9rem; }
pre { background: var(--band); color: var(--band-text); padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto; }
code { background: #e8eefc; padding: 0.1rem 0.35rem; border-radius: 6px; font-size: 0.92em; }
pre code { background: none; padding: 0; }

@media (max-width: 40rem) {
  .toc ol { columns: 1; }
  th, td { padding: 0.55rem 0.6rem; }
}
