/* Well Run Water, design scheme "Tide" (adopted 2026-09-01; tokens in the
   orchestrator repo's design-scheme.md). A deep water band carries the
   logo and navigation, aqua does the acting, the ground is a pale aqua so
   white tables read as the working surface. Public Sans throughout,
   self-hosted. Radius 4, hairline rules, no shadows, no icons but the
   check mark and the logo. Status is a word first and a color second. */

@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/public-sans-latin-v6s8R01.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/public-sans-latin-ext-WUY0g-4.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --ground: #eef5f7;
    --card: #ffffff;
    --tint: #e3f2f5;
    --group: #d5e8ee;
    --recessed: #f3f8f9;
    --deep: #163b47;
    --aqua: #1c8aa3;
    --aqua-dark: #146d81;
    --aqua-bright: #2aa7c1;
    --ink: #12303a;
    --ink-muted: #4a6570;
    --ink-faint: #8aa0a8;
    --border: #9fbfc8;
    --rule: #cfe0e5;
    --rule-light: #e2edf0;
    --band-text: #b9dfe7;
    --overdue: #b42318;
    --overdue-tint: #fbe9e7;
    --done: #2f7a4b;
    --done-tint: #e9f1ec;
    --attention: #7a5200;
    --font: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --page: 1200px;
    --gutter: 40px;
    --radius: 4px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--aqua); }
a:hover { color: var(--aqua-dark); }
:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 28px; letter-spacing: -0.02em; margin: 26px 0 8px; }
h2 { font-size: 20px; margin: 28px 0 10px; }
h3 { font-size: 15px; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 22px; }
li { margin-bottom: 6px; }
small, .small { font-size: 13px; }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.over { color: var(--overdue); }
.done { color: var(--done); }
.warn { color: var(--attention); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: lining-nums tabular-nums; }
.prose { max-width: 760px; font-size: 16px; }
.prose p { margin-bottom: 14px; }
.prose h2 { margin-top: 32px; }
.prose h3 { font-size: 17px; margin-top: 26px; scroll-margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; }

