[hidden] { display: none !important; }
:root {
  --ink: #1c2433;
  --ink-soft: #4a5468;
  --paper: #faf8f4;
  --card: #ffffff;
  --line: #e6e1d8;
  --accent: #b5532f;
  --accent-dark: #8f3f22;
  --accent-tint: #f6e9e2;
  --sage: #3f6b5a;
  --sage-tint: #e5efe9;
  --amber: #9a6a12;
  --amber-tint: #f8eed8;
  --red: #a23a3a;
  --red-tint: #f7e3e3;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 8px; align-items: center; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--accent-tint); color: var(--ink); }

.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff !important; border: 0; border-radius: 999px; padding: 10px 20px; font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--accent-dark); }
.btn.secondary { background: transparent; color: var(--ink) !important; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.secondary:hover { background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink-soft); }
.btn.small { padding: 7px 14px; font-size: .875rem; }
.btn:disabled { opacity: .6; cursor: default; }

/* hero */
.hero { padding: 72px 0 48px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--accent); margin: 0 0 14px; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin: 0 0 18px; max-width: 18ch; }
.hero p.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; margin: 0 0 28px; }
.values { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.values span { font-family: var(--serif); font-style: italic; color: var(--ink-soft); border-left: 3px solid var(--accent); padding: 2px 12px; }

/* filters + grid */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 24px 0 20px; }
.section-head h2 { font-size: 1.7rem; margin: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); padding: 6px 14px; border-radius: 999px; font: 500 .875rem var(--sans); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; padding-bottom: 72px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -12px rgba(28,36,51,.18); }
.thumb { aspect-ratio: 16 / 8; background: linear-gradient(135deg, var(--ink) 0%, #34425c 100%); position: relative; display: flex; align-items: flex-end; padding: 16px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .type { position: relative; background: rgba(255,255,255,.92); color: var(--ink); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { margin: 0; font-size: 1.25rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-soft); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .75rem; background: var(--accent-tint); color: var(--accent-dark); padding: 3px 10px; border-radius: 999px; }
.card-actions { margin-top: auto; padding-top: 8px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }

.pill { font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #eef0f3; color: var(--ink-soft); white-space: nowrap; }
.pill[data-state="completed"], .pill[data-state="passed"] { background: var(--sage-tint); color: var(--sage); }
.pill[data-state="incomplete"] { background: var(--amber-tint); color: var(--amber); }
.pill[data-state="failed"] { background: var(--red-tint); color: var(--red); }
.private-badge { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sage); }

.empty { text-align: center; color: var(--ink-soft); padding: 48px 0; grid-column: 1 / -1; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-soft); font-size: .875rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* learner dashboard */
.dash-head { padding: 48px 0 8px; }
.dash-head h1 { font-size: 2.2rem; margin: 0 0 6px; }
.dash-head p { color: var(--ink-soft); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 28px 0 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat .n { font-family: var(--serif); font-size: 2rem; font-weight: 700; }
.stat .l { color: var(--ink-soft); font-size: .875rem; }

/* admin table */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 24px 0 16px; }
.toolbar input, .toolbar select { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 200px; }
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; margin-bottom: 64px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); background: #fcfbf8; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* player */
.player { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--ink); }
.player-bar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: var(--ink); color: #fff; }
.player-bar .brand { color: #fff; font-size: 1.05rem; }
.player-bar .brand span { color: #f0a284; }
.player-bar .title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 1px solid rgba(255,255,255,.2); padding-left: 14px; }
.player-bar .save { font-size: .8rem; color: rgba(255,255,255,.65); white-space: nowrap; }
.player-bar .pill { background: rgba(255,255,255,.12); color: #fff; }
.player-bar .pill[data-state="completed"], .player-bar .pill[data-state="passed"] { background: #4f8a72; color: #fff; }
.player-bar .btn.secondary { color: #fff !important; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.player-bar .btn.secondary:hover { background: rgba(255,255,255,.08); }
.player-main { flex: 1; background: #fff; }
.player-main iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px) { .player-bar .save, .player-bar .brand { display: none; } .player-bar .title { border: 0; padding: 0; } }

.notice { max-width: 560px; margin: 12vh auto; padding: 0 24px; text-align: center; }
.notice .brand { display: inline-block; margin-bottom: 24px; }
.notice h1 { font-size: 2rem; }
.notice p { color: var(--ink-soft); }
