:root {
  --bg: #F2F5F3; --surface: #FFFFFF; --surface-2: #E9EFEC; --ink: #14231D; --ink-2: #3E4C46; --muted: #5E6D66;
  --line: #D6DED9; --accent: #0E7C6B; --accent-strong: #0A5F52; --accent-soft: #DCEFEA; --warn: #B84A2B;
  --warn-soft: #F6E3DB; --gold: #8A6A11; --gold-soft: #F5EBCD;
  --display: "Helvetica Neue", Arial, system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark; --bg: #0F1714; --surface: #172119; --surface-2: #1F2B25; --ink: #E8EEEA; --ink-2: #C2CCC6;
    --muted: #93A199; --line: #2A372F; --accent: #3FB59A; --accent-strong: #63CDB4; --accent-soft: #183A32;
    --warn: #E4805E; --warn-soft: #3A241B; --gold: #D9B24A; --gold-soft: #3A3117;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 760px; margin: 0 auto; padding-inline: 16px; min-width: 0; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(26px, 6vw, 40px); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.logo { font-family: var(--display); font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; white-space: nowrap; }
.logo i { width: 24px; height: 24px; border-radius: 7px; background: var(--accent); display: inline-block; }
select.pw-language-select { min-height: 44px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 600 14px var(--body); }

.links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 860px; }
.notice { display: grid; gap: 6px; background: var(--gold-soft); color: var(--ink); border-radius: 12px; padding: 10px 12px; font-size: 14px; border-inline-start: 4px solid var(--gold); overflow-wrap: anywhere; }
.notice a { color: var(--accent-strong); font-weight: 600; }
.lede { font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 12px; min-width: 0; }
.filters { display: grid; gap: 12px; margin-block: 14px; }
@media (min-width: 640px) { .filters { grid-template-columns: 2fr 1fr 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label { font-weight: 600; font-size: 14px; }
input[type="search"], select { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 16px var(--body); }
.count { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.products { display: grid; gap: 12px; min-width: 0; }
.product h3 { overflow-wrap: anywhere; }
.product .cat { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; min-width: 0; }
table.chains { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
table.chains th, table.chains td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; overflow-wrap: anywhere; }
table.chains thead th { font-size: 12px; color: var(--ink-2); }
table.chains th[scope="row"] { width: 34%; font-weight: 600; }
table.chains td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.chains tr:last-child > * { border-bottom: 0; }
.tag-single { display: inline-block; margin-top: 2px; padding: 0 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font: 700 11px var(--body); }
.phrase { font-size: 14px; color: var(--ink); background: var(--surface-2); border-radius: 8px; padding: 6px 10px; overflow-wrap: anywhere; }
.help { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.status-line { font-size: 14px; color: var(--warn); font-weight: 600; }
footer { border-top: 1px solid var(--line); padding: 18px 0 32px; font-size: 13px; color: var(--muted); margin-top: 20px; }
footer .links a { color: var(--ink-2); }
bdi { unicode-bidi: isolate; }
.links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--accent-strong); text-decoration: none; }
.links a:hover { text-decoration: underline; }
header.hero { display: grid; gap: 10px; padding: 4px 0 8px; }

/* Estado vacío útil (contrato tables-ux) */
.empty { padding: 16px; border: 1px dashed var(--line, #cbd5e1); border-radius: 12px; }
.empty p { margin: 0 0 8px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.suggest { font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; }
