/* CSP Academy — calm, warm reading design for long study sessions.
   Warm paper background (no pure white, no pure black), soft sage accent, generous line-height,
   light / dark / system theme and three text sizes (saved per browser). */

:root {
  --bg: #f6f3ec; --surface: #fffdf8; --surface-2: #f0ece3; --line: #e6dfd2;
  --text: #2b2925; --muted: #6f6a61; --faint: #9a948a;
  --accent: #3b7a6e; --accent-2: #2f665b; --accent-ink: #ffffff; --accent-soft: #e2eee9;
  --warm: #c08227; --warm-soft: #f6ead6; --ok: #3b7a6e; --danger: #b4452f;
  --shadow: 0 1px 2px rgba(60, 50, 30, .05), 0 8px 24px rgba(60, 50, 30, .06);
  --radius: 16px; --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --serif: 'Fraunces', Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16191c; --surface: #1d2125; --surface-2: #242a2f; --line: #2f363c;
    --text: #e6e2d9; --muted: #a39e94; --faint: #7c776e;
    --accent: #7cb8a8; --accent-2: #93c7b9; --accent-ink: #10201c; --accent-soft: #21332e;
    --warm: #e2ac5a; --warm-soft: #3a3020; --ok: #7cb8a8; --danger: #e48b74;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16191c; --surface: #1d2125; --surface-2: #242a2f; --line: #2f363c;
  --text: #e6e2d9; --muted: #a39e94; --faint: #7c776e;
  --accent: #7cb8a8; --accent-2: #93c7b9; --accent-ink: #10201c; --accent-soft: #21332e;
  --warm: #e2ac5a; --warm-soft: #3a3020; --ok: #7cb8a8; --danger: #e48b74;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
html[data-size="l"]  { font-size: 17.5px; }
html[data-size="xl"] { font-size: 19px; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6;
       -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

.ac-skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.ac-skip:focus { left: 12px; }

/* ── top bar ── */
.ac-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 10px 22px;
          background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
          border-bottom: 1px solid var(--line); min-height: 60px; }
.ac-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-size: 17px; white-space: nowrap; }
.ac-brand b { font-family: var(--serif); font-weight: 600; color: var(--accent); }
.ac-crumb { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ac-crumb a { color: var(--muted); text-decoration: none; }
.ac-crumb a:hover { color: var(--text); }
.ac-top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ac-ic { width: 38px; height: 38px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; cursor: pointer;
         display: inline-flex; align-items: center; justify-content: center; font-size: 15px; color: var(--muted); }
.ac-ic:hover { color: var(--text); border-color: var(--faint); }
.ac-ic small { font-size: 10px; margin-left: 1px; }
.ac-ic .i-moon { display: none; }
:root[data-theme="dark"] .ac-ic .i-sun { display: none; }
:root[data-theme="dark"] .ac-ic .i-moon { display: inline; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ac-ic .i-sun { display: none; } :root:not([data-theme="light"]) .ac-ic .i-moon { display: inline; } }
.ac-user { position: relative; }
.ac-user summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.ac-user summary::-webkit-details-marker { display: none; }
.ac-av { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.ac-uname { font-size: 14px; font-weight: 500; }
.ac-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
           box-shadow: var(--shadow); min-width: 200px; padding: 6px; display: flex; flex-direction: column; }
.ac-menu a { padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; }
.ac-menu a:hover { background: var(--surface-2); }

/* ── page ── */
main { flex: 1; }
.ac-wrap { max-width: 1120px; margin: 0 auto; padding: 34px 22px 60px; }
.ac-hello { font-family: var(--serif); font-weight: 500; font-size: 2rem; line-height: 1.2; margin: 0 0 6px; letter-spacing: -.01em; }
.ac-lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 28px; }
.ac-h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin: 34px 0 14px; }
.ac-foot { text-align: center; color: var(--faint); font-size: 13px; padding: 26px 16px 34px; }

.ac-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 12px; border: 1px solid transparent;
          background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; transition: transform .12s, background .15s; }
.ac-btn:hover { background: var(--accent-2); color: var(--accent-ink); }
.ac-btn:active { transform: translateY(1px); }
.ac-btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.ac-btn.ghost:hover { border-color: var(--faint); background: var(--surface); color: var(--text); }
.ac-btn.done { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.ac-btn[disabled] { opacity: .45; cursor: default; }

.ac-progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.ac-progress > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s ease; }
.ac-pmeta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 7px; }

