:root {
  color-scheme: light;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  --paper: #f4f7f6;
  --surface: #fff;
  --ink: #152c2a;
  --muted: #4c6562;
  --deep: #092f2c;
  --teal: #146456;
  --mint: #c6ecdc;
  --line: #d4e1dd;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
p { overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.2; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.8rem, 3vw, 2.65rem); letter-spacing: -.045em; }
h2 { font-size: 1.25rem; letter-spacing: -.02em; }
h3 { font-size: 1rem; }
a { color: var(--teal); text-underline-offset: .22em; }
button, input, textarea, select { font: inherit; }
button, summary { cursor: pointer; }
button {
  padding: .58rem 1rem;
  border: 1px solid var(--teal);
  border-radius: .5rem;
  color: white;
  background: var(--teal);
  font-weight: 650;
  justify-self: start;
}
button:hover { background: var(--deep); }
button.secondary { color: var(--teal); background: white; border-color: var(--line); }
button.secondary:hover { background: var(--paper); }
button:disabled { opacity: .65; }
:focus-visible { outline: 3px solid #168276; outline-offset: 3px; }
label { display: grid; gap: .3rem; color: var(--ink); font-weight: 600; }
input:not([type=hidden]), select, textarea {
  padding: .55rem .7rem;
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: white;
  border: 1px solid #9fb6b0;
  border-radius: .45rem;
}
textarea { resize: vertical; }
.stack { display: grid; gap: .85rem; max-width: 36rem; }
.muted, small, .empty { color: var(--muted); }
.kicker, .eyebrow, .portal-tag {
  font-size: .73rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.eyebrow, .kicker { color: var(--teal); }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: white; text-decoration: none; font-size: 1.15rem; line-height: 1; font-weight: 720; }
.brand small { display: block; margin-top: .28rem; color: #cce9df; font-size: .56rem; letter-spacing: .21em; }
.monogram { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .65rem; background: var(--mint); color: var(--deep); font: 700 1.38rem Georgia, serif; }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); }
.auth-intro { display: grid; align-content: space-between; gap: 3rem; padding: clamp(2rem, 6vw, 6rem); background: radial-gradient(ellipse at bottom right, #245c48, var(--deep) 72%); color: white; }
.auth-intro h1 { font-size: clamp(2.6rem, 6vw, 5.5rem); letter-spacing: -.075em; margin-block: .5rem 1rem; line-height: 1.03; }
.auth-intro p { max-width: 27rem; color: #deeee7; }
.auth-intro .kicker, .auth-back { color: var(--mint); }
.auth-main { display: grid; place-items: center; padding: clamp(1.25rem, 4vw, 4rem); }
.auth-card { width: min(100%, 29rem); background: white; padding: clamp(1.35rem, 4vw, 2.5rem); border: 1px solid var(--line); border-radius: 1.15rem; }
.auth-card h2 { font-size: 2rem; margin-top: .3rem; }
.auth-card p { margin: .65rem 0 1.2rem; }
.warning { color: #842b1e; }
.space { margin-top: 1rem; }
.shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; gap: 1rem; padding: 1.75rem 1.15rem; background: var(--deep); color: #e4f4ed; }
.portal-tag { margin-top: .9rem; color: #a4c7bf; }
.sidebar nav { display: grid; gap: .28rem; }
.sidebar nav a { display: flex; align-items: center; gap: .7rem; padding: .62rem .7rem; color: #e4f4ed; border-radius: .5rem; font-size: .92rem; font-weight: 560; text-decoration: none; }
.sidebar nav a span { width: 1.1rem; text-align: center; color: var(--mint); }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: #1b514a; color: white; }
.sidebar a:focus-visible, .auth-intro a:focus-visible { outline-color: var(--mint); }
.sidebar-bottom { margin-top: auto; padding-top: 1.2rem; }
.sidebar-bottom a { color: var(--mint); font-size: .88rem; }
.main { min-width: 0; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.45rem clamp(1.1rem, 4vw, 3.4rem); border-bottom: 1px solid var(--line); background: white; }
.topbar .eyebrow { margin-bottom: .28rem; }
.account { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; font-size: .875rem; }
.account span { font-weight: 650; }
.account button { padding: .35rem .6rem; }
.content { max-width: 84rem; margin-inline: auto; padding: clamp(1.1rem, 4vw, 3.4rem); display: grid; gap: 1.1rem; }
.welcome { padding: clamp(1.35rem, 4vw, 2.5rem); border-radius: 1rem; background: linear-gradient(115deg, var(--deep), #1b6356); color: white; }
.welcome h2 { margin: .35rem 0 .65rem; font-size: clamp(1.65rem, 4vw, 2.6rem); }
.welcome p { max-width: 34rem; color: #e1f2eb; }
.welcome .kicker { color: var(--mint); }
.stats, .overview-grid, .workspace-list { display: grid; gap: 1rem; }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-grid, .workspace-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { min-width: 0; padding: clamp(1rem, 2vw, 1.55rem); background: white; border: 1px solid var(--line); border-radius: .85rem; }
.panel > * + * { margin-top: .85rem; }
.stat { display: flex; flex-direction: column; gap: .3rem; color: var(--ink); text-decoration: none; }
.stat > * { margin: 0; }
.stat:hover, .workspace-card:hover { border-color: var(--teal); }
.stat > span { font-size: .9rem; color: var(--muted); font-weight: 600; }
.stat strong { font-size: 1.85rem; line-height: 1.25; }
.stat strong.appointment-stat { font-size: 1.25rem; }
.stat progress { accent-color: var(--teal); width: 100%; }
.stat small { margin-top: auto; padding-top: .3rem; }
.workspace-card { color: var(--ink); text-decoration: none; }
.workspace-card > span:last-child { display: block; color: var(--teal); }
.entry { border-top: 1px solid var(--line); padding: .85rem 0 .1rem; }
.entry > * + * { margin-top: .65rem; }
.entry header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .55rem; }
.entry header h3 { margin-top: .2rem; }
.pill { display: inline-block; padding: .19rem .55rem; border-radius: 2rem; background: #edf2f1; color: #385852; font-size: .77rem; font-weight: 700; }
.pill.done { color: #185540; background: #dbf1e4; }
.preserve { white-space: pre-wrap; }
summary { color: var(--teal); font-weight: 650; }
details[open] > summary { margin-bottom: .7rem; }
.create { padding: .85rem; background: var(--paper); border-radius: .55rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.files, .updates { padding-left: 0; list-style: none; }
.files li, .updates li { display: flex; justify-content: space-between; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.files a { overflow-wrap: anywhere; }
.files small, .updates small { flex: 0 0 auto; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: .55rem .75rem; border-bottom: 1px solid var(--line); text-align: left; }
thead, tfoot { background: var(--paper); }
tfoot { font-weight: 700; }
.cost-edit { display: grid; gap: .55rem; }
.upload-status:empty { display: none; }
.error-page { max-width: 44rem; margin: 3rem auto; padding: 1rem; }
.error-page a { display: inline-block; margin-top: 1rem; }
.skip { position: absolute; top: -10rem; padding: .6rem; background: white; }
.skip:focus { top: .6rem; left: .6rem; z-index: 1; }
@media (max-width: 970px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding: 1rem clamp(1.1rem, 4vw, 3.4rem); gap: .7rem; }
  .sidebar nav { grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr)); }
  .portal-tag { display: none; }
  .sidebar-bottom { padding: 0; }
}
@media (max-width: 620px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-intro { gap: 1.4rem; padding: 1.25rem; }
  .auth-intro h1 { font-size: 2.6rem; }
  .stats, .overview-grid, .workspace-list { grid-template-columns: minmax(0, 1fr); }
  .files li, .updates li { flex-wrap: wrap; }
}
