/* Folioo interface: a quiet dark workspace with a single blue accent. */
:root {
  color-scheme: dark;
  --green: #82aaff;
  --green-dark: #a9c4ff;
  --green-soft: #172947;
  --navy: #e8edf6;
  --blue: #82aaff;
  --amber: #d8b276;
  --coral: #e49a9f;
  --bg: #0b0f14;
  --card: #111720;
  --text: #e8edf6;
  --muted: #9aa8bb;
  --line: #273140;
  --shadow: none;
  --accent: #719eff;
  --font-display: "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
}
body { background: var(--bg); color: var(--text); font-family: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea { scroll-margin-top: 100px; }
button:focus-visible, a:focus-visible { outline: 2px solid #9ebdff; outline-offset: 4px; }
a { color: #a9c4ff; }
.brand { gap: 12px; color: var(--text); }
.brand-symbol { width: 39px; height: 39px; border: 0; border-radius: 0; background: transparent; flex: 0 0 39px; }
.brand-symbol svg { display: block; width: 39px; height: 39px; }
.brand strong { font-size: 19px; font-weight: 600; letter-spacing: -.5px; }
.brand small { margin-top: 5px; color: #8e9db4; font-size: 8px; letter-spacing: 2px; }
.brand-light { color: var(--text); }
.brand-light .brand-symbol { background: transparent; }
.brand-light small { color: #8e9db4; }
.eyebrow { color: #9caec7; font-size: 10px; font-weight: 600; letter-spacing: 2px; }
.eyebrow.green { color: #95b6ff; }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 43px; padding: 0 18px; border-radius: 6px; font-size: 13px; font-weight: 600; transition: background .18s, border-color .18s, color .18s; }
.btn-primary { border-color: #719eff; background: #719eff; color: #0a1426; }
.btn-primary:hover { border-color: #98b7ff; background: #98b7ff; color: #081223; }
.btn-primary:disabled { border-color: #30415e; background: #30415e; color: #a4b4cd; }
.btn-secondary { background: #131c28; border-color: #344259; color: #d6e1f5; }
.btn-secondary:hover { background: #1b293e; border-color: #5c79a6; }
.btn-light { background: #1a2a46; border-color: #3a5689; color: #b6ceff; }
.btn-light:hover { background: #223758; }
.text-button { color: #a5c1ff; font-weight: 500; font-size: 12px; }
.text-button:hover { color: #d2e0ff; text-decoration: underline; text-underline-offset: 4px; }
input, select, textarea { border: 1px solid #354154; border-radius: 6px; background: #0d141e; color: var(--text); font-size: 14px; }
input::placeholder, textarea::placeholder { color: #8e9bb0; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #4a5b75; }
input:focus, select:focus, textarea:focus { border-color: #86acff; box-shadow: 0 0 0 3px #719eff18; }
input[readonly] { background: #151b24; color: #a3b2c7; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 12px; border: 1px solid #475879; border-radius: 4px; background: #1d2d47; color: #bed3ff; font: inherit; cursor: pointer; }
select option { background: #121b28; color: var(--text); }

/* Access pages */
.login-page { min-height: 100vh; grid-template-columns: minmax(360px,.92fr) minmax(460px,1.08fr); background: var(--bg); }
.login-intro { position: relative; min-height: 100vh; padding: 40px clamp(36px,5vw,82px); border-right: 1px solid var(--line); background: #0e1623; overflow: hidden; }
.login-intro::after { position: absolute; right: 0; top: 110px; bottom: 80px; width: 1px; background: #496d9e; content: ""; }
.intro-copy { position: relative; z-index: 1; margin: auto 0; padding: 68px 0 48px; }
.intro-copy h1 { max-width: 500px; margin: 20px 0; color: #eaf0fa; font: 550 clamp(42px,4.2vw,66px)/1.08 var(--font-display); letter-spacing: -2.4px; }
.intro-copy h1 em { color: #80a9ff; font-style: normal; }
.intro-copy>p { max-width: 390px; margin: 0; color: #a1b0c6; font-size: 14px; line-height: 1.85; }
.access-visual { width: min(390px,100%); margin-top: 48px; border: 1px solid #2c3d57; border-radius: 8px; background: #0b121e; }
.access-visual-heading { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #2c3d57; color: #afc4e8; font: 10px/1.5 Consolas, monospace; letter-spacing: 1.6px; }
.access-visual-heading span:last-child { color: #94b9ff; }
.access-record { display: flex; gap: 17px; align-items: center; padding: 18px; border-bottom: 1px solid #1e2b3f; }
.access-record:last-child { border: 0; }
.access-record>span { color: #6e8cba; font: 11px/1.5 Consolas, monospace; }
.access-record strong { display: block; color: #d1ddef; font-size: 13px; font-weight: 500; }
.access-record small { display: block; margin-top: 4px; color: #91a2bb; font-size: 10px; }
.access-record svg { flex: 0 0 19px; margin-left: auto; color: #7fa8ed; }
.login-note { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding-top: 24px; border-top: 1px solid #26364d; color: #9aa9c0; font-size: 10px; letter-spacing: .5px; }
.login-panel { padding: 48px clamp(30px,7vw,100px); background: var(--bg); }
.login-form { width: min(405px,100%); }
.portal-back { display: block; margin: 0 0 42px; color: #a3b0c4; font-size: 12px; font-weight: 400; }
.portal-back:hover { color: #c4d7ff; text-decoration: none; }
.portal-label { display: inline-flex; margin: 0 0 12px; padding: 0; border-radius: 0; background: transparent; color: #92b6ff; font-size: 11px; font-weight: 500; letter-spacing: 1px; }
.portal-label::before { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border: 1px solid #7a9fde; border-radius: 50%; content: ""; }
.login-form h2 { margin: 0 0 12px; font: 550 38px/1.15 var(--font-display); letter-spacing: -1px; }
.login-form>p { margin: 0 0 28px; color: #9aa8bb; font-size: 13px; line-height: 1.7; }
.login-form label { margin-top: 20px; margin-bottom: 8px; color: #c0cbdc; font-size: 12px; font-weight: 500; }
.password-field button { color: #a5c1ff; font-weight: 500; }
.btn-large { min-height: 49px; margin-top: 28px; font-size: 14px; }
.form-error { color: #e6a7ae !important; }
.account-hint { margin-top: 18px !important; padding: 18px 0 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; color: #9eabc0 !important; font-size: 10px !important; line-height: 1.9 !important; }

/* Workspace */
.app-shell { grid-template-columns: 242px minmax(0,1fr); }
.sidebar { padding: 34px 20px 24px; border-right: 1px solid #202a39; background: #080d14; }
.sidebar>.brand { padding: 0 6px; }
.side-nav { gap: 6px; margin-top: 40px; }
.side-nav p { margin: 24px 12px 9px; color: #8392a9; font-size: 9px; font-weight: 500; letter-spacing: 1.5px; }
.side-nav button { gap: 13px; min-height: 45px; padding: 0 12px; border-radius: 6px; color: #aab7cc; font-size: 13px; font-weight: 400; }
.side-nav button:hover { background: #111c2b; color: #e0eafb; }
.side-nav button.active { position: relative; background: #15233a; color: #c3d6ff; font-weight: 500; }
.side-nav button.active::before { position: absolute; left: 0; top: 13px; bottom: 13px; width: 2px; border-radius: 1px; background: #7ca6ff; content: ""; }
.nav-icon { display: grid; place-items: center; width: 19px; }
.nav-icon svg { width: 18px; height: 18px; }
.sidebar-profile { grid-template-columns: 33px 1fr 28px; gap: 9px; padding: 22px 8px 0; border-top-color: #273140; }
.avatar { width: 33px; height: 33px; border: 1px solid #3a5279; border-radius: 7px; background: #182743; color: #b6cdff; font-weight: 500; }
.sidebar-profile strong { color: #cbd6e6; font-size: 12px; font-weight: 500; }
.sidebar-profile span { color: #8e9eb6; font-size: 10px; }
.sidebar-profile small { color: #93b6ff; font-size: 9px; font-weight: 400; }
.sidebar-profile button { color: #a3b2c9; }
.topbar { min-height: 86px; padding: 20px clamp(24px,3.4vw,52px); border-bottom: 1px solid #242d3a; background: #0b0f14; }
.topbar>div:nth-child(2) { min-width: 0; }
.topbar p { margin-bottom: 4px; color: #8fa0b8; font-size: 10px; letter-spacing: .3px; }
.topbar h1 { color: #c8d4e7; font-size: 16px; font-weight: 500; letter-spacing: -.2px; }
.icon-button { border-color: #3b4a63; background: #111b29; color: #c1d3f0; }
.global-search, .inline-search { border-color: #344157; border-radius: 6px; background: #101721; color: #99acc9; }
.global-search input, .inline-search input { color: #d0ddef; font-size: 12px; }
.global-search input { width: 190px; }
.content { max-width: 1440px; padding: 40px clamp(24px,3.4vw,52px) 68px; }
.page-heading { margin-bottom: 30px; }
.page-heading h2 { margin: 9px 0 12px; color: #e8edf6; font: 550 clamp(29px,3vw,40px)/1.12 var(--font-display); letter-spacing: -1.2px; }
.page-heading p { max-width: 680px; color: #9aa8bd; font-size: 13px; line-height: 1.7; }
.page-heading.row { align-items: center; }
.surface { padding: 26px; border: 1px solid #2b3648; border-radius: 9px; background: #111720; box-shadow: none; }
.section-head { margin-bottom: 22px; }
.section-head h2 { margin-top: 6px; color: #dce5f2; font-size: 18px; font-weight: 500; letter-spacing: -.3px; }
.section-head p { color: #97a7be; font-size: 12px; }
.welcome-band { min-height: 190px; padding: 32px; border: 1px solid #32466a; border-radius: 9px; background: #112037; }
.welcome-band::after { right: 48px; width: 160px; height: 160px; border: 1px solid #486b9f; border-radius: 0; transform: rotate(25deg); opacity: .35; }
.welcome-band h2 { margin: 12px 0; font-size: 29px; font-weight: 500; letter-spacing: -.7px; }
.welcome-band p { color: #a4b8d6; font-size: 13px; line-height: 1.7; }
.metric-grid { gap: 14px; margin: 20px 0 28px; }
.metric-grid article { min-height: 120px; gap: 13px; padding: 22px 18px; border-color: #2b3648; border-radius: 8px; background: #111720; }
.metric-icon { flex-basis: 34px; width: 34px; height: 34px; border: 1px solid #3a4a62; border-radius: 6px; background: #162238 !important; color: #a2bfff !important; font-size: 16px; }
.metric-grid p { color: #9eacc1; font-size: 11px; }
.metric-grid strong { margin: 6px 0 4px; color: #e1e9f7; font-weight: 500; font-size: 29px; }
.metric-grid small { color: #9babc1; font-size: 10px; }
.dashboard-grid { grid-template-columns: 1fr 1fr 270px; }
.record-row { gap: 12px; padding: 18px 4px; border-bottom-color: #2b3648; }
.record-badge { width: 38px; height: 38px; border: 1px solid #354863; border-radius: 6px; background: #19273b; color: #a7c2ee; font-size: 12px; font-weight: 500; }
.record-row h3 { color: #d6e0f0; font-size: 13px; font-weight: 500; }
.record-row p { color: #9aa9c0; font-size: 11px; line-height: 1.65; }
.status-chip { padding: 4px 7px; border: 1px solid #3b485a; border-radius: 4px; background: #1c2635; color: #b8c7de; font-size: 10px; font-weight: 500; }
.status-chip.passed { border-color: #365f56; background: #152f2b; color: #a0d1bc; }
.status-chip.reviewing { border-color: #6b5535; background: #32291e; color: #e0c090; }
.status-chip.returned { border-color: #704551; background: #332029; color: #e4aab5; }
.progress-ring { background: conic-gradient(#81a6f7 var(--progress),#25334b 0); }
.progress-ring::after { background: #111720; }
.progress-ring span { color: #d5e4ff; font-weight: 500; }
.progress-panel>p { color: #a7b5c9; }
.mini-progress span { background: #2d3c55; }
.mini-progress span.done { background: #7d9ee4; }
.filter-bar { gap: 14px; margin-bottom: 24px; padding: 12px; border-color: #2b3648; background: #111720; }
.filter-tabs { gap: 5px; }
.filter-tabs button { border: 1px solid transparent; color: #aab9cf; font-size: 12px; font-weight: 500; }
.filter-tabs button:hover { background: #1c2940; color: #e2ebfc; }
.filter-tabs button.active { border-color: #465f8b; background: #243c65; color: #c8daff; }
.portfolio-grid { gap: 18px; }
.portfolio-card { position: relative; min-height: 266px; padding: 25px 23px; border-color: #2b3648; border-radius: 8px; background: #111720; transition: border-color .18s, background .18s; }
.portfolio-card:hover { border-color: #4f6589; background: #141c28; }
.portfolio-card-top { align-items: center; }
.category-label { color: #9ebfff; font-size: 10px; font-weight: 500; letter-spacing: .4px; }
.portfolio-card h3 { margin: 22px 0 15px; color: #e1e9f6; font-size: 18px; font-weight: 500; line-height: 1.5; letter-spacing: -.3px; }
.portfolio-card p { margin: 0 0 6px; color: #a0aec3; font-size: 11px; }
.portfolio-card-footer { flex-wrap: wrap; row-gap: 12px; margin-top: 20px; padding-top: 17px; border-top-color: #2b3648; }
.portfolio-card-footer>strong { color: #c5d5ed; font-size: 12px; font-weight: 500; }
.card-actions { flex-wrap: wrap; }
.card-actions button { height: 31px; padding: 0 8px; border-color: #3d4b64; background: #141e2e; color: #b2c9ed; font-size: 10px; }
.card-actions button:hover { background: #22344f; }
.card-actions .danger { color: #ddacb6; }
.archive-meta { color: #8ea6cc; }
span.archive-demo, small.archive-demo { border: 1px solid #3b4a63; border-radius: 3px; background: #1e2b3e; color: #adbfdb; }
.archive-table-wrap td small.archive-demo { display: inline-block; }
.empty-state { border-color: #41506a; background: #111923; color: #acb8cc; font-size: 13px; line-height: 1.8; }
.empty-state strong { color: #d5dfef; font-weight: 500; }

/* Archive catalogue */
.archive-stats { gap: 32px; margin: 0 0 29px; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); }
.archive-stats>article { padding: 16px 0 20px; border: 0; border-bottom: 1px solid #324054; border-radius: 0; background: transparent; }
.archive-stats span { color: #a1aec3; font-size: 11px; }
.archive-stats strong { margin: 10px 0 0; color: #e3ebf8; font-size: 34px; font-weight: 400; letter-spacing: -1px; }
.archive-card { margin-top: 24px; }
.archive-toolbar { gap: 13px; margin-bottom: 24px; }
.archive-toolbar label { gap: 9px; color: #a5b3c9; font-size: 10px; font-weight: 500; }
.archive-toolbar input, .archive-toolbar select { height: 43px; font-size: 12px; }
.archive-table-wrap { border-color: #303d52; border-radius: 5px; }
.archive-table { font-size: 12px; }
.archive-table th { padding: 15px 14px; border-bottom-color: #35445c; background: #152032; color: #adbfdc; font-size: 10px; font-weight: 500; }
.archive-table td { padding: 20px 14px; border-bottom-color: #2a3648; color: #c3cfe1; background: #101720; }
.archive-table tbody tr:hover td { background: #172236; }
.archive-table td:first-child strong { color: #9db5dd; font: 10px/1.6 Consolas, monospace; }
.archive-table td small { color: #9babc2; font-size: 10px; line-height: 1.65; }
.archive-table td strong { color: #dce6f6; font-weight: 500; }
.archive-title { max-width: 380px; color: #dce6f6; font-size: 12px; font-weight: 500; line-height: 1.6; }
.archive-title:hover { color: #b7d0ff; }
.archive-table-wrap td:last-child button { border-color: #3b4b65; background: #162439; color: #b4cbf5; font-size: 10px; font-weight: 500; }
.archive-table-wrap td:last-child button:hover { border-color: #6887b8; background: #213755; }
.archive-actions .btn { font-size: 12px; }
.backup-note { padding: 14px 17px; border-left: 2px solid #5e83be; border-radius: 0; background: #162132; color: #a4b8d8; font-size: 12px; line-height: 1.9; }
.pagination { margin-top: 22px; color: #a4b2c8; }
.pagination button { min-height: 35px; border-color: #3a4860; background: #152033; color: #c5d7f6; font-weight: 500; }
.pagination button:hover:not(:disabled) { border-color: #6788bc; background: #213755; }
.pagination button:disabled { opacity: .45; }

/* Forms, review and details */
.entry-form { max-width: 1000px; padding: 30px; }
.entry-form h2 { margin: 2px 0 20px; color: #d9e5f7; font-size: 22px; font-weight: 500; }
.entry-form label, .review-form label { gap: 10px; margin-top: 20px; color: #b8c7dd; font-size: 12px; font-weight: 500; }
.form-section-title { margin-bottom: 22px; gap: 13px; }
.form-section-title:not(:first-child) { border-top-color: #2b3648; }
.form-section-title>span { width: 29px; height: 29px; border: 1px solid #3b5278; border-radius: 5px; background: #1c2b42; color: #b7d0fc; font-size: 11px; font-weight: 500; }
.form-section-title strong { color: #d3e0f3; font-size: 14px; font-weight: 500; }
.form-section-title small { margin-top: 5px; color: #9aaecb; font-size: 11px; }
.form-grid { gap: 1px 22px; }
.form-actions { margin-top: 30px; padding-top: 24px; border-top: 1px solid #2b3648; }
.file-field input { background: #121d2b; }
.file-field small { color: #a6b8d1; font-size: 11px; line-height: 1.7; }
.own-materials { max-width: none; }
.own-materials>.text-button { margin-top: 22px; }
.review-layout { grid-template-columns: minmax(0,1.2fr) minmax(300px,.8fr); gap: 24px; }
.selectable .record-row { padding: 18px 10px; }
.selectable .record-row:hover { background: #18243a; }
.selectable .record-row.selected { border-color: #4d6b99; background: #1d2e4a; }
.review-form { top: 25px; }
.review-form h2 { margin: 12px 0; color: #dce6f7; font-size: 22px; font-weight: 500; line-height: 1.4; }
.review-form p { font-size: 12px; line-height: 1.75; }
.file-empty { background: #1b273b; color: #afc0dc; }
.admin-monitor-grid { grid-template-columns: minmax(260px,.7fr) minmax(0,1.3fr); gap: 24px; }
.system-list>div { padding: 18px 0; border-bottom-color: #2b3648; font-size: 12px; }
.system-list span { color: #9fafc7; }
.system-list strong { color: #ccdaef; font-weight: 500; }
.online-dot { color: #a4cfbd !important; }
.online-dot::before { background: #89b6a0; }
.activity-row { padding: 17px 0; border-bottom-color: #2b3648; }
.activity-mark { border: 1px solid #3e5478; border-radius: 5px; background: #1e2d46; color: #b6cef7; font-weight: 500; }
.activity-row strong { color: #c3d3ea; font-weight: 500; }
.activity-row span, .activity-row time { color: #a4b4cd; }
.toast { border: 1px solid #49689a; border-radius: 6px; background: #182a46; color: #d2e1ff; font-size: 13px; line-height: 1.7; box-shadow: 0 16px 60px #0008; }
.record-dialog { border-color: #435576; border-radius: 10px; background: #101925; color: #dce6f6; box-shadow: 0 30px 100px #000a; }
.record-dialog::backdrop { background: #03070dc7; backdrop-filter: blur(5px); }
.dialog-content { padding: 34px; }
.dialog-content h2 { margin: 14px 0 24px; padding-right: 30px; color: #e0eafa; font-size: 27px; font-weight: 500; }
.dialog-content h3 { margin: 25px 0 12px; color: #c7d8f2; font-size: 14px; font-weight: 500; }
.dialog-content p { color: #a8bbd6; font-size: 13px; line-height: 1.8; }
.dialog-close { border-color: #445778; background: #1a2941; color: #c0d3f2; }
.dialog-close:hover { background: #2b4265; color: #e5eeff; }
.detail-grid { gap: 24px; border-color: #31415a; }
.detail-grid dt { color: #9eafd0; font-size: 10px; }
.detail-grid dd { color: #d3e0f5; font-size: 13px; }
.record-dialog .file-open { color: #0a1426; }

@media (max-width: 1180px) {
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .progress-panel { grid-column: span 2; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .archive-toolbar { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .archive-toolbar>label:first-child { grid-column: 1 / -1; }
  .portfolio-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 960px) {
  .login-page { grid-template-columns: minmax(300px,.85fr) minmax(390px,1.15fr); }
  .login-intro { padding: 32px; }
  .intro-copy h1 { font-size: 43px; letter-spacing: -1.5px; }
  .login-panel { padding: 40px; }
  .access-visual { margin-top: 30px; }
  .review-layout { grid-template-columns: 1fr; }
  .review-form { position: static; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { width: 242px; height: 100dvh; padding-top: 30px; box-shadow: none; }
  .sidebar.open { box-shadow: 20px 0 70px #000a; }
  #menuButton { display: grid; }
  .global-search { display: none; }
  .topbar { grid-template-columns: auto 1fr auto; padding: 17px 24px; }
  .admin-monitor-grid { grid-template-columns: 1fr; }
  #teacherList { max-height: 520px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #435a7d #101720; overscroll-behavior-y: contain; }
}
@media (max-width: 720px) {
  .login-page { grid-template-columns: 1fr; }
  .login-intro { min-height: 0; padding: 26px; border-right: 0; border-bottom: 1px solid #2b3b55; }
  .login-intro::after { display: none; }
  .intro-copy { margin: 0; padding: 34px 0 4px; }
  .intro-copy h1 { margin: 15px 0; max-width: 420px; font-size: 36px; letter-spacing: -1.1px; }
  .intro-copy>p { max-width: 450px; font-size: 12px; line-height: 1.75; }
  .access-visual, .login-note { display: none; }
  .login-panel { padding: 32px 26px 42px; }
  .login-form { width: min(450px,100%); }
  .portal-back { margin-bottom: 25px; }
  .login-form h2 { font-size: 31px; }
  .page-heading.row { align-items: flex-start; flex-direction: column; gap: 19px; }
  .archive-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .archive-stats { gap: 20px; grid-template-columns: repeat(auto-fit,minmax(110px,1fr)); }
  .archive-stats strong { font-size: 29px; }
  .archive-table { min-width: 780px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .inline-search input { width: 100%; }
}
@media (max-width: 540px) {
  .topbar { min-height: 75px; padding: 16px 20px; }
  .content { padding: 29px 20px 48px; }
  .page-heading { margin-bottom: 24px; }
  .page-heading h2 { font-size: 31px; }
  .page-heading p { font-size: 12px; }
  .surface { padding: 20px; }
  .archive-stats { gap: 16px; }
  .archive-stats span { font-size: 10px; }
  .archive-stats strong { font-size: 29px; }
  .archive-toolbar { grid-template-columns: 1fr; }
  .archive-toolbar>label:first-child { grid-column: auto; }
  .archive-actions { align-items: stretch; flex-direction: column; }
  .archive-actions .btn { min-height: 44px; }
  .archive-card>.section-head { gap: 10px; flex-wrap: wrap; }
  .section-head h2 { font-size: 17px; }
  .archive-table { min-width: 780px; }
  .portfolio-grid, .own-materials .portfolio-grid, .metric-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .progress-panel, .span-two { grid-column: auto; }
  .portfolio-card { min-height: 255px; }
  .welcome-band { padding: 27px 24px; align-items: flex-start; flex-direction: column; gap: 22px; }
  .welcome-band h2 { font-size: 25px; }
  .welcome-band p { font-size: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .form-actions { flex-wrap: wrap; }
  .record-row { grid-template-columns: 38px minmax(0,1fr); }
  .record-meta { grid-column: 2; text-align: left; }
  .record-row h3 { white-space: normal; line-height: 1.5; }
  .review-form { padding: 23px 20px; }
  .dialog-content { padding: 25px; }
  .dialog-content h2 { font-size: 23px; }
  .detail-grid { grid-template-columns: 1fr; }
  .activity-row { grid-template-columns: 32px minmax(0,1fr); }
  .activity-row time { grid-column: 2; margin: 0; }
  .pagination { flex-direction: column; align-items: flex-start; }
  .toast { right: 16px; left: 16px; bottom: 16px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
