:root {
  --ink: #182126;
  --muted: #657278;
  --paper: #f3f5f4;
  --surface: #ffffff;
  --line: #d8dfdc;
  --teal: #087f7a;
  --teal-dark: #075f5c;
  --amber: #d99118;
  --red: #b73d3d;
  --blue: #276ea5;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Segoe UI", sans-serif; line-height: 1.5; }
a { color: var(--teal-dark); }
.topbar { min-height: 62px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; background: #111a1e; color: white; border-bottom: 3px solid var(--teal); }
.brand { color: white; text-decoration: none; font-family: Georgia, serif; font-size: 1.2rem; }
nav { display: flex; align-items: center; gap: 1.25rem; }
nav a, .link-button { color: #dce7e5; text-decoration: none; font: inherit; }
nav form { margin: 0; }
.link-button { padding: 0; border: 0; background: none; cursor: pointer; }
.page { width: min(1120px, 92vw); margin: 2.5rem auto 5rem; }
h1, h2 { font-family: Georgia, serif; font-weight: 600; }
h1 { margin: .2rem 0; font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { margin-top: 2.4rem; }
.eyebrow { margin: 0; color: var(--teal-dark); font-size: .76rem; font-weight: 800; letter-spacing: .12em; }
.muted { color: var(--muted); font-size: .92rem; }
.login-panel { max-width: 650px; margin: 10vh auto; padding: 3rem 0; border-top: 5px solid var(--teal); border-bottom: 1px solid var(--line); }
.login-panel > p:not(.eyebrow) { max-width: 540px; }
.sso-button, .primary, .danger, .button { display: inline-block; border: 0; border-radius: 4px; padding: .8rem 1.15rem; color: white; background: var(--teal); font-weight: 700; text-decoration: none; cursor: pointer; }
.sso-button { margin: 1rem 0; background: #111a1e; }
.danger { background: var(--red); }
.page-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: center; margin-bottom: 1.25rem; }
.identity { display: flex; align-items: center; gap: .75rem; padding-left: 1rem; border-left: 3px solid var(--teal); }
.identity img { border-radius: 4px; background: #263238; }
.timezone { padding: .8rem 1rem; background: #e1ece9; border-left: 4px solid var(--teal); }
.legend { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0; }
.legend span, .tie, .state { border-radius: 3px; padding: .25rem .55rem; font-size: .82rem; font-weight: 700; }
.preferred { color: #704400; background: #ffe3a8; }
.available { color: #075550; background: #c6ebe4; }
.unavailable { color: #7d2525; background: #f5cece; }
.unspecified { color: #4f5a60; background: #dfe4e6; }
.days { display: grid; gap: .75rem; }
.day-card { min-width: 0; padding: .9rem 1rem 1rem; border: 1px solid var(--line); border-left: 5px solid #a7b1b4; border-radius: 4px; background: var(--surface); }
.day-card legend { padding: 0 .35rem; font-family: Georgia, serif; font-size: 1.2rem; font-weight: 700; }
.status-options ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; margin: 0; padding: 0; list-style: none; }
.status-options label, .time-options label { display: flex; gap: .4rem; align-items: center; min-height: 42px; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; }
.status-options label:has(input:disabled) { opacity: .45; cursor: not-allowed; background: #f1f1ee; }
.time-options { display: flex; align-items: center; gap: .6rem; margin-top: .75rem; }
.time-options > span { color: var(--muted); font-size: .85rem; font-weight: 700; }
.poll-form > .primary { margin-top: 1.2rem; }
.errorlist { color: var(--red); }
.notice { margin-bottom: 1rem; padding: .8rem 1rem; border-left: 4px solid var(--blue); background: #dceaf5; }
.notice.success { border-color: var(--teal); background: #d9eee9; }
.notice.error { border-color: var(--red); background: #f6dede; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .7rem .75rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead { background: #263238; color: white; }
tbody tr:last-child > * { border-bottom: 0; }
details summary { color: var(--teal-dark); cursor: pointer; font-weight: 700; }
.ranking { columns: 2; padding-left: 1.5rem; }
.ranking li { margin-bottom: .45rem; break-inside: avoid; }
.tie { color: #704400; background: #ffe3a8; }
.state { color: white; background: var(--teal); }
.empty { margin: 2rem 0; padding: 1.5rem; border: 1px solid var(--line); border-left: 5px solid var(--amber); background: white; }
.admin-actions { display: flex; align-items: start; gap: 2rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.new-round { display: grid; grid-template-columns: 1fr 1fr auto; gap: .75rem; align-items: end; }
.new-round p { margin: 0; }
input[type="text"] { width: 100%; padding: .65rem; border: 1px solid #aeb9b6; border-radius: 3px; font: inherit; }
@media (max-width: 760px) {
  .topbar, .page-heading, .admin-actions { align-items: stretch; flex-direction: column; }
  .topbar { padding: .8rem 4vw; }
  nav { flex-wrap: wrap; gap: .8rem 1rem; }
  .page { margin-top: 1.4rem; }
  .identity { padding: .75rem 0 0; border-left: 0; border-top: 2px solid var(--teal); }
  .status-options ul { grid-template-columns: 1fr 1fr; }
  .time-options { align-items: stretch; flex-direction: column; }
  .ranking { columns: 1; }
  .new-round { grid-template-columns: 1fr; width: 100%; }
}