:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --canvas: light-dark(#f6f8f5, #101915);
  --surface: light-dark(#fff, #17231d);
  --surface-alt: light-dark(#f4f7f3, #1e2d25);
  --ink: light-dark(#192b23, #eef5ef);
  --muted: light-dark(#52655b, #a9bcb0);
  --line: light-dark(#dbe5dc, #34493e);
  --line-soft: light-dark(#e8eee7, #2a3d32);
  --accent: light-dark(#236447, #9bdab2);
  --accent-ink: light-dark(#1b503b, #b2eaca);
  --accent-wash: light-dark(#e6f2e9, #21392d);
  --button: light-dark(#174b36, #a7dfbc);
  --button-ink: light-dark(#fff, #12291d);
  --danger: light-dark(#9b332f, #ffc2bc);
  --danger-wash: light-dark(#fbebe8, #432a28);
  --warning: light-dark(#795319, #f9d599);
  --warning-wash: light-dark(#fbf0d9, #433722);
  --shadow: 0 1px 2px light-dark(#173b2510, #0003);
  --radius: 16px;
  --sidebar-width: 218px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 1rem; line-height: 1.55; }
h1, h2, h3, h4, p, dl { margin: 0; }
h1, h2, h3, h4, strong { font-weight: 680; }
h1, h2, h3, h4 { line-height: 1.18; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.1rem, 4.3vw, 3.15rem); letter-spacing: -.062em; }
h2 { font-size: 1.3rem; letter-spacing: -.035em; }
h3 { font-size: 1.04rem; letter-spacing: -.025em; }
a { color: var(--accent-ink); text-decoration-thickness: .07em; text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .75; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent-wash); color: var(--accent-ink); }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 10; inset: .8rem auto auto .8rem; background: var(--surface); padding: .65rem 1rem; border-radius: 8px; }
.muted { color: var(--muted); }
.struck, .is-removed .task-title, .is-complete .task-title { text-decoration: line-through; }

.icon { width: 1.1rem; height: 1.1rem; display: inline-block; flex: none; position: relative; color: inherit; }
.icon::before, .icon::after { content: ""; position: absolute; }
.icon-plus::before, .icon-close::before { inset: 47% 12% auto; border-top: 2px solid; }
.icon-plus::after, .icon-close::after { inset: 12% auto 12% 47%; border-left: 2px solid; }
.icon-close { transform: rotate(45deg); }
.icon-search::before { width: 68%; height: 68%; border: 1.6px solid; border-radius: 50%; inset: 4% auto auto 4%; }
.icon-search::after { width: 44%; border-top: 1.6px solid; inset: 66% auto auto 58%; transform: rotate(47deg); transform-origin: left; }
.icon-grid::before { left: 10%; top: 10%; width: 32%; height: 32%; color: inherit; background: currentColor; border-radius: 1px; box-shadow: .51em 0, 0 .51em, .51em .51em; font-size: .94rem; }
.icon-book::before { inset: 8% 16% 8% 12%; border: 1.6px solid; border-radius: 2px 3px 3px 2px; }
.icon-book::after { inset: 8% auto 8% 32%; border-left: 1.6px solid; }
.icon-calendar::before { inset: 16% 8% 8%; border: 1.6px solid; border-radius: 3px; }
.icon-calendar::after { inset: 38% 11% auto; border-top: 1.6px solid; }
.icon-link::before, .icon-link::after { width: 60%; height: 37%; border: 1.6px solid; border-radius: 9px; transform: rotate(-42deg); }
.icon-link::before { inset: 23% auto auto 40%; }
.icon-link::after { inset: 43% auto auto 3%; }
.icon-gear::before { inset: 12%; border: 2px dotted; border-radius: 50%; }
.icon-gear::after { inset: 34%; border: 1.6px solid; border-radius: 50%; }
.icon-theme::before { inset: 10%; border: 1.6px solid; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.icon-logout::before { inset: 9% 38% 9% 10%; border: 1.6px solid; border-right: 0; border-radius: 3px; }
.icon-logout::after { width: 49%; height: 40%; inset: 30% 10% auto auto; background: currentColor; clip-path: polygon(0 36%, 66% 36%, 53% 0, 74% 0, 100% 50%, 74% 100%, 53% 100%, 66% 64%, 0 64%); }
.icon-shield::before { inset: 6% 12%; background: currentColor; clip-path: polygon(0 12%, 50% 0, 100% 12%, 92% 65%, 50% 100%, 8% 65%); }
.icon-shield::after { width: 37%; height: 24%; left: 32%; top: 34%; border: solid var(--surface); border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); }
.icon-alert::before { inset: 9%; border: 1.7px solid; border-radius: 50%; }
.icon-alert::after { width: 2px; height: 50%; top: 25%; left: 44%; background: linear-gradient(currentColor 65%, transparent 65% 81%, currentColor 81%); }
.icon-check::before { inset: 23% 14% 36% 15%; border: solid; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.icon-list::before { inset: 16% 11%; background: linear-gradient(currentColor 12%, transparent 12% 43%, currentColor 43% 55%, transparent 55% 86%, currentColor 86% 98%); }
.icon-spark::before { inset: 0; background: currentColor; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.icon-flask::before { inset: 8% 15% 8%; background: currentColor; clip-path: polygon(37% 0, 63% 0, 63% 36%, 99% 87%, 92% 100%, 8% 100%, 1% 87%, 37% 36%); }
.icon-flask::after { inset: 53% 31% 22%; border-top: 1.4px solid var(--surface); }
.icon-sync::before { inset: 8%; border: 1.6px solid; border-right-color: transparent; border-radius: 50%; }
.icon-sync::after { inset: 24% 9% auto auto; width: 35%; height: 29%; background: currentColor; clip-path: polygon(0 100%, 100% 100%, 100% 0); }

.signed-in { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 1.65rem 1.03rem 1.05rem; display: flex; flex-direction: column; gap: 2.35rem; border-right: 1px solid var(--line); background: var(--surface); }
.brand { display: inline-flex; align-items: center; gap: .66rem; color: var(--ink); font-weight: 760; font-size: 1.08rem; letter-spacing: -.055em; text-decoration: none; width: fit-content; white-space: nowrap; }
.sidebar .brand { margin-left: .25rem; min-height: 44px; }
.brand-mark { display: grid; place-content: center; gap: 3px; width: 36px; height: 36px; border-radius: 10px; background: #1c523a; color: #e7f6e8; box-shadow: 0 1px 2px #102b1b30; }
.brand-mark span { height: 3px; width: 16px; border-radius: 8px; background: currentColor; }
.brand-mark span:nth-child(2) { width: 12px; }
.brand-mark span:nth-child(3) { width: 8px; }
.navigation { display: grid; gap: .3rem; }
.navigation a, .theme-switch button { display: flex; align-items: center; gap: .75rem; min-height: 44px; padding: .6rem .7rem; border: 1px solid transparent; border-radius: 9px; text-decoration: none; color: var(--muted); font-size: .94rem; font-weight: 620; }
.navigation a:hover, .theme-switch button:hover { background: var(--surface-alt); color: var(--ink); }
.navigation a[aria-current] { background: var(--accent-wash); color: var(--accent-ink); font-weight: 750; }
.sidebar-footer { display: grid; gap: .65rem; margin-top: auto; }
.theme-switch button { background: none; width: 100%; text-align: left; }
.identity { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .58rem; align-items: center; padding: .75rem 0 0 .24rem; border-top: 1px solid var(--line-soft); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-ink); font-weight: 750; font-size: .92rem; }
.identity-text { display: grid; min-width: 0; line-height: 1.3; font-size: .87rem; }
.identity-text strong, .identity-text small { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.identity-text small { color: var(--muted); font-size: .8rem; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--muted); }
.icon-button:hover { border-color: var(--line); background: var(--surface-alt); color: var(--ink); }

.workspace { min-width: 0; padding: clamp(1.5rem, 3.7vw, 3.35rem) clamp(1.35rem, 3.65vw, 3.6rem) 4rem; }
.page-frame, .flashes { max-width: 1200px; margin-inline: auto; }
.narrow-page { max-width: 700px; margin-inline: 0; }
.page-header { display: flex; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.8rem; }
.page-header > div { min-width: 0; }
.page-subtitle, .detail-subtitle { margin-top: .65rem; color: var(--muted); overflow-wrap: anywhere; }
.date-eyebrow { display: flex; align-items: center; gap: .46rem; font-size: .85rem; font-weight: 735; text-transform: uppercase; letter-spacing: .085em; color: var(--accent-ink); margin-bottom: .68rem; }
.date-eyebrow .icon { width: 1rem; height: 1rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .48rem; min-height: 44px; padding: .55rem .84rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: .91rem; font-weight: 680; line-height: 1.25; text-align: center; text-decoration: none; }
.button:hover { background: var(--surface-alt); border-color: var(--muted); }
.button-primary { padding-inline: 1.06rem; background: var(--button); color: var(--button-ink); border-color: var(--button); box-shadow: var(--shadow); }
.button-primary:hover { background: var(--accent-ink); color: var(--button-ink); border-color: var(--accent-ink); }
.button-danger { color: var(--danger); }
.button-small { font-size: .85rem; padding: .42rem .68rem; }
.quick-action { min-width: 126px; margin-bottom: .17rem; }
.surface { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); min-width: 0; }

.demo-banner { display: flex; align-items: center; gap: .58rem; color: var(--accent-ink); background: var(--accent-wash); border-radius: 9px; padding: .55rem .75rem; font-size: .86rem; margin-bottom: 1.45rem; }
.demo-banner .icon { width: .95rem; height: .95rem; }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 31%); gap: clamp(1.22rem, 2.2vw, 2rem); align-items: start; }
.schedule { min-width: 0; }
.schedule-title { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.schedule-title > span { font-size: .85rem; color: var(--muted); }
.filters { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) minmax(0, .78fr) auto; column-gap: .48rem; row-gap: .58rem; align-items: center; margin-block: .9rem 1.16rem; }
.filters label { min-width: 0; }
input:not([type="checkbox"]):not([type="hidden"]), select, textarea { width: 100%; min-width: 0; min-height: 44px; padding: .54rem .72rem; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); }
::placeholder { color: var(--muted); opacity: 1; }
select { text-overflow: ellipsis; appearance: none; }
label:has(> select) { position: relative; }
label:has(> select)::after { content: ""; position: absolute; width: 7px; height: 7px; right: .86rem; transform: rotate(45deg); border: solid var(--muted); border-width: 0 1.5px 1.5px 0; pointer-events: none; top: calc(1.55rem + 20px); }
label:has(> select) select { padding-right: 1.8rem; }
.filters label:has(> select)::after { top: 17px; }
.filters input, .filters select { font-size: .88rem; }
.filters .search-field { display: flex; align-items: center; position: relative; }
.search-field .icon { position: absolute; left: .67rem; color: var(--muted); }
.search-field input:not([type="checkbox"]):not([type="hidden"]) { padding-left: 2.06rem; }
.filter-options { grid-column: 1 / -1; display: flex; align-items: center; gap: .3rem 1.05rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.filter-options a { margin-left: auto; }
.check-label { display: inline-flex; gap: .42rem; align-items: center; min-height: 44px; cursor: pointer; }
input[type="checkbox"] { margin: 0; width: 17px; height: 17px; accent-color: var(--accent); }
.deadline-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: .9rem; box-shadow: var(--shadow); }
.group-header { padding: .7rem .92rem; display: flex; gap: .58rem; align-items: center; min-height: 55px; }
.group-header h3 { font-size: 1.04rem; }
.section-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--accent-ink); background: var(--accent-wash); flex: none; }
.section-icon .icon { width: 1rem; height: 1rem; }
.danger-group .section-icon { color: var(--danger); background: var(--danger-wash); }
.group-date { color: var(--muted); font-size: .87rem; }
.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 1.55rem; padding: .04rem .37rem; border-radius: 999px; background: var(--surface-alt); border: 1px solid var(--line-soft); color: var(--muted); font-size: .79rem; font-weight: 700; }
.group-header .count-pill { margin-left: auto; }
.danger-group .count-pill { background: var(--danger-wash); color: var(--danger); border-color: transparent; }
.group-empty { padding: 0 1rem .8rem 1rem; color: var(--muted); font-size: .9rem; }
.task-list { list-style: none; padding: 0; margin: 0; }
.task-row { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; column-gap: .47rem; padding: .65rem .91rem .68rem .57rem; border-top: 1px solid var(--line-soft); align-items: start; }
.check-button { display: grid; place-items: center; background: none; color: var(--accent-ink); border: 0; border-radius: 8px; width: 38px; height: 44px; margin-top: -.22rem; }
.check-button:hover { background: var(--surface-alt); }
.check-button span { width: 18px; height: 18px; border: 1.5px solid var(--muted); border-radius: 5px; position: relative; }
.check-button[aria-checked="true"] span { background: var(--accent); border-color: var(--accent); }
.check-button[aria-checked="true"] span::after { content: ""; position: absolute; width: 8px; height: 5px; top: 4px; left: 3px; border: solid var(--surface); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.task-title { color: var(--ink); text-decoration: none; display: inline-block; font-weight: 690; line-height: 1.26; overflow-wrap: anywhere; }
.task-title:hover { color: var(--accent-ink); text-decoration: underline; }
.is-complete .task-title, .is-removed .task-title { color: var(--muted); }
.task-meta, .row-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .18rem .39rem; color: var(--muted); font-size: .81rem; margin-top: .23rem; }
.meta-separator { color: var(--muted); }
.course-tag { display: inline-flex; align-items: baseline; flex-wrap: wrap; column-gap: .31rem; min-width: 0; color: var(--muted); overflow-wrap: anywhere; }
.course-tag strong { color: var(--ink); white-space: nowrap; }
.course-dot { display: inline-block; flex: none; width: .48rem; height: .48rem; background: var(--course-color, var(--accent)); border-radius: 50%; align-self: center; }
.color-green { --course-color: light-dark(#37785a, #80c59e); }
.color-blue { --course-color: light-dark(#4b74ac, #93b7ef); }
.color-purple { --course-color: light-dark(#805cb1, #c2a5eb); }
.color-orange { --course-color: light-dark(#ac621e, #e7b589); }
.color-teal { --course-color: light-dark(#328182, #87d2ce); }
.color-rose { --course-color: light-dark(#b55374, #ed9dba); }
.color-gray { --course-color: light-dark(#637486, #b7c3cf); }
.task-end { display: grid; justify-items: end; gap: .22rem; font-size: .84rem; text-align: right; max-width: 9rem; }
.task-due { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.danger-group .task-due { color: var(--danger); }
.badge, .priority-chip { display: inline-flex; align-items: center; gap: .28rem; padding: .04rem .42rem; border-radius: 6px; color: var(--muted); background: var(--surface-alt); font-size: .78rem; font-weight: 680; line-height: 1.55; }
.badge-warning, .priority-high { background: var(--warning-wash); color: var(--warning); }
.badge-in-progress { background: var(--accent-wash); color: var(--accent-ink); }
.badge-removed { background: var(--surface-alt); color: var(--muted); }
.priority-medium { background: var(--accent-wash); color: var(--accent-ink); }
.sort-mark { width: 8px; height: 8px; background: currentColor; clip-path: polygon(0 75%, 23% 75%, 23% 100%, 0 100%, 0 75%, 38% 75%, 38% 45%, 61% 45%, 61% 100%, 38% 100%, 38% 75%, 77% 75%, 77% 8%, 100% 8%, 100% 100%, 77% 100%, 77% 75%); }
summary { cursor: pointer; }
summary::-webkit-details-marker { display: none; }
.change-disclosure { min-width: min-content; }
.change-disclosure summary { list-style: none; }
.change-disclosure summary::after, .week-group summary::after, .past-group summary::after { content: ""; display: inline-block; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin: -.12rem .04rem 0 .15rem; }
.change-disclosure[open] { flex-basis: 100%; }
.change-disclosure[open] summary::after, .week-group[open] > summary::after, .past-group[open] > summary::after { transform: rotate(225deg); margin-top: .19rem; }
.change-disclosure summary:hover { text-decoration: underline; }
.deadline-update { padding: .62rem; margin-top: .4rem; background: var(--surface-alt); border-radius: 8px; }
.deadline-update p { margin-block: .35rem; font-size: .83rem; }
.deadline-update form { margin-top: .35rem; }
.deadline-values { display: grid; gap: .35rem; font-size: .85rem; }
.deadline-values dt { color: var(--muted); }
.deadline-values dd { margin: 0; color: var(--ink); font-weight: 600; }
.day-group h4 { border-top: 1px solid var(--line-soft); padding: .61rem .92rem; background: var(--surface-alt); font-size: .84rem; color: var(--muted); letter-spacing: 0; }
.week-group > summary { min-height: 46px; display: flex; align-items: center; gap: .55rem; padding: .55rem .94rem; border-top: 1px solid var(--line-soft); font-size: .9rem; font-weight: 640; }
.week-group .count-pill { margin-left: auto; }
.more-weeks { margin: .6rem .92rem .73rem; }
.past-group > summary strong { font-size: 1rem; }
.past-group > summary { list-style: none; }

.planner-aside { display: grid; gap: .92rem; min-width: 0; }
.recommendation-card { padding: 1.1rem 1.15rem 1rem; border: 1px solid #336751; border-radius: var(--radius); color: #f6fff7; background: radial-gradient(ellipse at 112% -35%, #387e56 0, transparent 64%), #173e2e; box-shadow: 0 4px 13px #152d2220; }
.recommendation-card h2 { display: flex; align-items: center; gap: .47rem; font-size: 1rem; color: #d2ead8; }
.recommendation-card h2 .icon { color: #b5e5bd; width: .98rem; height: .98rem; }
.recommendation-task { padding-block: .95rem .9rem; }
.recommendation-card h3 { font-size: clamp(1.28rem, 2.1vw, 1.63rem); margin-block: .27rem .38rem; letter-spacing: -.052em; }
.recommendation-card p { color: #d2ead8; font-size: .87rem; line-height: 1.47; }
.recommendation-course { display: inline-block; font-size: .77rem; font-weight: 730; letter-spacing: .045em; text-transform: uppercase; padding: .05rem .37rem; border: 1px solid #6d9a7c; border-radius: 5px; }
.recommendation-footer { border-top: 1px solid #69957b90; padding-top: .8rem; display: flex; justify-content: space-between; align-items: center; gap: .35rem; }
.recommendation-link { background: #e1f3e5; color: #16422f; border-color: #e1f3e5; padding-inline: .67rem; min-height: 42px; font-size: .86rem; }
.recommendation-link:hover { background: #fff; border-color: #fff; }
.recommendation-card a:focus-visible { outline-color: #e1f3e5; }
.score { display: flex; align-items: baseline; gap: .21rem; color: #e9f7eb; white-space: nowrap; }
.score strong { font-size: 1.55rem; letter-spacing: -.075em; line-height: 1; }
.score small { font-size: .76rem; color: #c9e2ce; }
.week-card, .connection-card { padding: .93rem 1rem; }
.aside-title { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.aside-title .icon { color: var(--accent-ink); }
.week-card h2, .connection-card h2 { font-size: 1.05rem; letter-spacing: -.028em; }
.week-card p, .connection-card p { color: var(--muted); font-size: .86rem; margin-top: .35rem; }
.week-card progress { display: block; width: 100%; height: 5px; margin-block: .6rem .63rem; border: 0; border-radius: 10px; appearance: none; overflow: hidden; background: var(--line-soft); color: var(--accent); }
.week-card progress::-webkit-progress-bar { background: var(--line-soft); }
.week-card progress::-webkit-progress-value { background: var(--accent); }
.week-card progress::-moz-progress-bar { background: var(--accent); }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .12rem; margin-top: .55rem; }
.week-cell { display: grid; place-items: center; gap: .13rem; color: var(--muted); border: 1px solid transparent; border-radius: 8px; padding: .18rem .07rem .31rem; font-size: .75rem; }
.week-cell strong { color: var(--ink); font-size: .91rem; line-height: 1.25; }
.week-cell.is-today { background: var(--accent-wash); color: var(--accent-ink); border-color: var(--line-soft); }
.week-dot { height: 5px; width: 5px; border-radius: 50%; background: transparent; }
.week-dot.has-work { background: var(--muted); }
.week-dot.all-done { background: var(--accent); }
.connection-card { display: flex; gap: .65rem; align-items: flex-start; }
.connection-card a { display: inline-flex; align-items: center; min-height: 42px; font-size: .87rem; font-weight: 700; }
.connection-card .section-icon { width: 34px; height: 34px; }

.empty-state { padding: 1.28rem; margin-bottom: 1rem; }
.empty-state .section-icon { margin-bottom: .5rem; }
.empty-state p { color: var(--muted); margin-block: .45rem .68rem; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: .2rem; font-weight: 680; }
.detail-header h1 { font-size: clamp(2rem, 4.1vw, 2.8rem); }
.detail-subtitle { display: flex; flex-wrap: wrap; gap: .35rem .7rem; font-size: .94rem; align-items: center; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr); gap: 1rem; align-items: start; }
.detail-aside { display: grid; gap: .9rem; }
.panel { padding: clamp(1rem, 2.5vw, 1.45rem); }
.panel h2 + p, .panel h2 + dl, .panel > h2 + form { margin-top: .65rem; }
.panel p { color: var(--muted); overflow-wrap: anywhere; }
.panel h3 { margin-bottom: .35rem; }
.stacked-form { display: grid; gap: .92rem; }
.stacked-form label, .mapping-form label { display: block; color: var(--ink); font-size: .9rem; font-weight: 650; min-width: 0; }
.stacked-form label.check-label { display: inline-flex; }
.stacked-form label > :is(input:not([type="checkbox"]), select, textarea), .mapping-form label select { margin-top: .32rem; display: block; font-size: 1rem; font-weight: 440; }
.stacked-form label small, .field-hint, .optional { color: var(--muted); font-size: .83rem; font-weight: 450; }
.stacked-form label small { display: block; margin-top: .32rem; }
.password-requirements {
  display: grid; gap: .28rem; margin: -.3rem 0 0; padding: .65rem .8rem;
  list-style: none; border: 1px solid var(--line-soft); border-radius: 10px;
  background: var(--surface-alt); color: var(--muted); font-size: .84rem;
}
.password-requirements li { display: flex; align-items: center; gap: .5rem; }
.password-requirements .rule-icon {
  display: inline-grid; place-items: center; flex: 0 0 1rem; width: 1rem; height: 1rem;
  border: 1px solid currentColor; border-radius: 50%;
}
.password-requirements [data-met="true"] { color: var(--accent-ink); font-weight: 600; }
.password-requirements [data-met="true"] .rule-icon { background: var(--accent-wash); }
.password-requirements [data-met="true"] .rule-icon::before {
  content: ""; width: .32rem; height: .52rem; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.stacked-form .code-input { max-width: 12rem; font-variant-numeric: tabular-nums; letter-spacing: .3em; }
.optional { margin-left: .18rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .76rem .9rem; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem .8rem; margin-top: .36rem; }
.form-actions a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; font-size: .89rem; font-weight: 640; }
.advanced-time { font-size: .87rem; color: var(--muted); }
.advanced-time label { max-width: 270px; margin-top: .3rem; }
textarea { resize: vertical; }
.panel .priority-detail { color: var(--ink); }
.detail-aside .panel form, .field-compare form { margin-top: .45rem; }
.field-compare { display: grid; gap: .75rem; }
.field-compare > div + div, .change-entry + .change-entry { border-top: 1px solid var(--line-soft); padding-top: .68rem; }
.field-compare dt { font-size: .91rem; font-weight: 660; }
.field-compare dd { margin: .11rem 0 0; color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; font-size: .9rem; }
.change-entry { margin-top: .68rem; }
.course-grid, .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.course-card { padding: 1.1rem; }
.course-card h2 { margin: .47rem 0 .7rem; }
.course-identity { display: flex; align-items: center; gap: .46rem; color: var(--muted); font-size: .84rem; }
.course-ratings { display: flex; gap: 1.3rem; margin-bottom: .6rem; }
.course-ratings dt, .status-list dt { font-size: .84rem; color: var(--muted); }
.course-ratings dd, .status-list dd { margin: 0; font-weight: 660; overflow-wrap: anywhere; }
.settings-page .panel > p + form, .priority-settings p + form, .connection-steps + form { margin-top: .78rem; }
.priority-settings { grid-column: 1 / -1; }
.weights-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
.connection-steps { padding-left: 1.25rem; margin: .75rem 0; color: var(--muted); }
.connection-steps li + li { margin-top: .32rem; }
.connection-note { border-top: 1px solid var(--line); margin-top: .85rem; padding-top: .85rem; }
.connection-note a { display: inline-flex; align-items: center; min-height: 44px; }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .38rem; margin-bottom: .54rem; }
.status-list { display: grid; gap: .5rem; }
.status-list + p, .status-list + .form-actions, .panel-heading + p { margin-top: .6rem; }
.mapping-form { display: flex; align-items: end; gap: .55rem; padding-block: .45rem; }
.mapping-form label { flex: 1; max-width: 28rem; }
.admin-panel { margin-top: 1rem; }
.admin-account { display: grid; grid-template-columns: minmax(130px, .65fr) minmax(170px, 1.1fr) minmax(150px, .8fr); gap: .55rem; border-top: 1px solid var(--line-soft); padding-block: .9rem; }
.admin-accounts { margin-top: .66rem; }
.admin-account p, .audit-log small { font-size: .85rem; color: var(--muted); display: block; }
.admin-account .admin-error { color: var(--danger); }
.admin-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-content: start; }
.admin-tabs {
  display: flex; gap: .35rem; align-items: center; margin: -.2rem 0 1.1rem;
  border-bottom: 1px solid var(--line); overflow-x: auto;
}
.admin-tabs a {
  padding: .65rem .9rem; border-bottom: 2px solid transparent; text-decoration: none;
  color: var(--muted); font-size: .9rem; font-weight: 650;
}
.admin-tabs a[aria-current="page"] { color: var(--accent-ink); border-color: var(--accent); }
.source-layout { display: grid; grid-template-columns: minmax(190px, 275px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.source-sidebar { display: grid; gap: .72rem; min-width: 0; }
.source-versions, .source-search { display: flex; align-items: center; gap: .4rem; }
.source-search input { min-width: 0; min-height: 38px; font-size: .86rem; }
.source-versions a[aria-current="page"], .source-files a[aria-current="page"] { background: var(--accent-wash); color: var(--accent-ink); }
.source-files { display: grid; gap: .14rem; max-height: 54vh; overflow-y: auto; }
.source-files a { padding: .42rem .5rem; border-radius: 7px; font-size: .8rem; overflow-wrap: anywhere; text-decoration: none; }
.source-files a:hover { background: var(--surface-alt); }
.source-view { min-width: 0; overflow: hidden; }
.source-heading { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .85rem 1rem; }
.source-heading h2 { font-size: 1rem; }
.source-heading span { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.source-view pre { max-height: 68vh; overflow: auto; margin: 0; padding-block: .65rem; background: var(--surface-alt); border-top: 1px solid var(--line); font-size: .81rem; }
.source-view pre:focus-visible { outline-offset: -3px; }
.source-line { padding-right: 1rem; }
.source-number { display: inline-block; width: 3.75rem; margin-right: .9rem; padding-right: .65rem; text-align: right; color: var(--muted); border-right: 1px solid var(--line); user-select: none; }
.source-empty { color: var(--muted); padding: 1rem; }
.release-notice { margin-bottom: 1rem; }
.release-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.release-card p { margin-block: .45rem; }
.release-card p.release-version { margin: .75rem 0 .35rem; color: var(--ink); font-weight: 670; }
.release-card .form-actions, .release-card > a { margin-top: .65rem; }
.release-files { list-style: none; display: grid; gap: .35rem; padding: 0; margin: .6rem 0; overflow-wrap: anywhere; }
.release-files span { margin-left: .5rem; font-size: .8rem; }
.release-command { display: flex; align-items: center; gap: .7rem; justify-content: space-between; padding: .55rem .7rem; margin: .5rem 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-alt); }
.release-command code { font-size: .84rem; overflow-wrap: anywhere; }
.audit-log { list-style: none; margin: .65rem 0 0; padding: 0; }
.audit-log li { padding: .48rem 0; border-top: 1px solid var(--line-soft); }
.recovery-notice { margin-bottom: 1rem; }
.recovery-notice code { display: inline-block; padding: .4rem .55rem; margin-top: .42rem; border-radius: 7px; background: var(--surface); overflow-wrap: anywhere; }

.flashes { display: grid; gap: .45rem; margin-bottom: 1rem; }
.notice { border: 1px solid var(--line); border-radius: 10px; background: var(--accent-wash); color: var(--accent-ink); display: flex; align-items: center; justify-content: space-between; gap: .55rem; padding: .58rem .75rem; overflow-wrap: anywhere; }
.check-form[aria-busy="true"] .check-button { opacity: .65; cursor: progress; }
.checkoff-toast:not([hidden]) { position: fixed; z-index: 5; inset: auto 1rem max(1rem, env(safe-area-inset-bottom)) auto; display: flex; align-items: center; max-width: calc(100% - 2rem); padding-right: .25rem; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: 0 4px 20px #142a2633; }
.checkoff-toast [data-checkoff-message] { min-width: 0; }
.checkoff-toast .notice { border: 0; background: transparent; }
.notice ul { margin: 0; padding-left: 1.18rem; }
.notice-error, .panel .notice-error { color: var(--danger); background: var(--danger-wash); }
.page-frame > .notice:not(.recovery-notice), .auth-panel .notice { margin: .6rem 0 1rem; }
.quick-dialog { width: min(530px, calc(100% - 1.2rem)); max-height: calc(100dvh - 1.2rem); padding: 1.1rem 1.35rem 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--surface); box-shadow: 0 24px 80px #071d1670; }
.quick-dialog::backdrop { background: #071d1680; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.public-space { display: grid; min-height: 100dvh; align-content: center; padding: 1.2rem; }
.auth-layout { width: min(900px, 100%); display: grid; grid-template-columns: .98fr 1fr; justify-self: center; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--surface); box-shadow: 0 15px 50px #153a2420; }
.auth-intro { padding: clamp(1.4rem, 4vw, 2.55rem); display: flex; flex-direction: column; min-height: 535px; overflow: hidden; position: relative; background: #143e31; color: #f4fff6; }
.auth-intro .brand { color: #f4fff6; }
.auth-intro .brand-mark { background: #e2f1e5; color: #234f3b; }
.auth-copy { display: grid; gap: .7rem; margin-block: auto; z-index: 1; max-width: 21rem; }
.auth-copy h2 { font-size: clamp(2rem, 4.1vw, 3.22rem); letter-spacing: -.065em; }
.auth-copy p { color: #d1e8d5; }
.auth-kicker { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.auth-art { position: absolute; width: 19rem; height: 19rem; inset: auto -8rem -12rem auto; transform: rotate(-22deg); }
.auth-art span { position: absolute; inset: 0; border: 1px solid #d6efdc34; border-radius: 35px; }
.auth-art span:nth-child(2) { inset: 1rem; }
.auth-art span:nth-child(3) { inset: 2rem; }
.auth-panel { padding: clamp(1.4rem, 4vw, 2.55rem); align-self: center; }
.auth-panel h1, .error-panel h1 { font-size: clamp(1.85rem, 4vw, 2.35rem); letter-spacing: -.055em; }
.auth-panel p, .error-panel p { color: var(--muted); margin-top: .45rem; }
.auth-panel .stacked-form { margin-block: 1.25rem .68rem; }
.auth-panel .stacked-form > .field-hint { margin-top: -.57rem; }
.auth-links { display: flex; flex-wrap: wrap; gap: .15rem .75rem; font-size: .88rem; }
.auth-links a { display: inline-flex; align-items: center; min-height: 44px; }
.demo-entry { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; border-top: 1px solid var(--line); padding-top: .85rem; margin-top: .35rem; }
.demo-entry small { color: var(--muted); }
.error-panel { width: min(540px, 100%); justify-self: center; padding: 1.35rem; }
.error-panel .button { margin-top: .9rem; }
.signed-in .error-panel { justify-self: start; }

@media (max-width: 1110px) {
  :root { --sidebar-width: 184px; }
  .workspace { padding-inline: 1.35rem; }
  .dashboard-layout { grid-template-columns: minmax(0, 1fr) minmax(245px, 32%); gap: 1rem; }
  .sidebar { padding-inline: .75rem; }
  .recommendation-card, .week-card, .connection-card { padding-inline: .85rem; }
  .task-row { padding-right: .65rem; }
}
@media (max-width: 900px) {
  .signed-in { display: block; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--line); display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) auto; gap: .32rem .5rem; padding: .58rem 1rem .4rem; }
  .navigation { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: .17rem; }
  .navigation a { padding: .47rem .64rem; gap: .35rem; }
  .sidebar-footer { grid-row: 1; grid-column: 2; display: flex; align-items: center; gap: .22rem; margin: 0; }
  .identity { padding: 0; border: 0; grid-template-columns: auto auto; gap: .22rem; }
  .identity-text, .theme-switch button span:last-child { display: none; }
  .theme-switch button { width: 44px; padding: 0; justify-content: center; }
  .identity .avatar { width: 32px; height: 32px; }
  .workspace { padding-top: 1.6rem; }
}
@media (max-width: 680px) {
  .workspace { padding-inline: .86rem; }
  .dashboard-layout { display: flex; flex-direction: column; gap: .88rem; }
  .dashboard-layout > *, .planner-aside > * { width: 100%; }
  .planner-aside { display: contents; }
  .recommendation-card { order: -1; }
  .quick-action { min-width: 0; white-space: nowrap; }
  .page-header { margin-bottom: 1.05rem; }
  .page-subtitle { margin-top: .35rem; }
  .demo-banner { margin-bottom: .83rem; }
  .detail-layout, .settings-grid, .course-grid { grid-template-columns: minmax(0, 1fr); }
  .course-grid .empty-state { margin: 0; }
  .admin-account { grid-template-columns: 1fr; }
  .source-layout { grid-template-columns: minmax(0, 1fr); }
  .source-files { max-height: 10rem; }
  .auth-layout { grid-template-columns: minmax(0, 1fr); }
  .auth-intro { min-height: 0; padding-block: 1.1rem; }
  .auth-copy { gap: .25rem; margin: .85rem 0 0; }
  .auth-copy h2 { font-size: 1.55rem; }
  .auth-copy > p:last-child { display: none; }
  .auth-kicker { font-size: .77rem; }
  .auth-panel { padding: 1.1rem; }
}
@media (max-width: 430px) {
  .workspace { padding-top: 1.05rem; }
  .date-eyebrow { font-size: .76rem; letter-spacing: .07em; }
  .page-header { column-gap: .36rem; }
  .dashboard-header { align-items: flex-start; }
  .dashboard-header .quick-action { margin-top: 1.58rem; }
  .page-subtitle { font-size: .93rem; }
  .sidebar { padding-inline: .65rem; }
  .navigation a { font-size: .86rem; padding-inline: .46rem; }
  .navigation .icon { width: .95rem; height: .95rem; }
  .identity .avatar { display: none; }
  .identity { grid-template-columns: auto; }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; margin-bottom: .66rem; }
  .recommendation-task { padding-block: .7rem .65rem; }
  .filters .search-field { grid-column: 1 / -1; }
  .task-row { grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: .24rem; padding-left: .27rem; }
  .task-end { max-width: 6.6rem; font-size: .79rem; }
  .task-title { font-size: .95rem; }
  .task-meta { font-size: .78rem; }
  .form-grid { gap: .62rem .55rem; }
  .quick-dialog { padding-inline: .85rem; }
}
@media (pointer: coarse) {
  .check-button { width: 44px; }
  .task-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .change-disclosure summary { padding-block: .35rem; }
}
