/* Oregon Wage Tools — single stylesheet, no framework, no build step. */

:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1e222b;
  --border: #2a2f3a;
  --text: #e8eaed;
  --text-dim: #a1a8b3;
  --accent: #4a9d5f;
  --accent-hover: #57b06d;
  --accent-dim: #1f3d29;
  --warn: #d98b2b;
  --radius: 10px;
  --maxw: 820px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --surface-2: #f0f2f5;
    --border: #d8dce3;
    --text: #1a1d23;
    --text-dim: #5c636e;
    --accent: #2f7d45;
    --accent-hover: #276a3a;
    --accent-dim: #e3f1e7;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 650; font-size: 1.02rem;
  color: var(--text); text-decoration: none; letter-spacing: -0.01em;
}
.brand svg { display: block; }
nav.site a {
  color: var(--text-dim); text-decoration: none;
  font-size: 0.92rem; margin-left: 18px;
}
nav.site a:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero { padding: 44px 0 8px; }
.hero h1 {
  font-size: 2.05rem; line-height: 1.2; margin: 0 0 12px;
  letter-spacing: -0.02em; font-weight: 700;
}
.hero p.lede {
  font-size: 1.09rem; color: var(--text-dim); margin: 0 0 4px; max-width: 62ch;
}

/* ---------- calculator card ---------- */
.calc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 28px 0;
}
.calc h2 { margin: 0 0 4px; font-size: 1.15rem; letter-spacing: -0.01em; }
.calc .hint { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 20px; }

fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend {
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-dim); padding: 0; margin-bottom: 10px;
}

.row { display: flex; flex-wrap: wrap; gap: 14px; }
.field { flex: 1 1 190px; display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 0.88rem; color: var(--text-dim); font-weight: 500; }

input[type="number"], input[type="text"], select {
  width: 100%;
  padding: 10px 12px;
  font: inherit; font-size: 0.98rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  appearance: none;
}
input[type="number"]:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

/* day grid */
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day { display: flex; flex-direction: column; gap: 4px; }
.day label {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-dim); text-align: center; font-weight: 600;
}
.day input { text-align: center; padding: 9px 4px; }
.day.weekend label { color: var(--warn); }

@media (max-width: 620px) {
  .days { grid-template-columns: repeat(4, 1fr); }
}

button.go {
  width: 100%;
  padding: 13px 20px;
  font: inherit; font-weight: 620; font-size: 1rem;
  color: #fff; background: var(--accent);
  border: 0; border-radius: 8px; cursor: pointer;
}
button.go:hover { background: var(--accent-hover); }
button.go:active { transform: translateY(1px); }

/* ---------- results ---------- */
.results { margin-top: 22px; display: none; }
.results.show { display: block; }

.total {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.total .label {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-dim); font-weight: 600;
}
.total .amount {
  font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; margin-top: 2px;
}

table.breakdown {
  width: 100%; border-collapse: collapse; font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
}
table.breakdown th {
  text-align: left; font-size: 0.76rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-dim);
  padding: 8px 10px; border-bottom: 1px solid var(--border);
}
table.breakdown td {
  padding: 9px 10px; border-bottom: 1px solid var(--border);
}
table.breakdown td:last-child, table.breakdown th:last-child { text-align: right; }
table.breakdown tr:last-child td { border-bottom: 0; }
table.breakdown .sub { color: var(--text-dim); font-size: 0.86rem; }

.workings {
  margin-top: 14px; padding: 14px 16px;
  background: var(--surface-2); border-radius: 8px;
  font-family: var(--mono); font-size: 0.84rem;
  color: var(--text-dim); line-height: 1.7;
  overflow-x: auto;
}

.err {
  background: #3a1e1e; border: 1px solid #7a3535; color: #f0c9c9;
  padding: 12px 14px; border-radius: 8px; font-size: 0.92rem; margin-top: 14px;
}
@media (prefers-color-scheme: light) {
  .err { background: #fdeaea; border-color: #e0a0a0; color: #7a2020; }
}

/* ---------- prose / explanatory content ---------- */
article.prose { padding: 8px 0 40px; }
article.prose h2 {
  font-size: 1.4rem; margin: 40px 0 12px;
  letter-spacing: -0.015em; scroll-margin-top: 20px;
}
article.prose h3 { font-size: 1.09rem; margin: 26px 0 8px; }
article.prose p { margin: 0 0 15px; }
article.prose ul, article.prose ol { margin: 0 0 15px; padding-left: 22px; }
article.prose li { margin-bottom: 7px; }
article.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 14px 18px; margin: 20px 0;
  border-radius: 0 8px 8px 0;
}
.callout.warn { border-left-color: var(--warn); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--text); }

.example {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin: 18px 0;
}
.example h4 { margin: 0 0 10px; font-size: 1rem; }
.example .math {
  font-family: var(--mono); font-size: 0.85rem;
  color: var(--text-dim); line-height: 1.8; white-space: pre-wrap;
}

/* ---------- FAQ ---------- */
details.faq {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
details.faq summary {
  cursor: pointer; font-weight: 570; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; color: var(--text-dim); font-size: 1.3rem;
  font-weight: 400; line-height: 1;
}
details.faq[open] summary::after { content: "\2013"; }
details.faq p { margin: 12px 0 0; color: var(--text-dim); }

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid var(--border);
  margin-top: 40px; padding: 26px 0 40px;
  color: var(--text-dim); font-size: 0.88rem;
}
footer.site a { color: var(--text-dim); }
footer.site .disclaimer {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px 16px; margin-bottom: 18px;
  font-size: 0.85rem; line-height: 1.6;
}

/* ---------- ad slots (reserved space, prevents layout shift) ---------- */
.ad-slot {
  margin: 28px 0; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border); border-radius: 8px;
  color: var(--text-dim); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.ad-slot:empty::after { content: "advertisement"; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
