/* tokens.css — the specification-bench identity for epoxyfloorcostcalculator.com.
   Olive rules, warm paper, material swatch marks, cure-stage cards. Namespace: cs-.

   FILENAME NOTE: tools/checks/check-contrast.mjs reads sites/<domain>/styles/tokens.css by
   path, and the token names it resolves are --ink, --paper, --card, --wash and --primary.
   This file is therefore named tokens.css and uses those names, so the contrast gate is
   validating the stylesheet the site actually serves. A prettier private filename would
   have left the checker inspecting an orphan file and reporting OK for the wrong reason. */

:root {
  --paper: #f7f5f1;
  --card: #ffffff;
  --ink: #1f1d19;
  --muted: #55504a;
  --primary: #3d4327;
  --primary-deep: #2b301b;
  --accent: #7a3d1c;
  --wash: #e8e3d8;
  --line: #c9c2b4;
  --warn-bg: #fbf3e4;
  --warn-line: #a8712a;
  --refuse-bg: #f2eef7;
  --refuse-line: #5a4a7a;
}

* {
  box-sizing: border-box;
}
html {
  color-scheme: light;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.7 Verdana, Geneva, sans-serif;
}
a {
  color: var(--primary-deep);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.16em;
}
a:hover {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.cs-skip {
  position: absolute;
  left: -9999px;
}
.cs-skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0.3rem;
}

/* ---------------------------------------------------------------- masthead */

.cs-head {
  background: var(--primary);
  border-bottom: 6px solid var(--primary-deep);
}
.cs-head__inner {
  width: min(1120px, calc(100% - 2rem));
  margin: auto;
  padding: 0.9rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.cs-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font: 800 1.12rem/1.2 Rockwell, 'Roboto Slab', Georgia, serif;
  letter-spacing: -0.015em;
}
.cs-brand__swatch {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.2rem;
  background:
    linear-gradient(135deg, #d9cbb2 0 45%, #b7a077 45% 70%, #7a3d1c 70% 100%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}
.cs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
}
.cs-nav__link {
  color: #f3efe6;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
}
.cs-nav__link:hover {
  color: #fff;
  border-bottom-color: #d9cbb2;
}
.cs-nav__link.is-here {
  color: #fff;
  border-bottom-color: #d9cbb2;
  font-weight: 700;
}

/* ---------------------------------------------------------------- main */

.cs-main {
  width: min(1120px, calc(100% - 2rem));
  margin: auto;
  padding: 2.2rem 0 3.5rem;
}
.cs-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font: 700 0.76rem/1.3 Rockwell, 'Roboto Slab', Georgia, serif;
  color: var(--accent);
  margin: 0 0 0.4rem;
}
.cs-h1 {
  font: 800 clamp(2rem, 5vw, 3.2rem) / 1.06 Rockwell, 'Roboto Slab', Georgia, serif;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
  max-width: 20ch;
}
.cs-h2 {
  font: 700 clamp(1.3rem, 2.6vw, 1.85rem) / 1.18 Rockwell, 'Roboto Slab', Georgia, serif;
  margin: 0 0 0.7rem;
}
.cs-h3 {
  font: 700 1.05rem/1.3 Rockwell, 'Roboto Slab', Georgia, serif;
  margin: 1.1rem 0 0.4rem;
}
.cs-lead {
  font-size: 1.1rem;
  max-width: 70ch;
  margin: 0 0 1.6rem;
}
.cs-p {
  max-width: 76ch;
  margin: 0 0 0.9rem;
}
.cs-p--muted {
  color: var(--muted);
  font-size: 0.94rem;
}
.cs-sec {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--primary);
  border-radius: 0.6rem;
  padding: clamp(1.1rem, 2.6vw, 1.9rem);
  margin: 1.6rem 0;
}
.cs-list,
.cs-steps {
  max-width: 76ch;
  padding-left: 1.2rem;
  margin: 0 0 0.9rem;
}
.cs-list li,
.cs-steps li {
  margin: 0.4rem 0;
}
.cs-list--warn {
  list-style: square;
}
.cs-list--excl {
  color: var(--muted);
}

/* ---------------------------------------------------------------- answer + stats */