/* Page frame */
.page { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter) 48px; }
.narrow { max-width: 760px; }
.band { background: var(--deep); color: #fff; }
.band .in { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.band a { color: var(--band-text); text-decoration: none; font-weight: 600; font-size: 14px; }
.band a:hover { color: #fff; }
.band .logo { display: inline-flex; align-items: center; gap: 9px; color: #fff; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.band .logo svg { width: 26px; height: 26px; flex: none; }
.band .logo .staff { font-weight: 400; color: var(--band-text); }
.band nav { display: flex; gap: 24px; align-items: center; }
.band nav a.on { color: #fff; border-bottom: 2px solid var(--aqua-bright); padding: 4px 0; }
.band .who { font-size: 14px; color: var(--band-text); }
.band nav.pub { gap: 22px; }
.band .outline { border: 1px solid var(--band-text); border-radius: var(--radius); padding: 6px 12px; }
.band nav a.cta { background: var(--aqua); color: #fff; border: 1px solid var(--aqua); border-radius: var(--radius); padding: 6px 12px; }
.band nav a.cta:hover { background: var(--aqua-dark); border-color: var(--aqua-dark); color: #fff; }
.sub { background: var(--tint); border-bottom: 1px solid var(--rule); }
.sub .in { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--ink-muted); flex-wrap: wrap; }
.sub a { font-weight: 600; }
.foot { max-width: var(--page); margin: 36px auto 0; padding: 12px var(--gutter) 40px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--ink-muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--ink-muted); }

/* Flash and banners */
.flash { border: 1px solid var(--rule); border-left: 4px solid var(--aqua); border-radius: var(--radius); background: var(--card); padding: 12px 16px; margin: 16px 0; }
.flash.error { border-left-color: var(--overdue); }
.flash.success { border-left-color: var(--done); }
.banner { border: 1px solid var(--rule); border-left: 4px solid var(--aqua); border-radius: var(--radius); background: var(--card); padding: 12px 16px; margin-top: 18px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.over { border-left-color: var(--overdue); }
.panel { border: 1px solid var(--rule); border-left: 4px solid var(--aqua); border-radius: var(--radius); background: var(--card); padding: 16px 18px; margin: 4px 0; }
.box { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); padding: 16px 18px; }
.well { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--recessed); padding: 16px 18px; }
.lock { border: 1px solid var(--rule); border-left: 4px solid var(--aqua); border-radius: var(--radius); background: var(--card); padding: 12px 16px; margin: 10px 0 0; display: flex; gap: 16px; align-items: center; justify-content: space-between; font-size: 13px; flex-wrap: wrap; }

/* Buttons and controls */
.btn, button.btn { display: inline-block; font-family: inherit; font-size: 15px; line-height: 20px; padding: 10px 16px; background: var(--aqua); color: #fff; border: 1px solid var(--aqua); border-radius: var(--radius); text-decoration: none; cursor: pointer; font-weight: 600; }
.btn:hover { background: var(--aqua-dark); border-color: var(--aqua-dark); color: #fff; }
.btn2, button.btn2 { display: inline-block; font-family: inherit; font-size: 15px; line-height: 20px; padding: 10px 16px; background: var(--card); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; cursor: pointer; font-weight: 600; }
.btn2:hover { border-color: var(--aqua); color: var(--ink); }
.btn.sm, .btn2.sm { font-size: 13px; line-height: 18px; padding: 6px 12px; }
.btn.danger { background: var(--overdue); border-color: var(--overdue); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--aqua); cursor: pointer; text-decoration: underline; }
.linkbtn:hover { color: var(--aqua-dark); }
.tabs { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 13px; font-weight: 600; background: var(--card); }
.tabs a, .tabs span { padding: 7px 14px; color: var(--ink-muted); text-decoration: none; }
.tabs .on { background: var(--deep); color: #fff; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
    font-family: inherit; font-size: 15px; line-height: 20px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--ink); width: 100%; max-width: 420px;
}
textarea { min-height: 88px; resize: vertical; }
input[readonly] { background: var(--tint); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, label.lbl { font-size: 13px; font-weight: 600; }
.field .help { font-size: 13px; color: var(--ink-muted); }
.field.error input, .field.error select, .field.error textarea { border-color: var(--overdue); }
.field .err { color: var(--overdue); font-size: 13px; }
.choices { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.choices label { display: flex; gap: 8px; align-items: center; font-size: 15px; font-weight: 400; }
input[type=checkbox], input[type=radio] { accent-color: var(--aqua); width: 16px; height: 16px; margin: 0; }
.inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline .field { margin-bottom: 0; }
.w-160 { width: 160px; } .w-200 { width: 200px; } .w-240 { width: 240px; } .w-300 { width: 300px; }

/* Tables */
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; font-variant-numeric: lining-nums tabular-nums; }
th, td { border-bottom: 1px solid var(--rule-light); padding: 8px 12px; text-align: left; vertical-align: top; }
tr:last-child > td { border-bottom: 0; }
th { background: var(--tint); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); }
th.g, tr.g > th { background: var(--group); color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 13px; }
tr.sel > td { background: var(--tint); }
tr.veil > td { filter: blur(4px); color: var(--ink-faint); user-select: none; }
.tablewrap { overflow-x: auto; }
.notes { margin-top: 6px; font-size: 13px; }
.notes .n { padding: 4px 0 0 12px; border-left: 2px solid var(--border); margin-top: 4px; }
.kv th { width: 220px; }

/* Stat strip */
.stat { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.stat div { padding: 10px 18px; border-right: 1px solid var(--rule); }
.stat div:last-child { border-right: 0; }
.stat .n { font-size: 24px; line-height: 1.1; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.stat .l { font-size: 12px; color: var(--ink-muted); }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.cal .hd { background: var(--tint); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); padding: 6px 8px; border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule-light); }
.cal .d { min-height: 118px; padding: 6px 8px; font-size: 13px; border-right: 1px solid var(--rule-light); border-bottom: 1px solid var(--rule-light); display: flex; flex-direction: column; gap: 4px; }
.cal .d .n { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.cal .om { background: var(--recessed); color: var(--ink-faint); }
.cal .today { background: var(--tint); box-shadow: inset 0 0 0 2px var(--aqua); }
.cal .today .n { color: var(--aqua); }
.cal .t { line-height: 1.3; padding-left: 8px; border-left: 2px solid var(--aqua); color: inherit; text-decoration: none; display: block; }
.cal .t:hover { text-decoration: underline; }
.cal .t.over { border-color: var(--overdue); color: var(--overdue); }
.cal .t.done { border-color: var(--done); color: var(--done); }
.cal .t.skipped { border-color: var(--border); color: var(--ink-faint); }

/* Sign-in and other single-form pages */
.auth-page { display: flex; flex-direction: column; align-items: center; }
.auth { width: 100%; max-width: 420px; margin: 40px auto 0; }
.auth .mark { display: flex; justify-content: center; margin-bottom: 14px; }
.auth .mark svg { width: 48px; height: 48px; }
.auth h1 { text-align: center; margin: 0 0 6px; }
.auth .lead { text-align: center; margin-bottom: 22px; }
.auth .box { padding: 22px 24px 20px; }
.auth input[type=email], .auth input[type=password] { max-width: 100%; }
.btn.wide { display: block; width: 100%; text-align: center; margin-top: 4px; }
.auth .flash { margin: 0 0 16px; }

/* This month at a glance */
.glance { display: flex; flex-direction: column; gap: 8px; max-width: 900px; }
.glance section h2 { margin: 18px 0 8px; }
.glance table { font-size: 15px; }
.glance td { padding: 10px 12px; }
tr[id] { scroll-margin-top: 16px; }

/* Marketing */
.hero { padding: 48px 0 8px; max-width: 800px; }
.hero h1 { font-size: 36px; margin: 0 0 14px; }
.hero p { font-size: 18px; color: var(--ink-muted); }
.hero .row { margin-top: 20px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 24px 0; }
.cards .box h3 { margin-top: 0; }
.cards .box p { margin-bottom: 0; font-size: 14px; color: var(--ink-muted); }
.lede { font-size: 17px; }
.mark-lg { width: 96px; height: 96px; }

@media (max-width: 900px) {
    :root { --gutter: 20px; }
    .band .in { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
    .band nav { gap: 14px; flex-wrap: wrap; }
    .cards { grid-template-columns: 1fr; }
    .cal .d { min-height: 72px; font-size: 12px; }
    .hero h1 { font-size: 28px; }
    input[type=text], input[type=email], input[type=password], select, textarea { max-width: 100%; }
}
@media print {
    .band, .sub, .foot, .noprint { display: none !important; }
    body { background: #fff; }
    table { border-color: #999; }
}
