@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --text: #1f1f1e; --muted: #6f6e69; --faint: #9b9a97;
  --bg: #fff; --card: #fff; --side: #f7f7f5; --hover: #efefed; --line: #e9e9e7; --line-strong: #dcdcd9; --line-hover: #d0d0cd; --subtle: #fbfbfa; --glass: var(--glass);
  --purple: #7b4fc9; --purple-soft: #f1ebfa; --red: #d03b3b; --red-soft: #fbe9e9; --hero: #eef5fd;
  --accent: #2383e2; --accent-hover: #1a6fc4; --accent-soft: #e7f1fc;
  --ok: #2e8b57; --ok-soft: #e6f4ec; --warn: #d9730d; --warn-soft: #fbecdd;
  --radius: 8px; --shadow: 0 1px 2px rgba(15, 15, 15, .04), 0 2px 8px rgba(15, 15, 15, .04);
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --side-w: 240px;
}
/* Dark mode: follows the system unless chosen in Settings (data-theme on <html>) */
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) {
  --text: #ebebea; --muted: #a3a29e; --faint: #7d7c78;
  --bg: #191919; --card: #202020; --side: #1f1f1f; --hover: #2c2c2c; --line: #2f2f2f; --line-strong: #3a3a3a; --line-hover: #474747; --subtle: #1d1d1d; --glass: rgba(25, 25, 25, .9);
  --accent: #4a9df0; --accent-hover: #6aaff3; --accent-soft: #1d2f43; --ok: #4fbf7e; --ok-soft: #1b3326; --warn: #f0a050; --warn-soft: #3b2a17;
  --purple: #ad8cf0; --purple-soft: #2c2340; --red: #f07070; --red-soft: #3d2020; --hero: #16263a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
} }
:root[data-theme='dark'] {
  --text: #ebebea; --muted: #a3a29e; --faint: #7d7c78;
  --bg: #191919; --card: #202020; --side: #1f1f1f; --hover: #2c2c2c; --line: #2f2f2f; --line-strong: #3a3a3a; --line-hover: #474747; --subtle: #1d1d1d; --glass: rgba(25, 25, 25, .9);
  --accent: #4a9df0; --accent-hover: #6aaff3; --accent-soft: #1d2f43; --ok: #4fbf7e; --ok-soft: #1b3326; --warn: #f0a050; --warn-soft: #3b2a17;
  --purple: #ad8cf0; --purple-soft: #2c2340; --red: #f07070; --red-soft: #3d2020; --hero: #16263a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 14px/1.55 var(--sans); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
main a:not(.button) { color: var(--accent); text-decoration: none; }
main a:not(.button):hover { text-decoration: underline; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* App shell: sidebar on the left, page on the right */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--side); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; z-index: 20; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font-weight: 700; font-size: 16px; text-decoration: none; letter-spacing: -.01em; }
.logo { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 700; }
.side-h { margin: 16px 10px 4px; font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 6px; color: var(--muted); font-weight: 500; text-decoration: none; }
.side nav a:hover { background: var(--hover); color: var(--text); }
.side nav a[aria-current='page'] { background: var(--hover); color: var(--text); }
.side .side-foot { margin-top: auto; padding: 12px 10px 4px; font-size: 12px; color: var(--faint); }
.side .side-foot a { color: var(--muted); }
/* Apple-style on/off switch (a real checkbox, visually replaced) */
.switch { display: flex; align-items: center; gap: 10px; width: fit-content; margin-top: 16px; font-weight: 500; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch .track { position: relative; width: 28px; height: 16px; flex: none; border-radius: 999px; background: #d9d9d9; transition: background .25s ease; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .25s cubic-bezier(.3, .7, .4, 1); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(12px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.mbar { display: none; }
.scrim { display: none; }
body.shell { padding-left: var(--side-w); }

@media (max-width: 860px) {
  body.shell { padding-left: 0; }
  .side { transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
  body.menu-open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .15); }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 15, 15, .25); z-index: 15; }
  .mbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 10; height: 52px; padding: 0 12px; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .mbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
  .mbar .icon-btn { margin-left: -4px; }
}
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--hover); }
.icon-btn svg.i { width: 20px; height: 20px; }

