/* Palette taken from the course deck. Swap the tokens to rebrand. */
:root {
  --ink: #2b0a16;
  --ink-soft: #5a3a46;
  --paper: #fff9ed;
  --card: #ffffff;
  --sand: #e5d6c7;
  --sand-soft: #f3d9c9;
  --primary: #7a1838;
  --primary-ink: #ffffff;
  --accent: #ca1c57;
  --blue: #2b4c7e;
  --focus: #2b4c7e;
  --danger: #8a1010;
  --radius: 10px;
  --font-body: Calibri, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 112.5%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); line-height: 1.5; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

.site { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; justify-content: space-between; align-items: baseline;
  padding: .75rem 1rem; background: var(--ink); color: var(--paper); }
.site p { margin: 0; }
.site-name { font-family: var(--font-head); font-weight: 700; }
.site-privacy { font-size: .9rem; }

main { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
main:focus { outline: none; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; color: var(--primary); }
h1 { font-size: 1.9rem; margin: .25rem 0 .75rem; }
h1:focus { outline: none; }
h2 { font-size: 1.35rem; margin: 2rem 0 .5rem; }
h3 { font-size: 1.1rem; margin: 1rem 0 .25rem; }
p { margin: .5rem 0 1rem; }
.lead { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.eyebrow { margin: 0; font-size: .95rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }

a { color: var(--blue); }

/* Focus: always visible */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* Buttons */
.btn { font: inherit; font-weight: 700; min-height: 2.75rem; padding: .55rem 1.25rem; border-radius: var(--radius);
  border: 2px solid var(--primary); background: var(--primary); color: var(--primary-ink); cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn.secondary { background: var(--card); color: var(--primary); }
.btn.secondary:hover { background: var(--sand-soft); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }

.panel { background: var(--card); border: 2px solid var(--sand); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.25rem 0; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }
.panel.strong { border-color: var(--primary); }
.notice { border-left: 6px solid var(--blue); background: var(--card); padding: .75rem 1rem; margin: 1rem 0; border-radius: 0 var(--radius) var(--radius) 0; }
.notice.error { border-left-color: var(--danger); }
.notice strong:first-child { color: var(--ink); }

/* Forms */
label, .label { font-weight: 700; display: block; margin: 1rem 0 .25rem; }
input[type=text], textarea { font: inherit; width: 100%; padding: .6rem .75rem; border: 2px solid var(--ink-soft); border-radius: 8px; background: #fff; color: var(--ink); }
textarea { min-height: 6.5rem; resize: vertical; }
input[type=file] { font: inherit; max-width: 100%; }
details.import { margin: 1rem 0; }
details.import > summary { cursor: pointer; font-weight: 700; color: var(--primary); padding: .4rem 0; }

/* Statements and rating scale */
fieldset.statement { border: 2px solid var(--sand); border-radius: var(--radius); background: var(--card); margin: 0 0 1rem; padding: .75rem 1rem 1rem; min-width: 0; }
fieldset.statement.missing { border-color: var(--danger); }
fieldset.statement legend { padding: 0 .4rem; font-weight: 700; max-width: 100%; }
.missing-note { margin: .5rem 0 0; color: var(--danger); font-weight: 700; }
.scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: .35rem; margin-top: .5rem; }
.tap { position: relative; }
.tap input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tap span { display: flex; align-items: center; justify-content: center; min-height: 2.9rem; border: 2px solid var(--ink-soft);
  border-radius: 8px; background: #fff; font-weight: 700; color: var(--ink); }
.tap input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.tap input:checked + span::before { content: "\2713\00a0"; font-size: .7em; }
.tap input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.tap:hover span { background: var(--sand-soft); }
.tap input:checked:hover + span { background: var(--primary); }
.scale-ends { display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; color: var(--ink-soft); margin-top: .3rem; }
@media (max-width: 34rem) {
  .scale { grid-template-columns: repeat(5, 1fr); }
  .scale-ends span:last-child { text-align: right; }
}

.progress { position: sticky; top: 0; background: var(--paper); padding: .5rem 0; margin: 0 0 .5rem; font-weight: 700; border-bottom: 2px solid var(--sand); z-index: 2; }
.pillar-dots { display: flex; gap: .4rem; margin: .25rem 0 1rem; padding: 0; list-style: none; }
.pillar-dots li { flex: 1; height: .5rem; border-radius: 4px; background: var(--sand); }
.pillar-dots li.done { background: var(--primary); }
.pillar-dots li.now { background: var(--accent); }

/* Bars */
.bar-row { display: grid; grid-template-columns: 7.5rem 1fr 3rem; gap: .6rem; align-items: center; margin: .35rem 0; }
.bar-row.head { grid-template-columns: 1fr 3rem; }
.bar-label { font-size: .95rem; }
.bar-track { height: 1.25rem; background: var(--sand); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); }
.bar-fill.base { background: repeating-linear-gradient(45deg, var(--blue) 0 6px, #6f8ab3 6px 12px); }
.bar-value { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.pillar-result { margin: 1rem 0 1.5rem; }
.pillar-result h3 { margin-bottom: .1rem; }
.change { margin: .25rem 0 0; font-weight: 700; }
.axis { font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 34rem) { .bar-row { grid-template-columns: 5.5rem 1fr 2.6rem; } }

table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { border-bottom: 1px solid var(--sand); padding: .4rem .5rem; text-align: left; vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
caption { text-align: left; font-weight: 700; padding: .4rem 0; }
.table-wrap { overflow-x: auto; }

.copy-field { display: flex; gap: .5rem; flex-wrap: wrap; align-items: stretch; }
.copy-field input { flex: 1 1 14rem; }
.status { min-height: 1.5rem; font-weight: 700; color: var(--blue); margin: .25rem 0 0; }
.save-grid { display: grid; gap: 1rem; }
.save-grid > div { border-top: 2px solid var(--sand); padding-top: .75rem; }
.save-grid > div:first-child { border-top: 0; padding-top: 0; }
.save-grid h3 { margin: 0 0 .25rem; }
.msg-box { white-space: pre-wrap; background: #fff; border: 2px solid var(--sand); border-radius: 8px; padding: .75rem 1rem; font-family: inherit; }

.print-only { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .tap span { transition: background-color .15s ease; }
}

@media print {
  body { background: #fff; font-size: 11pt; }
  .site, .skip, .screen-only, noscript { display: none !important; }
  .print-only { display: block; }
  main { padding: 0; max-width: none; }
  .bar-fill, .bar-track { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table, .pillar-result { break-inside: avoid; }
  a { color: inherit; }
}
