/* Course site – Machine Vision theme (JMC Photographic Communication) */
:root {
--bg: #0c1116;
--surface: #16202a;
--slate: #2c3a47;
--line: rgba(196, 214, 229, .12);
--line-2: rgba(196, 214, 229, .22);
--text: #e6ebef;
--muted: #93a3b1;
--mustard: #e3aa2b;
--mustard-2: #f2c45a;
--mustard-dim: rgba(227, 170, 43, .14);
--brick: #ef7a5a;
--ok: #5cc596;
--radius: 10px;
--font: "IBM Plex Sans Hebrew", "Heebo", system-ui, sans-serif;
--nav-h: 66px;
color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
margin: 0; font-family: var(--font); color: var(--text); font-size: 17px; line-height: 1.65; min-height: 100vh;
background:
radial-gradient(1200px 600px at 85% -10%, rgba(44, 58, 71, .55), transparent 60%),
radial-gradient(900px 500px at 0% 110%, rgba(227, 170, 43, .06), transparent 60%),
var(--bg);
background-attachment: fixed;
}
a { color: var(--mustard-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--mustard); outline-offset: 3px; }
main:focus { outline: none; }
img { max-width: 100%; }
h1, h2, h3 { color: #fff; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 1.08rem; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 12px; top: 12px; z-index: 99; background: var(--mustard); color: #000; padding: 8px 12px; }

/* ---------- header & nav ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(12, 17, 22, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1300px; margin: 0 auto; padding: 10px 18px; display: flex; align-items: center; gap: 16px; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; line-height: 1.15; }
.brand .disc { width: 46px; height: 46px; flex: none; border-radius: 50%; background: #e7b94a; color: #111; display: grid; place-items: center; text-align: center; font-style: normal; font-weight: 700; font-size: 8.5px; line-height: 1.05; }
.brand .bar { width: 2px; height: 30px; background: #e7b94a; flex: none; }
.brand .bt { display: block; color: #fff; font-size: 1rem; }
.brand b { font-size: .98rem; font-weight: 600; display: block; }
.brand .bt span { font-size: .76rem; color: var(--muted); }
.brand:hover { color: #fff; }
.top nav { display: none; margin-inline-start: auto; gap: 2px; }
.top nav a { color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: 999px; font-size: .93rem; transition: color .15s, background .15s; white-space: nowrap; }
.top nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.top nav a[aria-current="page"] { color: #000; background: var(--mustard); font-weight: 600; }
.who { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.who img, .avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--slate); border: 1px solid var(--line-2); }
.who a { color: var(--muted); font-size: .85rem; }
.tabbar {
position: fixed; bottom: 10px; inset-inline: 10px; z-index: 20; height: var(--nav-h);
background: rgba(22, 32, 42, .84); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
border: 1px solid var(--line-2); border-radius: 18px; display: grid; grid-template-columns: repeat(5, 1fr);
margin-bottom: env(safe-area-inset-bottom);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .72rem; color: var(--muted); text-decoration: none; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: #fff; }
.tabbar a[aria-current="page"] svg { color: var(--mustard); filter: drop-shadow(0 0 6px rgba(227,170,43,.55)); }
@media (min-width: 880px) {
.top nav { display: flex; }
.who { margin-inline-start: 12px; }
.tabbar { display: none; }
}
main { max-width: 1300px; margin: 0 auto; padding: 22px 18px calc(var(--nav-h) + 44px); }
@media (min-width: 880px) { main { padding: 36px 24px 72px; } }

/* ---------- detection box (viewfinder corners + label) ---------- */
.vf { position: relative; }
.vf > .corner { position: absolute; width: 20px; height: 20px; border: 0 solid var(--mustard); pointer-events: none; }
.vf > .c1 { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 12px; }
.vf > .c2 { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 12px; }
.vf > .c3 { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 12px; }
.vf > .c4 { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; border-bottom-left-radius: 12px; }
.tag { position: absolute; top: -12px; inset-inline-start: 18px; background: var(--mustard); color: #000; font-size: .75rem; font-weight: 700; padding: 1px 9px; border-radius: 4px; line-height: 1.6; z-index: 1; }

/* ---------- generic blocks ---------- */
.panel { background: linear-gradient(180deg, rgba(29,41,53,.72), rgba(22,32,42,.72)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.grid2 { display: grid; gap: 16px; }
@media (min-width: 880px) { .grid2 { grid-template-columns: 1.55fr 1fr; align-items: start; } }
.grid2 > *, .sheet > *, .gal > *, .tools > * { min-width: 0; }
.btn {
display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 20px;
border: 1px solid var(--line-2); background: rgba(255,255,255,.06); color: #fff; border-radius: 999px;
font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn.primary { background: var(--mustard); border-color: var(--mustard); color: #0c1116; }
.btn.primary:hover { background: var(--mustard-2); box-shadow: 0 0 24px rgba(227,170,43,.35); color: #0c1116; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 34px; padding: 4px 14px; font-size: .88rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chip { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid var(--line-2); color: var(--text); white-space: nowrap; background: rgba(255,255,255,.04); }
.chip.photo { border-color: rgba(227,170,43,.5); color: var(--mustard-2); background: var(--mustard-dim); }
.chip.open { border-color: rgba(147,163,177,.5); }
.st { font-weight: 600; font-size: .85rem; white-space: nowrap; }
.st-none { color: var(--muted); }
.st-submitted { color: var(--mustard-2); }
.st-reviewed { color: var(--ok); }
.st-revise, .st-late { color: var(--brick); }
.empty { color: var(--muted); padding: 6px 0; }
.notice { border: 1px solid rgba(227,170,43,.35); background: var(--mustard-dim); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.toast { position: fixed; inset-inline: 16px; bottom: calc(var(--nav-h) + 24px); z-index: 50; background: var(--mustard); color: #000; font-weight: 600; padding: 12px 16px; border-radius: 12px; max-width: 480px; margin: 0 auto; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
@media (min-width: 880px) { .toast { bottom: 24px; } }

/* ---------- hero: the denoising unit ---------- */
.hero { display: grid; gap: 22px; padding: 22px; margin-bottom: 18px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(44,58,71,.6), rgba(17,25,33,.6)); }
@media (min-width: 720px) { .hero { grid-template-columns: minmax(240px, 340px) 1fr; align-items: center; padding: 28px; } }
.denoise { aspect-ratio: 4 / 3; border-radius: 12px; background: #000; }
.denoise canvas { width: 100%; height: 100%; display: block; border-radius: 12px; }
.denoise .step { position: absolute; bottom: 8px; inset-inline-end: 12px; font-size: .72rem; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.hero h2 { font-size: clamp(1.35rem, 3.4vw, 1.9rem); margin-bottom: 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .92rem; color: var(--muted); }
.due-strong { color: #fff; font-weight: 600; }

/* ---------- progress strip: denoising tiles ---------- */
.strip-wrap { margin: 0 -18px 22px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.strip-wrap::-webkit-scrollbar { display: none; }
@media (min-width: 880px) { .strip-wrap { margin: 0 0 26px; overflow-x: auto; scrollbar-width: thin; } }
.strip { display: flex; gap: 10px; padding: 12px 18px; width: max-content; }
@media (min-width: 880px) { .strip { padding: 12px 4px; } }
.frame {
position: relative; width: 164px; height: 164px; flex: none; border-radius: 20px; text-decoration: none; color: #fff;
display: flex; flex-direction: column; justify-content: flex-end; padding: 16px 20px; overflow: hidden;
border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, transform .15s;
}
.frame::before { content: ""; position: absolute; inset: 0; background-image: url("/img/noise.svg"); background-size: 120px; opacity: .6; }
.frame.open::before { opacity: .22; }
.frame.done::before { opacity: 0; }
.frame.done { background: linear-gradient(160deg, #34485a, #1d2935); border-color: var(--line-2); }
.frame.open { background: linear-gradient(160deg, #24313d, #18222c); }
.frame .num { position: relative; font-size: 3rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.frame.locked .num { color: rgba(255,255,255,.45); filter: blur(1.6px); }
.frame .lab { position: relative; font-size: 1.1rem; color: var(--muted); white-space: nowrap; }
.frame.done::after { content: "✓"; position: absolute; top: 12px; inset-inline-end: 20px; color: var(--ok); font-weight: 700; font-size: 1.7rem; }
.frame.current { border: 2px solid var(--mustard); box-shadow: 0 0 0 4px rgba(227,170,43,.12), 0 0 26px rgba(227,170,43,.28); overflow: visible; }
.frame.current .lab { color: var(--mustard-2); font-weight: 600; }
.frame.break { width: 44px; border: 1px dashed var(--line-2); background: transparent; padding: 0; align-items: center; justify-content: center; }
.frame.break::before { display: none; }
.frame.break span { writing-mode: vertical-rl; font-size: 1.05rem; color: var(--muted); }
.frame:hover { border-color: var(--line-2); color: #fff; transform: translateY(-2px); }
.frame.current:hover { border-color: var(--mustard-2); }

/* ---------- home ---------- */
.hello { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.hello h1 { margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; justify-content: space-between; align-items: baseline; }
.list li:last-child { border-bottom: 0; }
.list a { color: var(--text); text-decoration: none; }
.list a:hover { color: var(--mustard-2); }
.ann h3 { margin-bottom: 2px; }
.ann + .ann { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }

/* ---------- units ---------- */
.sheet { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.ucard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: inherit; display: grid; grid-template-columns: 58px 1fr; gap: 4px 14px; transition: border-color .15s, transform .15s; }
.ucard:hover { border-color: var(--line-2); color: inherit; transform: translateY(-1px); }
.ucard .n { grid-row: span 3; font-size: 2.3rem; font-weight: 700; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.ucard.locked { opacity: .55; }
.ucard.locked .n { filter: blur(1.5px); }
.ucard.is-current { border-color: var(--mustard); box-shadow: 0 0 22px rgba(227,170,43,.15); }
.ucard h3 { margin: 0; }

.uhead { display: grid; grid-template-columns: auto 1fr; gap: 4px 20px; align-items: end; margin-bottom: 14px; }
.uhead .n { font-size: clamp(3.8rem, 13vw, 6.4rem); font-weight: 700; line-height: .82; grid-row: span 2; font-variant-numeric: tabular-nums;
background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,.3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.uhead h1 { margin: 0; }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.5em; padding-top: .8em; border-top: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--mustard); }
.prose strong { color: #fff; }
.prose blockquote { margin: 0 0 1em; padding: 12px 16px; background: rgba(0,0,0,.25); border-inline-start: 3px solid var(--mustard); border-radius: 8px 0 0 8px; color: #cfd8df; }
.prose, .panel { overflow-wrap: anywhere; }
.videos { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.video { aspect-ratio: 16/9; border-radius: var(--radius); display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; position: relative; overflow: hidden; text-decoration: none; color: var(--muted);
background: radial-gradient(circle at 70% 30%, rgba(227,170,43,.12), transparent 50%), linear-gradient(160deg, #24313d, #121a22); border: 1px solid var(--line); }
.video::before { content: ""; position: absolute; top: 36%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); background: rgba(0,0,0,.25); }
.video::after { content: ""; position: absolute; top: 36%; left: 50%; margin: -8px 0 0 -4px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent rgba(255,255,255,.75); }
.video video { object-fit: cover; background: #000; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1; }
.video b { color: #fff; position: relative; }
.video .soon { font-size: .78rem; position: relative; }
.task { position: relative; border: 1px solid rgba(227,170,43,.45); border-radius: var(--radius); padding: 22px 20px 20px; background: linear-gradient(180deg, rgba(227,170,43,.08), rgba(22,32,42,.6)); margin-bottom: 16px; }
.task h2 { margin-bottom: 6px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: .88rem; }
dl.kv dd { margin: 0; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; margin: 14px 0 5px; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; display: block; }
input[type=text], input[type=url], textarea, select {
width: 100%; font: inherit; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 8px; background: rgba(0,0,0,.28); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--mustard); box-shadow: 0 0 0 3px rgba(227,170,43,.18); }
textarea { min-height: 100px; resize: vertical; }
input[type=file] { font: inherit; width: 100%; color: var(--muted); padding: 10px; border: 1px dashed var(--line-2); border-radius: 8px; background: rgba(0,0,0,.18); }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-inline-end: 10px; padding: 6px 14px; border-radius: 999px; border: 0; background: var(--mustard); color: #000; cursor: pointer; }
input[type=checkbox] { accent-color: var(--mustard); width: 16px; height: 16px; vertical-align: -2px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 16px; margin: 16px 0; }
legend { font-weight: 700; padding: 0 6px; color: #fff; }
.files { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.files li { background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 8px; padding: 6px; font-size: .78rem; word-break: break-all; }
.files a { color: var(--muted); }
.files img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px; margin-bottom: 4px; background: #222; }
.feedback { background: rgba(92,197,150,.1); border: 1px solid rgba(92,197,150,.35); padding: 12px 14px; border-radius: var(--radius); margin: 12px 0; white-space: pre-wrap; }
.feedback.revise { background: rgba(239,122,90,.1); border-color: rgba(239,122,90,.4); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: .82rem; background: rgba(0,0,0,.25); position: sticky; top: 0; }
tr:hover td { background: rgba(255,255,255,.02); }
tr.break td { color: var(--muted); font-style: italic; }
.matrix td.c { text-align: center; min-width: 36px; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; background: rgba(255,255,255,.08); vertical-align: middle; }
.dot.submitted { background: var(--mustard); box-shadow: 0 0 8px rgba(227,170,43,.5); }
.dot.reviewed { background: var(--ok); }
.dot.revise { background: var(--brick); }
.flag { color: var(--brick); font-weight: 600; font-size: .82rem; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--muted); margin: 8px 0; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; padding: 4px; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 999px; width: max-content; max-width: 100%; }
.tabs button { font: inherit; font-size: .92rem; background: none; border: 0; padding: 7px 16px; cursor: pointer; color: var(--muted); border-radius: 999px; white-space: nowrap; }
.tabs button:hover { color: #fff; }
.tabs button[aria-selected="true"] { color: #000; background: var(--mustard); font-weight: 600; }

/* ---------- library ---------- */
.src { padding: 16px 0; border-bottom: 1px solid var(--line); }
.src:last-child { border-bottom: 0; }
.src .focus { background: rgba(0,0,0,.25); border-inline-start: 2px solid var(--mustard); padding: 9px 13px; border-radius: 8px 0 0 8px; font-size: .93rem; }
.tools { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.tool h3 a { color: #fff; }
.tool dl.kv { font-size: .88rem; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.gloss dt { font-weight: 700; color: #fff; margin-top: 14px; }
.gloss dd { margin: 2px 0 0; color: #c6d0d8; }

/* ---------- gallery ---------- */
.gal { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.gitem { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.gitem .thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: #000; }
.gitem .thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.gitem .body { padding: 16px; }
.review { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; font-size: .92rem; }
details summary { cursor: pointer; font-weight: 600; padding: 6px 0; color: var(--mustard-2); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; }
.login .in { align-self: center; max-width: 540px; padding: 32px 20px; margin: 0 auto; width: 100%; min-width: 0; }
.login .denoise { aspect-ratio: 16 / 9; margin-bottom: 30px; }
.login h1 { font-size: clamp(2.1rem, 8vw, 3.2rem); }
.login .dept { color: var(--mustard-2); font-weight: 600; margin-bottom: 8px; font-size: .95rem; }
.login p { color: #c3ced7; }
.login .btn.primary { margin-top: 10px; min-height: 52px; padding: 10px 28px; font-size: 1.05rem; }
.login .err { background: rgba(239,122,90,.12); border: 1px solid rgba(239,122,90,.45); color: #ffb9a6; padding: 10px 14px; border-radius: var(--radius); }
.login footer { padding: 18px 20px; color: var(--muted); font-size: .85rem; text-align: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.frame.break { aspect-ratio: auto; align-self: stretch; height: auto; min-height: 164px; }
@media (max-width: 560px) { .brand .bt span { display: none; } .brand b { font-size: .92rem; } .brand .disc { width: 40px; height: 40px; font-size: 7.5px; } }

/* ---------- generative imagery ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero > canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.ucard { grid-template-columns: 58px 1fr; padding: 0 0 16px; overflow: hidden; }
.ucard > :not(.ucover) { margin-inline: 16px; }
.ucard .n { margin-inline-end: 0; }
.ucover { grid-column: 1 / -1; aspect-ratio: 16 / 7; margin-bottom: 12px; position: relative; overflow: hidden; background: #111a22; border-bottom: 1px solid var(--line); }
.ucover canvas, .ucover img, .ubanner canvas, .ubanner img { width: 100%; height: 100%; display: block; object-fit: cover; }
.ucard.locked .ucover { filter: grayscale(1) blur(1.5px); }
.ucard.is-current .ucover::after { content: "השבוע"; position: absolute; top: 10px; inset-inline-start: 12px; background: var(--mustard); color: #000; font-size: .74rem; font-weight: 700; padding: 1px 9px; border-radius: 4px; }
.ubanner { aspect-ratio: 16 / 6; max-height: 260px; width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 18px; background: #111a22; }
@media (max-width: 600px) { .ubanner { aspect-ratio: 16 / 8; } }
.skip { inset-inline-start: 12px; top: -200px; }
.skip:focus { top: 12px; }

/* ---------- photographic covers ---------- */
.hero { background: linear-gradient(270deg, rgba(12,17,22,.25) 0%, rgba(12,17,22,.82) 48%, rgba(12,17,22,.95) 100%), var(--cover, none) center / cover no-repeat, linear-gradient(135deg, rgba(44,58,71,.6), rgba(17,25,33,.6)); }
.hero > canvas { opacity: .55; mix-blend-mode: screen; }
@media (max-width: 719px) { .hero { background: linear-gradient(180deg, rgba(12,17,22,.35) 0%, rgba(12,17,22,.9) 55%), var(--cover, none) top center / cover no-repeat, var(--surface); } }
.ucover img, .ubanner img { object-position: 65% 50%; }
.ucover img { transition: transform .4s ease; }
.ucard:hover .ucover img { transform: scale(1.04); }
.ubanner { position: relative; }
.ubanner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12,17,22,.55), transparent 50%); pointer-events: none; }
.login { background: linear-gradient(180deg, rgba(12,17,22,.6), rgba(12,17,22,.96) 55%), url("/img/login-bg.webp") center top / cover no-repeat, var(--bg); }
@media (min-width: 880px) { .login { background: linear-gradient(90deg, rgba(12,17,22,.97) 35%, rgba(12,17,22,.55)), url("/img/login-bg.webp") center / cover no-repeat, var(--bg); } }
.welcome .videos { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }

/* office hours */
.slots { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.slot { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 12px; border: 1px solid var(--line, #2a3540); background: rgba(255,255,255,.02); text-align: start; font: inherit; color: inherit; }
.slot b { font-size: 1.15rem; }
.slot.free { cursor: pointer; border-color: var(--mustard); }
.slot.free:hover { background: rgba(227,170,43,.12); }
.slot.taken { opacity: .55; }
.slot.mine { border: 2px solid var(--mustard); background: rgba(227,170,43,.1); }
.slot .btn { margin-top: 6px; align-self: flex-start; }
.booked { border-color: var(--mustard); }
.chip.lect { border-color: rgba(227,170,43,.45); color: var(--mustard); }
.notice.moodle { margin: 4px 0 14px; font-weight: 600; }

/* quiz */
.qq { border: 1px solid var(--line, #2a3540); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.qq legend { font-weight: 600; padding: 0 6px; line-height: 1.4; }
.qa { display: flex; gap: 10px; align-items: flex-start; padding: 7px 4px; cursor: pointer; border-radius: 8px; }
.qa:hover { background: rgba(255,255,255,.04); }
.qa input { margin-top: 5px; accent-color: var(--mustard); }
.quizres { border-radius: 12px; padding: 12px 14px; margin: 10px 0 14px; }
.quizres.ok { background: rgba(127,207,154,.1); border: 1px solid rgba(127,207,154,.45); }
.quizres.bad { background: rgba(239,122,90,.1); border: 1px solid rgba(239,122,90,.45); }
.st-passed { color: var(--ok); } .st-failed { color: var(--brick); }
.charter h2 { margin-top: 26px; } .charter h3 { margin-top: 16px; }

.notice.remind { border-color: var(--mustard); background: rgba(227,170,43,.1); }
.remind-box summary { list-style: none; display: inline-flex; }
.remind-box summary::-webkit-details-marker { display: none; }
.remind-box[open] summary { margin-bottom: 8px; }

.feedback .grade { margin: 6px 0 2px; font-size: 15px; color: var(--mustard-2); }
.feedback .grade b { font-size: 20px; }
.grade-pill { display: inline-block; min-width: 38px; text-align: center; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--mustard-2); color: var(--mustard-2); font-weight: 700; margin-inline: 8px; }

th.gh { vertical-align: bottom; min-width: 64px; max-width: 92px; }
th.gh .gh-t { display: block; font-size: 12px; line-height: 1.25; font-weight: 600; white-space: normal; color: var(--ink, #EEF1F4); }

.gtable th, .gtable td { white-space: nowrap; }
.gtable th.gh { white-space: normal; min-width: 78px; }
.gtable td:first-child, .gtable th:first-child { min-width: 150px; white-space: normal; }

/* lecturer dashboard uses the full width of large screens */
main.wide { max-width: 1760px; }
.gtable th, .gtable td { padding-inline: 8px; }
.gtable th.gh { min-width: 72px; }

.gtable .gsep { border-inline-start: 2px solid var(--line); }
.gtable .gfinal { border-inline-start: 2px solid var(--mustard-2); color: var(--mustard-2); font-size: 1.05em; }

/* ---------- content editor ---------- */
input[type=number], input[type=date], input[type=datetime-local] {
width: 100%; min-height: 44px; padding: 8px 12px; background: var(--surface); color: var(--text);
border: 1px solid var(--line-2); border-radius: 8px; font: inherit; color-scheme: dark;
}
input[type=number]:focus, input[type=date]:focus, input[type=datetime-local]:focus { outline: none; border-color: var(--mustard); box-shadow: 0 0 0 3px rgba(227,170,43,.18); }
.cms-pane { margin-top: 16px; }
.cms-tabs { flex-wrap: wrap; }
.cms-field { display: block; margin: 0 0 14px; }
.cms-lab { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
.cms-lab .hint, .cms-inline .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
.cms-inline { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; }
.cms-inline input { width: 20px; height: 20px; accent-color: var(--mustard); }
.cms-sub { border-inline-start: 2px solid var(--line-2); padding-inline-start: 14px; }
.cms-item { border: 1px solid var(--line-2); border-radius: var(--radius); background: rgba(255,255,255,.02); margin: 0 0 10px; }
.cms-item > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; }
.cms-item[open] > summary { border-bottom: 1px solid var(--line); }
.cms-item > .cms-obj { padding: 16px; }
.cms-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.cms-list { margin-bottom: 14px; }
.cms-rowline { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.cms-checks { display: flex; gap: 16px; flex-wrap: wrap; }
.cms-check { display: inline-flex; gap: 6px; align-items: center; }
.cms-bar { position: sticky; bottom: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 20px; padding: 12px 16px; background: rgba(22,32,42,.94); backdrop-filter: blur(8px); border: 1px solid var(--line-2); border-radius: var(--radius); z-index: 5; }
.cms-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cms-md { min-height: 420px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; direction: rtl; }
.cms-prev { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; min-height: 420px; overflow: auto; }
@media (max-width: 800px) { .cms-split { grid-template-columns: 1fr; } .cms-bar { bottom: 84px; } }
.cms-top { display: flex; justify-content: flex-end; margin-bottom: 8px; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }

.cms-vis { width: 100%; border-collapse: collapse; }
.cms-vis th, .cms-vis td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; }
.cms-vis .c { width: 56px; text-align: center; }
.cms-vis input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--mustard); }
.cms-vis tr.grp th { background: var(--mustard-dim); color: var(--mustard-2); font-size: .9rem; }
.cms-vis input.cms-name { min-height: 38px; padding: 6px 10px; }
.cms-cover-wrap { margin: 12px 0; max-width: 720px; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: #000; }
.cms-cover { display: block; width: 100%; height: auto; }
.cms-bar input[type=file] { flex: 1 1 220px; width: auto; }
.previewbar { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 14px; background: var(--mustard); color: #0c1116; font-weight: 700; }
.previewbar .btn { background: #0c1116; color: var(--mustard-2); border-color: #0c1116; }
#prevbtn { margin-inline-end: 6px; }
.cms-coverbox { margin: 6px 0; max-width: 520px; aspect-ratio: 16 / 7; border: 1px dashed var(--line-2); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; background: #111a22; }
.cms-coverimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.cms-coverf .cms-rowline { margin-top: 8px; }
.cms-coverf input[type=file] { flex: 1 1 200px; width: auto; }
.cms-dt { display: flex; gap: 10px; flex-wrap: wrap; }
.cms-dt .cms-dmy { flex: 1 1 150px; } .cms-dt .cms-hm { flex: 1 1 130px; }
input.bad { border-color: var(--brick) !important; box-shadow: 0 0 0 3px rgba(239,122,90,.2) !important; }
.cms-filebox { margin-bottom: 16px; } .cms-filebox .cms-rowline { flex-wrap: wrap; } .cms-filebox input[type=file] { flex: 1 1 220px; width: auto; }
.hello h1 { font-size: clamp(.9rem, 2.5vw, 1.35rem); }
.homebanner { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.homebanner img { display: block; width: 100%; height: auto; }
.homebanner figcaption { padding: 14px 20px 16px; }
.homebanner h2 { margin: 0; font-size: clamp(1.3rem, 3.4vw, 2rem); }
.cms-homebox { max-width: 760px; } .cms-homebox .cms-coverbox { aspect-ratio: auto; max-width: 760px; display: block; } .cms-homebox .cms-coverimg { height: auto; object-fit: contain; }

.lecpanel { margin-top: 16px; }
@media (min-width: 880px) { .lecpanel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; align-items: center; padding-block: 14px; }
.lecpanel h2 { margin-bottom: 6px; } .lecpanel .list { margin: 0; } .lecpanel h3 { margin: 0 0 4px; } .lecpanel p { margin: 0 0 8px; } }

.subwide { margin-top: 16px; }
@media (min-width: 880px) {
.subwide #sform { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-items: start; }
.subwide #sform .sf-act { grid-column: 1 / -1; }
.subwide #sform .sf-col > fieldset { margin-top: 0; }
}
@media (min-width: 880px) {
.subwide #qform { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; align-items: start; }
.subwide #qform > .btn { grid-column: 1 / -1; justify-self: start; }
.subwide #qform .qq { margin: 0; }
}

.grid-after { display: grid; gap: 16px; margin-top: 16px; }
.grid-after:empty { display: none; }
@media (min-width: 880px) { .grid-after { grid-template-columns: 1.55fr 1fr; align-items: start; } .grid-after > * { margin: 0; } }

.unitimgs { margin-top: 16px; }
.uimgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.uimgs figure { margin: 0; }
.uimgs img { width: 100%; height: auto; border-radius: 10px; display: block; border: 1px solid var(--line); }
.uimgs figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.cms-imgrow { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.cms-imgrow input[type=text] { flex: 1; min-width: 160px; }
.cms-imgthumb { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

.unitex { margin-top: 16px; }
.slider { position: relative; }
.sl-vp { overflow: hidden; touch-action: none; cursor: grab; border-radius: 12px; }
.sl-vp:active { cursor: grabbing; }
.sl-track { display: flex; direction: rtl; will-change: transform; }
.sl-slide { margin: 0; padding: 0 6px; box-sizing: border-box; user-select: none; -webkit-user-select: none; }
.sl-slide { display: flex; flex-direction: column; align-items: center; }
.sl-slide img { width: auto; max-width: 100%; height: min(68vh, 560px); object-fit: contain; border-radius: 10px; display: block; border: 1px solid var(--line); pointer-events: none; }
.sl-slide figcaption { font-size: 1rem; font-weight: 600; text-align: center; color: var(--text, #eee); margin-top: 8px; min-height: 1.4em; }
.sl-btn { position: absolute; top: 40%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(12,16,20,.82); color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 4px; }
.sl-btn:hover { border-color: var(--mustard); color: var(--mustard-2); }
.sl-l { left: 8px; } .sl-r { right: 8px; }
.slider.noloop .sl-btn { display: none; }

.cms-tabcfg { border-style: dashed !important; opacity: .85; }
.cms-tabedit { margin: 8px 0 14px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 12px; }
.cms-tabedit[hidden] { display: none; }
.cms-tabchecks { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cms-tabchecks label { white-space: nowrap; font-weight: 400; }

.pl, .task .kv dd { white-space: pre-line; }
.task .brief{margin:14px 0}.task .brief h3{font-size:1.02rem;margin:16px 0 4px}.task .brief .pl{line-height:1.7}
.unitstack{display:block}.unitstack>div{width:100%}
.sl-slide img,.uimgs img{cursor:zoom-in}
body.lbx-open{overflow:hidden}
.lbx{position:fixed;inset:0;z-index:1000;background:rgba(0,0,0,.88);display:flex;align-items:center;justify-content:center;padding:24px}
.lbx figure{margin:0;max-width:94vw;max-height:92vh;display:flex;flex-direction:column;align-items:center;gap:10px}
.lbx img{max-width:94vw;max-height:84vh;object-fit:contain;border-radius:6px;box-shadow:0 10px 50px rgba(0,0,0,.6)}
.lbx figcaption{color:#fff;font-size:.95rem;text-align:center;max-width:80vw}
.lbx-x,.lbx-b{position:absolute;background:rgba(255,255,255,.14);color:#fff;border:0;border-radius:50%;width:46px;height:46px;font-size:1.8rem;line-height:1;cursor:pointer}
.lbx-x:hover,.lbx-b:hover{background:rgba(255,255,255,.3)}
.lbx-x{top:16px;left:16px}.lbx-b{top:50%;transform:translateY(-50%)}.lbx-l{left:16px}.lbx-r{right:16px}
.unitstack .prose{max-width:none}
/* course flow chart */
.flowc{list-style:none;margin:16px 0 0;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:22px 30px}
.fn{position:relative;display:flex;flex-direction:column;gap:4px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:rgba(0,0,0,.2);min-height:118px}
.fn::after{content:"←";position:absolute;inset-inline-end:-24px;top:50%;transform:translateY(-50%);color:var(--mustard);font-size:1.3rem;font-weight:700}
.fn:nth-child(4n)::after{content:"↓";inset-inline-end:50%;top:auto;bottom:-24px;transform:translateX(50%)}
.fn:last-child::after{display:none}
.fn-k{font-size:.74rem;letter-spacing:.02em;color:var(--mustard)}
.fn-h{font-size:1rem;line-height:1.3}
.fn-d{font-size:.84rem;color:#b6c2cc}
.fn-dt{font-size:1.2rem;font-weight:800;color:#fff;line-height:1.1}.fn-prac .fn-dt,.fn-sub .fn-dt,.fn-end .fn-dt,.fn-hack .fn-dt{color:var(--mustard)}
.fn-g{align-self:flex-start;font-size:.76rem;font-weight:700;background:var(--mustard);color:#000;border-radius:99px;padding:1px 9px}
.fn-prac{border-color:rgba(226,174,63,.55)}
.fn-sub,.fn-end{background:rgba(226,174,63,.12);border-color:var(--mustard)}
.fn-hack{border-style:dashed;border-color:var(--mustard)}
.fn-brk{border-style:dashed;opacity:.75}
.fn.is-past{opacity:.55}
.fn.is-now{box-shadow:0 0 0 2px var(--mustard);background:rgba(226,174,63,.1)}
.flowrun{display:flex;flex-wrap:wrap;gap:8px 22px;margin-top:22px;padding-top:12px;border-top:1px dashed var(--line);font-size:.86rem;color:#b6c2cc}
@media (max-width:900px){.flowc{grid-template-columns:repeat(2,1fr)}.fn:nth-child(4n)::after{content:"←";inset-inline-end:-24px;top:50%;bottom:auto;transform:translateY(-50%)}.fn:nth-child(2n)::after{content:"↓";inset-inline-end:50%;top:auto;bottom:-24px;transform:translateX(50%)}}
@media (max-width:560px){.flowc{grid-template-columns:1fr;gap:26px}.fn::after,.fn:nth-child(n)::after{content:"↓";inset-inline-end:50%;top:auto;bottom:-25px;transform:translateX(50%)}.fn:last-child::after{display:none}}
.frame.current .lab{white-space:normal;text-align:center;font-size:.98rem;line-height:1.2;max-width:140px}
/* home tabs */
.hometabs{display:flex;gap:6px;margin:6px 0 18px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.hometabs button{appearance:none;background:none;border:0;border-bottom:3px solid transparent;color:var(--muted);font:inherit;font-weight:600;font-size:1.05rem;padding:12px 20px;margin-bottom:-1px;cursor:pointer;white-space:nowrap}
.hometabs button:hover{color:#fff}
.hometabs button[aria-selected="true"]{color:var(--mustard-2);border-bottom-color:var(--mustard)}
.hometabs button:focus-visible{outline:2px solid var(--mustard);outline-offset:-2px;border-radius:6px}
.tabpanel:not(.on){height:0;overflow:hidden;visibility:hidden;margin:0;padding:0}
@media (min-width:880px){.lecpanel{grid-template-columns:1fr}}

.task ul.tk{margin:6px 0 0;padding-inline-start:1.3em}.task ul.tk li{color:#ff8a1f;font-weight:700;margin-bottom:.3em;line-height:1.6}.task ul.tk li::marker{color:#ff8a1f}.task .gap{height:.6em}

/* unit tags */
.utags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.utag { touch-action: none; font: inherit; font-size: .9rem; cursor: grab; user-select: none; color: var(--mustard-2); background: var(--mustard-dim); border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; }
.utag:hover { border-color: var(--mustard); color: #fff; }
.utag.drag { cursor: grabbing; background: var(--mustard); color: #000; box-shadow: 0 4px 14px rgba(0,0,0,.4); }

/* the simulator frame may be wider than the content column so its windows can be moved outside it */
html, body { overflow-x: clip; }
.utab-off { display: none !important; }
.utag.on { background: var(--mustard); color: #000; border-color: var(--mustard); font-weight: 600; }
.simpanel { margin: 0 0 16px; }
.utag.empty { opacity: .55; }
.utag.empty.on { opacity: 1; }
#subbox[hidden]{display:none!important}
.subcard .subtext{line-height:1.8;margin:0 0 14px}
.subcard .btn[disabled]{opacity:.5;cursor:not-allowed}

/* ====== Portal theme (light, black + yellow of the JMC photographic communication brand) ====== */
:root {
--bg: #f4f5f8; --surface: #ffffff; --slate: #e8eaf0;
--line: rgba(35, 31, 32, .12); --line-2: rgba(35, 31, 32, .24);
--text: #231f20; --muted: #626b76;
--mustard: #fdb813; --mustard-2: #7a5500; --mustard-dim: rgba(253, 184, 19, .2);
--ink: #231f20;
--font: "Heebo", "IBM Plex Sans Hebrew", system-ui, sans-serif;
color-scheme: light;
}
body { background: var(--bg); background-attachment: scroll; font-weight: 400; }
h1, h2, h3 { color: var(--ink); font-weight: 800; letter-spacing: -.01em; }
h1 { font-weight: 900; }
a { color: #7a5500; }
a:hover { color: #000; }
.due-strong, .ucard .n, .prose strong, legend, .gloss dt, .tool h3 a, .fn-dt { color: var(--ink); }
.prose blockquote { background: #fff8e6; color: #4a4339; }
/* header: black bar with the logo */
.top { background: #231f20; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 4px solid var(--mustard); }
.top-in { padding: 0 18px; gap: 18px; min-height: 64px; }
.brand { gap: 16px; }
.brand .logo { height: 64px; width: auto; display: block; margin-inline-start: -18px; }
.brand .bar { background: var(--mustard); height: 34px; }
.brand .bt, .brand b { color: #fff; }
.brand .bt span { color: #c9c4bd; }
.top nav a { color: #e7e3dc; font-weight: 700; border-radius: 0; padding: 22px 12px 18px; border-bottom: 4px solid transparent; margin-bottom: -4px; }
.top nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.top nav a[aria-current="page"] { color: #fff; background: transparent; border-bottom-color: var(--mustard); }
.who a { color: #d6d1c9; }
.who img, .avatar { background: #3a3536; border-color: #5a5455; }
.tabbar { background: #231f20; border-color: #231f20; }
.tabbar a { color: #bdb7ae; }
.tabbar a[aria-current="page"] { color: #fff; }
.tabbar a[aria-current="page"] svg { color: var(--mustard); filter: none; }
/* cards */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.panel h2 { border-bottom: 3px solid var(--mustard); padding-bottom: 8px; display: inline-block; }
.btn { background: #fff; color: var(--ink); border-color: var(--ink); border-radius: 4px; font-weight: 700; }
.btn:hover { background: var(--ink); color: #fff; }
.btn.primary, .subcard .btn:not([disabled]) { background: var(--mustard); border-color: var(--mustard); color: #000; }
.btn.primary:hover, .subcard .btn:not([disabled]):hover { background: #ffc93f; box-shadow: none; color: #000; }
.chip { background: #f0f1f5; color: var(--ink); border-radius: 3px; }
.chip.photo, .chip.lect { background: var(--mustard-dim); color: #5c4000; border-color: rgba(122,85,0,.35); }
.notice { background: #fff8e6; border: 1px solid rgba(122,85,0,.3); border-inline-start: 5px solid var(--mustard); border-radius: 4px; }
.tag { background: var(--mustard); color: #000; border-radius: 2px; }
.toast { background: var(--ink); color: #fff; }
/* forms and tables */
input, textarea, select { background: #fff; color: var(--text); border-radius: 4px; }
input[type=file] { background: #fafafa; }
input[type=file]::file-selector-button { background: var(--mustard); color: #000; border-radius: 4px; }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px rgba(253,184,19,.35); }
th { background: #eceef3; color: var(--ink); }
tr:hover td { background: #fafafc; }
.files li { background: #fafafa; }
.tabs { background: #fff; border-radius: 4px; border: 1px solid var(--line); }
.tabs button { color: var(--muted); border-radius: 3px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"], .hometabs button[aria-selected="true"] { background: var(--mustard); color: #000; }
.hometabs button:hover { color: var(--ink); }
.src .focus { background: #fff8e6; }
.dot { background: #dfe2e8; } .dot.submitted { box-shadow: none; }
/* unit tags = portal tab strip */
.utags { gap: 0; background: #fff; border: 1px solid var(--line); border-bottom: 3px solid var(--ink); border-radius: 0; padding: 0; }
.utag { background: transparent; color: var(--ink); border: 0; border-inline-start: 1px solid var(--line); border-radius: 0; padding: 12px 22px; font-weight: 800; }
.utag:hover { background: #f4f5f8; color: var(--ink); border-color: var(--line); }
.utag.on { background: var(--mustard); color: #000; font-weight: 800; }
.utag.drag { background: var(--ink); color: #fff; }
/* units */
.ucard { background: #fff; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.ucard.is-current { border-color: var(--mustard); box-shadow: 0 0 0 2px var(--mustard); }
.ucard.is-current .ucover::after { background: var(--mustard); color: #000; }
.task { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--mustard); border-radius: 4px; }
.fn { background: #fff; border-radius: 4px; }
.fn-sub, .fn-end { background: #fff8e6; } .fn.is-now { background: #fff8e6; }
.fn-prac .fn-dt, .fn-sub .fn-dt, .fn-end .fn-dt, .fn-hack .fn-dt { color: #7a5500; }
.slot { background: #fff; } .slot.free:hover { background: #fff8e6; } .slot.mine { background: #fff8e6; }
.qa:hover { background: #f4f5f8; }
.cms-item { background: #fff; } .cms-bar { background: rgba(255,255,255,.96); }
.previewbar { background: var(--mustard); color: #000; } .previewbar .btn { background: #000; color: var(--mustard); }
/* dark-by-design blocks keep white text */
.hero, .hero h1, .hero h2, .hero h3, .hero p, .hero .muted, .hero a:not(.btn) { color: #fff; }
.hero .muted { color: #d6d1c9; }
.frame, .frame h3, .frame b { color: #fff; }
.video b, .ubanner, .lbx figcaption { color: #fff; }
.login h1, .login h2, .login h3, .login p, .login label, .login .muted { color: #fff; }
.login .panel h1, .login .panel h2, .login .panel p, .login .panel label, .login .panel .muted { color: var(--ink); }
.brand .bt { display: none; }
@media (min-width: 1100px) { .brand .bt { display: block; } }
.uhead .n { background: linear-gradient(180deg, #fdb813 40%, #f3d58a); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900; }
.brand .bt b { font-size: .9rem; }

/* ====== Black version of the portal theme ====== */
:root {
--bg: #0d0c0c; --surface: #1a1818; --slate: #2b2829;
--line: rgba(255, 255, 255, .13); --line-2: rgba(255, 255, 255, .26);
--text: #f2efe9; --muted: #a9a39a;
--mustard: #fdb813; --mustard-2: #ffd466; --mustard-dim: rgba(253, 184, 19, .16);
--ink: #f4f1ea;
color-scheme: dark;
}
body { background: #0d0c0c; color: var(--text); }
a { color: #ffd466; } a:hover { color: #fff; }
.prose blockquote { background: rgba(253,184,19,.08); color: #e2ddd3; }
.top { background: #231f20; border-bottom-color: var(--mustard); }
.panel { background: #1a1818; border-color: var(--line); box-shadow: none; }
.btn { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn:hover { background: var(--mustard); color: #000; border-color: var(--mustard); }
.btn.primary, .subcard .btn:not([disabled]) { background: var(--mustard); border-color: var(--mustard); color: #000; }
.btn.primary:hover, .subcard .btn:not([disabled]):hover { background: #ffd466; color: #000; }
.chip { background: rgba(255,255,255,.07); color: var(--text); }
.chip.photo, .chip.lect { background: var(--mustard-dim); color: #ffd466; border-color: rgba(253,184,19,.45); }
.notice { background: rgba(253,184,19,.1); border-color: rgba(253,184,19,.35); border-inline-start-color: var(--mustard); }
.toast { background: var(--mustard); color: #000; }
input, textarea, select { background: #0d0c0c; color: var(--text); border-color: var(--line-2); }
input[type=file] { background: #131111; }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px rgba(253,184,19,.3); }
th { background: #262324; color: var(--text); }
tr:hover td { background: rgba(255,255,255,.04); }
.files li { background: #131111; }
.tabs { background: #1a1818; }
.tabs button:hover, .hometabs button:hover { color: #fff; }
.src .focus { background: rgba(253,184,19,.08); }
.dot { background: rgba(255,255,255,.14); }
.utags { background: #1a1818; border-color: var(--line); border-bottom-color: var(--mustard); }
.utag { color: var(--text); border-inline-start-color: var(--line); }
.utag:hover { background: #262324; color: #fff; }
.utag.on { background: var(--mustard); color: #000; }
.utag.drag { background: var(--mustard); color: #000; }
.ucard { background: #1a1818; box-shadow: none; }
.task { background: #1a1818; border-color: var(--line); border-top-color: var(--mustard); }
.fn { background: #1a1818; } .fn-sub, .fn-end, .fn.is-now { background: rgba(253,184,19,.1); }
.fn-prac .fn-dt, .fn-sub .fn-dt, .fn-end .fn-dt, .fn-hack .fn-dt { color: var(--mustard); }
.slot { background: #1a1818; } .slot.free:hover, .slot.mine { background: rgba(253,184,19,.12); }
.qa:hover { background: rgba(255,255,255,.05); }
.cms-item { background: #1a1818; } .cms-bar { background: rgba(26,24,24,.96); }
.uhead .n { background: linear-gradient(180deg, #fdb813 40%, #8a6410); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login .panel h1, .login .panel h2, .login .panel p, .login .panel label, .login .panel .muted { color: var(--text); }

/* ====== full-width unit pages and units list ====== */
main:has(.uhead), main:has(.sheet) { max-width: 2000px; width: 100%; margin-inline: auto; padding-inline: clamp(14px, 2.4vw, 44px); }
body:has(main .uhead) .top-in, body:has(main .sheet) .top-in { max-width: 2000px; padding-inline: clamp(14px, 2.4vw, 44px); }
main:has(.uhead) .ubanner { max-height: 340px; }
main:has(.uhead) .unitstack, main:has(.uhead) .panel, main:has(.uhead) .task { max-width: none; }
main:has(.uhead) .simpanel { margin-inline: 0; }
main:has(.uhead) iframe.simframe { width: 100% !important; max-width: 100% !important; margin-inline: 0 !important; }
.sheet { grid-template-columns: repeat(auto-fill, minmax(clamp(260px, 22vw, 380px), 1fr)); }

/* ====== stronger frames ====== */
:root { --line: rgba(255, 255, 255, .26); --line-2: rgba(255, 255, 255, .42); --frame: #5a5455; }
.panel, .ucard, .task, .fn, .slot, .qq, .cms-item, .gitem, .tool, .src, .utags, .tabs {
border: 2px solid var(--frame); background-color: #1d1a1b;
box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 6px 18px rgba(0,0,0,.45);
}
.panel, .ucard, .task { border-radius: 6px; }
.task { border-top: 5px solid var(--mustard); }
.ucard.is-current, .fn.is-now, .slot.mine { border-color: var(--mustard); }
.utags { border-bottom: 4px solid var(--mustard); }
.ubanner, .ucover, .video, .gitem .thumbs { border: 2px solid var(--frame); }
input, textarea, select { border: 2px solid #6b6566; }
input:focus, textarea:focus, select:focus { border-color: var(--mustard); }
.btn { border-width: 2px; border-color: #8a8384; }
.btn:hover { border-color: var(--mustard); }
.chip { border: 1.5px solid #7a7374; }
.notice { border: 2px solid rgba(253,184,19,.55); border-inline-start: 6px solid var(--mustard); }
.simframe, .simpanel { border: 2px solid var(--frame) !important; border-radius: 6px; }
hr { border: 0; border-top: 2px solid var(--frame); }

/* ====== no yellow corners: accent bars drawn inside square frames ====== */
.task, .notice, .utags { border-radius: 0; }
.task { border: 2px solid var(--frame); box-shadow: inset 0 5px 0 var(--mustard), 0 0 0 1px rgba(0,0,0,.6), 0 6px 18px rgba(0,0,0,.45); }
.notice { border: 2px solid var(--frame); box-shadow: inset -6px 0 0 var(--mustard); }
.utags { border: 2px solid var(--frame); box-shadow: inset 0 -4px 0 var(--mustard), 0 0 0 1px rgba(0,0,0,.6), 0 6px 18px rgba(0,0,0,.45); }
.notice.remind { border-color: var(--frame); }

.ubanner.solid::after { display: none; }
.ucard:hover .ucover.solid img { transform: none; }
.ubanner.solid img, .ucover.solid img { object-position: center; }
.frame.has-img { background: linear-gradient(180deg, rgba(10,14,18,.05) 30%, rgba(10,14,18,.82)), var(--img) center / cover no-repeat; }
.frame.has-img::before { display: none; }
.frame.has-img .num, .frame.has-img .lab { text-shadow: 0 1px 8px rgba(0,0,0,.85); }
.frame.has-img .lab { color: #fff; }
.prose .mdimg{margin:18px 0}.prose .mdimg img{display:block;width:100%;height:auto;border-radius:12px}.prose .mdimg figcaption{font-size:.85rem;color:var(--muted,#9a9a9a);margin-top:6px;text-align:center}
