/* AK Courses: light theme in Claude ivory/oat with clay accents (no blue). Serif display over sans body. */
:root {
    --ivory: #FAF9F5; --slate: #141413; --clay: #D97757; --oat: #E3DACC; --cream: #F5F4ED; --sand: #F0EEE6;
    --muted: #5E5D59; --line: rgba(31,30,29,0.15); --line-strong: rgba(31,30,29,0.3);
    --link: #A8502F; --link-hover: #7A3A22; --star: #B5582F; --danger: #A63D2F;
    --sans: 'Anthropic Sans', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --serif: 'Anthropic Serif', Georgia, 'Times New Roman', Times, serif;
    --mono: 'Anthropic Mono', 'JetBrains Mono', 'SF Mono', Monaco, 'Courier New', monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ivory); color: var(--slate); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: var(--link); } a:hover { color: var(--link-hover); }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 400; margin: 0; }
h1 { font-size: 40px; font-weight: 330; line-height: 1.15; }
h2 { font-size: 26px; font-weight: 500; }
h3 { font-size: 20px; font-weight: 500; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }

.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 12px 40px; border-bottom: 0.5px solid var(--line); background: var(--ivory); }
.brand { font-family: var(--serif); font-size: 24px; color: var(--slate); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; display: inline-block; }
.footer-brand { display: inline-flex; align-items: center; gap: 6px; }
.cert-logo { width: 96px; height: 96px; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; flex: 1; }
.nl { color: #3D3D3A; text-decoration: none; font-size: 15px; padding: 10px 0; }
.nl:hover, .nl.active { color: var(--slate); }
.nl.active { font-weight: 600; }
.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn, .btn2, .btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 10px; font: inherit; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn { background: var(--slate); color: var(--ivory); border: 0; }
.btn:hover { background: #30302E; color: var(--ivory); }
.btn2 { background: #FFFFFF; color: var(--slate); border: 0.5px solid var(--line-strong); }
.btn2:hover { background: var(--sand); color: var(--slate); }
.btn-danger { background: #FFFFFF; color: var(--danger); border: 0.5px solid var(--danger); }
.btn:disabled, .btn2:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; }

.card { background: #FFFFFF; border: 0.5px solid var(--line); border-radius: 14px; }
.pad { padding: 24px; }
.page { max-width: 1200px; margin: 0 auto; padding: 40px 40px 80px; display: flex; flex-direction: column; gap: 28px; }
.page.narrow { max-width: 860px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.pill { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--sand); white-space: nowrap; }
.pill.oat { background: var(--oat); }
.bar { height: 6px; border-radius: 3px; background: var(--sand); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--clay); border-radius: 3px; }
.stars { color: var(--star); }
.alert { padding: 14px 16px; border-radius: 10px; background: var(--cream); border: 0.5px solid var(--line); }
.alert.error { background: #FBEDE8; border-color: #E9B8A8; }

label.fld { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
input.inp, select.inp, textarea.inp { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 0.5px solid var(--line-strong); background: #FFFFFF; font: inherit; font-size: 15px; color: var(--slate); }
textarea.inp { padding: 10px 12px; resize: vertical; }
.chk { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.chk input { width: 18px; height: 18px; accent-color: var(--slate); }

.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0.5px solid var(--line-strong); background: #FFFFFF; font: inherit; font-size: 14px; color: var(--slate); cursor: pointer; }
.chip.on { background: var(--slate); color: var(--ivory); border-color: var(--slate); }
.course-card { text-decoration: none; color: var(--slate); display: flex; flex-direction: column; overflow: hidden; }
.course-card:hover { border-color: rgba(31,30,29,0.4); color: var(--slate); }
.thumb { aspect-ratio: 16/9; display: flex; align-items: flex-end; padding: 14px; }
.thumb .pill { background: var(--ivory); }

table.tbl { border-collapse: collapse; width: 100%; font-size: 14px; }
table.tbl th { text-align: left; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 0.5px solid var(--line-strong); white-space: nowrap; }
table.tbl td { padding: 10px 14px; border-bottom: 0.5px solid var(--line); vertical-align: middle; }
.scroll-x { overflow-x: auto; }

.learn { display: flex; flex-wrap: wrap; min-height: calc(100vh - 69px); }
.learn-nav { flex: 1 1 260px; max-width: 300px; padding: 16px 12px; border-right: 0.5px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.learn-main { flex: 999 1 520px; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.learn-ai { flex: 1 1 320px; max-width: 400px; border-left: 0.5px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 14px; background: #FFFFFF; }
.les { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px; text-decoration: none; color: var(--slate); font-size: 14px; }
.les:hover { background: rgba(115,114,108,0.1); color: var(--slate); }
.les.cur { background: var(--oat); }
.video { width: 100%; aspect-ratio: 16/9; border-radius: 12px; background: #1F1E1D; }
.tab { min-height: 44px; padding: 0 16px; border: 0; border-bottom: 2px solid transparent; background: transparent; font: inherit; font-size: 15px; color: var(--muted); cursor: pointer; }
.tab.on { color: var(--slate); border-bottom-color: var(--clay); }
.msg { padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; max-width: 92%; }
.msg.me { background: var(--sand); align-self: flex-end; }
.msg.ai { background: var(--ivory); align-self: flex-start; border: 0.5px solid var(--line); }
.msg.ai p { margin: 0 0 8px; } .msg.ai pre { white-space: pre-wrap; background: var(--sand); padding: 8px; border-radius: 8px; }

.opt { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 10px; border: 0.5px solid var(--line-strong); background: #FFFFFF; cursor: pointer; }
.opt.on { border-color: var(--slate); box-shadow: 0 0 0 1px var(--slate); background: var(--cream); }
.opt.right { border-color: #558A42; box-shadow: 0 0 0 1px #558A42; }
.opt.wrong { border-color: var(--danger); }

.star-btn { width: 44px; height: 44px; border: 0; background: transparent; font-size: 28px; cursor: pointer; color: #C2C0B6; padding: 0; }
.star-btn.on { color: var(--star); }

.admin { display: flex; flex-wrap: wrap; min-height: calc(100vh - 69px); }
.admin-nav { flex: 1 1 220px; max-width: 250px; padding: 20px 12px; border-right: 0.5px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.admin-main { flex: 999 1 640px; min-width: 0; padding: 28px 36px 64px; display: flex; flex-direction: column; gap: 24px; }
.side { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px; text-decoration: none; color: #3D3D3A; font-size: 15px; }
.side:hover { background: rgba(115,114,108,0.1); color: var(--slate); }
.side.active { background: var(--oat); color: var(--slate); }

.cert-frame { width: 100%; background: #FFFFFF; border-radius: 6px; padding: 12px; box-shadow: 0 0 0 0.5px var(--line); }
.cert-inner { border: 1px solid var(--clay); border-radius: 4px; padding: 56px 48px; display: flex; flex-direction: column; gap: 18px; align-items: center; text-align: center; background: var(--ivory); }

.site-footer { border-top: 0.5px solid var(--line); padding: 28px 40px; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; font-size: 14px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 640px) {
    .site-header { padding: 12px 16px; }
    .page { padding: 24px 16px 64px; }
    h1 { font-size: 32px; }
    .admin-main, .learn-main { padding: 16px; }
    .learn-nav, .learn-ai, .admin-nav { max-width: none; border: 0; }
}

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 20px; background: #FBEDE8; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

/* Article lessons */
.lesson-body { max-width: 760px; line-height: 1.7; font-size: 17px; }
.lesson-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 8px 0; }
.lesson-body pre { overflow: auto; padding: 12px; border-radius: 8px; border: 0.5px solid var(--line); }
.lesson-body table { border-collapse: collapse; } .lesson-body td, .lesson-body th { border: 0.5px solid var(--line); padding: 6px 10px; }
.lesson-body blockquote { border-left: 3px solid var(--line); margin: 0; padding-left: 14px; color: var(--muted); }
