/* SundayArc: Field & Timber. Colors by role. Light is the default; dark swaps the values. */
:root {
  --bg: #EEF0E8; --surface: #FAF9F4; --ink: #1E2A23; --ink-soft: #3A4A40; --muted: #5A675F; --line: #CBD3C6;
  --header: #22392D; --header-ink: #F4F2E9; --header-muted: #B9C9B6;
  --arc: #9BC48A; --ground: #C9A45A; --ball: #E9E3CF;
  --pine: #2F5D45; --pine-soft: #DCE8DC; --on-pine: #F6F4EC;
  --clay: #A24E2B; --wheat: #C9A45A; --wheat-soft: #F3EAD3; --wheat-ink: #6B4E12;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #111A15; --surface: #1A251F; --ink: #E8EEE5; --ink-soft: #C3CEC4; --muted: #9AA79E; --line: #33433A;
  --header: #0B120E; --header-ink: #EEF1E8; --header-muted: #8FA597;
  --arc: #8CC47A; --ball: #EEE8D4;
  --pine: #7DB892; --pine-soft: #1F3A2C; --on-pine: #0E1712;
  --clay: #E08A63; --wheat: #B8964F; --wheat-soft: #2A2618; --wheat-ink: #E7C978;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.45 Inter, system-ui, sans-serif; }
h1, h2, h3, .num { font-family: "Space Grotesk", Inter, sans-serif; }
a { color: var(--pine); }
button, select, input { font: inherit; color: inherit; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 20px 32px; }

header.top { background: var(--header); color: var(--header-ink); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -0.3px; }
.brand h1 span { color: var(--arc); }
.beta { font-size: 11px; font-weight: 600; border: 1px solid var(--header-muted); color: var(--header-muted); border-radius: 4px; padding: 1px 5px; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--header-muted); background: transparent; color: var(--header-ink); display: grid; place-items: center; cursor: pointer; }

.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 16px 0; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
select { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 0 10px; font-weight: 600; font-size: 14px; text-transform: none; letter-spacing: 0; }

h2 { margin: 0 0 10px; font-size: 19px; font-weight: 600; }
.states { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.state { min-height: 56px; text-align: left; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; }
.state small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.state[aria-pressed="true"] { border: 2px solid var(--pine); background: var(--pine-soft); font-weight: 700; }
.state[aria-pressed="true"] small { color: var(--ink-soft); }

.side { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.side h3 { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; font-family: Inter, sans-serif; }
.side.give h3 { color: var(--clay); }
.side.get h3 { color: var(--pine); }
.asset { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.asset .who { font-weight: 700; }
.asset .meta { font-size: 13px; color: var(--muted); }
.asset .num { font-weight: 700; font-size: 19px; }
.asset .remove { width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; }
.search { position: relative; margin-top: 10px; }
.search input { width: 100%; min-height: 44px; border-radius: 10px; border: 1px dashed var(--line); background: transparent; padding: 0 12px; font-size: 15px; }
.results { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.results button { width: 100%; min-height: 44px; display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.results li:last-child button { border-bottom: 0; }
.results button:hover, .results button:focus-visible { background: var(--pine-soft); }

.card { border-radius: 14px; padding: 16px; margin-top: 12px; }
.card .kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 6px; }
.card .big { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 24px; line-height: 1.1; }
.market { background: var(--surface); border: 1px solid var(--line); }
.market .kicker { color: var(--muted); }
.bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; margin-top: 12px; }
.bar .g { background: var(--clay); } .bar .t { background: var(--pine); }
.bar-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.headline { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 22px; line-height: 1.25; margin: 22px 0 0; }
.market.compact { padding: 12px 16px; }
.market.compact .row { margin-top: 0; align-items: center; }
.market.compact .kicker { margin-right: 4px; }
.worth { font-size: 14px; font-weight: 600; margin-top: 4px; opacity: 0.95; }
.fit { background: var(--pine); color: var(--on-pine); }
.fit.poor { background: var(--clay); color: #FFF8F2; }
:root[data-theme="dark"] .fit.poor { color: #1A0F0A; }
.fit ul { margin: 12px 0 0; padding-left: 18px; font-size: 14px; }
.fit .other { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid currentColor; font-size: 13px; opacity: 0.92; }
.tip { background: var(--wheat-soft); border: 1px solid var(--wheat); }
.tip h3 { margin: 0; font-size: 15px; color: var(--wheat-ink); font-family: Inter, sans-serif; }
.tip p { margin: 8px 0 0; font-size: 14px; }
.tip .field { flex-direction: row; align-items: center; justify-content: space-between; margin-top: 12px; color: var(--ink-soft); }
.empty { color: var(--muted); font-size: 14px; text-align: center; padding: 18px 0 4px; }

.primary { width: 100%; min-height: 52px; border-radius: 12px; border: 0; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 16px; margin-top: 16px; cursor: pointer; }
footer { color: var(--muted); font-size: 12px; padding: 28px 0 8px; }
footer p { margin: 0 0 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--wheat); outline-offset: 2px; }
