/* Shared visual contract. Feature styles own layouts; these tokens own the basics. */
:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  --ink: #1b3028;
  --muted: #5d7066;
  --line: #dce5df;
  --green: #17664e;
  --green2: #e7f2ec;
  --teal: #17664e;
  --paper: #f5f8f6;
  --white: #fff;
  --red: #a2352e;
  --radius: 12px;
  --shadow: 0 4px 20px #173b2610;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
}
* { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--green); text-underline-offset: 3px; }
input, select, textarea {
  width: 100%; min-width: 0; min-height: 44px;
  padding: 10px 12px; border: 1px solid #bacbc0; border-radius: 9px;
  color: var(--ink); background: #fff; font-size: 16px; font-weight: 400;
}
textarea { line-height: 1.6; resize: vertical; }
label { font-size: 14px; line-height: 1.5; font-weight: 650; }
input[type=checkbox], input[type=radio] {
  accent-color: var(--green); width: 20px; height: 20px; min-height: 20px;
  flex: 0 0 20px; padding: 0;
}
:is(button, a, summary, input, select, textarea):focus-visible {
  outline: 3px solid #7ab99e; outline-offset: 3px;
}
input[aria-invalid=true], textarea[aria-invalid=true], select[aria-invalid=true] { border-color: var(--red); }
.primary, .secondary, .danger, .ghost {
  min-height: 44px; padding: 10px 16px; border-radius: 9px;
  font-size: 15px; font-weight: 650; line-height: 1.4;
}
.primary { background: var(--green); color: #fff; border: 1px solid var(--green); }
.primary:hover { background: #10553f; }
.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.secondary:hover { background: #f0f6f2; }
.danger { color: #962e27; background: #fff; border: 1px solid #e4b9b5; }
.ghost { background: transparent; color: var(--green); border: 1px solid var(--line); }
.muted, .hint, .field-hint { color: var(--muted); }
.hint, .field-hint, small { font-size: 14px; line-height: 1.5; }
h1, h2, h3 { line-height: 1.3; overflow-wrap: anywhere; }
h1 { font-size: 28px; letter-spacing: -.025em; }
h2 { font-size: 21px; letter-spacing: -.015em; }
h3 { font-size: 18px; }
.status { font-size: 13px; font-weight: 650; line-height: 1.5; }
.error { color: var(--red); background: #fff2f0; border: 1px solid #ecc6c1; border-radius: 9px; padding: 12px 14px; }
.sr-only { position: absolute; width: 1px !important; height: 1px !important; min-height: 1px !important; padding: 0 !important; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
dialog { color: var(--ink); max-width: calc(100vw - 24px); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 80px #122b2530; }
dialog::backdrop { background: #172e265c; backdrop-filter: blur(2px); }
dialog:not([open]) { display: none; }
dialog.viewport-dialog { max-height: calc(var(--visual-height, 100dvh) - 24px); }
body:has(dialog[open]:not(.filter-sheet)) { overflow: hidden; }
.ui-dialog-head { flex: none; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.ui-dialog-head h2, .ui-dialog-head h3 { margin: 0 0 6px; }
.ui-dialog-head p { margin: 6px 0 0; font-size: 14px; }
.ui-dialog-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 20px 24px; }
.ui-dialog-footer { flex: none; padding: 14px 24px; border-top: 1px solid var(--line); background: #fff; display: flex; align-items: center; gap: 10px; }
@media (max-width: 670px) {
  h1 { font-size: 25px; } h2 { font-size: 20px; }
  .ui-dialog-head, .ui-dialog-body { padding: 16px; }
  .ui-dialog-footer { padding: 12px 16px; }
  .primary, .secondary, .danger, .ghost { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
