/* Concrete Slab & Bag Calculator — content styles.
   Prefix: --cs-  /  .cs-

   Reference point: a materials-yard, job-site register — dense
   concrete grey neutrals and a plain bordered table for the bag
   count, since a contractor or DIYer reading this on a phone at the
   hardware store wants the number fast, not a decorated result card.
   Second `home-diy`-cluster tool this loop, after
   `wallpaper-roll-and-pattern-repeat`.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --cs-surface: #ffffff;
  --cs-panel:   #f2f2f0;
  --cs-line:    #dcdad5;
  --cs-text:    #191815;
  --cs-muted:   #656158;
  --cs-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.cs-wrap {
  width: 100%;
  max-width: 32rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.cs-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--cs-line);
  border-radius: 2px;
  background: var(--cs-surface);
}

.cs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cs-row:last-of-type {
  margin-bottom: 1.25rem;
}

.cs-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cs-muted);
}

.cs-field input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--cs-mono);
  font-size: 1rem;
  color: var(--cs-text);
  background: var(--cs-panel);
  border: 1px solid var(--cs-line);
  border-radius: 2px;
}

.cs-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

/* ── Primary action button ──────────────────────────────────────────────── */

.cs-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--tf-accent-ink);
  background: var(--tf-accent);
  border: 1px solid var(--tf-accent);
  border-radius: 2px;
  cursor: pointer;
}

.cs-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.cs-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.cs-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Hero + bag table ────────────────────────────────────────────────────── */

.cs-hero {
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid var(--cs-line);
  border-radius: 2px;
  background: var(--cs-surface);
}

.cs-hero-label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cs-muted);
}

.cs-hero-value {
  margin: 0;
  font-family: var(--cs-mono);
  font-size: 2rem;
  font-weight: 800;
  color: var(--tf-accent);
}

.cs-hero-sub {
  margin: 0.375rem 0 0;
  font-family: var(--cs-mono);
  font-size: 0.8125rem;
  color: var(--cs-muted);
}

.cs-table-wrap {
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--cs-line);
  border-radius: 2px;
  background: var(--cs-surface);
}

.cs-table-title {
  margin: 0 0 0.875rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cs-muted);
}

.cs-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--cs-mono);
  font-size: 0.9375rem;
}

.cs-table th {
  text-align: left;
  padding: 0.375rem 0.5rem;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--cs-muted);
  border-bottom: 1px solid var(--cs-line);
}

.cs-table td {
  padding: 0.5rem;
  color: var(--cs-text);
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--cs-line);
}

.cs-table tr:last-child td {
  border-bottom: none;
}

.cs-table td:last-child {
  text-align: right;
  font-weight: 700;
}

.cs-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--cs-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.cs-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 32rem;
  padding-inline: 1.5rem;
  overflow: hidden;
}

@media (max-width: 26rem) {
  .cs-wrap,
  .cs-ad { padding-inline: 1rem; }
  .cs-panel { padding: 1.25rem; }
  .cs-row { gap: 0.75rem; }
}

/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --cs-surface: var(--tf-surface);
  --cs-panel: var(--tf-surface);
  --cs-line: var(--tf-rule);
  --cs-text: var(--tf-ink);
  --cs-muted: var(--tf-ink-soft);
}