/* resume card */
.ac-resume { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 22px 24px; border-radius: var(--radius);
             background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ac-resume small { color: var(--muted); font-size: 13px; }
.ac-resume h3 { margin: 4px 0 2px; font-size: 1.15rem; }

/* course cards */
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.ac-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
           text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .18s ease, border-color .18s; }
.ac-card:hover { transform: translateY(-2px); border-color: var(--faint); color: var(--text); }
.ac-cover { height: 118px; position: relative; padding: 18px 20px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.ac-cover::after { content: ''; position: absolute; right: -30px; top: -30px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.ac-cover h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.3rem; line-height: 1.2; position: relative; z-index: 1; }
.ac-cbody { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.ac-cbody p { margin: 0; color: var(--muted); font-size: .95rem; }
.ac-tag { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.ac-tag.ok { background: var(--accent-soft); color: var(--accent); }
.ac-tag.warm { background: var(--warm-soft); color: var(--warm); }
.ac-empty { text-align: center; padding: 60px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* course page */
.ac-hero { border-radius: 20px; padding: 34px 32px; color: #fff; position: relative; overflow: hidden; margin-bottom: 26px; }
.ac-hero::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.ac-hero h1 { font-family: var(--serif); font-weight: 600; font-size: 2.1rem; line-height: 1.15; margin: 0 0 8px; position: relative; }
.ac-hero p { margin: 0; opacity: .9; max-width: 62ch; position: relative; }
.ac-hero .ac-progress { background: rgba(255, 255, 255, .22); margin-top: 22px; max-width: 420px; position: relative; }
.ac-hero .ac-progress > span { background: #fff; }
.ac-hero .ac-pmeta { color: rgba(255, 255, 255, .85); max-width: 420px; position: relative; }
.ac-hero .ac-btn { background: #fff; color: #1f2a28; margin-top: 18px; position: relative; }
.ac-cols { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }
.ac-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.ac-curr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ac-sec { padding: 14px 20px 6px; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ac-les { display: flex; align-items: center; gap: 14px; padding: 13px 20px; text-decoration: none; color: var(--text); border-top: 1px solid var(--line); }
.ac-les:hover { background: var(--surface-2); color: var(--text); }
.ac-les .st { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.ac-les.done .st { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ac-les.part .st { border-color: var(--accent); }
.ac-les .tt { flex: 1; min-width: 0; }
.ac-les .tt small { display: block; color: var(--muted); font-size: 12.5px; }
.ac-les.cur { background: var(--accent-soft); }

/* lesson page */
.ac-lesson { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: calc(100vh - 61px); }
.ac-side { border-right: 1px solid var(--line); background: var(--surface); position: sticky; top: 61px; height: calc(100vh - 61px); overflow-y: auto; }
.ac-side-h { padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.ac-side-h a { text-decoration: none; color: var(--text); font-weight: 600; }
.ac-side .ac-les { padding: 11px 18px; font-size: .92rem; }
.ac-side .ac-les:first-of-type { border-top: none; }
body.ac-focus .ac-lesson { grid-template-columns: 0 minmax(0, 1fr); }
body.ac-focus .ac-side { visibility: hidden; border: 0; }
.ac-read { max-width: 860px; width: 100%; margin: 0 auto; padding: 28px 28px 70px; }
.ac-lbar { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.ac-lbar .ac-chip { font-size: 13px; color: var(--muted); }
.ac-video { position: relative; padding-top: 56.25%; border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.ac-video iframe, .ac-video > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ac-video-note { font-size: 12px; color: var(--faint); margin-top: 6px; }
.ac-ltitle { font-family: var(--serif); font-weight: 600; font-size: 1.85rem; line-height: 1.2; margin: 26px 0 6px; letter-spacing: -.01em; }
.ac-lmeta { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.ac-prose { font-size: 1.0625rem; line-height: 1.78; max-width: 68ch; }
.ac-prose p { margin: 0 0 1.05em; }
.ac-prose ul { margin: 0 0 1.05em; padding-left: 1.3em; }
.ac-prose li { margin: .3em 0; }
.ac-prose h3 { font-size: 1.15rem; margin: 1.6em 0 .5em; }
.ac-prose strong { font-weight: 600; }
.ac-files { margin-top: 26px; display: grid; gap: 10px; }
.ac-file { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); }
.ac-file:hover { border-color: var(--faint); color: var(--text); }
.ac-file .fi { width: 38px; height: 38px; border-radius: 10px; background: var(--warm-soft); color: var(--warm); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.ac-file small { display: block; color: var(--muted); font-size: 12.5px; }
.ac-nav { display: flex; align-items: center; gap: 10px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ac-nav .sp { flex: 1; }
.ac-congrats { margin-top: 22px; padding: 18px 20px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ac-side-toggle { display: none; }

/* quiz */
.ac-quiz { margin-top: 10px; }
.ac-qstat { display: inline-block; margin-bottom: 16px; padding: 7px 14px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: 14px; }
.ac-qstat.ok { background: var(--accent-soft); color: var(--accent); }
.ac-qq { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 18px 20px 14px; margin: 0 0 14px; box-shadow: var(--shadow); }
.ac-qq legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; font-weight: 600; font-size: 1.05rem; line-height: 1.5; display: flex; gap: 10px; }
.ac-qq legend .n { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.ac-opt { clear: both; display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; margin: 6px 0; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.ac-opt:hover { border-color: var(--faint); }
.ac-opt input { margin-top: 4px; accent-color: var(--accent); width: 17px; height: 17px; flex: 0 0 auto; }
.ac-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ac-opt.right { border-color: var(--ok); background: var(--accent-soft); }
.ac-opt.right::after { content: '✓'; margin-left: auto; color: var(--ok); font-weight: 700; }
.ac-opt.wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.ac-opt.wrong::after { content: '✕'; margin-left: auto; color: var(--danger); font-weight: 700; }
.ac-qq.locked .ac-opt { cursor: default; }
.ac-qx { margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: var(--warm-soft); color: var(--text); font-size: .95rem; }
.ac-qbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.ac-qres { font-weight: 600; }
.ac-qres.ok { color: var(--ok); } .ac-qres.ko { color: var(--danger); }

/* guest top bar + public catalogue */
.ac-topbtn { padding: 8px 14px; font-size: .88rem; border-radius: 10px; }
.ac-pub-hero { text-align: center; padding: 30px 10px 6px; }
.ac-pub-hero h1 { font-family: var(--serif); font-weight: 600; font-size: 2.4rem; line-height: 1.15; margin: 0 0 12px; letter-spacing: -.01em; }
.ac-pub-hero p { color: var(--muted); font-size: 1.1rem; max-width: 60ch; margin: 0 auto 22px; }
.ac-badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.ac-badges span { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; }
.ac-price { font-weight: 700; color: var(--accent); }
.ac-cta { position: sticky; bottom: 0; z-index: 20; margin-top: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
          box-shadow: var(--shadow); padding: 16px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ac-cta b { font-size: 1.05rem; }
.ac-cta .sp { flex: 1; }
.ac-note { padding: 12px 16px; border-radius: 12px; font-size: .95rem; margin-bottom: 16px; }
.ac-note.ok { background: var(--accent-soft); color: var(--accent); }
.ac-note.warm { background: var(--warm-soft); color: var(--warm); }
.ac-note.err { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.ac-preview-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #0e7490; background: #ecfeff; border-radius: 99px; padding: 2px 9px; }
:root[data-theme="dark"] .ac-preview-tag { background: #12323a; color: #7dd3e5; }

/* sign-up form */
.ac-lbox.ac-reg { max-width: 780px; padding: 36px 40px; }   /* .ac-lbox (login, 420px) is defined later */
@media (max-width: 640px) { .ac-lbox.ac-reg { padding: 26px 20px; } }
.ac-field { min-width: 0; }
.ac-field input, .ac-field select { width: 100%; min-width: 0; box-sizing: border-box; }
.ac-2 > * { min-width: 0; }
.ac-field small { font-weight: 400; color: var(--faint); }
.ac-2 .ac-field > small { margin-top: -4px; }
.ac-steps { display: flex; gap: 6px; margin: 4px 0 22px; }
.ac-steps span { flex: 1; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--faint); padding-top: 10px; border-top: 3px solid var(--line); }
.ac-steps span.on { color: var(--accent); border-top-color: var(--accent); }
.ac-steps span.ok { color: var(--muted); border-top-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ac-step[hidden] { display: none; }
.ac-row { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.ac-row .sp { flex: 1; }
.ac-doc { border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.ac-doc-h { font-size: 13px; font-weight: 600; color: var(--muted); }
.ac-cap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.ac-capbtn { padding: 9px 14px; font-size: .9rem; cursor: pointer; }
.ac-cap-or { font-size: 12.5px; color: var(--faint); }
.ac-cap-prev { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ac-cap-prev:empty { display: none; }
.ac-thumb { position: relative; width: 132px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 6px; text-align: center; font-size: 12px; color: var(--muted); }
.ac-thumb .im { height: 84px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 4px; }
.ac-thumb img { max-width: 100%; max-height: 84px; transition: transform .2s; }
.ac-thumb button { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 2px 7px; cursor: pointer; font-size: 12px; margin: 0 2px; color: var(--text); }
.ac-thumb.file { width: auto; max-width: 100%; padding: 8px 12px; text-align: left; }
/* ✂ crop editor */
.ac-crop { position: fixed; inset: 0; z-index: 200; background: rgba(15, 18, 20, .82); display: none; align-items: center; justify-content: center; padding: 14px; }
.ac-crop-box { background: var(--surface); border-radius: 16px; padding: 14px; max-width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.ac-crop-t { font-weight: 700; margin-bottom: 10px; }
.ac-crop-t small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.ac-crop-stage { position: relative; touch-action: none; user-select: none; line-height: 0; margin: 0 auto; width: fit-content; }
.ac-crop-stage canvas { display: block; border-radius: 6px; }
.ac-crop-sel { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.5); cursor: move; }
.ac-crop-sel i { position: absolute; width: 22px; height: 22px; background: #fff; border: 2px solid var(--accent); border-radius: 50%; }
.ac-crop-sel i[data-h=nw] { left: -12px; top: -12px; cursor: nwse-resize; } .ac-crop-sel i[data-h=ne] { right: -12px; top: -12px; cursor: nesw-resize; }
.ac-crop-sel i[data-h=sw] { left: -12px; bottom: -12px; cursor: nesw-resize; } .ac-crop-sel i[data-h=se] { right: -12px; bottom: -12px; cursor: nwse-resize; }
.ac-crop-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ac-crop-bar .ac-btn { padding: 9px 14px; font-size: .9rem; }
.ac-crop-rat { margin-top: 10px; }
.ac-crop-rat .ac-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.ac-doc.done { border-style: solid; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.ac-doc.ok { border-style: solid; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
.ac-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin: 20px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.ac-sub small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.ac-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: end; }   /* inputs aligned even when one label has a hint */
.ac-sel, .ac-field input[type=file] { padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: .95rem; width: 100%; }
.ac-err a { color: inherit; font-weight: 700; }
@media (max-width: 560px) { .ac-2 { grid-template-columns: 1fr; } }

/* login */
.ac-login { flex: 1; display: flex; align-items: center; justify-content: center; padding: 30px 18px; }
.ac-lbox { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 34px 30px; box-shadow: var(--shadow); }
.ac-lbox h1 { font-family: var(--serif); font-weight: 600; font-size: 1.7rem; margin: 14px 0 4px; }
.ac-lbox p { color: var(--muted); margin: 0 0 22px; font-size: .95rem; }
.ac-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ac-field input { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; }
.ac-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ac-check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin: 4px 0 18px; }
.ac-err { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }

@media (max-width: 960px) {
  .ac-cols { grid-template-columns: 1fr; }
  .ac-lesson { grid-template-columns: 1fr; }
  .ac-side { position: fixed; left: 0; top: 61px; bottom: 0; width: min(340px, 88vw); height: auto; z-index: 30; transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow); }
  body.ac-side-open .ac-side { transform: none; }
  body.ac-focus .ac-side { visibility: visible; }
  .ac-side-toggle { display: inline-flex; }
}
@media (max-width: 640px) {
  .ac-top { padding: 8px 14px; gap: 10px; }
  .ac-crumb, .ac-uname { display: none; }
  .ac-wrap { padding: 24px 16px 50px; }
  .ac-read { padding: 18px 16px 60px; }
  .ac-hello { font-size: 1.6rem; }
  .ac-hero { padding: 26px 22px; }
  .ac-hero h1 { font-size: 1.6rem; }
  .ac-resume { grid-template-columns: 1fr; }
  .ac-ltitle { font-size: 1.5rem; }
}