.cs-answer {
  background: linear-gradient(135deg, var(--wash), #f3efe4);
  border: 1px solid var(--line);
  border-top: 8px solid var(--accent);
  border-radius: 0.6rem;
  padding: clamp(1.1rem, 3vw, 2rem);
  margin: 1.4rem 0;
}
.cs-answer__label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font: 700 0.74rem/1.3 Rockwell, 'Roboto Slab', Georgia, serif;
  color: var(--primary-deep);
  margin: 0 0 0.3rem;
}
.cs-answer__value {
  font: 800 clamp(1.7rem, 5vw, 3rem) / 1.05 Rockwell, 'Roboto Slab', Georgia, serif;
  margin: 0 0 0.4rem;
  color: var(--ink);
}
.cs-answer__sub {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

.cs-statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.7rem;
  margin: 1.2rem 0;
}
.cs-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--primary);
  border-radius: 0.45rem;
  padding: 0.8rem 0.9rem;
  display: grid;
  gap: 0.15rem;
}
.cs-stat__label {
  font-size: 0.79rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cs-stat__value {
  font: 700 1.25rem/1.2 Rockwell, 'Roboto Slab', Georgia, serif;
}
.cs-stat__note {
  font-size: 0.82rem;
  color: var(--muted);
}

.cs-band {
  background: var(--wash);
  border-left: 5px solid var(--primary);
  padding: 0.65rem 0.9rem;
  margin: 0 0 1.2rem;
  max-width: 76ch;
  border-radius: 0 0.35rem 0.35rem 0;
}
.cs-band__label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--primary-deep);
  margin-right: 0.4rem;
}
.cs-swing {
  border: 2px dashed var(--accent);
  border-radius: 0.45rem;
  padding: 0.75rem 1rem;
  margin: 1.3rem 0;
  max-width: 76ch;
}
.cs-swing__label {
  display: block;
  font: 700 0.75rem/1.3 Rockwell, 'Roboto Slab', Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

/* ---------------------------------------------------------------- callouts */

.cs-callout {
  border: 1px solid var(--line);
  border-left: 6px solid var(--primary);
  background: #fbfaf7;
  border-radius: 0.5rem;
  padding: 1rem 1.15rem;
  margin: 1.3rem 0;
}
.cs-callout__h {
  font: 700 1rem/1.3 Rockwell, 'Roboto Slab', Georgia, serif;
  margin: 0 0 0.5rem;
}
.cs-callout--warn {
  background: var(--warn-bg);
  border-left-color: var(--warn-line);
}
.cs-callout--assumed {
  background: #f5f4ee;
  border-left-color: var(--muted);
  border-left-style: dashed;
}
.cs-callout--refuse {
  background: var(--refuse-bg);
  border-left-color: var(--refuse-line);
}

.cs-excl {
  border-top: 2px solid var(--line);
  padding-top: 0.9rem;
  margin: 1.2rem 0;
}
.cs-excl__h {
  font: 700 0.85rem/1.3 Rockwell, 'Roboto Slab', Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

/* ---------------------------------------------------------------- tables */

.cs-tablewrap {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
}
.cs-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  background: var(--card);
}
.cs-table th,
.cs-table td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.cs-table thead th {
  background: var(--primary);
  color: #fff;
  font: 700 0.82rem/1.3 Rockwell, 'Roboto Slab', Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: none;
}
.cs-table tbody th {
  font-weight: 700;
  background: #faf8f4;
}
.cs-table tbody tr:last-child th,
.cs-table tbody tr:last-child td {
  border-bottom: none;
}

.cs-quote {
  margin: 0.8rem 0;
  padding: 0.8rem 1rem;
  background: #faf8f3;
  border-left: 5px solid var(--accent);
  border-radius: 0 0.35rem 0.35rem 0;
}
.cs-quote p {
  margin: 0 0 0.4rem;
  font-style: italic;
  max-width: 74ch;
}
.cs-quote footer {
  font-size: 0.83rem;
  color: var(--muted);
}
.cs-means {
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 5px solid var(--wash);
  max-width: 74ch;
  font-size: 0.97rem;
}
.cs-means__label {
  display: block;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-deep);
}
.cs-arith {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.86rem;
  background: #f3f1ea;
  padding: 0.6rem 0.8rem;
  border-radius: 0.35rem;
  max-width: 76ch;
  margin: 0 0 0.5rem;
}
.cs-srcblock {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  margin-top: 1.1rem;
}
code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: #f0eee6;
  padding: 0.08em 0.32em;
  border-radius: 0.2rem;
}

/* ---------------------------------------------------------------- forms */

.cs-tool {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 8px solid var(--accent);
  border-radius: 0.6rem;
  padding: clamp(1rem, 2.5vw, 1.7rem);
  margin: 1.4rem 0;
  display: grid;
  gap: 1.2rem;
}
.cs-fs {
  border: 0;
  border-top: 2px solid var(--wash);
  margin: 0;
  padding: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
}
.cs-fs__legend {
  font: 700 0.95rem/1.3 Rockwell, 'Roboto Slab', Georgia, serif;
  color: var(--primary-deep);
  padding: 0 0.4rem 0 0;
}
.cs-field {
  display: grid;
  gap: 0.3rem;
  align-content: start;
}
.cs-field__label {
  font-size: 0.88rem;
  font-weight: 700;
}
.cs-field__inputwrap {
  display: flex;
  align-items: stretch;
  gap: 0.3rem;
}
.cs-field__input,
.cs-field__select {
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: 2px solid var(--primary);
  border-radius: 0.3rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  min-height: 44px;
}
.cs-field__suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.5rem;
  background: var(--wash);
  border: 2px solid var(--primary);
  border-left: 0;
  border-radius: 0 0.3rem 0.3rem 0;
  font-size: 0.85rem;
  color: var(--primary-deep);
  white-space: nowrap;
}
.cs-field__hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  max-width: 46ch;
}
.cs-field--toggle .cs-field__toggle {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.cs-field--toggle input {
  margin-top: 0.28rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--primary);
}
.cs-warns {
  margin: 0;
}

/* ---------------------------------------------------------------- footer */

.cs-foot {
  background: var(--primary-deep);
  color: #ece7db;
  border-top: 6px solid var(--accent);
}
.cs-foot__inner {
  width: min(1120px, calc(100% - 2rem));
  margin: auto;
  padding: 1.8rem 0 2.6rem;
  display: grid;
  gap: 0.8rem;
}
.cs-foot__line {
  margin: 0;
  max-width: 82ch;
  font-size: 0.88rem;
}
.cs-foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
}
.cs-foot__nav a {
  color: #fff;
  font-size: 0.87rem;
}
.cs-foot__rev {
  margin: 0;
  font-size: 0.8rem;
  color: #c8c0ad;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .cs-sec {
    padding: 1rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
