:root {
  --bg: #292929; --panel: #333331; --panel-2: #3b3b38; --line: #4a4a46;
  --cream: #e4e2dc; --muted: #a9a69d;
  --teal: #3f7a6e; --brick: #9b2a0e; --orange: #d9502b; --gold: #ffb400;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--cream); font: 16px/1.5 "Montserrat", system-ui, sans-serif; }
a { color: var(--gold); }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 800; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 1.8rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px 64px; }
.stripes { display: grid; gap: 3px; }
.stripes span { height: 5px; } .s1 { background: var(--teal); } .s2 { background: var(--brick); } .s3 { background: var(--orange); } .s4 { background: var(--gold); }

header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; max-width: 880px; margin: 0 auto; }
header.top img { height: 56px; width: auto; display: block; }
header.top nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.who { font-size: .8rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 0; font: 700 1rem "Montserrat", sans-serif; cursor: pointer; text-decoration: none; background: var(--gold); color: #2a2a2a; }
.btn.secondary { background: transparent; color: var(--cream); border: 2px solid var(--line); }
.btn.teal { background: var(--teal); color: #fff; }
.btn.danger { background: var(--brick); color: #fff; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: .85rem; }
.btn.big { min-height: 64px; font-size: 1.2rem; width: 100%; }
form.inline { display: inline; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.panel.callout { border-left: 6px solid var(--gold); }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .9rem; margin: .25em 0 1em; }
.alert { background: var(--brick); color: #fff; padding: 12px 16px; border-radius: var(--radius); margin: 12px 0; }

label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: .95rem; }
input[type=text], input[type=number], input[type=password], textarea, select {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--line);
  background: #232322; color: var(--cream); font: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }
textarea { min-height: 120px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 12px; }
@media (max-width: 600px) { .grid2, .grid4 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 12px; font-weight: 500; margin: 10px 0; }
.check input { width: 24px; height: 24px; accent-color: var(--gold); }

/* step tracker */
.tracker { display: flex; gap: 4px; margin: 8px 0 16px; }
@media (max-width: 600px) { .tracker a { font-size: .62rem !important; letter-spacing: 0 !important; } .tracker .n { display: none; } }
.tracker a { flex: 1; min-width: 0; text-align: center; text-decoration: none; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding-top: 10px; border-top: 6px solid var(--line); }
.tracker a.done { color: var(--cream); border-color: var(--teal); }
.tracker a.now { color: var(--gold); border-color: var(--gold); }

.card-head { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: start; }
.card-head img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.photos { display: flex; gap: 8px; }
.photos img { width: 50%; }
@media (max-width: 600px) { .card-head { grid-template-columns: 1fr; } .card-head .photos img { max-height: 280px; object-fit: contain; } }

/* dashboard */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat b { display: block; font: 800 1.6rem "Fraunces", serif; color: var(--gold); }
.stat span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list img { width: 44px; height: 60px; object-fit: cover; border-radius: 4px; background: #222; }
.list a.name { color: var(--cream); font-weight: 600; text-decoration: none; flex: 1; }
.pill { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); color: var(--cream); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.pill.gold { background: var(--gold); color: #2a2a2a; } .pill.teal { background: var(--teal); } .pill.brick { background: var(--brick); }

/* grading math */
.math { width: 100%; border-collapse: collapse; margin: 8px 0; }
.math td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.math td:last-child { text-align: right; font-weight: 700; }
.verdict { font: 800 1.15rem "Fraunces", serif; padding: 14px 16px; border-radius: var(--radius); margin-top: 12px; }
.verdict.yes { background: var(--teal); } .verdict.no { background: var(--brick); }
.choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.choice label { margin: 0; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 64px; padding: 8px; border-radius: var(--radius); border: 2px solid var(--line); cursor: pointer; font-weight: 700; }
.choice input:checked + span { border-color: var(--gold); background: var(--panel-2); color: var(--gold); }
.choice input:focus-visible + span { outline: 3px solid var(--gold); }

.login { max-width: 360px; margin: 10vh auto; text-align: center; }
.login img { width: 240px; max-width: 80%; }
.pin { text-align: center; font-size: 2rem !important; letter-spacing: .5em; }
pre.preview { white-space: pre-wrap; background: #232322; padding: 12px; border-radius: 10px; font: .9rem/1.5 "Montserrat", sans-serif; }
