/* EOS — Ohio State Chi Alpha. One stylesheet, light and dark. */
:root {
  --bg: #F3F1EC;
  --bg-raised: #FDFCF9;
  --bg-sunken: #E8E4DA;
  --ink: #1D2433;
  --ink-soft: #5A6170;
  --ink-faint: #8A8F99;
  --line: #DAD5C8;
  --navy: #22324F;
  --navy-deep: #16223A;
  --navy-tint: #E1E6EF;
  --scarlet: #B23A2E;
  --scarlet-tint: #F5DFDA;
  --good: #2F7A5B;
  --good-tint: #DDEEE5;
  --warn: #A9741C;
  --warn-tint: #F4E7CC;
  --bad: #B23A2E;
  --bad-tint: #F5DFDA;
  --shadow: 0 1px 2px rgba(20, 28, 45, .06), 0 4px 16px rgba(20, 28, 45, .06);
  --radius: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161F; --bg-raised: #1A202C; --bg-sunken: #0D1017; --ink: #E8E9EC; --ink-soft: #A3A9B5;
    --ink-faint: #737a87; --line: #2C3442; --navy: #8EA6D1; --navy-deep: #B5C6E6; --navy-tint: #1F2A3D;
    --scarlet: #E07A6E; --scarlet-tint: #3A1F1C; --good: #6CC29B; --good-tint: #18302A; --warn: #E0AE5A;
    --warn-tint: #332818; --bad: #E07A6E; --bad-tint: #3A1F1C; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12161F; --bg-raised: #1A202C; --bg-sunken: #0D1017; --ink: #E8E9EC; --ink-soft: #A3A9B5;
  --ink-faint: #737a87; --line: #2C3442; --navy: #8EA6D1; --navy-deep: #B5C6E6; --navy-tint: #1F2A3D;
  --scarlet: #E07A6E; --scarlet-tint: #3A1F1C; --good: #6CC29B; --good-tint: #18302A; --warn: #E0AE5A;
  --warn-tint: #332818; --bad: #E07A6E; --bad-tint: #3A1F1C; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
svg { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 15px; font-family: var(--font); font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--navy-deep); color: #E9ECF3; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
:root[data-theme="dark"] .side { background: #0B0E14; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side { background: #0B0E14; } }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--scarlet); display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: #fff; font-size: 15px; }
.brand-name { font-family: var(--display); font-size: 18px; font-weight: 600; line-height: 1.1; }
.brand-org { font-size: 11px; opacity: .65; }
.side-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; opacity: .55; padding: 14px 10px 4px; }
.nav { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: inherit; text-decoration: none; opacity: .85; font-size: 13.5px; }
.nav:hover { background: rgba(255,255,255,.07); opacity: 1; }
.nav.on { background: rgba(255,255,255,.13); opacity: 1; font-weight: 600; }
.nav svg { width: 16px; height: 16px; flex: none; opacity: .9; }
.nav .live { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: #F06A5D; box-shadow: 0 0 0 3px rgba(240,106,93,.25); }
.team-pick { margin: 4px 6px 2px; width: calc(100% - 12px); background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 7px 8px; }
.team-pick option { color: #111; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: 12px; display: flex; flex-direction: column; gap: 6px; }
.side-foot button { background: none; border: 0; color: inherit; opacity: .7; padding: 0; cursor: pointer; text-align: left; }
.side-foot button:hover { opacity: 1; text-decoration: underline; }
.shell > div { min-width: 0; }
.main { padding: 26px 32px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .eyebrow { font-size: 12px; color: var(--ink-soft); margin-bottom: 2px; }
.topbar { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--navy-deep); color: #fff; position: sticky; top: 0; z-index: 30; }
  .topbar button { background: none; border: 0; color: #fff; padding: 4px; }
  .main { padding: 18px 16px 60px; }
}

/* ---------- surfaces ---------- */
.card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 15px; font-family: var(--font); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.empty { padding: 22px 16px; text-align: center; color: var(--ink-soft); font-size: 13px; }
.stat { padding: 14px 16px; }
.stat .n { font-family: var(--display); font-size: 28px; font-weight: 600; line-height: 1.1; }
.stat .l { font-size: 12px; color: var(--ink-soft); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg-raised); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap; }
.btn:hover { border-color: var(--ink-faint); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #0D1017; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0D1017; } }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: none; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-sunken); }
.btn.sm { padding: 3px 8px; font-size: 12px; }
.btn svg { width: 14px; height: 14px; }
.icon-btn { border: 0; background: none; padding: 4px; border-radius: 6px; cursor: pointer; color: var(--ink-soft); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--bg-sunken); color: var(--ink); }
.icon-btn svg { width: 15px; height: 15px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: var(--bg-raised); border-radius: 8px; padding: 7px 10px; }
.input:focus { outline: 2px solid var(--navy-tint); border-color: var(--navy); }
textarea.input { resize: vertical; min-height: 70px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.flat { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 4px 6px; width: 100%; }
.flat:hover { border-color: var(--line); }
.flat:focus { outline: none; border-color: var(--navy); background: var(--bg-raised); }
textarea.flat { resize: none; overflow: hidden; min-height: 28px; }
.tabs { display: inline-flex; gap: 2px; background: var(--bg-sunken); border-radius: 9px; padding: 3px; }
.tab { border: 0; background: none; padding: 5px 12px; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--ink-soft); }
.tab.on { background: var(--bg-raised); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.check { width: 18px; height: 18px; accent-color: var(--good); cursor: pointer; flex: none; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 0; }
.pill.on_track, .pill.good { background: var(--good-tint); color: var(--good); }
.pill.off_track, .pill.bad { background: var(--bad-tint); color: var(--bad); }
.pill.done { background: var(--navy-tint); color: var(--navy); }
.pill.not_done { background: var(--bg-sunken); color: var(--ink-soft); text-decoration: line-through; }
.pill.warn { background: var(--warn-tint); color: var(--warn); }
.pill.plain { background: var(--bg-sunken); color: var(--ink-soft); }
select.pill { appearance: none; cursor: pointer; padding-right: 9px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--navy-tint); color: var(--navy); display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.avatar.lg { width: 34px; height: 34px; font-size: 13px; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.li { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li:hover { background: color-mix(in srgb, var(--bg-sunken) 45%, transparent); }
.li .title { flex: 1; min-width: 0; cursor: pointer; }
.li .title:hover { text-decoration: underline; text-decoration-color: var(--ink-faint); }
.li.done .title { text-decoration: line-through; color: var(--ink-faint); }
.li .meta { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.li .late { color: var(--bad); font-weight: 600; }
.group-head { padding: 10px 16px 6px; display: flex; align-items: center; gap: 8px; font-weight: 600; background: var(--bg-sunken); border-bottom: 1px solid var(--line); font-size: 13px; }
.rank { display: inline-flex; gap: 2px; }
.rank button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: none; font-size: 11px; font-weight: 700; cursor: pointer; color: var(--ink-faint); padding: 0; }
.rank button.on { background: var(--scarlet); border-color: var(--scarlet); color: #fff; }
.progress { height: 6px; background: var(--bg-sunken); border-radius: 99px; overflow: hidden; width: 60px; flex: none; }
.progress > i { display: block; height: 100%; background: var(--good); }

/* ---------- scorecard ---------- */
.sc-wrap { overflow-x: auto; }
table.sc { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
table.sc th, table.sc td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
table.sc th { font-size: 11px; font-weight: 600; color: var(--ink-soft); background: var(--bg-raised); position: sticky; top: 0; }
table.sc td.l, table.sc th.l { text-align: left; }
table.sc td.m { position: sticky; left: 0; background: var(--bg-raised); z-index: 1; min-width: 220px; max-width: 280px; white-space: normal; }
table.sc th.m { position: sticky; left: 0; z-index: 2; }
table.sc td.v { padding: 2px; min-width: 64px; }
table.sc td.v input { width: 60px; text-align: center; border: 1px solid transparent; border-radius: 6px; padding: 5px 2px; background: transparent; }
table.sc td.v input:hover { border-color: var(--line); }
table.sc td.v input:focus { outline: none; border-color: var(--navy); background: var(--bg-raised); }
table.sc td.v.good input { background: var(--good-tint); color: var(--good); font-weight: 600; }
table.sc td.v.bad input { background: var(--bad-tint); color: var(--bad); font-weight: 600; }
table.sc th.cur { color: var(--navy); }
table.sc tr:hover td.m { text-decoration: none; }

/* ---------- modal & drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(12, 16, 24, .45); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal { width: 100%; max-width: 560px; background: var(--bg-raised); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { max-width: 760px; }
.modal-head { padding: 16px 20px 6px; display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 10px 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.modal-foot { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.modal-foot .left { margin-right: auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 80; font-size: 13px; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--bad); color: #fff; }

/* ---------- meetings ---------- */
.mtg { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }
.agenda { position: sticky; top: 16px; }
.agenda-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13.5px; }
.agenda-item:last-child { border-bottom: 0; }
.agenda-item:hover { background: var(--bg-sunken); }
.agenda-item.on { background: var(--navy); color: #fff; font-weight: 600; }
:root[data-theme="dark"] .agenda-item.on { color: #0D1017; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .agenda-item.on { color: #0D1017; } }
.agenda-item.past { color: var(--ink-faint); }
.agenda-item .mins { margin-left: auto; font-size: 11.5px; opacity: .75; }
.clock { font-family: var(--display); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.clock.over { color: var(--bad); }
.clock-sub { font-size: 11.5px; color: var(--ink-soft); }
.live-banner { display: flex; align-items: center; gap: 10px; background: var(--scarlet-tint); color: var(--scarlet); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; font-weight: 600; }
.live-banner .grow { color: var(--ink); font-weight: 500; }
.rate { display: flex; gap: 4px; flex-wrap: wrap; }
.rate button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-raised); cursor: pointer; font-weight: 600; }
.rate button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.prompt { background: var(--navy-tint); border-radius: var(--radius); padding: 12px 16px; color: var(--navy-deep); font-size: 13.5px; }
@media (max-width: 860px) { .mtg { grid-template-columns: 1fr; } .agenda { position: static; } }

/* ---------- V/TO ---------- */
.vto { display: grid; grid-template-columns: 200px 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-raised); }
.vto > .k { background: var(--navy); color: #fff; padding: 14px 16px; font-family: var(--display); font-weight: 600; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
:root[data-theme="dark"] .vto > .k { color: #0D1017; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vto > .k { color: #0D1017; } }
.vto > .k .hint { display: block; font-family: var(--font); font-size: 11px; font-weight: 400; opacity: .75; margin-top: 4px; }
.vto > .v { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.vto > .k:last-of-type, .vto > .v:last-child { border-bottom: 0; }
.vto .sub { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.list-edit { display: flex; flex-direction: column; gap: 2px; }
.list-edit .row { gap: 4px; }
.list-edit .num { width: 20px; text-align: right; color: var(--ink-faint); font-size: 12px; flex: none; }
@media (max-width: 700px) { .vto { grid-template-columns: 1fr; } }

/* ---------- accountability chart ---------- */
.ac-wrap { overflow-x: auto; padding: 8px 0 20px; }
.ac { display: flex; justify-content: center; width: max-content; min-width: 100%; padding: 0 12px; }
.ac-tools { display: flex; align-items: center; gap: 6px; padding: 10px 12px 0; position: sticky; left: 0; }
.ac ul.tree { list-style: none; margin: 0; padding: 22px 0 0; display: flex; justify-content: center; position: relative; }
.ac > ul.tree { padding-top: 0; }
.ac li.node { display: flex; flex-direction: column; align-items: center; position: relative; padding: 22px 8px 0; }
.ac li.node::before, .ac li.node::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 2px solid var(--line); }
.ac li.node::after { right: auto; left: 50%; border-left: 2px solid var(--line); }
.ac li.node:only-child::before, .ac li.node:only-child::after { display: none; }
.ac li.node:only-child { padding-top: 0; }
.ac li.node:first-child::before, .ac li.node:last-child::after { border: 0 none; }
.ac li.node:last-child::before { border-right: 2px solid var(--line); border-radius: 0 6px 0 0; }
.ac li.node:first-child::after { border-radius: 6px 0 0 0; }
.ac ul.tree ul.tree::before { content: ""; position: absolute; top: 0; left: 50%; width: 0; height: 22px; border-left: 2px solid var(--line); }
.seat { width: 220px; background: var(--bg-raised); border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 10px; box-shadow: var(--shadow); text-align: left; cursor: pointer; }
.seat:hover { border-color: var(--navy); }
.seat-title { padding: 9px 12px 4px; font-weight: 700; font-size: 13.5px; }
.seat-people { padding: 0 12px 6px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.seat-people .open { color: var(--scarlet); font-style: italic; }
.seat-roles { overflow-wrap: anywhere; margin: 0; padding: 7px 12px 10px 26px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); }

/* ---------- people analyzer ---------- */
table.pa { border-collapse: collapse; width: 100%; font-size: 13px; }
table.pa th, table.pa td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; }
table.pa th { font-size: 11.5px; color: var(--ink-soft); font-weight: 600; vertical-align: bottom; }
table.pa td.l, table.pa th.l { text-align: left; }
.mark { display: inline-grid; place-items: center; min-width: 34px; height: 24px; border-radius: 6px; font-weight: 700; font-size: 12.5px; }
.mark.p { background: var(--good-tint); color: var(--good); }
.mark.m { background: var(--warn-tint); color: var(--warn); }
.mark.n { background: var(--bad-tint); color: var(--bad); }
.mark.x { color: var(--ink-faint); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: none; padding: 5px 10px; cursor: pointer; font-weight: 700; border-right: 1px solid var(--line); min-width: 40px; }
.seg button:last-child { border-right: 0; }
.seg button.on.p { background: var(--good); color: #fff; }
.seg button.on.m { background: var(--warn); color: #fff; }
.seg button.on.n { background: var(--bad); color: #fff; }

/* ---------- sign-in ---------- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--navy-deep); }
.signin .card { width: 100%; max-width: 380px; padding: 28px; }
.signin .brand-mark { width: 44px; height: 44px; font-size: 22px; margin-bottom: 14px; }

/* ---------- print (V/TO and meeting summaries) ---------- */
@media print {
  .side, .topbar, .no-print, .btn, .icon-btn { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .card { box-shadow: none; }
  body { background: #fff; }
  .flat { border: 0 !important; }
}
.linkish { border: 0; background: none; padding: 0; color: var(--navy); cursor: pointer; text-align: left; font-weight: 500; }
.linkish:hover { text-decoration: underline; }
details[open] > summary { margin-bottom: 6px; }
@media print { details { display: block; } details > summary { display: none; } details:not([open]) > *:not(summary) { display: block; } }
