:root {
  color-scheme: light;
  --ink: #152d33;
  --muted: #52686b;
  --soft: #edf5f1;
  --sea: #185b4b;
  --sea-dark: #104638;
  --sea-light: #c8eddb;
  --line: #dbe5e1;
  --paper: #fff;
  --canvas: #f5f8f6;
  --amber: #805517;
  --amber-bg: #fbf0d8;
  --danger: #a34034;
  --radius: 20px;
  --shadow: 0 18px 65px #102c3312;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; color: var(--ink); background: var(--canvas); }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--sea); }
button { color: inherit; }
:focus-visible { outline: 3px solid #4a9077; outline-offset: 3px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 20; background: #fff; padding: 10px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { line-height: 1.24; text-wrap: pretty; }
h1 { font-size: clamp(2.05rem, 4vw, 3.6rem); font-weight: 760; letter-spacing: -.048em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.026em; }
h3 { font-size: 1.15rem; letter-spacing: -.012em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .83rem; letter-spacing: .04em; font-weight: 700; color: var(--sea); }
.shell { width: min(1320px, calc(100% - 80px)); margin: 0 auto; }
main.shell { min-height: 70vh; padding: 35px 0 68px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 30px; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; font-size: 1.05rem; font-weight: 800; letter-spacing: -.035em; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 6px); grid-template-rows: repeat(2, 6px); place-content: center; gap: 3px; width: 36px; height: 36px; border-radius: 11px; background: #154e43; transform: rotate(-6deg); }
.brand-mark i { background: #e3f5e7; border-radius: 2px; }
.brand-mark i:nth-child(2) { opacity: .55; }
.brand-mark i:nth-child(3) { opacity: .75; }
.main-nav { display: flex; gap: 2px; align-items: center; flex: 1; justify-content: center; }
.main-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; padding: 0 13px; border-radius: 9px; font-size: .9rem; font-weight: 650; color: #4b6467; white-space: nowrap; }
.main-nav a:hover { background: #f1f6f3; }
.main-nav a[aria-current="page"] { color: #174c3f; background: #e7f3ec; }
.header-tools { display: flex; gap: 8px; align-items: center; }
.header-cohort { color: #52686b; font-size: .79rem; font-weight: 670; white-space: nowrap; }
.header-tools .language-select { min-height: 38px; font-size: .86rem; font-weight: 700; }
.header-tools .header-account { min-height: 38px; padding-inline: .65rem; font-size: .875rem; }
.account-icon { position: relative; width: 1rem; height: 1rem; flex: 0 0 1rem; }
.account-icon::before, .account-icon::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 1.5px solid currentColor; }
.account-icon::before { top: 0; width: .42rem; height: .42rem; border-radius: 50%; }
.account-icon::after { bottom: 0; width: .85rem; height: .35rem; border-bottom: 0; border-radius: .45rem .45rem 0 0; }
.button { display: inline-flex; gap: 6px; align-items: center; justify-content: center; min-height: 42px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px; background: var(--sea); color: white; font-size: .89rem; font-weight: 720; white-space: nowrap; }
.button:hover { background: var(--sea-dark); color: white; }
.button.secondary { color: var(--ink); background: #fff; border-color: #d4e2dc; }
.button.secondary:hover, .button.ghost:hover { color: var(--sea); background: #eaf4ee; border-color: #c4dbd0; }
.button.ghost { color: var(--sea); background: transparent; border-color: transparent; }
.button.selected { background: #e5f0e9; color: #154d40; border-color: #b9d9c9; }
.button.tiny { padding: 0 10px; min-height: 35px; font-size: .82rem; }
.button.danger { background: var(--danger); }
.button.danger:hover { background: #832e25; }
.hero { position: relative; min-height: 332px; display: grid; grid-template-columns: 1.12fr .88fr; isolation: isolate; border-radius: 24px; background: #122f34; overflow: hidden; color: #f6fff9; }
.hero-content { align-self: center; position: relative; z-index: 2; padding: 33px 0 34px 41px; }
.hero h1 { margin: 13px 0 10px; font-size: clamp(2.15rem, 4.4vw, 4rem); max-width: 15ch; text-wrap: balance; }
.hero p { color: #cfe1dc; max-width: 37rem; text-wrap: pretty; }
.hero-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 25px; }
.hero .button { background: #bce6d1; color: #153b32; border-color: #bce6d1; }
.hero .button:hover { background: #d4f6e5; }
.hero .button.secondary { background: #183a3c; color: #f2fff8; border-color: #496a66; }
.hero .button.secondary:hover { background: #285251; }
.hero-photo { position: relative; min-width: 0; background: #316765 right center / cover no-repeat; background-image: url("/cover.jpg"); }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,#122f34 0%,#122f34e0 6%,#122f3440 31%,transparent 73%), linear-gradient(0deg,#122f3460,transparent 48%); }
.hero-loc { position: absolute; right: 18px; bottom: 14px; z-index: 1; padding: 4px 9px; border-radius: 7px; color: white; background: #12383bdc; font-size: .76rem; }
.eyebrow { color: var(--sea); font-size: .79rem; font-weight: 740; letter-spacing: .07em; text-transform: uppercase; }
.hero .eyebrow { color: #bfedce; }
.term-mark { display: inline-flex; align-items: center; gap: 8px; }
.term-mark::before { content: ""; width: 14px; height: 2px; background: currentColor; border-radius: 2px; }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: white; border: 1px solid var(--line); border-radius: 16px; margin: 16px 0 33px; }
.stat { min-width: 0; min-height: 86px; padding: 13px 18px; display: flex; align-items: center; gap: 12px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font-size: 1.54rem; line-height: 1.08; letter-spacing: -.055em; }
.stat span:last-child { color: var(--muted); font-size: .83rem; }
.stat-icon, .location-symbol { display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 37px; color: #205849; background: #eaf4ee; border-radius: 10px; font-size: 1rem; font-weight: 790; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 305px); gap: 25px; align-items: start; }
.catalog-head, .section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.catalog-head p, .section-head p { margin-top: 4px; }
.section-head .button { flex-shrink: 0; }
.catalog-filters { display: grid; gap: 11px; padding-bottom: 11px; }
.search-wrap { position: relative; }
.search-wrap::before { content: ""; position: absolute; width: 12px; height: 12px; left: 16px; top: 15px; border: 2px solid #456766; border-radius: 50%; pointer-events: none; }
.search-wrap::after { content: ""; position: absolute; left: 28px; top: 28px; width: 6px; height: 2px; transform: rotate(48deg); border-radius: 2px; background: #456766; pointer-events: none; }
.search-input { width: 100%; min-height: 48px; padding: 9px 16px 9px 42px; border: 1px solid #cfded6; border-radius: 11px; background: #fff; color: var(--ink); }
.search-input::placeholder { color: #617976; }
.catalog-period-filters { display: grid; justify-items: start; gap: 8px; }
.segment { display: inline-flex; align-items: center; gap: 3px; padding: 3px; background: #eaf1ed; border-radius: 10px; }
.segment button { border: 1px solid transparent; border-radius: 7px; min-height: 34px; padding: 3px 10px; background: transparent; color: #536b69; font-size: .85rem; font-weight: 680; }
.segment button[aria-pressed="true"] { background: #fff; border-color: #d8e5df; color: #1c5145; box-shadow: 0 1px 3px #122f340d; }
.kind-switch { justify-self: start; }
.term-switch button, .stage-switch button { min-height: 38px; padding-inline: 13px; }
.term-switch button[aria-pressed="true"] { background: var(--sea); color: #fff; border-color: var(--sea); }
.stage-switch button[aria-pressed="true"] { background: #fff; color: var(--sea); border-color: #a4c4b7; }
select, .field input, .field textarea { min-height: 42px; padding: 8px 10px; border-radius: 9px; border: 1px solid #cbdcd4; background: #fff; color: var(--ink); }
select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, #536b69 50%), linear-gradient(135deg, #536b69 50%, transparent 50%); background-position: calc(100% - 15px) 18px, calc(100% - 10px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
.result-head { font-size: .85rem; color: var(--muted); padding: 0 0 9px; }
.course-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.course-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); background: #fff; border-radius: 15px; padding: 15px 15px 12px; transition: border-color .15s ease, box-shadow .15s ease; }
.course-card:hover { border-color: #9bbfae; box-shadow: 0 7px 18px #143d2d0c; }
.card-top, .card-bottom, .section-meta, .detail-actions { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.card-top { margin-bottom: 8px; }
.card-title { font-size: 1.11rem; min-height: 2.48em; }
.course-card .card-teacher { padding-top: 6px; color: var(--muted); font-size: .86rem; }
.card-bottom { margin-top: auto; padding-top: 12px; color: var(--muted); font-size: .81rem; flex-wrap: wrap; }
.card-bottom .actions { margin-left: auto; }
.actions { display: inline-flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tag { display: inline-flex; align-items: center; line-height: 1.35; white-space: nowrap; padding: 3px 8px; font-size: .77rem; font-weight: 710; border-radius: 7px; background: #edf3f0; color: #4d6962; }
.tag.required { background: #e6f0fc; color: #315b83; }
.tag.elective { background: #e0f1e7; color: #23614a; }
.tag.warn { background: var(--amber-bg); color: var(--amber); }
.tag.live { background: var(--sea-light); color: #164b3a; }
.side-stack { display: grid; gap: 13px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 16px; min-width: 0; }
.side-stack .panel h3 { margin-bottom: 10px; }
.side-dark { color: #f3fdf7; background: #183d3d; border-color: #183d3d; }
.side-dark .muted { color: #cbdfd7; }
.side-dark .button.secondary { margin-top: 12px; border: 1px solid #567570; color: #effdf5; background: #285351; }
.side-dark .button.secondary:hover { background: #3c6761; }
.rule-list { display: grid; gap: 12px; }
.rule { display: grid; grid-template-columns: 32px 1fr; gap: 9px; align-items: start; }
.rule b { display: block; font-size: .92rem; }
.rule span:last-child { color: var(--muted); font-size: .84rem; }
.rule-number { display: grid; place-items: center; min-height: 32px; border-radius: 8px; background: #edf5ef; color: var(--sea); font-weight: 750; }
.location { display: flex; gap: 9px; padding: 10px 0; align-items: center; }
.location + .location { border-top: 1px solid var(--line); }
.location div { min-width: 0; }
.location b { display: block; font-size: .9rem; }
.location span:last-child { display: block; color: var(--muted); font-size: .79rem; line-height: 1.4; }
.location-symbol { width: 32px; height: 32px; flex-basis: 32px; }
.text-link { color: var(--sea); font-weight: 690; text-decoration: underline; text-underline-offset: .19em; }
.breadcrumb { font-size: .88rem; color: var(--sea); margin-bottom: 15px; }
.page-intro { margin-bottom: 22px; }
.page-intro h1 { margin: 7px 0 8px; }
.page-intro p { color: var(--muted); max-width: 65ch; }
.course-detail {
  --detail-gap: clamp(.8rem, 1.6vw, 1.25rem);
  --detail-pad: clamp(1rem, 1.7vw, 1.4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 22%);
  grid-template-rows: auto auto auto 1fr;
  grid-template-areas: "heading heading" "summary sidebar" "reviews sidebar" "sections sidebar";
  gap: var(--detail-gap);
  align-items: start;
}
.course-detail > * { min-width: 0; }
.detail-head { grid-area: heading; display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: var(--detail-pad); border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(110deg, #fff 35%, #eaf4ed); }
.detail-title { flex: 1 1 31rem; min-width: 0; }
.detail-head h1 { margin: 7px 0 0; font-size: clamp(1.9rem, 4vw, 3.05rem); overflow-wrap: anywhere; }
.detail-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.detail-tags .code { margin-inline-end: 4px; }
.detail-actions { justify-content: flex-start; }
.detail-actions .button.ghost { border-color: var(--line); }
.detail-summary { grid-area: summary; display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(12rem, 1fr); gap: var(--detail-gap); }
.course-overview, .course-rating { display: grid; align-content: start; gap: 9px; padding: var(--detail-pad); }
.course-overview { justify-items: start; }
.course-overview > p:not(.small) { max-width: 58ch; line-height: 1.65; }
.course-overview h2, .course-rating h2, .detail-sidebar h2 { font-size: 1.12rem; letter-spacing: normal; }
.course-rating { background: #fcfefc; }
.rating-tally { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; }
.rating-average { color: var(--sea-dark); font-size: clamp(2rem, 4vw, 3rem); font-weight: 760; line-height: 1.05; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.rating-average small { color: var(--muted); font-size: .8rem; font-weight: 650; letter-spacing: normal; white-space: nowrap; }
.rating-result { display: grid; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.rating-result .rating { font-size: 1.06rem; }
.rating-distribution { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.rating-distribution li { display: grid; grid-template-columns: max-content minmax(0,1fr) max-content; align-items: center; gap: 7px; color: var(--muted); font-size: .79rem; font-variant-numeric: tabular-nums; }
.rating-distribution progress { display: block; appearance: none; width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 8px; background: #e4eee8; color: #358266; accent-color: #358266; }
.rating-distribution progress::-webkit-progress-bar { background: #e4eee8; }
.rating-distribution progress::-webkit-progress-value { border-radius: 8px; background: #358266; }
.rating-distribution progress::-moz-progress-bar { border-radius: 8px; background: #358266; }
.rating-empty { display: grid; justify-items: start; align-content: center; min-height: 68px; padding: 9px 12px; border-radius: 10px; background: var(--soft); color: var(--muted); font-size: .9rem; }
.rating-empty-stars { color: #51776b; font-size: 1.18rem; letter-spacing: .12em; line-height: 1.3; }
.detail-sidebar { grid-area: sidebar; display: grid; gap: var(--detail-gap); }
.detail-sidebar > * { min-width: 0; }
.faculty-panel { min-width: 0; display: grid; gap: 8px; padding: 14px 15px 15px; background: #f3f8f5; border: 1px solid var(--line); border-radius: 13px; }
.faculty-panel h2 { color: var(--sea); }
.faculty-list { display: grid; gap: 11px; padding: 0; margin: 0; list-style: none; }
.faculty-list li + li { padding-top: 11px; border-top: 1px solid var(--line); }
.faculty-name { font-size: 1.17rem; font-weight: 770; line-height: 1.35; overflow-wrap: anywhere; }
.faculty-note { color: var(--muted); font-size: .85rem; }
.faculty-links { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin-top: 7px; }
.faculty-link { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--sea); font-size: .84rem; font-weight: 700; }
.faculty-link:hover { background: #e6f2eb; border-color: #accbbd; }
.detail-offerings { display: grid; gap: 10px; }
.offering-link { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 47px; padding: 7px 9px; background: #f8fbf9; border: 1px solid var(--line); border-radius: 8px; font-size: .83rem; }
.offering-link:hover { background: var(--soft); border-color: #a7c8b7; }
.offering-meta, .offering-score { display: grid; gap: 2px; color: var(--muted); }
.offering-meta { min-width: 0; overflow-wrap: anywhere; }
.offering-meta strong { color: var(--ink); }
.offering-score { flex-shrink: 0; text-align: end; font-variant-numeric: tabular-nums; }
.offering-score strong { color: var(--sea); }
.detail-related summary { cursor: pointer; font-size: .92rem; font-weight: 730; }
.detail-related[open] summary { margin-bottom: 6px; }
.course-note { padding: 9px 12px; background: var(--soft); border-radius: 8px; font-size: .9rem; }
.course-note a { display: inline-block; }
.course-review-panel { grid-area: reviews; padding: var(--detail-pad); }
.course-sections { grid-area: sections; scroll-margin-top: 18px; padding: var(--detail-pad); }
.course-detail :is(.course-review-panel, .course-sections) .section-head { align-items: start; flex-wrap: wrap; gap: 8px; }
.course-detail :is(.course-review-panel, .course-sections) .section-head h2 { font-size: clamp(1.26rem, 2.4vw, 1.65rem); }
.course-review-panel .empty { padding: 12px 14px; text-align: start; }
.detail-review-tools { display: flex; flex-wrap: wrap; gap: 7px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.detail-review-tools select { min-width: 0; max-width: 100%; min-height: 38px; font-size: .88rem; }
.course-review-panel .review-list { gap: 0; }
.course-review-panel .review { padding: 12px 0; border: 0; border-radius: 0; background: transparent; }
.course-review-panel .review + .review { border-top: 1px solid var(--line); }
.course-review-panel .review:last-child { padding-bottom: 0; }
.course-review-panel .review-top > strong { color: var(--ink); }
.course-sections .section-meta > :first-child { min-width: 0; overflow-wrap: anywhere; }
.course-sections .section-meta > .button { flex-shrink: 0; }
.section-list { display: grid; gap: 8px; }
.section-card { background: #f8fbf9; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; }
.section-card.current { border-color: #96c6af; background: #edf8f0; }
.section-meta { align-items: flex-start; }
.section-time { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-weight: 740; }
.section-dates { color: var(--sea); font-size: .84rem; font-weight: 650; }
.section-dates summary { cursor: pointer; padding: 4px 0; }
.section-dates ul { display: flex; gap: 5px; flex-wrap: wrap; list-style: none; margin: 4px 0; padding: 0; }
.section-dates li { background: var(--soft); color: var(--ink); padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.section-desc { margin: 1px 0 0; color: var(--muted); font-size: .88rem; }
.section-events { display: grid; gap: 5px; margin-top: 7px; }
.event { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; font-size: .85rem; }
.empty { border: 1px dashed #bdd1c7; border-radius: 13px; background: #f7fbf8; padding: 25px 18px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; font-size: 1.05rem; }
.empty .button { margin-top: 11px; }
.review-list { display: grid; gap: 10px; }
.review { padding: 14px; }
.review-top { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .84rem; }
.review-top time { margin-left: auto; }
.rating { color: #915c0e; font-weight: 800; letter-spacing: .035em; }
.review p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0; }
.reviews-tools { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-bottom: 12px; }
.sources { display: grid; gap: 13px; max-width: 870px; }
.sources p+p, .sources ul { margin-top: 8px; }
.sources ul { padding-left: 20px; margin-bottom: 0; }
.sources li+li { margin-top: 6px; }
.site-footer { padding: 17px 0 37px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .84rem; }
.footer-row { display: flex; gap: 14px; justify-content: space-between; flex-wrap: wrap; align-items: baseline; }
.footer-links { display: inline-flex; gap: 14px; flex-wrap: wrap; }
.compare-bar { position: fixed; z-index: 5; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(590px,calc(100% - 24px)); display: flex; justify-content: space-between; gap: 9px; align-items: center; padding: 8px 9px 8px 13px; border: 1px solid #41615c; border-radius: 12px; background: #15353a; color: #f2fcf5; box-shadow: var(--shadow); }
.compare-bar strong { font-size: .89rem; }
.compare-bar .button { background: #c9ebd9; color: #153b32; }
.compare-bar .button.secondary { background: #23474b; color: #f1fff9; border-color: #4f6f6c; }
.toast { position: fixed; z-index: 15; right: 16px; bottom: 16px; max-width: calc(100vw - 32px); pointer-events: none; color: white; padding: 8px 12px; border-radius: 8px; background: #153d35; opacity: 0; transform: translateY(8px); transition: opacity .15s ease, transform .15s ease; font-size: .9rem; box-shadow: var(--shadow); }
.toast.visible { opacity: 1; transform: none; }
body:has(.compare-bar) .toast { bottom: 79px; }
dialog { color: var(--ink); border: 1px solid var(--line); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border-radius: 18px; box-shadow: 0 18px 80px #09252538; }
dialog::backdrop { background: #0e2428a5; }
.dialog-box { padding: 20px; }
.dialog-box h2 { margin: 0 0 7px; }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin-top: 14px; }
.field { display: grid; gap: 4px; color: var(--ink); font-size: .89rem; font-weight: 690; min-width: 0; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; font-weight: 450; }
.field textarea { resize: vertical; min-height: 110px; }
.field.full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 13px; flex-wrap: wrap; }
.form-error { margin-top: 7px; color: var(--danger); font-size: .89rem; }
.account-dialog { display: grid; gap: .72rem; }
.account-form { display: grid; gap: .4rem; margin-top: .25rem; }
.account-form > input { width: 100%; min-width: 0; min-height: 44px; padding: .55rem .68rem; border: 1px solid #cbdcd4; border-radius: 9px; background: #fff; color: var(--ink); }
.account-form > .field:not(:first-child) { margin-top: .25rem; }
.account-form > .form-actions { margin-top: .45rem; }
.account-email-line { overflow-wrap: anywhere; color: var(--sea); font-weight: 720; }
#account-code { max-width: 12rem; font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: .14em; }
.account-details { margin: 0; padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: #fafcfb; }
.account-details > div { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.6fr); gap: .45rem .8rem; padding: .52rem 0; }
.account-details > div + div { border-top: 1px solid var(--line); }
.account-details dt { color: var(--muted); font-size: .875rem; }
.account-details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; text-align: start; font-size: .94rem; }
.account-id-row { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .55rem; }
.account-id-row > .code { flex: 1 1 7rem; min-width: 0; }
.account-id-row > .button { flex: none; }
.account-legacy { display: grid; justify-items: start; gap: .52rem; padding: .85rem; border: 1px solid var(--line); border-radius: 12px; }
.account-legacy h3 { font-size: 1.04rem; }
.account-feedback { padding: .65rem .75rem; border-radius: 8px; background: var(--soft); color: var(--sea-dark); font-size: .9rem; }
.account-feedback p { margin-top: .28rem; }
.account-logout { margin-top: 0; }
.summary-entries { display: grid; gap: 6px; font-size: .88rem; color: var(--muted); }
.summary-entries dt { color: var(--ink); font-weight: 700; }
.summary-entries dd { margin: 0; }
@media (max-width: 1150px) {
  .header-row:has(.header-account) .header-cohort { display: none; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .header-row:has(.header-account) { column-gap: 9px; }
  .header-row:has(.header-account) .main-nav a { padding-inline: 6px; }
  .header-row:has(.header-account) .header-tools { gap: 5px; }
}
@media (max-width: 1040px) {
  .shell { width: calc(100% - 44px); }
  .header-row { gap: 14px; }
  .header-cohort { display: none; }
  .main-nav a { padding: 0 9px; }
  .dashboard { gap: 15px; grid-template-columns: minmax(0,1fr) 246px; }
  .hero-content { padding-left: 30px; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 26px); }
  main.shell { padding: 17px 0 47px; }
  .header-row { display: grid; grid-template-columns: 1fr auto; gap: 5px; min-height: auto; padding: 8px 0 4px; }
  .header-tools { grid-area: 1 / 2; }
  .main-nav { grid-column: 1 / -1; justify-content: flex-start; overflow: auto; padding: 2px 0 4px; }
  .main-nav a { min-height: 35px; font-size: .86rem; flex: 0 0 auto; }
  .brand { font-size: 1rem; }
  .brand-mark { width: 31px; height: 31px; border-radius: 9px; }
  .hero { min-height: 0; grid-template-columns: 1fr; }
  .hero-content { padding: 24px 19px 21px; }
  .hero h1 { margin-top: 10px; }
  .hero-photo { min-height: clamp(150px, 35vw, 210px); background-position: center 66%; }
  .hero-photo::after { background: linear-gradient(180deg,#122f34 0%,#122f341a 45%), linear-gradient(0deg,#122f3433,transparent 48%); }
  .hero-actions { margin-top: 15px; }
  .stats { margin-bottom: 22px; }
  .stat { min-height: 66px; padding: 8px 10px; }
  .stat b { font-size: 1.33rem; }
  .dashboard { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .side-stack .side-dark { grid-column: 1/-1; }
  .course-detail { grid-template-columns: minmax(0,1fr); grid-template-rows: auto; grid-template-areas: "heading" "summary" "sidebar" "reviews" "sections"; }
  .detail-sidebar:has(.detail-offerings) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-related { grid-column: 1 / -1; }
}
@media (max-width: 580px) {
  .detail-summary, .detail-sidebar:has(.detail-offerings) { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 485px) {
  .course-grid, .side-stack { grid-template-columns: 1fr; }
  .stat { flex-direction: column; gap: 6px; text-align: center; }
  .card-title { min-height: 0; }
  .segment button { padding-inline: 8px; }
  .section-meta { flex-wrap: wrap; }
  .reviews-tools { grid-template-columns: 1fr; }
  .detail-actions .button { min-height: 38px; padding-inline: 8px; }
  .form-grid { gap: 7px; }
}
@media (max-width: 410px) {
  .header-tools .offline-badge { display: none; }
  .header-tools:has(.header-account) { gap: 5px; }
  .header-tools .header-account { padding-inline: .45rem; }
  .account-details > div { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
}
@media (max-width: 370px) {
  .header-tools .header-account { width: 38px; padding: 0; }
  .header-account-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; scroll-behavior: auto !important; }
}