/* Simple top bar for pages outside the app (log in, supervisor sign-off) */
.top { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.top .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; text-decoration: none; }

main { max-width: 880px; margin: 0 auto; padding: 48px 40px 80px; transition: opacity .3s ease; }
main.narrow { max-width: 480px; }
@media (max-width: 860px) { main { padding: 28px 16px 64px; } }
/* Pages with body.loading fade in once their data arrives (shown after 3s regardless, in case loading fails) */
.loading main { opacity: 0; animation: reveal 0s 3s forwards; }
@keyframes reveal { to { opacity: 1; } }
section { margin-bottom: 40px; }
h1, h2, h3 { margin: 0 0 12px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
h1 { font-size: 30px; }
h2 { font-size: 18px; letter-spacing: -.01em; }
h1 + .muted, .page-head .muted { margin-top: -4px; font-size: 15px; }
.page-head { margin-bottom: 28px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.label { font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none; }
.label.soon { color: var(--warn); font-weight: 600; }
.label.soon::before { content: '● '; font-size: 9px; vertical-align: 1px; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 500; color: var(--text); }
input, textarea, select { display: block; width: 100%; margin-top: 6px; padding: 8px 10px; font: 14px var(--sans); color: var(--text); background: var(--card); border: 1px solid var(--line-strong); border-radius: 6px; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=file] { padding: 6px; background: var(--side); }
textarea { resize: vertical; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.wide { grid-column: 1 / -1; }
.stack { display: grid; gap: 16px; margin-bottom: 20px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; margin: 3px 0 0; box-shadow: none; accent-color: var(--accent); }

/* Buttons */
button, a.button, label.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; font: 500 14px var(--sans); text-decoration: none; color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: 6px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
button:hover, a.button:hover, label.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.secondary, a.button.secondary, label.button.secondary { color: var(--text); background: var(--card); border-color: var(--line-strong); box-shadow: 0 1px 1px rgba(0, 0, 0, .03); }
button.secondary:hover, a.button.secondary:hover, label.button.secondary:hover { background: var(--hover); border-color: var(--line-hover); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, a.button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.chip { height: 28px; padding: 0 12px; font-size: 13px; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
button.chip:hover { color: var(--text); background: var(--hover); }
button.chip[aria-pressed='true'] { color: var(--text); background: var(--hover); border-color: var(--line-hover); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }
.chips:empty { display: none; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.post { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 12px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.post:hover { border-color: var(--line-strong); box-shadow: 0 2px 4px rgba(15, 15, 15, .05), 0 6px 16px rgba(15, 15, 15, .06); }
.post h2 { margin: 2px 0 4px; font-size: 17px; }
.post p { margin: 0 0 6px; }
.post .notes { white-space: pre-line; color: var(--text); font-size: 13.5px; }
.post .row { margin-top: 12px; }
.post .button, .post button, .track .row button { height: 30px; padding: 0 12px; font-size: 13px; }
.track.done { opacity: .6; }
.track select { width: auto; display: inline-block; margin: 0; padding: 4px 8px; height: 30px; font-size: 13px; }
.cal-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.cal-links a.label { color: var(--accent); }
.cal-links a.label:hover { text-decoration: underline; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 12px 0; }
.tags li { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--side); border: 1px solid var(--line); border-radius: 999px; }
.tags.small { margin: 8px 0 4px; }
.tags.small li { font-size: 11.5px; padding: 1px 8px; }

/* Stats (trackers) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 24px; }
.stats:empty { display: none; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.stat span { font-size: 12px; font-weight: 500; color: var(--muted); }

/* Collapsible "add" form */
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
details summary { display: flex; align-items: center; gap: 8px; padding: 14px 20px; font-weight: 600; cursor: pointer; list-style: none; border-radius: 12px; }
details summary:hover { background: var(--side); }
details summary::-webkit-details-marker { display: none; }
details[open] summary { border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; }
details form { padding: 20px; }
.tools { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
@media (max-width: 560px) { .tools { grid-template-columns: 1fr; } }

/* Hours, progress */
.big { font-size: 36px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; text-decoration: none; }
.big .of { color: var(--faint); font-weight: 600; }
progress { display: block; width: 100%; height: 8px; margin-top: 14px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; background: var(--hover); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--hover); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; transition: width .4s ease; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { font-weight: 500; font-size: 12px; color: var(--muted); background: var(--side); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--subtle); }
td button, td a.button { height: 28px; padding: 0 10px; font-size: 12.5px; margin-right: 4px; }
.actions { white-space: nowrap; }
.thumb { display: block; width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.photo-preview { display: block; max-width: 240px; max-height: 240px; margin-top: 12px; border-radius: 8px; }
.verified { display: inline-flex; margin-top: 4px; padding: 1px 8px; font-size: 11.5px; font-weight: 500; color: var(--ok); background: var(--ok-soft); border-radius: 999px; }
#rows td:nth-child(2) { white-space: nowrap; }
table:has(#rows:empty) { display: none; }
.table-wrap:has(#rows:empty) { display: none; }

/* Home dashboard */
.dash { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.dash > * { margin: 0; }
.dash .hours { grid-column: span 4; }
.dash .side-stat { grid-column: span 2; display: flex; flex-direction: column; justify-content: space-between; }
.dash .upcoming { grid-column: span 4; }
.dash .calendars { grid-column: span 2; }
.quick { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick a { display: flex; flex-direction: column; gap: 10px; padding: 16px; color: var(--text) !important; text-decoration: none !important; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s, box-shadow .15s; }
.quick a:hover { border-color: var(--line-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(15, 15, 15, .07); }
.quick b { font-weight: 600; }
.quick span.muted { font-size: 12.5px; line-height: 1.4; }
.quick .ico { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.quick a:nth-child(2) .ico { background: var(--ok-soft); color: var(--ok); }
.quick a:nth-child(3) .ico { background: var(--warn-soft); color: var(--warn); }
.quick a:nth-child(4) .ico { background: var(--purple-soft); color: var(--purple); }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.card-h h2 { margin: 0; font-size: 15px; }
@media (max-width: 960px) { .quick { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .dash .hours, .dash .side-stat, .dash .upcoming, .dash .calendars { grid-column: 1 / -1; } }
.dash .school-events { grid-column: 1 / -1; }
main > .school-events { margin-bottom: 16px; }
.school-members { list-style: none; padding: 0; margin: 0; columns: 2 200px; }
.school-members li { padding: 4px 0; }
.leaderboard { margin: 0; padding: 0 0 0 1.6em; }
.leaderboard li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.leaderboard li:last-child { border-bottom: 0; }
.leaderboard .club { display: block; font-weight: 600; }
.leaderboard b { color: var(--text); font-weight: 600; }
#club-sort label > span { height: 28px; padding: 0 12px; font-size: 13px; }
.upcoming ul { list-style: none; padding: 0; margin: 0; }
.upcoming li { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.upcoming li:last-child { border-bottom: 0; }
.upcoming li .label { grid-column: 1 / -1; }
.upcoming li a, .upcoming li .title { font-weight: 600; color: var(--text) !important; }
.upcoming li .muted { align-self: end; font-size: 12.5px; }
.steps { padding-left: 18px; margin: 8px 0 14px; font-size: 13px; }
.steps li { margin-bottom: 4px; }
#cal-sources li button.chip { height: 22px; padding: 0 8px; font-size: 11.5px; }

/* Landing page */
body.landing { background: var(--bg) radial-gradient(1200px 600px at 50% -10%, var(--hero) 0%, var(--bg) 60%) no-repeat; }
.landing-top { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; margin: 0 auto; padding: 18px 24px; }
.landing-top .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; text-decoration: none; }
.hero { max-width: 760px; margin: 0 auto; padding: 96px 24px 48px; text-align: center; }
.hero .eyebrow { display: inline-block; margin-bottom: 20px; padding: 4px 12px; font-size: 12.5px; font-weight: 500; color: var(--accent); background: var(--accent-soft); border-radius: 999px; }
.hero h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 18px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 560px; margin: 0 auto 32px; }
.hero .row { justify-content: center; }
.hero .button { height: 42px; padding: 0 20px; font-size: 15px; }
.features { max-width: 1080px; margin: 0 auto; padding: 24px 24px 96px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.features .card h3 { font-size: 15px; margin: 12px 0 6px; }
.features .card p { color: var(--muted); font-size: 13.5px; margin: 0; }
.features .ico { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } .hero { padding-top: 56px; } }
.landing-right { display: flex; align-items: center; gap: 16px; }
.landing-right .switch { margin: 0; color: var(--muted); font-size: 13px; }

/* Landing ASCII style (switch next to Log in): the first comp. start page, white and serif over the ASCII field (ascii.js) */
#ascii { display: none; }
.landing.ascii #ascii { display: block; position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.landing.ascii { --text: #111; --muted: #777; --accent: #111; --serif: 'Instrument Serif', Georgia, serif; --mono: 'Courier New', Courier, monospace; background: #fff; color: var(--text); font: 15px/1.6 var(--mono); }
.landing.ascii header, .landing.ascii main { position: relative; z-index: 1; }
.landing.ascii main { text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 12px #fff; } /* keeps text readable over the field */
.landing.ascii .logo { display: none; }
.landing.ascii .landing-top .brand { font: 400 2rem/1 var(--serif); }
.landing.ascii .switch { font: .75rem var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.landing.ascii .button { height: auto; padding: 14px 36px; font: .8rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: #fff; background: #111; border: 1px solid #111; border-radius: 999px; box-shadow: none; text-shadow: none; }
.landing.ascii .button.secondary { color: #111; background: #fff; }
.landing.ascii .landing-top .button { padding: 8px 22px; }
.landing.ascii .hero .button.secondary { background: none; border-color: transparent; padding: 14px 12px; text-decoration: underline; text-underline-offset: 4px; }
.landing.ascii .hero .eyebrow { padding: 0; color: var(--muted); background: none; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.landing.ascii .hero h1 { font: 400 clamp(44px, 8vw, 84px)/1 var(--serif); letter-spacing: -.01em; margin-bottom: 24px; }
.landing.ascii .hero p { font-size: 15px; }
.landing.ascii .features { gap: 32px; }
.landing.ascii .features .card { padding: 20px 0 0; background: none; border: 0; border-top: 1px solid #111; border-radius: 0; box-shadow: none; }
.landing.ascii .features .ico { display: none; }
.landing.ascii .features .card h3 { font: 400 1.75rem/1.1 var(--serif); margin: 0 0 10px; }
.landing.ascii .features .card p { font-size: 13px; line-height: 1.6; }

/* Profile */
.profile-head { position: relative; display: flex; gap: 18px; align-items: center; margin-bottom: 32px; }
.avatar { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 26px; font-weight: 700; }
.profile-head p { margin: 0 0 2px; }
.name-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.name { font-size: 26px; margin: 0; }
.edit-link { order: 2; margin-left: auto; align-self: flex-start; }
#p-insta a { display: inline-flex; align-items: center; gap: 6px; }
.resume { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.resume li { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.resume li:last-child { border-bottom: 0; }
.resume .club { font-weight: 600; }
.resume .when { align-self: center; font-size: 12px; color: var(--muted); }
.resume .role { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .resume li { grid-template-columns: 1fr; } }
.membership { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; }
.membership .remove { justify-self: start; }

/* Discover */
.filters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 8px; padding: 16px; align-items: end; background: var(--side); border: 1px solid var(--line); border-radius: 12px; }
.filters label.check { align-self: center; }
@media (max-width: 560px) { .filters { grid-template-columns: 1fr 1fr; } }
#count { font-size: 13px; }
label.search { margin-bottom: 4px; }

/* Supervisor sign-off */
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; margin: 20px 0 28px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }

#msg:empty { display: none; }
#msg { padding: 10px 14px; margin: 12px 0; font-size: 13.5px; background: var(--side); border: 1px solid var(--line); border-radius: 8px; }

.print-only { display: none; }
@media print {
  body.shell { padding-left: 0; }
  .side, .mbar, .top { display: none; }
  .no-print { display: none !important; }
  .print-only { display: revert; }
  td.print-only { min-width: 160px; }
  main { padding-top: 24px; }
  .table-wrap { box-shadow: none; }
}

/* Study */
.study-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.study-grid .post { margin: 0; }
.post .tip { font-size: 13.5px; margin: 6px 0 12px; }
.resources { list-style: none; padding: 12px 0 0; margin: 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.resources li { display: grid; gap: 1px; }
.resources a { font-weight: 600; font-size: 13.5px; }
.resources .muted { font-size: 12.5px; line-height: 1.4; }

/* Submit an event */
fieldset.card { margin: 0 0 16px; padding: 20px; }
legend { float: left; width: 100%; margin-bottom: 14px; padding: 0; font-weight: 600; font-size: 15px; }
legend + * { clear: both; }
.process { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0; margin: 0 0 24px; }
.process li { counter-increment: step; display: grid; gap: 2px; padding: 14px 16px; background: var(--side); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; color: var(--muted); }
.process li b { color: var(--text); font-size: 14px; }
.process li b::before { content: counter(step); display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; }
@media (max-width: 640px) { .process { grid-template-columns: 1fr; } }
.label.status-pending { color: var(--warn); }
.label.status-approved { color: var(--ok); }
.label.status-saved { color: var(--muted); }

/* Hours goal */
.goal-form { display: flex; align-items: flex-end; gap: 8px; margin-top: 16px; }
.goal-form label { width: 160px; }

/* Calendar */
main.wide-main { max-width: 1200px; }
.cal-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.cal-side { display: grid; gap: 16px; }
.cal-side .card { padding: 16px; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: 1fr; } }
.cal-card { padding: 16px; }
.cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.cal-bar h2 { margin: 0; font-size: 20px; }
button.icon { width: 36px; padding: 0; font-size: 18px; }
.dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dow span { padding: 6px 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
.cal-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.day { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; overflow: hidden; }
.day:hover { background: var(--subtle); }
.day:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.day.other { background: var(--subtle); }
.day.other .num { color: var(--faint); }
.day .num { align-self: flex-start; min-width: 24px; height: 24px; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 500; border-radius: 999px; }
.day.today .num { background: var(--accent); color: #fff; }
.day.picked { background: var(--accent-soft); }
.ev { display: block; padding: 1px 6px; font-size: 11.5px; line-height: 1.5; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--hover); color: var(--muted); }
.ev-scholarship { --c: var(--accent); --tint: var(--accent-soft); }
.ev-program { --c: var(--warn); --tint: var(--warn-soft); }
.ev-hours { --c: var(--ok); --tint: var(--ok-soft); }
.ev[class*='ev-'] { background: var(--tint); color: var(--c); }
.day .more { font-size: 11px; color: var(--muted); padding-left: 6px; }
@media (max-width: 640px) {
  .day { min-height: 56px; padding: 4px; }
  .day .ev { height: 6px; padding: 0; font-size: 0; background: var(--c); }
  .day .more { display: none; }
  .cal-card { padding: 10px; }
}
.day-list, .sources { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.day-list li { display: grid; padding: 8px 10px; border-left: 3px solid var(--c, var(--line)); background: var(--tint, var(--side)); border-radius: 6px; }
.day-list li a, .day-list li .title { font-weight: 600; color: var(--text) !important; }
.day-list li .muted { font-size: 12px; }
.sources li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sources li .muted { font-size: 12px; margin-left: auto; }
.sources li button.chip { height: 22px; padding: 0 8px; font-size: 11px; }
.sources .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; margin-top: 4px; }
.sources label.check { align-items: center; }
.sources label.check input { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.cal-side > section, .cal-layout > section { margin: 0; }

/* Discover tools */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.disc-tools { margin-bottom: 16px; }
.disc-bar { display: grid; grid-template-columns: 1fr auto 190px; gap: 8px; align-items: center; }
.disc-bar input, .disc-bar select { margin: 0; height: 36px; }
.search-box input { padding-left: 34px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9a97' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 10px center / 16px; }
@media (max-width: 640px) { .disc-bar { grid-template-columns: 1fr auto; } .disc-bar .sort { grid-column: 1 / -1; } }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; }
.filter-panel { margin-top: 8px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px rgba(15, 15, 15, .08); }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.panel-grid label.check { align-self: center; padding-top: 18px; }
.tabs { display: flex; gap: 4px; margin: 16px 0 8px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
button.tab { all: unset; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px 10px; font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
button.tab:hover { color: var(--text); }
button.tab[aria-pressed='true'] { color: var(--text); border-bottom-color: var(--text); }
button.tab .n { font-size: 11.5px; padding: 0 6px; border-radius: 999px; background: var(--hover); color: var(--muted); }
button.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.active-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 28px; }
.active-row .chips { margin: 0; }
button.chip.on { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
button.chip.link { border: 0; color: var(--muted); text-decoration: underline; background: none; }
.post.type-event { border-left: 3px solid var(--ok); }
.concerns { margin: 4px 0 12px; padding-left: 18px; font-size: 13px; color: var(--warn); }

.study-bar { grid-template-columns: 1fr auto; }
#s-mine[aria-pressed='true'] { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.exam-dates { display: grid; gap: 6px; margin: 4px 0 12px; padding: 10px 12px; background: var(--side); border: 1px solid var(--line); border-radius: 10px; }
.exam-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.exam-row > div { flex: 1; min-width: 0; }
.exam-row button.chip { height: 26px; flex: none; }
.exam-row button.chip[aria-pressed='true'] { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.exam-row .gcal { flex: none; font-size: 12px; }
details.how { margin: 0 0 12px; border: 0; box-shadow: none; background: none; }
details.how summary { padding: 0; font-size: 13.5px; font-weight: 600; color: var(--accent); border: 0 !important; }
details.how summary::before { content: '▸ '; }
details.how[open] summary::before { content: '▾ '; }
details.how summary:hover { background: none; text-decoration: underline; }
details.how ol { margin: 8px 0 0; padding-left: 20px; font-size: 13px; display: grid; gap: 6px; }
.ev-exam { --c: var(--red); --tint: var(--red-soft); }
.ev-college { --c: var(--purple); --tint: var(--purple-soft); }
.ev-cal { --c: #8a8f98; --tint: var(--hover); }

/* Reminder banner */
.remind { display: flex; align-items: center; gap: 12px; margin: -24px 0 24px; padding: 10px 8px 10px 14px; font-size: 13.5px; background: var(--warn-soft); border: 1px solid transparent; border-radius: 10px; color: var(--text); }
.remind span { flex: 1; min-width: 0; }
.remind a { font-weight: 600; white-space: nowrap; }
.remind .icon-btn { width: 28px; height: 28px; font-size: 18px; color: var(--muted); }
@media (max-width: 860px) { .remind { margin-top: 0; } }

/* First-visit setup */
dialog.setup { width: min(520px, calc(100vw - 32px)); padding: 24px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog.setup::backdrop { background: rgba(15, 15, 15, .35); }
dialog.setup h2 { font-size: 20px; margin-bottom: 6px; }
dialog.setup form { display: grid; gap: 14px; }
dialog.setup .hint { font-size: 12.5px; margin: -8px 0 0; }
dialog.setup fieldset { border: 0; padding: 0; margin: 0; }
dialog.setup legend { font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.seg, .picks { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label, .picks label { position: relative; }
.seg input, .picks input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label > span, .picks label > span { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; font-size: 13.5px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
.seg input:checked + span, .picks input:checked + span { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
.seg input:focus-visible + span, .picks input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
dialog.setup .row { margin-top: 4px; }

/* Settings */
.settings section { margin-bottom: 16px; }
.settings h2 { font-size: 15px; }
fieldset.seg { border: 0; padding: 0; margin: 0; }
.settings .row { margin-top: 12px; }

/* Colleges */
.checklist { display: grid; gap: 6px; margin: 8px 0 4px; padding: 12px 14px; background: var(--side); border: 1px solid var(--line); border-radius: 10px; }
.checklist .label { margin: 0; }
.checklist progress { margin: 0 0 4px; height: 6px; }
.checklist progress::-webkit-progress-value { background: var(--ok); }
.checklist progress::-moz-progress-bar { background: var(--ok); }
.checklist label.check { font-size: 13.5px; }
.timeline { margin-top: 8px; }
.timeline ol { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.timeline li:last-child { border-bottom: 0; }
.timeline li .when { font-size: 12px; font-weight: 600; color: var(--muted); }
.timeline li.now .when { color: var(--accent); }
.timeline li.now { font-weight: 500; }
.timeline li a { color: var(--text) !important; }
.timeline li button.chip { height: 26px; }
.timeline li button.chip[aria-pressed='true'] { color: var(--ok); background: var(--ok-soft); border-color: transparent; }

/* Home: checklist and picks */
.dash .roadmap, .dash .picks-card { grid-column: span 3; }
@media (max-width: 760px) { .dash .roadmap, .dash .picks-card { grid-column: 1 / -1; } }
.roadmap ul, .picks-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.roadmap li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 13.5px; }
.roadmap li input { width: auto; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.roadmap li.done span { color: var(--faint); text-decoration: line-through; }
.roadmap li .tag { margin-left: auto; flex: none; font-size: 11.5px; font-weight: 600; color: var(--accent); }
.roadmap li a { color: var(--text) !important; }
.picks-card li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.picks-card li:last-child { border-bottom: 0; }
.picks-card li a { font-weight: 600; color: var(--text) !important; }
.picks-card li .muted { display: block; font-size: 12.5px; }

/* Resume */
.resume-page .card { margin-bottom: 16px; }
.resume-page .card-h h2 .muted { font-weight: 400; font-size: 13px; }
.act { padding: 14px 0; border-bottom: 1px solid var(--line); }
.act:last-child { border-bottom: 0; }
.act-top { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.act-top b { margin-right: auto; }
.act-top button.chip { height: 26px; padding: 0 10px; }
.lbl { display: flex; justify-content: space-between; gap: 8px; }
.count { font-size: 11.5px; font-weight: 400; color: var(--faint); }
.count.full { color: var(--warn); font-weight: 600; }
fieldset.grades { display: flex; align-items: center; gap: 12px; border: 0; padding: 0; margin: 0; }
fieldset.grades legend { float: left; font-size: 13px; font-weight: 500; margin-right: 6px; }
.paper { max-width: 760px; margin: 16px auto; padding: 48px 56px; color: #1f1f1e; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 30px rgba(0, 0, 0, .1); font-size: 13px; line-height: 1.45; }
.paper h1 { font-size: 26px; margin: 0 0 2px; text-align: center; letter-spacing: -.01em; }
.paper .contact { text-align: center; color: #555; margin-bottom: 18px; }
.paper h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 1.5px solid #1f1f1e; }
.paper .entry { margin-bottom: 10px; }
.paper .entry-top { display: flex; justify-content: space-between; gap: 16px; }
.paper .entry-top span { color: #555; white-space: nowrap; }
.paper p { margin: 2px 0 0; }
@media (max-width: 640px) { .paper { padding: 24px 20px; } }
@media print {
  .resume-page { max-width: none; padding: 0; }
  .paper { margin: 0; padding: 0; border: 0; box-shadow: none; max-width: none; }
  body.shell { background: #fff; }
}
@media print { .remind, dialog.setup { display: none !important; } }
