/* SmartNest Technologies - mobile first, no external fonts or scripts */
:root {
  --ink: #14213d;
  --ink-soft: #3a4763;
  --nest: #fca311;
  --nest-dark: #e08e00;
  --paper: #fffdf7;
  --card: #ffffff;
  --line: #e6e1d3;
  --leaf: #2a9d8f;
  --bad: #c0392b;
  --good: #1e8449;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 33, 61, 0.08);
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img, svg, iframe { max-width: 100%; }
a { color: #0b5cad; }
a:hover { color: #08407a; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6rem; }
h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
code { font-family: var(--mono); font-size: 0.92em; background: #f3efe2; padding: 0.1em 0.35em; border-radius: 5px; }
pre {
  font-family: var(--mono); font-size: 0.88rem; line-height: 1.5;
  background: #101a2e; color: #e8edf7; padding: 14px 16px; border-radius: 10px;
  overflow-x: auto; margin: 0 0 1.1rem;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 520px; }
.section { padding: 36px 16px; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; }
.lead { font-size: 1.1rem; color: var(--ink-soft); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--nest-dark); margin-bottom: 0.4rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: 8px; transform: translateY(-300%); background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { transform: none; }
:focus-visible { outline: 3px solid var(--nest); outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-block; cursor: pointer; text-align: center; text-decoration: none;
  font: inherit; font-weight: 700; color: var(--ink); background: var(--nest);
  border: 2px solid var(--nest); border-radius: 999px; padding: 12px 24px;
  min-height: 46px; transition: transform 0.08s, background 0.15s;
}
.btn:hover { background: var(--nest-dark); border-color: var(--nest-dark); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-small { padding: 8px 18px; min-height: 40px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }
form.inline { display: inline; margin: 0; }

/* Header and navigation (CSS-only mobile menu) */
.site-header { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50; }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 62px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand small { font-weight: 500; opacity: 0.8; font-size: 0.7em; display: block; margin-top: -4px; letter-spacing: 0.04em; }
.brand-mark { font-size: 1.5rem; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  content: ""; display: block; width: 22px; height: 2px; background: #fff; position: relative; transition: transform 0.2s;
}
.nav-burger span::before { position: absolute; top: -7px; }
.nav-burger span::after { position: absolute; top: 7px; }
.nav-toggle:focus-visible + .nav-burger { outline: 3px solid var(--nest); border-radius: 8px; }
.nav {
  display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--ink);
  flex-direction: column; padding: 8px 16px 18px; gap: 4px; border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.nav-toggle:checked ~ .nav { display: flex; }
.nav a, .nav .link-btn { color: #fff; text-decoration: none; padding: 10px 4px; display: block; }
.nav a:hover, .nav .link-btn:hover { color: var(--nest); }
.nav .btn { color: var(--ink); text-align: center; }
.nav .btn:hover { color: var(--ink); }

/* Flash messages */
.flashes { margin-top: 16px; }
.flash { padding: 12px 16px; border-radius: 10px; margin: 0 0 8px; font-weight: 600; }
.flash-success { background: #e6f6ec; color: #145a32; border: 1px solid #b7e2c6; }
.flash-error { background: #fdecea; color: #922b21; border: 1px solid #f3c1bb; }

/* Hero */
.hero { background: linear-gradient(160deg, #fff7e0 0%, var(--paper) 60%); padding: 40px 0 28px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2rem 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 6px; }
.ticks li::before { content: "✓"; color: var(--leaf); font-weight: 800; margin-right: 8px; }
.code-card { background: #101a2e; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 6px; color: #e8edf7; }
.code-card pre { background: none; padding: 0; margin: 0 0 8px; }
.dots { display: flex; gap: 6px; margin-bottom: 10px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: #3b4a6b; }

/* Cards and grids */
.grid { display: grid; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.grid .card { margin-bottom: 0; }
.icon { font-size: 2rem; margin: 0 0 6px; }
.band { background: var(--ink); color: #fff; padding: 36px 0; }
.band p { color: #d5dcec; margin: 0; }
.course h2, .course h3 { margin-bottom: 0.4rem; }
.syllabus { margin: 0; padding-left: 1.2rem; }
.syllabus li { padding: 6px 0; }
.syllabus .small { margin-left: 8px; }
.badge { display: inline-block; background: #e6f6ec; color: var(--good); font-size: 0.75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; vertical-align: middle; }
.lock { opacity: 0.7; }
.unlock { border-color: var(--nest); background: #fff8e6; }
.meter { width: 100%; height: 12px; margin: 0 0 22px; border: 0; border-radius: 999px; overflow: hidden; background: #ece7d7; accent-color: var(--leaf); appearance: none; -webkit-appearance: none; }
.meter::-webkit-progress-bar { background: #ece7d7; }
.meter::-webkit-progress-value { background: var(--leaf); border-radius: 999px; }
.meter::-moz-progress-bar { background: var(--leaf); border-radius: 999px; }

/* Pricing */
.price-card { max-width: 440px; margin: 20px auto 32px; text-align: center; border: 2px solid var(--nest); }
.price { font-size: 2.6rem; font-weight: 800; margin: 0; }
.price-card .ticks { text-align: left; margin: 16px 0 20px; }
.faq { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 10px 0 0; }

/* Forms */
.form { display: grid; gap: 16px; margin: 20px 0; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form small { font-weight: 400; color: var(--ink-soft); }
input[type="text"], input[type="email"], input[type="password"] {
  font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; min-height: 46px;
}
input:focus { border-color: var(--nest); outline: none; }

/* Lessons */
.lesson { padding-top: 24px; padding-bottom: 40px; }
.crumbs { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 8px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 24px; position: sticky; top: 62px; background: var(--paper); padding: 8px 0; z-index: 10; }
.pills a { text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; font-weight: 600; color: var(--ink); }
.pills a:hover { border-color: var(--nest); }
.prose { max-width: 760px; margin-bottom: 40px; scroll-margin-top: 130px; }
.prose h2.sec { border-bottom: 2px solid var(--nest); padding-bottom: 6px; margin-bottom: 14px; }
.prose h2 { margin-top: 1.6rem; }
.prose li { margin-bottom: 4px; }
.practice { margin-top: 12px; }
.editor {
  width: 100%; font-family: var(--mono); font-size: 0.92rem; line-height: 1.5; tab-size: 2;
  background: #101a2e; color: #e8edf7; border: 2px solid #101a2e; border-radius: 10px; padding: 14px; resize: vertical; min-height: 220px;
}
.editor:focus { border-color: var(--nest); outline: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.results { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.results li { padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; word-break: break-word; }
.results li.pass { background: #e6f6ec; color: #145a32; }
.results li.fail { background: #fdecea; color: #922b21; }
.results li small { display: block; font-family: var(--mono); margin-top: 2px; }
.summary { font-weight: 700; min-height: 1.6em; }
.summary.ok { color: var(--good); }
.summary.no { color: var(--bad); }
.sandbox-frame { display: none; width: 100%; height: 260px; border: 2px solid var(--line); border-radius: 10px; background: #fff; margin-top: 8px; }
.sandbox-frame.visible { display: block; }
.quiz { display: grid; gap: 16px; margin: 12px 0; }
.q { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.q legend { font-weight: 700; padding: 0 4px; }
.q fieldset { border: 0; margin: 0; padding: 0; }
.q label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.q label:hover { background: #fff8e6; }
.q input { margin-top: 5px; }
.q .why { margin: 8px 0 0; font-size: 0.92rem; }
.q.right { border-color: #b7e2c6; background: #f4fbf6; }
.q.wrong { border-color: #f3c1bb; background: #fff6f5; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Footer */
.site-footer { background: var(--ink); color: #d5dcec; margin-top: 40px; padding: 30px 0; }
.site-footer a { color: #fff; }
.foot { display: grid; gap: 14px; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot p { margin: 0; }
.copy { font-size: 0.85rem; opacity: 0.85; }
.langs a { margin-left: 10px; text-decoration: none; opacity: 0.85; }
.langs a.on { font-weight: 700; text-decoration: underline; opacity: 1; }
.clock { font-size: 0.9rem; opacity: 0.9; }

/* Line icons (inline SVG, same colour as the text) */
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.brand-mark { display: inline-flex; color: var(--nest); }
.brand-mark .ic { width: 30px; height: 30px; }
.icon { margin: 0 0 10px; color: var(--nest-dark); }
.icon .ic { width: 30px; height: 30px; }
.course h2 .ic, .course h3 .ic, .prose h2.sec .ic { margin-inline-end: 8px; vertical-align: -3px; color: var(--nest-dark); }
.lock .ic { width: 16px; height: 16px; vertical-align: -2px; }

/* Account area: side menu, notifications, profile */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 16px; padding-bottom: 20px; }
.side, .shell-main { min-width: 0; }
.side a, .side summary, .side-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 0; border-radius: 10px; background: none; color: var(--ink); text-decoration: none; font: inherit; font-weight: 600; text-align: start; cursor: pointer; }
.side a:hover, .side summary:hover, .side-btn:hover { background: #f3efe2; }
.side summary { list-style: none; }
.side summary::-webkit-details-marker { display: none; }
.side summary::after { content: ""; width: 7px; height: 7px; margin-inline-start: auto; border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 0.15s; flex: none; }
.side details[open] > summary::after { transform: rotate(-135deg) translateY(0); }
.side-dash { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.side-dash > summary { font-size: 1rem; }
.side summary.on, .side a.on { background: var(--ink); color: #fff; }
.side-list, .side-lang ul { list-style: none; margin: 2px 0 4px; padding: 0 0 0 14px; }
[dir="rtl"] .side-list, [dir="rtl"] .side-lang ul { padding: 0 14px 0 0; }
.side-list form { margin: 0; }
.side-list > li > a, .side-list > li summary, .side-btn { font-weight: 500; }
.side-lang ul { padding-inline-start: 34px; }
.side-lang li a { padding: 8px 12px; font-weight: 500; font-size: 0.95rem; }
.side-lang li a.on { background: #f3efe2; color: var(--ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--nest); }
[dir="rtl"] .side-lang li a.on { box-shadow: inset -3px 0 0 var(--nest); }
.app-section { padding: 4px 0 24px; min-width: 0; }
.lang-grid { list-style: none; margin: 12px 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lang-grid .btn.on { background: var(--ink); color: #fff; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
.notif { position: relative; margin-inline-start: auto; margin-inline-end: 4px; }
.notif summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; position: relative; color: #fff; border-radius: 10px; }
.notif summary .ic { width: 22px; height: 22px; vertical-align: middle; }
.notif summary:hover { color: var(--nest); }
.notif summary::-webkit-details-marker { display: none; }
.notif-badge { position: absolute; top: 3px; inset-inline-end: 2px; background: var(--nest); color: var(--ink); font-size: 0.68rem; font-weight: 800; border-radius: 999px; min-width: 17px; height: 17px; line-height: 17px; text-align: center; padding: 0 4px; }
.notif-panel { position: absolute; inset-inline-end: 0; top: 100%; width: min(340px, 88vw); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; z-index: 60; }
.notif-panel ul { list-style: none; margin: 8px 0; padding: 0; }
.notif-panel li, .notif-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.notif-panel li.new, .notif-list li.new { border-inline-start: 4px solid var(--nest); padding-inline-start: 10px; }
.notif-panel a { color: var(--ink); font-weight: 700; }
.notif-list { list-style: none; padding: 0; }
.notif-list li { margin-bottom: 10px; }

/* Log in link in the header on phones, delete account, price table */
.bar-login { color: #fff; text-decoration: none; font-weight: 600; padding: 8px 10px; margin-inline-start: auto; margin-inline-end: 2px; }
.bar-login:hover { color: var(--nest); }
.danger { border-color: #f3c1bb; background: #fff9f8; margin-top: 28px; }
.danger h2 { color: var(--bad); margin-top: 0; }
.danger .ic { vertical-align: -3px; margin-inline-end: 6px; }
.check { display: flex !important; align-items: center; gap: 10px; font-weight: 500 !important; }
.check input { width: 20px; height: 20px; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #a93226; border-color: #a93226; color: #fff; }
.table-wrap { overflow-x: auto; margin: 10px 0; }
.world { border-collapse: collapse; width: 100%; max-width: 680px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.world th, .world td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.world th { background: #f3efe2; font-size: 0.9rem; }
.world tr.mine td { background: #fff6e0; font-weight: 700; }

/* Larger screens */
@media (min-width: 768px) {
  .wrap { padding: 0 24px; }
  .section { padding: 56px 24px; }
  .hero { padding: 64px 0 48px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 48px; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .nav-burger { display: none; }
  .nav { display: flex; position: static; flex-direction: row; align-items: center; padding: 0; gap: 22px; border: 0; background: none; }
  .nav a, .nav .link-btn { padding: 0; }
  .nav a.btn { padding: 9px 20px; line-height: 1.3; }
  .shell { grid-template-columns: 230px minmax(0, 1fr); gap: 32px; padding-top: 32px; }
  .side { position: sticky; top: 84px; align-self: start; }
  .bar-login { display: none; }
  .notif { order: 3; margin-inline-start: 18px; margin-inline-end: 0; }
  .nav { margin-inline-start: auto; }
  .foot { grid-template-columns: 1fr auto; align-items: center; }
  .copy { grid-column: 1 / -1; }
  .pills { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---- Auth pages: centred card ---- */
.auth { min-height: calc(100vh - 62px - 200px); display: grid; place-items: start center; padding: 32px 16px 24px; background: linear-gradient(180deg, #fff7e0 0, var(--paper) 280px); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px; box-shadow: 0 10px 30px rgba(20, 33, 61, 0.08); }
.auth-mark { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; color: var(--ink); text-decoration: none; margin-bottom: 14px; }
.auth-mark .ic { width: 26px; height: 26px; color: var(--nest); }
.auth-card h1 { font-size: 1.6rem; text-align: center; margin: 0 0 6px; }
.auth-card > .muted:first-of-type { text-align: center; }
.auth-card .form { margin: 18px 0 8px; }
.auth-card .form .btn { width: 100%; padding: 13px 20px; font-size: 1.05rem; }
.auth-alt { text-align: center; margin: 12px 0 0; color: var(--ink-soft); }
.auth-card .muted { font-size: 0.9rem; text-align: center; }
@media (min-width: 700px) { .auth { padding-top: 56px; } .auth-card { padding: 36px 36px; } }

/* ---- Footer language links stay tidy ---- */
.langs { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.langs a { margin: 0; white-space: nowrap; }
.shell .form .btn { justify-self: start; min-width: 160px; }
.site-footer { margin-top: 0; }
main > section:last-child, main > .wrap:last-child { margin-bottom: 40px; }

/* ---- Auth pages, dark style (update 8) ---- */
.auth { background: radial-gradient(900px 420px at 80% -10%, rgba(252,163,17,.22), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(80,110,220,.28), transparent 60%), linear-gradient(160deg, #0d1730 0%, #14213d 55%, #1c2f5e 100%); }
.auth-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.22); color: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.auth-mark, .auth-card h1 { color: #fff; }
.auth-card .muted, .auth-alt, .auth-card .form small { color: #cfd7ea; }
.auth-card .form label { color: #e8edf8; font-weight: 500; }
.auth-card input { background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.35); color: #fff; }
.auth-card input::placeholder { color: #aab5d0; }
.auth-card input:focus { outline: none; border-color: var(--nest); box-shadow: 0 0 0 3px rgba(252,163,17,.3); }
.auth-card a { color: #fff; }
.auth-card a.strong { font-weight: 700; }
.auth-card .btn { color: var(--ink); }
.pw { position: relative; display: block; }
.pw input { width: 100%; padding-inline-end: 48px; }
.pw-toggle { position: absolute; inset-block: 0; inset-inline-end: 4px; width: 44px; background: none; border: 0; color: #cfd7ea; cursor: pointer; display: grid; place-items: center; }
.pw-toggle.on { color: var(--nest); }
.pw-toggle .ic { width: 22px; height: 22px; }
.auth-forgot { text-align: end; margin: -4px 0 0; font-size: .95rem; }
.auth-forgot a { color: #fff; }
.auth-card input:-webkit-autofill { -webkit-text-fill-color: #fff; transition: background-color 9999s; }
main > .auth:last-child { margin-bottom: 0; }

/* ---- Auth pages stand alone: no site header or footer ---- */
.page-auth .site-header, .page-auth .site-footer, .page-auth .skip { display: none; }
.page-auth main { min-height: 100vh; }
.page-auth .auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; margin: 0; }
.page-auth .flashes { width: 100%; max-width: 440px; padding: 0; margin-bottom: 12px; }
.auth-lang { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 18px 0 0; max-width: 440px; font-size: .85rem; }
.auth-lang a { color: #cfd7ea; text-decoration: none; white-space: nowrap; }
.auth-lang a.on { color: #fff; font-weight: 700; text-decoration: underline; }
.auth-home { margin: 10px 0 0; font-size: .9rem; }
.auth-home a { color: #cfd7ea; }

/* ---- Multi-course catalogue ---- */
.course-card { display: flex; flex-direction: column; gap: 6px; }
.course-card h2 { font-size: 1.25rem; margin: 4px 0; }
.course-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: auto 0 0; padding-top: 12px; flex-wrap: wrap; }
.badge.soon { background: #eef0f5; color: #5a6480; border: 1px solid var(--line); }
.module-title { margin: 18px 0 6px; font-size: 1.05rem; }
.eyebrow { margin: 0; }
.module-head { display: grid; gap: 12px; }
.module-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.price-sm { font-size: 1.15rem; }
p.price.price-sm { font-size: 1.35rem; margin: 6px 0; }
.syllabus { list-style: none; padding-inline-start: 0; margin: 6px 0 14px; display: grid; gap: 8px; }
.section-name { margin: 14px 0 4px; font-weight: 700; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; vertical-align: middle; border: 1px solid transparent; }
.tag-frontend { background: #e6f0ff; color: #1d4ed8; border-color: #bcd3ff; }
.tag-backend { background: #e8f7ee; color: #166534; border-color: #b9e4c8; }
.tag-database { background: #fff3dc; color: #8a5200; border-color: #f4d9a0; }
.next-course { background: #fff7e0; border-color: #f4d9a0; margin-top: 20px; }
@media (min-width: 700px) { .module-head { grid-template-columns: 1fr auto; align-items: start; } }
details.sec { border-top: 1px solid var(--line); padding: 8px 0; }
details.sec > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px 0; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #eef0f5; font-weight: 700; flex: none; }
details.sec[open] > summary::before { content: "\2212"; }
details.sec .syllabus { margin: 6px 0 8px 32px; }

/* ---- Practice hub ---- */
.hub-wrap { max-width: 1400px; margin: 0 auto; padding: 16px; }
.hub-crumbs { margin: 0 0 10px; }
.hub { display: grid; gap: 14px; }
.hub-left, .hub-right { min-width: 0; padding: 0; overflow: hidden; }
.hub-tabs { display: flex; gap: 4px; background: #e8edf7; padding: 6px 8px 0; border-bottom: 1px solid var(--line); }
.hub-tabs button { background: none; border: 0; padding: 10px 16px; font: inherit; font-weight: 600; color: var(--ink-soft); cursor: pointer; border-bottom: 3px solid transparent; }
.hub-tabs button.on { color: var(--ink); border-bottom-color: var(--nest); }
.hub-pane { padding: 18px 20px 24px; }
.hub-pane h1 { font-size: 1.5rem; margin: 0 0 8px; }
.hub-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.lvl { font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.lvl-easy { background: #e8f7ee; color: #166534; }
.lvl-medium { background: #fff3dc; color: #8a5200; }
.lvl-hard { background: #fde8e8; color: #991b1b; }
.tag-oop { background: #efe7ff; color: #5b21b6; border-color: #d6c3ff; }
.tag-plain { background: #eef0f5; color: #46506b; border-color: var(--line); }
.hub-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: #e8edf7; border-bottom: 1px solid var(--line); }
.lang-select { font: inherit; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; }
.code-box { display: grid; grid-template-columns: 44px 1fr; min-height: 360px; background: #fff; }
.gutter { margin: 0; padding: 14px 8px; text-align: right; color: #8b93a8; background: #f3f5fa; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow: hidden; user-select: none; }
.code { border: 0; resize: vertical; min-height: 360px; padding: 14px; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 4; white-space: pre; overflow: auto; outline: none; width: 100%; min-width: 0; }
.code:focus { box-shadow: inset 0 0 0 2px rgba(252,163,17,.5); }
.hub-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.hub-right .summary, .hub-right .results { margin: 0 14px 12px; }
.solution { background: #14213d; color: #f6f1e3; padding: 14px; border-radius: 12px; overflow: auto; }
.frames iframe { position: absolute; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
table.problems { width: 100%; border-collapse: collapse; }
table.problems th, table.problems td { text-align: start; padding: 12px 10px; border-bottom: 1px solid var(--line); }
@media (min-width: 960px) { .hub { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .hub-left { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; } }
.hub-pane .prose h2 { font-size: 1.15rem; margin: 18px 0 6px; }

/* ---- Admin ---- */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.admin-tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; background: #fff; }
.admin-tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.stat { display: grid; gap: 2px; padding: 14px; }
.stat strong { font-size: 1.7rem; }
.stat span { color: var(--ink-soft); font-size: .9rem; }
.admin-form { max-width: 520px; }
.admin-form select, .admin-inline select, .admin-inline input { font: inherit; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--line); background: #fff; }
.admin-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.admin-inline input { flex: 1; min-width: 200px; }
.pager-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
@media (min-width: 800px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Password strength checklist */
.pw-rules { list-style: none; margin: -4px 0 14px; padding: 0; display: grid; gap: 4px; font-size: 0.88rem; }
.pw-rules li { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.pw-rules li::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; opacity: 0.6; }
.pw-rules li.ok { color: #1a8f4c; }
.pw-rules li.ok::before { opacity: 1; background: #1a8f4c; border-color: #1a8f4c; box-shadow: inset 0 0 0 3px #fff; }
.pw-rules.show-bad li:not(.ok) { color: #d64545; }
.auth-card .pw-rules li { color: #cfd7ea; }
.auth-card .pw-rules li.ok { color: #5fe39a; }
.auth-card .pw-rules li.ok::before { background: #5fe39a; border-color: #5fe39a; box-shadow: inset 0 0 0 3px #101a33; }
.auth-card .pw-rules.show-bad li:not(.ok) { color: #ff8a8a; }

.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #a93226; }
.table-wrap input[type="checkbox"] { width: 20px; height: 20px; }
.card.danger input[name="confirm"] { display: block; width: 100%; max-width: 280px; margin: 6px 0 12px; padding: 10px 12px; font: inherit; border: 1px solid #d9c9c5; border-radius: 10px; }

.help-search { display: block; margin: 16px 0 8px; font-weight: 600; }
.help-search input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; border: 1px solid var(--line); border-radius: 10px; }
.help-group h2 { margin-top: 28px; }
.help .card { margin-top: 28px; }
[hidden] { display: none !important; }
.admin-form td input[type="number"] { width: 120px; padding: 9px 10px; font: inherit; border: 1px solid var(--line); border-radius: 8px; }

.checklist { list-style: none; padding: 0; display: grid; gap: 10px; }
.checklist li { padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 8px 0; }
label.check input { width: 20px; height: 20px; }
