:root {
  color-scheme: light;
  --accent: #bc4340;
  --ink: #2b2f36;
  --muted: #526560;
  --border: #c9d8d3;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f3f7f5;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button, input, select { min-height: 44px; }
button { border: 1px solid var(--accent); border-radius: .4rem; padding: .6rem 1rem; background: var(--accent); color: white; cursor: pointer; }
button:hover { background: #993531; }
button:disabled { cursor: not-allowed; opacity: .65; }
input, select { width: 100%; border: 1px solid #718a82; border-radius: .35rem; padding: .55rem .7rem; background: white; color: var(--ink); }
label { display: grid; gap: .35rem; font-weight: 600; }
form { display: grid; gap: 1rem; }
:focus-visible { outline: 3px solid #b05900; outline-offset: 3px; }
.site-header { padding: 1.25rem max(1rem, calc((100% - 72rem) / 2)); border-bottom: 1px solid var(--border); background: white; display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.brand-logo { display: block; max-width: 100%; object-fit: contain; background: white; }
main { max-width: 72rem; margin: 2rem auto; padding: 0 1rem 3rem; }
h1 { line-height: 1.2; font-size: clamp(1.65rem, 4vw, 2.2rem); margin: 0 0 1.5rem; }
h2 { font-size: 1.25rem; }
.card { padding: clamp(1rem, 3vw, 2rem); background: white; border: 1px solid var(--border); border-radius: .65rem; margin-bottom: 1.5rem; }
.auth { max-width: 32rem; margin: 2rem auto 1rem; }
.hint { font-size: .9rem; color: var(--muted); margin: 0; font-weight: 400; }
.skip-link { position: absolute; top: -10rem; left: 1rem; padding: .75rem; background: white; z-index: 10; }
.skip-link:focus { top: .5rem; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.header-controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; }
.header-controls form { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1.5rem; }
.banner { padding: 1rem; border: 1px solid #a9822c; border-left: 4px solid #a9822c; background: #fff6da; border-radius: .35rem; margin-bottom: 1.5rem; }
.banner a { margin-inline-start: .5rem; }
.badge { display: inline-block; padding: .1rem .5rem; margin-inline-start: .35rem; border: 1px solid #a9822c; border-radius: .35rem; background: #fff6da; font-size: .85rem; font-weight: 600; }
.table-scroll table.runs { min-width: 62rem; }
table.runs td { overflow-wrap: normal; }
table.runs td:nth-child(3) { min-width: 16rem; }
label.choice { display: grid; grid-template-columns: 1.25rem 1fr; align-items: start; gap: .5rem; font-weight: 400; }
label.choice input { min-height: 0; width: 1.25rem; height: 1.25rem; margin: .15rem 0 0; }
.nowrap { white-space: nowrap; }
fieldset { border: 1px solid var(--border); border-radius: .5rem; margin: 0 0 1rem; display: grid; gap: .5rem; }
.empty-state { padding-block: 3rem; text-align: center; }
.table-scroll { overflow-x: auto; }
.review-grid .sticky-name { position: sticky; left: 0; z-index: 1; min-width: 10rem; max-width: 14rem; background: #fff; box-shadow: 2px 0 0 var(--border); }
.review-grid td { min-width: 6rem; }
.warning { display: block; font-size: .8rem; color: #793a00; }
.deleted { text-decoration: line-through; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 35rem; }
table { width: 100%; border-collapse: collapse; text-align: start; }
.table-scroll table { min-width: 48rem; }
th, td { padding: .8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #eef4f1; }
td { overflow-wrap: anywhere; }
td form { min-width: 10rem; margin-bottom: .75rem; }
/* P5-6: checkbox rows (export email recipients) sit inline with their label (the whole row is the touch target). */
label.check { display: flex; align-items: center; gap: .6rem; min-height: 44px; font-weight: 400; }
label.check .check-text { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
label.check input[type=checkbox] { width: 1.25rem; height: 1.25rem; min-height: 1.25rem; margin: 0; flex: none; accent-color: var(--accent); }
label.check:has(input:disabled) { color: var(--muted); }
.badge { display: inline-block; padding: .1rem .5rem; border: 1px solid #a9822c; border-radius: 999px; background: #fff6da; color: #5c4210; font-size: .8rem; font-weight: 600; }
@media (max-width: 600px) {
  .site-header { align-items: start; gap: 1rem; }
  .header-controls, nav { width: 100%; }
  main { margin-top: 1.25rem; }
  .auth { margin-top: 0; }
}
