:root {
  --bg: #f2f3f5; --card: #ffffff; --ink: #18202e; --muted: #5a6478; --line: #e1e5ec;
  --brand: #7a1f2b; --brand-2: #9b2c3a; --brand-soft: #f6e9eb; --on-brand: #ffffff;
  --good: #1b7a43; --good-soft: #e5f4ec; --bad: #b42318; --bad-soft: #fdecea;
  --yellow: #fff2b3; --grey: #edeff2; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c; --card: #1a2029; --ink: #e8ecf2; --muted: #a3adbf; --line: #2c3442;
    --brand: #e39aa4; --brand-2: #eeb3bb; --brand-soft: #3a2328; --on-brand: #1c1012;
    --good: #6fd39a; --good-soft: #17342a; --bad: #ff8a7f; --bad-soft: #3a1f1f;
    --yellow: #5c5016; --grey: #2c3340; --shadow: 0 1px 2px rgba(0,0,0,.3);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Header band */
.top { background: linear-gradient(120deg, #5e1520, #8c2433); color: #fff; border-bottom: 4px solid #a7a9ac; }
.top-inner { max-width: 880px; margin: 0 auto; padding: 18px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 38px; height: 38px; flex: none; }
.logo rect { fill: rgba(255,255,255,.16); stroke: none; }
.logo path { stroke: #fff; stroke-width: 2.4; }
.title { font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.tag { font-size: 13px; opacity: .8; }
.who { display: flex; align-items: center; gap: 8px; font-size: 14px; background: rgba(255,255,255,.12); padding: 5px 12px 5px 5px; border-radius: 999px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; }
.avatar svg { width: 16px; height: 16px; }
.who .link { color: #fff; opacity: .85; }

main, footer { max-width: 880px; margin: 0 auto; padding: 0 16px; }
h1, h2 { letter-spacing: -.01em; }

/* Sign-in */
.hero { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 40px 24px; margin: 32px auto; max-width: 560px; }
.hero h1 { font-size: 26px; margin: 12px 0 8px; }
.hero p { color: var(--muted); margin: 0 auto 22px; max-width: 440px; }
.hero .fine { font-size: 13px; margin: 16px auto 0; }
.hero-art { width: 120px; height: 90px; }
.art-sheet { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 2; }
.art-grid { stroke: var(--brand); stroke-width: 1.5; opacity: .45; }
.art-hi { fill: var(--yellow); stroke: none; }
.art-hi2 { fill: var(--brand-2); stroke: none; opacity: .6; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 24px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 22px; margin-bottom: 16px; }
.step-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--card), 0 0 0 5px #a7a9ac; color: var(--on-brand); display: grid; place-items: center; font-weight: 700; }
h2 { margin: 3px 0 2px; font-size: 18px; }
.lead { margin: 0; color: var(--muted); font-size: 15px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.row.end { justify-content: flex-end; }
.input-wrap { flex: 1 1 320px; min-width: 0; position: relative; }
.input-wrap svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); }
input[type=text] { width: 100%; padding: 11px 12px 11px 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s; }
input[type=text]:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; max-width: 100%; }
select:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; background: var(--brand-soft); border-radius: 10px; font-size: 14px; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); flex: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--brand); border-radius: 10px; background: var(--card); color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: transform .05s, filter .15s, background .15s; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.big { padding: 13px 26px; font-size: 17px; }
.btn.quiet { border-color: var(--line); color: var(--muted); }
.btn:disabled { opacity: .55; cursor: progress; }
.link { background: none; border: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* Legend */
.legend { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.sw { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--line); }
.sw-white { background: #fff; } .sw-yellow { background: #fff2b3; } .sw-grey { background: #edeff2; }

/* Upload */
.drop { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 26px 16px; border: 2px dashed var(--line); border-radius: 12px; background: var(--bg); color: var(--muted); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--brand-2); background: var(--brand-soft); }
.drop.has-file { border-style: solid; border-color: var(--good); background: var(--good-soft); color: var(--ink); }
.drop svg { width: 26px; height: 26px; flex: none; color: var(--brand); }
.drop strong { color: var(--brand); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* Messages */
.status { color: var(--muted); font-size: 14px; margin: 12px 0 0; min-height: 0; }
.status:empty { display: none; }
.status.working::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.status.done { color: var(--good); }
@keyframes spin { to { transform: rotate(360deg); } }
.msg { padding: 12px 16px; border-radius: 10px; margin-top: 20px; }
.bad { color: var(--bad); background: var(--bad-soft); border: 1px solid var(--bad); }
.summary { font-weight: 600; margin: 18px 0 6px; }
.notes { color: var(--muted); font-size: 14px; padding-left: 20px; }
.after { margin-top: 8px; padding: 14px 16px; background: var(--good-soft); border-radius: 10px; }
.after .summary { margin-top: 0; color: var(--good); }

/* Table */
.table-wrap { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 10px 0 4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: var(--bg); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg) 50%, transparent); }
td.ok, td.fail { font-weight: 600; }
td.ok { color: var(--good); } td.fail { color: var(--bad); }

footer { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 13px; padding-bottom: 36px; }
footer svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

@media (max-width: 600px) {
  .card { padding: 18px 16px; }
  .hero { padding: 32px 18px; }
  .row .btn { flex: 1 1 auto; justify-content: center; }
  table, thead, tbody, tr, td, th { display: block; }
  thead { display: none; }
  td { border: 0; padding: 2px 12px; }
  td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
  tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  tbody tr:nth-child(even) td { background: none; }
}

/* Assign To download */
.alt { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid #a7a9ac; border-radius: 10px; font-size: 14px; }
.alt > div { flex: 1 1 320px; display: flex; flex-direction: column; gap: 2px; color: var(--muted); }
.alt strong { color: var(--ink); }
.sw-band { background: #f6e9eb; }

/* Big buttons between the three BVA pages (course sheet, meetings, tools) */
.site-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0 6px; }
.site-nav a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--brand); border-radius: 14px;
  background: var(--card); color: var(--brand); text-decoration: none; font-weight: 700; font-size: 17px; line-height: 1.25; box-shadow: var(--shadow);
  transition: background .15s, color .15s, transform .05s; }
.site-nav a small { display: block; font-weight: 500; font-size: 13px; color: var(--muted); }
.site-nav a svg { width: 28px; height: 28px; flex: none; }
.site-nav a:hover { background: var(--brand-soft); }
.site-nav a:active { transform: translateY(1px); }
.site-nav a[aria-current=page] { background: var(--brand); color: var(--on-brand); cursor: default; }
.site-nav a[aria-current=page] small { color: var(--on-brand); opacity: .85; }
.site-nav a[hidden] { display: none; }
.site-nav:has(a[data-ids-only]:not([hidden])), .site-nav:has(a[data-form]) { grid-template-columns: repeat(4, 1fr); }
.site-nav:has(a[data-form]):has(a[data-ids-only]:not([hidden])) { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .site-nav:has(a[data-ids-only]:not([hidden])), .site-nav:has(a[data-form]) { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .site-nav, .site-nav:has(a[data-ids-only]:not([hidden])), .site-nav:has(a[data-form]) { grid-template-columns: 1fr; gap: 8px; } .site-nav a { padding: 12px 14px; } }
@media print { .site-nav { display: none !important; } }
