:root {
  color-scheme: light;
  --ink: #172e3c;
  --muted: #536c77;
  --teal: #075c58;
  --line: #d9e4e7;
  --surface: #fff;
  --shadow: 0 8px 28px rgb(19 48 57 / 6%);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f1f6f6; color: var(--ink); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.05rem, 4vw, 3.25rem); letter-spacing: -.057em; line-height: 1.08; }
h2 { font-size: 1.2rem; letter-spacing: -.025em; }
p, small { color: var(--muted); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #15a298; outline-offset: 3px; }
.icon { width: 1.18em; height: 1.18em; flex: none; vertical-align: middle; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 246px minmax(0, 1fr); }
.rail { position: sticky; top: 0; height: 100dvh; padding: 25px 17px; display: flex; flex-direction: column; gap: 28px; background: #10293a; color: #f1f8fa; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px; font-weight: 750; letter-spacing: -.02em; }
.brand > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: #073e3d; background: #95e1cc; font-size: 21px; }
.rail small { display: block; color: #adc1cd; font-size: .77rem; font-weight: 500; }
.rail nav { display: grid; gap: 5px; }
.rail nav a { display: flex; gap: 11px; align-items: center; min-height: 44px; padding: 10px 12px; color: #c1d3dd; border-radius: 11px; }
.rail nav a:hover, .rail nav a[aria-current] { background: #214655; color: #fff; }
.rail nav a[aria-current] .icon { color: #98e4d1; }
.identity { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 17px 7px 0; border-top: 1px solid #365362; margin-top: auto; }
.identity strong { overflow-wrap: anywhere; }
.sign-out { display: grid; place-items: center; width: 39px; height: 39px; color: inherit; background: #214655; border: 0; border-radius: 10px; }
.main { width: min(100%, 1220px); padding: 27px clamp(16px, 4vw, 60px) 44px; margin-inline: auto; }
.workspace { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 750; color: var(--muted); margin-bottom: 18px; }
.online { width: 8px; height: 8px; background: #148977; border-radius: 50%; box-shadow: 0 0 0 4px #d2eae2; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(24px, 4vw, 44px); margin-bottom: 20px; border-radius: 24px; background: linear-gradient(120deg, #123248, #126462); color: #fff; }
.hero::before { content: ""; z-index: -1; position: absolute; width: 320px; height: 320px; right: -85px; top: -165px; border: 1px solid #9bf1db60; border-radius: 50%; box-shadow: 0 0 0 36px #9bf1db19, 0 0 0 72px #9bf1db12, 0 0 0 108px #9bf1db0a; pointer-events: none; }
.hero p { color: #e0f3ef; margin-top: 9px; max-width: 52ch; }
.eyebrow { margin-bottom: 9px; text-transform: uppercase; letter-spacing: .125em; font-size: .72rem; font-weight: 800; color: var(--teal); }
.hero .eyebrow { color: #a5eddb; }
.hero-symbol { font-size: 3.6rem; color: #a5eddb; }
.heading { margin-bottom: 20px; }
.heading p { margin-top: 8px; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 18px; padding: 21px; min-width: 0; }
.person { display: block; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.person:hover { transform: translateY(-3px); border-color: #82bcb2; box-shadow: 0 12px 28px rgb(19 48 57 / 11%); }
.person-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; color: var(--teal); }
.avatar, .glyph { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px; background: #dbf2ea; color: #075c58; font-weight: 800; }
.avatar.large { width: 72px; height: 72px; border-radius: 23px; font-size: 1.65rem; }
.person h2, .hero h1 { overflow-wrap: anywhere; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 9px; color: #07514e; background: #def3ec; font-size: .75rem; font-weight: 720; }
.pill.neutral { color: #3d5b68; background: #edf3f5; }
.pill.warm { color: #784700; background: #fff0cb; }
.profile-hero { justify-content: flex-start; }
.preview-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 16px; font-size: .85rem; }
.preview-nav span { margin-right: 5px; color: var(--muted); }
.preview-nav a { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.preview-nav a[aria-current] { color: #fff; background: var(--teal); border-color: var(--teal); }
.flash { display: flex; align-items: center; gap: 9px; background: #e1f1f6; border: 1px solid #c8e5ed; border-radius: 13px; padding: 11px 14px; margin-bottom: 15px; }
.flash.success { color: #075c45; background: #e0f5ec; border-color: #b3e4d1; animation: enter .24s ease-out both; }
.flash.error, .flash.attention { color: #754400; background: #fff5dc; border-color: #efdcaa; }
.profile-form { display: grid; gap: 14px; }
.card-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.field-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; align-content: start; gap: 8px; }
.field-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.field-heading label, .field-heading strong { font-weight: 700; }
.read-value { min-height: 42px; padding: 9px 12px; background: #f3f7f8; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.checks, .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.check-option, .confirm { display: flex; align-items: center; gap: 7px; font-size: .9rem; }
.check-option { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; width: fit-content; }
.confirm { color: var(--teal); }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; color: var(--ink); padding: 9px 11px; border: 1px solid #c9d9dd; border-radius: 10px; min-height: 42px; background: #fff; }
textarea { resize: vertical; }
input[type=checkbox] { accent-color: var(--teal); width: 17px; height: 17px; flex: none; margin: 0; }
.savebar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 10px 0; }
.savebar span { color: var(--muted); font-size: .88rem; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border: 1px solid transparent; border-radius: 11px; font-weight: 720; transition: background .16s ease, transform .16s ease; }
.button:hover { transform: translateY(-1px); }
.primary { background: var(--teal); color: #fff; }
.primary:hover { background: #074a47; }
.hero-button { flex-shrink: 0; background: #d2f5e9; color: #103e3a; }
.hero-button:hover { background: #f1fff8; }
.secondary { background: #fff; border-color: var(--line); }
.policy-card { padding-block: 8px; }
.policy-row { display: grid; grid-template-columns: 1fr 1.15fr .7fr; gap: 13px; align-items: center; padding: 12px 0; }
.policy-row + .policy-row { border-top: 1px solid var(--line); }
.policy-row small { display: block; }
.policy-head { font-size: .78rem; font-weight: 750; color: var(--muted); }
.stack { display: grid; gap: 14px; }
.stack label { display: grid; gap: 5px; font-weight: 650; }
.narrow { max-width: 610px; }
.login-layout { min-height: 100dvh; display: grid; place-items: center; padding: 19px; background: radial-gradient(ellipse at 78% 18%, #25817a, #10293a 60%); }
.login-card { width: min(100%, 440px); border-radius: 25px; padding: clamp(24px, 6vw, 37px); background: #fff; box-shadow: 0 18px 60px rgb(8 30 35 / 30%); }
.login-card p { margin: 8px 0 24px; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 21px; }
.login-brand .eyebrow { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero, .login-card { animation: enter .3s ease-out both; }
@keyframes enter { from { opacity: .25; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; padding: 10px 12px; gap: 9px; }
  .rail nav { display: flex; flex-wrap: wrap; grid-row: 2; grid-column: 1 / -1; }
  .rail nav a { min-height: 37px; padding: 7px 8px; font-size: .81rem; gap: 5px; }
  .rail { display: grid; grid-template-columns: 1fr auto; }
  .identity { margin: 0; border: 0; padding: 0; }
  .identity > div { display: none; }
  .main { padding: 19px 14px 28px; }
  .hero { align-items: flex-start; border-radius: 19px; }
  .hero:not(.profile-hero) { flex-direction: column; }
  .hero-symbol { display: none; }
  .field-list { grid-template-columns: 1fr; }
  .policy-head { display: none; }
  .policy-row:not(.policy-head) { grid-template-columns: 1fr; }
  .policy-row:first-of-type { border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button:hover, .person:hover { transform: none; }
}

.budgets, .settings-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.budget { display: grid; gap: 3px; }
.budget > span { font-weight: 700; }
.budget > strong { color: var(--teal); font-size: 1.45rem; }
.budget small { font-weight: 550; font-size: .8rem; }
.results { margin-bottom: 16px; }
.result-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.result-row > :first-child { flex: 1 1 220px; }
.result-row small { display: block; }
.week-tabs, .steps, .round-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 13px; }
.week-tabs button[aria-pressed=true] { background: var(--teal); color: #fff; }
.week { margin-bottom: 12px; }
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.day { display: grid; align-content: start; gap: 7px; min-width: 0; background: #f3f8f8; border: 1px solid var(--line); border-radius: 11px; padding: 8px; }
.day-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.day-head strong { color: var(--ink); font-size: 1.15rem; }
.day label { font-size: .77rem; color: var(--muted); }
.day select { padding-inline: 4px; min-height: 36px; }
.day .pill { width: fit-content; }
.wish-actions { margin-top: 8px; }
.button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.spinner { width: 18px; height: 18px; flex: none; border: 2px solid #8bbabf; border-top-color: var(--teal); border-radius: 100%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.roster-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.roster { border-collapse: separate; border-spacing: 0; font-size: .78rem; white-space: nowrap; }
.roster th, .roster td { padding: 7px; text-align: center; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.roster th { background: #eaf4f3; }
.roster tbody th { position: sticky; left: 0; text-align: left; }
.config-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.settings-title { margin: 22px 0 10px; }
@media (max-width: 1130px) { .week-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .week-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
  .budget { padding: 10px; font-size: .86rem; }
  .budget small { font-size: .72rem; }
  .week-tabs .button { min-height: 36px; padding: 5px 9px; }
}
