/* Men's Suit & Hat Size Converter — content styles.
   Prefix: --sz-  /  .sz-

   Reference point: two small, independent converter panels (suit → EU,
   head circumference → hat size) each show a live result directly below
   their own inputs, plus a static quick-reference chart beneath both for
   scanning without typing. Second reference-cluster tool this loop.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --sz-surface: #ffffff;
  --sz-panel:   #f6f5f2;
  --sz-line:    #e2ded4;
  --sz-text:    #1a1712;
  --sz-muted:   #6c6558;
  --sz-bad:     #b3261e;
  --sz-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.sz-wrap {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Converter panels ────────────────────────────────────────────────────── */

.sz-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--sz-line);
  border-radius: 2px;
  background: var(--sz-surface);
}

.sz-panel-title {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--sz-text);
}

.sz-field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.sz-field {
  display: grid;
  gap: 0.375rem;
}

.sz-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sz-muted);
}

.sz-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--sz-mono);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--sz-text);
  background: var(--sz-surface);
  border: 1px solid var(--sz-line);
  border-radius: 2px;
}

.sz-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.sz-result {
  margin: 0.875rem 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--tf-accent);
}

.sz-hat-results {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.sz-hat-results .sz-result { margin-top: 0.875rem; }

.sz-error {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--sz-bad);
  background: rgba(179, 38, 30, 0.06);
  border: 1px solid var(--sz-bad);
  border-radius: 2px;
}

/* ── Primary action button ──────────────────────────────────────────────── */

.sz-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;
  margin-bottom: 1.5rem;
}

.sz-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.sz-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.sz-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Quick-reference chart ───────────────────────────────────────────────── */

.sz-table-title {
  margin: 0 0 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sz-muted);
}

.sz-table {
  display: grid;
  border: 1px solid var(--sz-line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.sz-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0.5625rem 1rem;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  border-bottom: 1px solid var(--sz-line);
  background: var(--sz-surface);
}

.sz-row:last-child { border-bottom: none; }

.sz-row-head {
  background: var(--sz-panel);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sz-muted);
}

.sz-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--sz-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.sz-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 34rem;
  padding-inline: 1.5rem;
}

@media (max-width: 26rem) {
  .sz-wrap,
  .sz-ad { padding-inline: 1rem; }
  .sz-panel { padding: 1.25rem; }
  .sz-field-grid { grid-template-columns: 1fr; }
}

/* 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"] {
  --sz-surface: var(--tf-surface);
  --sz-panel: var(--tf-surface);
  --sz-line: var(--tf-rule);
  --sz-text: var(--tf-ink);
  --sz-muted: var(--tf-ink-soft);
  --sz-bad: #da8581;
}
