/* Root For design system: near-white surfaces, deep green actions, clean type.
   Team colors belong to schedules and team-page headers; Root For's own
   controls always use the green below. Spacing is in multiples of 8px. */

:root {
  --bg: #FCFCF8;
  --surface: #FFFFFF;
  --cream: #F2EDE3;          /* fridge illustration and the odd supporting area only */
  --ink: #26332D;
  --ink-2: #59665F;
  --line: #E1E3DC;
  --line-strong: #869089;   /* control borders: at least 3:1 against the page */
  --green: #245747;
  --green-hover: #1B4638;
  --green-tint: #E8F0EC;
  --gold: #EBC75E;           /* small decorative details only */
  --coral: #E4572E;          /* the logo's pennant only */
  --warn: #9A3B12;
  --warn-tint: #FBEDE6;
  --ok: #245747;

  --head: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-control: 8px;
  --r-card: 12px;
  --max: 1120px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.5 var(--body); color: var(--ink); background: var(--bg); }
img { max-width: 100%; }
a { color: var(--green); text-underline-offset: 2px; }
a:hover { color: var(--green-hover); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--green-tint); }

h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.08; letter-spacing: -0.005em; margin: 0; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
p { margin: 0 0 16px; }
.muted { color: var(--ink-2); }
.small { font-size: 0.9375rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Logo: "root for!" in heavy letters; the "!" is a pennant (green pole and
   dot, coral flag). Coral appears only in the logo. */
.wordmark { display: inline-block; white-space: nowrap; font: 800 2rem/1 var(--head); letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.wordmark .for { color: var(--green); }
.wordmark .bang { display: inline-block; height: .76em; width: .61em; margin-left: .04em; vertical-align: baseline; overflow: visible; }
.wordmark:hover { color: var(--ink); }

/* Site header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .container { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.site-header nav { display: flex; gap: 24px; margin-left: auto; font-weight: 600; }
.site-header nav a { color: var(--ink); text-decoration: none; }
.site-header nav a:hover { color: var(--green); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: var(--r-control); border: 1px solid transparent; font: 600 1.0625rem/1.2 var(--body); text-decoration: none; text-align: center;
  cursor: pointer; background: var(--green); color: #fff; }
.btn:hover { background: var(--green-hover); color: #fff; }
.btn.secondary { background: var(--surface); color: var(--green); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--green); background: var(--green-tint); color: var(--green-hover); }
.btn.quiet { background: transparent; color: var(--green); border-color: transparent; padding: 0 8px; }
.btn.quiet:hover { background: var(--green-tint); }
.btn.danger { background: var(--surface); color: var(--warn); border-color: currentColor; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 1rem; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Form controls */
.field { display: grid; gap: 8px; margin: 0 0 24px; }
.field > label, .field > .label { font-weight: 600; }
.field .hint { color: var(--ink-2); font-size: 0.9375rem; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 10px 14px; font: 400 1.0625rem/1.4 var(--body); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-control); }
.input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-tint); }
.input[aria-invalid="true"] { border-color: var(--warn); }
.check { display: flex; gap: 10px; align-items: center; min-height: 40px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--green); flex: none; }
input[type=color] { width: 48px; height: 40px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); cursor: pointer; }

/* Segmented choice (e.g. provider picker) */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-control);
  background: var(--surface); font-weight: 600; }
.choice input:checked + span { border-color: var(--green); background: var(--green-tint); color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.choice input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }

/* Cards and notices */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; }
.notice { border-radius: var(--r-control); padding: 12px 16px; font-size: 1rem; }
.notice.error { background: var(--warn-tint); color: var(--warn); border: 1px solid #EFC9B6; }
.notice.info { background: var(--green-tint); color: var(--ink); }

/* Dialog */
dialog.sheet-dialog { border: 0; border-radius: var(--r-card); padding: 0; width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: 0 24px 64px rgba(38, 51, 45, .25); }
dialog.sheet-dialog::backdrop { background: rgba(38, 51, 45, .5); }
.dialog-bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dialog-bar h2 { font-size: 1.375rem; margin-right: auto; }

/* Site footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; min-height: 96px; color: var(--ink-2); font-size: 0.9375rem; }
.site-footer nav { display: flex; gap: 24px; margin-left: auto; }
.site-footer a { color: var(--ink-2); }

@media (min-width: 900px) {
  h1 { font-size: 3.75rem; }
  h2 { font-size: 2.75rem; }
}
@media (max-width: 720px) {
  .site-header nav { display: none; }
  .site-footer nav { margin-left: 0; }
}
