:root {
  --ink: #18211e;
  --muted: #66716d;
  --paper: #f5f3ec;
  --card: #fffdf8;
  --line: #deddd4;
  --green: #143d32;
  --green-2: #236b57;
  --lime: #dbe9a7;
  --gold: #d29b43;
  --red: #a93b3b;
  --shadow: 0 18px 45px rgba(26, 46, 39, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.5; }
a { color: var(--green-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.05; letter-spacing: -.04em; }
h2 { font-size: 1.45rem; letter-spacing: -.02em; }
button, input, select, textarea { font: inherit; }
.site-header { min-height: 74px; padding: 14px max(24px, calc((100vw - 1160px)/2)); display: flex; align-items: center; justify-content: space-between; background: rgba(255,253,248,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(16px); }
.brand, .admin-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 750; }
.brand:hover, .admin-brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--green); color: white; letter-spacing: -.04em; font-size: .85rem; }
.brand-mark.light { background: var(--lime); color: var(--green); }
.site-header nav { display: flex; align-items: center; gap: 22px; }
.mobile-nav-toggle { display: none; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--green); padding: 8px 10px; font-weight: 800; cursor: pointer; }
.page-loadbar { position: sticky; top: 74px; z-index: 999; height: 0; pointer-events: none; }
.page-loadbar::before { content: ""; position: absolute; top: 0; left: 0; width: 0; height: 3px; background: linear-gradient(90deg, #236b57, #dbe9a7, #236b57); opacity: 0; transition: opacity .15s ease; }
.page-loadbar-spinner { position: absolute; top: 7px; left: 50%; display: grid; width: 25px; height: 25px; place-items: center; border: 3px solid rgba(219,233,167,.65); border-top-color: #143d32; border-radius: 50%; background: #fffdf8; box-shadow: 0 7px 16px rgba(20,61,50,.14); opacity: 0; transform: translate(-50%, -8px) scale(.8); transition: opacity .15s ease, transform .2s ease; }
.page-is-loading .page-loadbar::before { width: 85%; opacity: 1; animation: loading-progress .9s ease-in-out infinite alternate; }
.page-is-loading .page-loadbar-spinner { opacity: 1; transform: translate(-50%, 0) scale(1); animation: loading-spin .6s linear infinite; }
.site-header nav a, .link-button { color: var(--ink); font-weight: 600; font-size: .92rem; }
.install-button { border: 1px solid var(--green-2); border-radius: 999px; background: transparent; color: var(--green); padding: 7px 10px; font-weight: 750; font-size: .78rem; cursor: pointer; }
.install-button.is-ready { background: var(--lime); }
.admin-link { background: var(--green); color: white !important; padding: 9px 13px; border-radius: 10px; }
.inline-form { display: inline; margin: 0; }
.link-button, .text-button { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; color: var(--green-2); }
.mode-banner { background: var(--lime); text-align: center; padding: 6px 16px; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.page-shell { width: min(1160px, calc(100% - 36px)); margin: 0 auto; min-height: calc(100vh - 150px); padding: 46px 0 72px; }
.hero { min-height: 300px; border-radius: 28px; padding: clamp(32px, 6vw, 72px); color: white; background: radial-gradient(circle at 86% 18%, rgba(219,233,167,.35), transparent 24%), linear-gradient(135deg, #143d32, #1b5747); box-shadow: var(--shadow); display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.hero.compact { min-height: 260px; }
.hero h1 { margin-bottom: 12px; max-width: 680px; }
.hero p { color: rgba(255,255,255,.78); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.eyebrow { margin-bottom: 8px; color: var(--green-2); text-transform: uppercase; letter-spacing: .13em; font-size: .73rem; font-weight: 850; }
.hero .eyebrow, .admin-sidebar .eyebrow { color: var(--lime); }
.button { border: 0; border-radius: 12px; background: var(--green); color: white; padding: 11px 17px; font-weight: 750; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.button:hover { text-decoration: none; filter: brightness(1.08); }
.button.secondary { background: var(--card); color: var(--green); border: 1px solid var(--line); }
.button.danger { background: #a73035; color: white; border-color: #a73035; }
.button.danger:hover { background: #7f2127; border-color: #7f2127; }
.button.ghost { background: transparent; color: white; border: 1px solid rgba(255,255,255,.45); }
.button.small { padding: 8px 12px; font-size: .85rem; }
.section-heading, .page-title, .admin-title { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 48px 0 20px; }
.section-heading h2, .page-title h1, .admin-title h1 { margin-bottom: 0; }
.schedule-list { display: grid; gap: 12px; }
.class-card { display: grid; grid-template-columns: 112px 1fr; gap: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 5px 20px rgba(26,46,39,.04); }
.time-block { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.time-block strong { font-size: 1.35rem; }
.time-block span, .muted { color: var(--muted); }
.class-main h3 { margin: 10px 0 3px; }
.card-row { display: flex; justify-content: space-between; }
.pill, .mode-chip { display: inline-flex; width: fit-content; border-radius: 999px; padding: 4px 9px; background: #e9eee9; color: var(--green); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.pill.success, .pill.active { background: #d9ebdf; color: #17603c; }
.pill.danger, .pill.rejected { background: #f6dcdc; color: #8d2929; }
.pill.warning, .pill.staging { background: #f5e5c9; color: #7b5315; }
.status-dot { color: var(--green-2); font-size: .84rem; }
.empty-state, .subtle-card { padding: 34px; border: 1px dashed #bfc7c1; border-radius: 18px; text-align: center; background: rgba(255,255,255,.35); }
.empty-state p { margin: 0; color: var(--muted); }
.notice-card { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 20px 0; padding: 15px 18px; border-radius: 14px; background: #e8f0dc; border: 1px solid #cfddae; color: var(--green); }
.notice-card span { color: #426052; }
.browse-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; padding: 18px; margin: 20px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.browse-form p { display: grid; gap: 6px; min-width: min(100%, 260px); margin: 0; }
.browse-form label { font-size: .82rem; font-weight: 750; }
.browse-form select { padding: 11px 12px; border: 1px solid #cdd1cb; border-radius: 10px; background: white; }
.agenda-shell { margin-top: 20px; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--card); }
.day-rail { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); background: #eff2eb; }
.day-tab { border: 0; border-right: 1px solid var(--line); background: transparent; padding: 15px 10px; color: var(--muted); display: grid; gap: 2px; cursor: pointer; font-weight: 800; transition: background .2s ease, color .2s ease, transform .2s ease; }
.day-tab:last-child { border-right: 0; }
.day-tab small { font-size: .7rem; font-weight: 600; }
.day-tab.is-selected { background: var(--green); color: white; }
.day-tab:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(35,107,87,.35); outline-offset: -3px; }
.agenda-day { padding: clamp(20px, 4vw, 36px); }
.agenda-day.is-hidden { display: none; }
.agenda-day.is-entering { animation: agenda-panel-in .28s ease-out both; }
.agenda-day header { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.agenda-day header h2 { margin: 0; color: var(--muted); font-size: .95rem; font-weight: 600; }
.agenda-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.agenda-item { display: grid; grid-template-columns: 104px 1fr; gap: 14px; padding: 15px; background: #fffefa; border: 1px solid #e4e5dd; border-radius: 14px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.agenda-item time { color: var(--green-2); font-size: .82rem; font-weight: 800; display: grid; align-content: start; gap: 3px; }
.agenda-item time small { color: var(--muted); font-size: .72rem; font-weight: 650; }
.agenda-item div { display: grid; gap: 2px; }
.agenda-item .class-label { display: flex; }
.agenda-item span { font-size: .92rem; }
.agenda-item small { color: var(--muted); font-size: .76rem; }
.subtle-card { text-align: left; padding: 14px 18px; }
.week-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.day-column { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.day-column h2 { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.week-class { display: grid; margin-top: 13px; padding-bottom: 13px; border-bottom: 1px solid #ebeae3; }
.week-class time, .week-class small { color: var(--muted); font-size: .78rem; }
.week-class span { font-size: .9rem; }
.week-switcher { display: flex; align-items: center; gap: 10px; margin: -8px 0 20px; }
.week-switcher a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: .86rem; font-weight: 750; }
.week-switcher .current-week { background: var(--green); color: white; border-color: var(--green); }
.week-switcher a { transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
@media (hover: hover) {
  .day-tab:not(.is-selected):hover { background: #e4eadf; color: var(--green); }
  .agenda-item:hover { transform: translateY(-2px); border-color: #c5d4ca; box-shadow: 0 12px 24px rgba(26,46,39,.08); }
  .week-switcher a:hover { transform: translateY(-1px); text-decoration: none; }
}
@keyframes agenda-panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .day-tab, .agenda-item, .week-switcher a { transition: none; }
  .agenda-day.is-entering { animation: none; }
}
.class-label { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.type-tag, .elective-tag { display: inline-flex; width: fit-content; border-radius: 999px; padding: 3px 7px; font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.type-tag { background: #e9eee9; color: var(--green); }
.elective-tag { background: #eee2fb; color: #624283; }
.type-lecture { border-left: 5px solid #2f7a61 !important; background: #f5fbf7 !important; }
.type-lecture .pill, .type-lecture .type-tag { background: #dcefe5; color: #195b43; }
.type-tutorial { border-left: 5px solid #477fb3 !important; background: #f4f8fd !important; }
.type-tutorial .pill, .type-tutorial .type-tag { background: #dceafb; color: #285c8c; }
.type-lab { border-left: 5px solid #d29b43 !important; background: #fff8e9 !important; }
.type-lab .pill, .type-lab .type-tag { background: #fde6ba; color: #7d5114; }
.type-elective { border-left: 5px solid #9a69c4 !important; background: #fbf7ff !important; }
.type-elective .pill, .type-elective .type-tag { background: #eee2fb; color: #624283; }
.type-other { border-left: 5px solid #7b8581 !important; background: #f6f7f6 !important; }
.type-other .pill, .type-other .type-tag { background: #e4e7e5; color: #4e5954; }
.status-cancelled, .status-no_class { border-left: 5px solid #be3f42 !important; background: #fff0f0 !important; }
.status-cancelled .status-dot, .status-no_class .status-dot { color: #8e2427; font-weight: 850; }
.status-completed { border-left: 5px solid #8b9390 !important; background: #f2f3f2 !important; opacity: .68; filter: grayscale(.62); }
.status-completed .status-dot { color: #505956; font-weight: 850; }
.schedule-legend { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 18px; }
.schedule-legend span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.schedule-legend span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.legend-lecture { background: #dcefe5; color: #195b43; }
.legend-tutorial { background: #dceafb; color: #285c8c; }
.legend-lab { background: #fde6ba; color: #7d5114; }
.legend-elective { background: #eee2fb; color: #624283; }
.legend-other { background: #e4e7e5; color: #4e5954; }
.rule-row.type-lecture td:first-child { border-left: 5px solid #2f7a61; }
.rule-row.type-tutorial td:first-child { border-left: 5px solid #477fb3; }
.rule-row.type-lab td:first-child { border-left: 5px solid #d29b43; }
.rule-row.type-elective td:first-child { border-left: 5px solid #9a69c4; }
.rule-row.type-other td:first-child { border-left: 5px solid #7b8581; }
.center-card, .auth-card { width: min(560px, 100%); margin: 8vh auto; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: clamp(28px, 6vw, 54px); box-shadow: var(--shadow); }
.wide-card { width: min(680px, 100%); }
.placement-program { display: flex; justify-content: space-between; gap: 18px; padding: 13px 15px; margin: 20px 0; border-radius: 12px; background: #edf1e4; color: var(--green); font-size: .92rem; }
.placement-program span { color: var(--muted); }
.center-card { text-align: center; }
.maintenance-icon { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 20px; border-radius: 20px; background: var(--lime); color: var(--green); font-size: 2rem; }
.center-card .button { margin: 16px 0; width: 100%; }
.text-link { display: block; font-size: .9rem; }
.stack-form { display: grid; gap: 12px; }
.stack-form p { display: grid; gap: 6px; margin-bottom: 4px; }
.stack-form input, .stack-form select, .stack-form textarea, .search-bar input { width: 100%; padding: 12px 13px; border-radius: 10px; border: 1px solid #cdd1cb; background: white; color: var(--ink); }
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus { outline: 3px solid rgba(35,107,87,.18); border-color: var(--green-2); }
.stack-form label { font-weight: 700; font-size: .9rem; }
.helptext, .stack-form ul { color: var(--muted); font-size: .78rem; }
.errorlist { color: var(--red) !important; }
.messages { display: grid; gap: 8px; margin-bottom: 18px; }
.message { border-radius: 10px; padding: 12px 14px; background: #e8eee9; }
.message.error { background: #f6dcdc; color: #7b2424; }
.message.success { background: #d9ebdf; color: #165c3a; }
.site-footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 28px; }
.install-message { position: fixed; z-index: 30; right: 18px; bottom: 18px; max-width: min(390px, calc(100% - 36px)); padding: 13px 16px; border-radius: 12px; background: var(--green); color: white; box-shadow: var(--shadow); font-size: .86rem; }
.attendance-overview { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr); gap: 18px; margin-bottom: 16px; padding: clamp(22px, 4vw, 34px); border-radius: 24px; color: white; background: radial-gradient(circle at 88% 16%, rgba(219,233,167,.32), transparent 25%), linear-gradient(135deg, #143d32, #1d5b4a); box-shadow: var(--shadow); }
.attendance-placement h2 { margin: 13px 0 5px; font-size: clamp(1.35rem, 3vw, 2rem); }
.attendance-placement p { margin: 0; color: rgba(255,255,255,.76); }
.attendance-placement .pill { background: var(--lime); color: var(--green); }
.attendance-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; align-self: end; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(255,255,255,.1); }
.attendance-summary div { min-width: 0; padding: 14px 12px; background: rgba(4,34,26,.14); }
.attendance-summary span { display: block; color: rgba(255,255,255,.7); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.attendance-summary strong { display: block; margin-top: 4px; font-size: clamp(1.15rem, 2vw, 1.65rem); overflow-wrap: anywhere; }
.attendance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.attendance-card { display: flex; flex-direction: column; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 5px 20px rgba(26,46,39,.04); transition: transform .2s ease, box-shadow .2s ease; }
.attendance-card h2 { margin: 16px 0 4px; font-size: 1.25rem; }
.attendance-number { display: block; margin: 18px 0 3px; font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -.05em; color: var(--green); }
.attendance-actions { display: grid; gap: 5px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.attendance-actions p { margin: 0; color: var(--muted); font-size: .9rem; }
.attendance-actions strong { color: var(--ink); }
.attendance-progress { height: 8px; overflow: hidden; margin-top: 16px; border-radius: 999px; background: #e4eae3; }
.attendance-progress span { display: block; width: min(var(--progress), 100%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-2), #72aa70); transition: width .45s ease; }
.attendance-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 20px; }
.daily-status { color: var(--muted); font-size: .8rem; font-weight: 700; }
.daily-status.is-marked { color: #17603c; }
.attendance-status-choice ul { display: flex; gap: 12px; padding: 0; margin: 0; list-style: none; }
.attendance-status-choice label { display: inline-flex; align-items: center; gap: 6px; }
@media (hover: hover) { .attendance-card:hover { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(26,46,39,.09); } }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 5px 20px rgba(26,46,39,.04); }
.panel-card h2 { margin-bottom: 12px; }
.notice-copy { padding: 12px; border-radius: 10px; background: #fff5d6; color: #795112; font-size: .9rem; }
.audience-choice ul { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 0; margin: 2px 0 0; list-style: none; }
.audience-choice li label { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; }
.notification-test-actions { display: grid; gap: 10px; margin: 18px 0; }
.notification-test-actions form, .notification-test-actions .button { width: 100%; }
.button.ghost-dark { border: 1px solid var(--green); background: transparent; color: var(--green); }
.button.ghost-dark:hover { background: #edf2ea; }
.test-recipient-picker { display: grid; gap: 8px; }
.test-recipient-picker > label { font-size: .86rem; font-weight: 750; }
.test-recipient-picker input { width: 100%; padding: 11px 12px; border: 1px solid #cdd1cb; border-radius: 10px; background: white; }
.test-search-results { display: grid; gap: 6px; }
.test-search-results:empty { display: none; }
.test-search-result { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fffefa; text-align: left; color: var(--ink); cursor: pointer; }
.test-search-result span { color: var(--muted); font-size: .78rem; }
.selected-test-recipients { display: flex; flex-wrap: wrap; gap: 7px; min-height: 30px; }
.selected-test-recipients .helptext { margin: 0; }
.test-recipient-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 6px 8px; border-radius: 999px; background: #e4eee6; color: #195b43; font-size: .78rem; font-weight: 700; }
.test-recipient-chip button { border: 0; background: transparent; color: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; }
@media (hover: hover) { .test-search-result:hover { border-color: var(--green-2); background: #f2f7f1; } }

/* Separate administrator application */
.admin-body { background: #eef0ec; display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 16px; background: #102c25; color: white; display: flex; flex-direction: column; }
.admin-brand { color: white; padding: 5px 8px 26px; }
.admin-brand span:last-child { display: grid; }
.admin-brand small { color: rgba(255,255,255,.55); font-weight: 500; }
.admin-sidebar nav { display: grid; gap: 5px; }
.admin-sidebar nav a { color: rgba(255,255,255,.78); padding: 10px 12px; border-radius: 9px; font-size: .91rem; white-space: nowrap; }
.admin-sidebar nav a:hover { background: rgba(255,255,255,.09); color: white; text-decoration: none; }
.back-link { margin-top: auto; padding: 10px 12px; color: var(--lime); font-size: .9rem; }
.admin-main { min-width: 0; padding: 0 clamp(22px, 4vw, 58px) 72px; }
.admin-topbar { min-height: 78px; border-bottom: 1px solid #d9ddd8; display: flex; justify-content: space-between; align-items: center; }
.admin-topbar > div { display: grid; }
.admin-topbar .eyebrow { margin: 0; }
.admin-title { align-items: center; margin-top: 38px; }
.admin-title h1 { font-size: clamp(2rem, 3.5vw, 3rem); }
.admin-title p:last-child { color: var(--muted); margin: 8px 0 0; }
.mode-chip { padding: 9px 13px; }
.mode-chip.maintenance { background: #f5e5c9; color: #795112; }
.mode-chip.pilot { background: #dce6f6; color: #224f87; }
.mode-chip.production { background: #d9ebdf; color: #17603c; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-grid article, .panel, .directory-grid a { background: white; border: 1px solid #daddd8; border-radius: 15px; padding: 20px; }
.metric-grid article { display: grid; }
.metric-grid span { color: var(--muted); font-size: .85rem; }
.metric-grid strong { font-size: 2rem; margin: 7px 0; }
.metric-grid small { color: var(--muted); }
.admin-two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e6e8e4; }
.list-row { padding: 13px 0; border-bottom: 1px solid #eceeea; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.list-row:last-child { border-bottom: 0; }
.list-row > div { display: grid; }
.list-row span { color: var(--muted); font-size: .8rem; }
.empty-copy { color: var(--muted); padding: 20px 0 4px; }
.search-bar { display: flex; gap: 10px; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; background: white; border: 1px solid #daddd8; border-radius: 15px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #e8eae6; vertical-align: middle; }
th { color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .08em; }
td strong, td small { display: block; }
td small { color: var(--muted); }
.actions { display: flex; gap: 12px; align-items: center; }
.danger-text { color: var(--red); }
.form-panel { max-width: 720px; }
.mode-explainer, .directory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.mode-explainer article { padding: 16px; border-left: 3px solid var(--green-2); background: rgba(255,255,255,.6); }
.mode-explainer p { margin: 6px 0 0; color: var(--muted); font-size: .85rem; }
.secret-card { background: #fff5d6; border: 1px solid #e7ca77; padding: 18px; border-radius: 14px; margin-bottom: 18px; display: grid; gap: 8px; }
.secret-card code { overflow-wrap: anywhere; padding: 10px; background: white; border-radius: 7px; }
.timeline { position: relative; border-left: 2px solid #cad2cc; margin-left: 9px; }
.timeline article { position: relative; padding: 0 0 28px 28px; }
.timeline-dot { position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--green-2); border: 3px solid #eef0ec; }
.timeline p, .timeline small { margin: 3px 0; color: var(--muted); }
.directory-grid a { color: var(--ink); display: grid; min-height: 140px; }
.directory-grid a:hover { border-color: var(--green-2); text-decoration: none; }
.directory-grid strong { font-size: 2.2rem; margin: 8px 0; }
.directory-grid small { color: var(--green-2); margin-top: auto; }

@media (max-width: 900px) {
  .week-grid, .metric-grid, .mode-explainer, .directory-grid, .attendance-grid { grid-template-columns: repeat(2, 1fr); }
  .agenda-list { grid-template-columns: 1fr; }
  .attendance-overview { grid-template-columns: 1fr; }
  .admin-two-column { grid-template-columns: 1fr; }
  .admin-body { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-sidebar nav { display: flex; overflow-x: auto; }
  .back-link { margin-top: 16px; }
  .site-header { padding-inline: 18px; }
  .hero { min-height: auto; }
  .page-title { margin-top: 28px; }
}
@media (max-width: 640px) {
  .site-header { min-height: 64px; padding: 10px 12px; align-items: center; gap: 9px; flex-wrap: wrap; }
  .brand { gap: 9px; font-size: .96rem; min-width: 0; }
  .brand-mark { width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto; }
  .mobile-nav-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
  .site-header nav { display: none; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 10px 0 2px; border-top: 1px solid var(--line); }
  .site-header nav.is-open { display: grid; }
  .site-header nav a, .site-header nav .inline-form, .site-header nav .install-button { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; background: var(--card); padding: 8px; text-align: center; font-size: .8rem; white-space: normal; }
  .site-header nav .admin-link { background: var(--green); color: white !important; border-color: var(--green); }
  .site-header nav .link-button { width: 100%; color: var(--ink); font-size: .8rem; font-weight: 700; }
  .install-button { padding: 7px 8px; }
  .page-shell { width: min(100% - 24px, 1160px); padding-top: 24px; }
  .hero { min-height: 300px; padding: 28px 22px; display: grid; }
  .class-card { grid-template-columns: 82px 1fr; gap: 15px; padding: 16px; }
  .time-block { padding-right: 8px; }
  .page-title h1 { font-size: clamp(2.1rem, 13vw, 3rem); }
  .browse-form { display: grid; }
  .browse-form .button { width: 100%; }
  .week-switcher { justify-content: space-between; gap: 6px; }
  .week-switcher a { padding: 8px 9px; font-size: .75rem; }
  .week-grid, .metric-grid, .mode-explainer, .directory-grid, .attendance-grid, .settings-grid { grid-template-columns: 1fr; }
  .attendance-summary { grid-template-columns: repeat(2, 1fr); }
  .attendance-card-footer { align-items: flex-start; flex-direction: column; }
  .admin-main { padding: 0 14px 50px; }
  .admin-topbar { min-height: 68px; }
  .admin-title, .page-title { align-items: flex-start; flex-direction: column; }
  .day-tab { padding: 12px 5px; font-size: .78rem; }
  .day-tab small { display: none; }
  .agenda-day { padding: 18px 14px; }
  .agenda-item { grid-template-columns: 1fr; gap: 5px; }
}

/* Student experience refresh */
html { scroll-behavior: smooth; }
body { background: radial-gradient(circle at 8% 4%, rgba(219,233,167,.32), transparent 21rem), var(--paper); }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
.site-header { box-shadow: 0 8px 28px rgba(20,61,50,.04); }
.site-header nav { gap: 8px; }
.site-header nav .nav-link, .nav-more summary { padding: 9px 10px; border-radius: 10px; transition: color .2s ease, background .2s ease, transform .2s ease; }
.site-header nav .nav-link:hover, .nav-more summary:hover { background: #eaf0e9; color: var(--green); text-decoration: none; }
.nav-profile { display: none; }
.nav-more { position: relative; }
.nav-more summary { list-style: none; color: var(--ink); cursor: pointer; font-weight: 600; font-size: .92rem; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more[open] summary { background: #eaf0e9; color: var(--green); }
.nav-more summary span { display: inline-block; margin-left: 3px; transition: transform .2s ease; }
.nav-more[open] summary span { transform: rotate(180deg); }
.nav-popover { position: absolute; top: calc(100% + 10px); right: 0; z-index: 25; width: 184px; padding: 7px; border: 1px solid rgba(20,61,50,.13); border-radius: 14px; background: rgba(255,253,248,.98); box-shadow: 0 18px 42px rgba(20,61,50,.16); animation: popover-in .18s ease-out both; }
.nav-popover a { display: block; padding: 9px 10px; border-radius: 8px; font-size: .86rem; }
.nav-popover a:hover { background: #edf3eb; text-decoration: none; }
.mobile-nav-icon { display: grid; gap: 4px; width: 17px; }
.mobile-nav-icon i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon i:nth-child(2) { opacity: 0; }
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.button { transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; box-shadow: 0 7px 16px rgba(20,61,50,.13); }
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(20,61,50,.19); }
.button:active { transform: translateY(0) scale(.98); }
.button.secondary { box-shadow: 0 5px 14px rgba(20,61,50,.08); }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; padding: 34px 28px; }
.footer-links { display: flex; gap: 14px; }
.footer-links a { color: var(--muted); font-weight: 700; }
.signup-safety { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 0; padding: 11px 12px; border-radius: 10px; background: #edf4e7; color: #496456; font-size: .76rem; }
.signup-safety span { color: var(--green-2); font-size: 1rem; line-height: 1; }

/* About, FAQ, and student contact */
.about-hero { position: relative; display: grid; grid-template-columns: minmax(0, .95fr) minmax(390px, 1.05fr); min-height: 460px; overflow: hidden; border: 1px solid rgba(20,61,50,.12); border-radius: 30px; background: linear-gradient(117deg, #123c34 0%, #1d6653 53%, #dbe9a7 160%); color: white; box-shadow: 0 24px 56px rgba(20,61,50,.16); }
.about-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 20% 22%, rgba(219,233,167,.25), transparent 25%), linear-gradient(90deg, rgba(9,39,32,.28), transparent 60%); }
.about-hero-copy { position: relative; z-index: 1; align-self: center; padding: clamp(32px, 6vw, 68px); }
.about-hero h1 { max-width: 610px; margin-bottom: 16px; font-size: clamp(2.65rem, 5vw, 4.6rem); }
.about-hero-copy > p:not(.eyebrow) { max-width: 550px; color: rgba(255,255,255,.78); font-size: 1.06rem; }
.about-hero .eyebrow { color: var(--lime); }
.about-art { align-self: end; height: 100%; margin: 0; }
.about-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 71% center; mix-blend-mode: screen; opacity: .95; transform: scale(1.035); }
.about-trust { display: flex; flex-wrap: wrap; gap: 8px 15px; margin-top: 26px; color: rgba(255,255,255,.78); font-size: .77rem; font-weight: 750; }
.about-trust span { display: inline-flex; align-items: center; gap: 5px; }
.about-hero { background: #fffdf8; color: var(--ink); box-shadow: 0 18px 42px rgba(20,61,50,.09); }
.about-hero::before { display: none; }
.about-hero .eyebrow { color: var(--green-2); }
.about-hero-copy > p:not(.eyebrow) { color: var(--muted); }
.about-art { overflow: hidden; background: #edf3ed; }
.about-art img { mix-blend-mode: normal; opacity: 1; transform: none; }
.about-trust { color: var(--green-2); }
.value-section { margin-top: 72px; }
.section-intro { max-width: 370px; margin: 0; color: var(--muted); }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.value-grid article { min-height: 232px; padding: 25px; border: 1px solid #dde3dd; border-radius: 20px; background: rgba(255,253,248,.75); box-shadow: 0 10px 28px rgba(20,61,50,.045); transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease; }
.value-grid article:hover { transform: translateY(-5px); border-color: #a9c7b5; box-shadow: 0 20px 38px rgba(20,61,50,.1); }
.value-grid h3 { margin: 18px 0 8px; font-size: 1.14rem; }
.value-grid p { margin: 0; color: var(--muted); font-size: .92rem; }
.value-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; font-size: 1.32rem; font-weight: 900; }
.schedule-icon { color: #235d4b; background: #dcefe5; }.attendance-icon { color: #2d6398; background: #dceafb; }.alert-icon { color: #855d22; background: #fde6ba; }
.how-it-works { display: grid; grid-template-columns: .88fr 1.12fr; gap: clamp(35px, 9vw, 130px); align-items: center; margin-top: 70px; padding: clamp(30px, 6vw, 58px); border-radius: 26px; background: #e8efe4; }
.how-it-works h2 { font-size: clamp(1.75rem, 3vw, 2.6rem); }
.how-it-works > div > p:last-child { color: var(--muted); }
.how-it-works ol { display: grid; gap: 18px; padding: 0; margin: 0; list-style: none; }
.how-it-works li { display: grid; grid-template-columns: 44px 1fr; gap: 15px; }
.how-it-works li > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--green); color: var(--lime); font-size: .75rem; font-weight: 850; }
.how-it-works strong { font-size: 1rem; }.how-it-works li p { margin: 3px 0 0; color: var(--muted); font-size: .88rem; }
.about-cta, .support-callout { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 65px; padding: clamp(28px, 5vw, 48px); border-radius: 25px; background: linear-gradient(120deg, #183f35, #245d4d); color: white; }
.about-cta h2, .support-callout h2 { max-width: 670px; margin-bottom: 8px; font-size: clamp(1.45rem, 3vw, 2.2rem); }.about-cta p:not(.eyebrow), .support-callout p { margin: 0; color: rgba(255,255,255,.7); }.about-cta .eyebrow { color: var(--lime); }
.support-hero { max-width: 740px; padding: 28px 0 12px; }.support-hero h1 { margin-bottom: 12px; }.support-hero p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; }
.faq-list { display: grid; gap: 10px; margin-top: 30px; }.faq-list details { border: 1px solid #dce2dc; border-radius: 16px; background: rgba(255,253,248,.84); overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }.faq-list details[open] { border-color: #aac9b6; box-shadow: 0 12px 26px rgba(20,61,50,.07); }.faq-list summary { display: flex; justify-content: space-between; gap: 20px; padding: 19px 21px; cursor: pointer; list-style: none; font-weight: 760; }.faq-list summary::-webkit-details-marker { display: none; }.faq-list summary::after { content: "+"; color: var(--green-2); font-size: 1.25rem; }.faq-list details[open] summary::after { content: "−"; }.faq-list p { max-width: 820px; margin: 0; padding: 0 21px 20px; color: var(--muted); }.support-callout { margin-top: 44px; }.support-callout .button { flex: 0 0 auto; }
.contact-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 8vw, 110px); align-items: center; min-height: 540px; }.contact-copy h1 { max-width: 490px; margin-bottom: 14px; }.contact-copy > p:not(.eyebrow) { max-width: 470px; color: var(--muted); font-size: 1.05rem; }.contact-assurances { display: grid; gap: 14px; margin-top: 32px; }.contact-assurances > div { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }.contact-assurances > div > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #dcefe5; color: var(--green); font-size: .9rem; }.contact-assurances p { display: grid; gap: 2px; margin: 0; }.contact-assurances small { color: var(--muted); }.contact-form-card { padding: clamp(25px, 5vw, 45px); border: 1px solid #dce3dc; border-radius: 24px; background: #fffdf8; box-shadow: 0 24px 55px rgba(20,61,50,.1); }.contact-form-card h2 { margin-bottom: 8px; }.contact-form-card .button { width: 100%; gap: 8px; margin-top: 5px; }
.contact-inbox { display: grid; gap: 14px; margin-top: 22px; }.contact-inbox-card { padding: 22px; border: 1px solid #dce2dc; border-radius: 17px; background: white; }.contact-inbox-card.is-resolved { opacity: .68; }.contact-inbox-meta, .contact-inbox-card footer { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }.contact-inbox-meta { color: var(--muted); font-size: .78rem; }.contact-inbox-card h2 { margin: 14px 0 8px; font-size: 1.1rem; }.contact-inbox-card > p { margin-bottom: 20px; white-space: pre-wrap; }.contact-inbox-card footer { padding-top: 14px; border-top: 1px solid #edf0ed; }.contact-inbox-card footer span { color: var(--muted); font-size: .84rem; }.contact-inbox-card footer form { margin-left: auto; }
[data-reveal] { animation: surface-enter .5s cubic-bezier(.2,.7,.2,1) both; }.is-revealed { opacity: 1; transform: translateY(0); }
@keyframes popover-in { from { opacity: 0; transform: translateY(-5px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes surface-enter { from { opacity: .01; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes loading-spin { to { transform: translate(-50%, 0) rotate(360deg); } }
@keyframes loading-progress { from { width: 38%; } to { width: 88%; } }
@media (max-width: 900px) { .about-hero { grid-template-columns: 1fr; }.about-art { height: 290px; order: -1; }.about-art img { object-position: 72% 44%; }.about-hero-copy { padding-top: 35px; }.value-grid { grid-template-columns: 1fr; }.value-grid article { min-height: 0; }.how-it-works, .contact-layout { grid-template-columns: 1fr; }.contact-layout { min-height: 0; }.contact-copy { max-width: 650px; }.contact-form-card { max-width: 680px; }.section-heading { align-items: flex-start; flex-direction: column; }.section-intro { max-width: 580px; } }
@media (max-width: 640px) { body.nav-open { overflow: hidden; }.site-header { align-items: center; }.mobile-nav-toggle { position: relative; z-index: 1002; min-height: 44px; border-radius: 14px; box-shadow: 0 7px 16px rgba(20,61,50,.08); }.page-loadbar { top: 64px; }.site-header nav { position: fixed; top: 64px; right: 0; bottom: 0; left: auto; z-index: 1001; display: flex; width: min(86vw, 360px); max-height: none; overflow-y: auto; flex-direction: column; gap: 6px; padding: 20px 16px 22px; border: 0; border-radius: 24px 0 0 0; background: #fffdf8; box-shadow: -18px 0 45px rgba(20,61,50,.18); pointer-events: none; transform: translate3d(105%, 0, 0); transition: transform .24s cubic-bezier(.2,.8,.2,1); will-change: transform; }.site-header nav.is-open { display: flex; pointer-events: auto; transform: translate3d(0, 0, 0); }.site-header nav .nav-link, .site-header nav .inline-form, .site-header nav .install-button, .site-header nav .nav-more { width: 100%; }.site-header nav .nav-link, .site-header nav .inline-form, .site-header nav .install-button { min-height: 48px; }.site-header nav .nav-link { display: flex; justify-content: flex-start; padding: 12px 13px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink); font-size: .94rem; }.site-header nav .nav-link:hover { border-color: #d7e5d9; background: #edf5ed; }.nav-profile { display: flex; align-items: center; gap: 10px; padding: 4px 4px 15px; border-bottom: 1px solid #e5e9e4; color: var(--green); font-size: .86rem; font-weight: 800; }.nav-profile small { display: block; color: var(--muted); font-size: .68rem; font-weight: 600; }.nav-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: var(--green); color: var(--lime); }.nav-more { order: 10; }.nav-more summary { min-height: 46px; display: flex; align-items: center; justify-content: flex-start; padding: 10px 13px; border: 1px solid #e0e6df; background: #f4f8f1; }.nav-more summary > span:last-child { margin-left: auto; }.nav-popover { position: static; width: auto; margin: 6px 0 0; padding: 5px; box-shadow: none; border-radius: 12px; background: #fff; }.nav-popover a { padding: 11px 12px; text-align: left; border-bottom: 1px solid #edf0ed; }.nav-popover a:last-child { border-bottom: 0; }.site-header nav .nav-utility-link { order: 11; }.site-header nav .install-button { order: 12; justify-content: flex-start; padding-left: 14px; }.site-header nav .inline-form { order: 13; }.site-header nav .link-button { text-align: left; padding-left: 13px; }.about-hero { border-radius: 23px; }.about-art { height: 230px; }.about-hero-copy { padding: 28px 22px 31px; }.about-hero h1 { font-size: clamp(2.35rem, 12vw, 3.25rem); }.about-trust { display: grid; gap: 6px; }.how-it-works { margin-top: 45px; padding: 28px 22px; }.about-cta, .support-callout { align-items: flex-start; flex-direction: column; margin-top: 45px; padding: 28px 22px; }.about-cta .button, .support-callout .button { width: 100%; }.value-section { margin-top: 46px; }.faq-list summary { padding: 16px; font-size: .94rem; }.faq-list p { padding: 0 16px 17px; font-size: .9rem; }.contact-layout { gap: 28px; }.contact-form-card { padding: 25px 20px; border-radius: 19px; }.contact-inbox-card { padding: 17px; }.contact-inbox-card footer form { width: 100%; margin-left: 0; }.contact-inbox-card footer form .button { width: 100%; }.browse-form { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 15px; }.browse-form .browse-field, .browse-form .browse-field-branch { min-width: 0; width: 100%; }.browse-form select { width: 100%; max-width: 100%; min-height: 46px; }.browse-form .button { min-height: 46px; margin-top: 2px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }.button, .site-header nav .nav-link, .nav-more summary, .value-grid article, .site-header nav, [data-reveal] { transition: none; animation: none; }.button:hover, .value-grid article:hover { transform: none; }.nav-popover { animation: none; } }

/* Keep the phone navigation stable even when the browser is zoomed. */
@media (max-width: 640px) {
  body.nav-open { overflow: hidden; }
  .site-header nav {
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    display: flex;
    width: 100vw;
    max-height: none;
    min-height: calc(100dvh - 64px);
    overflow-y: auto;
    flex-direction: column;
    gap: 7px;
    padding: 20px 16px 28px;
    border: 0;
    border-radius: 0;
    box-shadow: 0 18px 38px rgba(20,61,50,.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-9px);
    transition: opacity .18s ease, transform .22s cubic-bezier(.2,.8,.2,1);
    will-change: transform, opacity;
  }
  .site-header nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .site-header nav .nav-link { min-height: 46px; }
  .site-header nav .nav-utility-link { order: 11; }
  .site-header nav .install-button { order: 12; }
  .site-header nav .inline-form { order: 13; }
}
