/* Jose Quevedo's POS Readiness — dark cinematic schema */

:root {
  --bg: hsl(0 0% 4%);
  --card: hsl(0 0% 6%);
  --panel: hsl(0 0% 9%);
  --well: hsl(0 0% 12%);
  --border: hsl(0 0% 14%);
  --muted: hsl(0 0% 60%);
  --fg: hsl(0 0% 96%);
  --sunken: hsl(0 0% 2%);
  --accent: #f4444e;
  --accent-ink: #16050a;       /* text on accent fills */
  --good: #3ecf8e;
  --warn: #f5b942;
  --bad: #e5534b;
  --dim: #6b7689;
  --good-bg: rgba(62, 207, 142, .13);
  --warn-bg: rgba(245, 185, 66, .13);
  --bad-bg: rgba(229, 83, 75, .13);
  --accent-bg: rgba(244, 68, 78, .12);
  --hover: hsl(0 0% 100% / .04);
  --shadow: 0 12px 32px hsl(0 0% 0% / .55);
  --radius: 8px;
}

:root[data-theme="light"] {
  --bg: #f6f7f9;
  --card: #ffffff;
  --panel: #ffffff;
  --well: #eef0f4;
  --border: #d7dbe3;
  --muted: #545d6b;
  --fg: #15181e;
  --sunken: #e8eaef;
  --accent: #b3261e;
  --accent-ink: #ffffff;
  --good: #14683f;
  --warn: #7d5600;
  --bad: #a32e27;
  --dim: #545d6b;
  --good-bg: rgba(20, 104, 63, .10);
  --warn-bg: rgba(125, 86, 0, .10);
  --bad-bg: rgba(163, 46, 39, .10);
  --accent-bg: rgba(179, 38, 30, .10);
  --hover: hsl(0 0% 0% / .04);
  --shadow: 0 12px 32px hsl(220 20% 40% / .18);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
:root:not([data-theme="light"]) body {
  background-image:
    radial-gradient(1200px 600px at 80% -10%, hsl(355 45% 12% / .35), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, hsl(0 0% 10% / .5), transparent 60%);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: "Oswald", "DM Sans", "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
  text-wrap: balance;
  font-weight: 600;
  margin: 0 0 .4em;
}
h1 { font-size: 34px; line-height: 1.15; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 .8em; }
code {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12.5px;
  background: var(--well);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.site-header .bar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 0;
}
.site-header img.logo { height: 40px; width: auto; display: block; }
.site-header .brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.site-header .brand:hover { text-decoration: none; }
.site-header .brand .t {
  font-family: "Oswald", sans-serif; font-size: 15px; letter-spacing: .02em;
  text-transform: uppercase; line-height: 1.15;
}
.site-header .brand .t small {
  display: block; font-family: "DM Sans", sans-serif; font-size: 10.5px;
  letter-spacing: .08em; color: var(--muted); text-transform: uppercase;
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--muted); font-size: 12.5px; padding: 6px 10px; border-radius: 6px;
  letter-spacing: .02em;
}
.site-nav a:hover { background: var(--hover); color: var(--fg); text-decoration: none; }
.site-nav a.active { color: var(--accent); }
.theme-toggle {
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  border-radius: 999px; width: 30px; height: 30px; cursor: pointer;
  font-size: 14px; line-height: 1; display: grid; place-items: center;
}
.theme-toggle:hover { background: var(--hover); color: var(--fg); }

/* ---------- sections / cards ---------- */
.kicker {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); font-weight: 600; margin-bottom: 8px;
}
.sec-h {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 600; margin: 0 0 10px;
}
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 18px 20px;
}
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.stat {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px;
}
.stat .v { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); margin-top: 2px;
}

.pill {
  display: inline-block; border-radius: 999px; padding: 2px 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.acc { background: var(--accent-bg); color: var(--accent); }
.pill.dim { background: var(--well); color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  border: none; border-radius: 10px; padding: 10px 18px;
  font-family: "DM Sans", sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; letter-spacing: .01em;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost {
  background: transparent; color: var(--fg);
  border: 1px solid var(--border);
  font-weight: 500;
}
.btn.ghost:hover { background: var(--hover); filter: none; }
.btn.small { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: default; filter: none; }

/* ---------- landing ---------- */
.hero { padding: 64px 0 36px; text-align: center; }
.hero img.hero-logo { height: 96px; width: auto; margin: 0 auto 18px; display: block; }
.hero h1 { font-size: 42px; margin-bottom: 10px; }
.hero .sub { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 15px; }

.entry-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0 8px;
}
.entry-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; text-align: left; color: inherit; display: block;
  transition: border-color .15s ease, transform .15s ease;
}
.entry-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.entry-card .n {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 8px;
}
.entry-card h2 { margin-bottom: 6px; }
.entry-card p { color: var(--muted); margin: 0; font-size: 13.5px; }
.entry-card .go { margin-top: 14px; font-weight: 700; color: var(--accent); font-size: 13.5px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 26px 0; }

/* reference accordion */
.ref-item { border-top: 1px solid var(--border); }
.ref-item:last-child { border-bottom: 1px solid var(--border); }
.ref-item summary {
  cursor: pointer; padding: 12px 4px; font-weight: 600; font-size: 13.5px;
  display: flex; align-items: center; gap: 10px; list-style: none;
}
.ref-item summary::-webkit-details-marker { display: none; }
.ref-item summary::after { content: "+"; margin-left: auto; color: var(--muted); font-weight: 400; }
.ref-item[open] summary::after { content: "–"; }
.ref-item summary:hover { background: var(--hover); }
.ref-item .body { padding: 2px 4px 16px; color: var(--fg); font-size: 13px; }
.ref-item .body table { margin-top: 6px; }

table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 600; padding: 6px 10px 6px 2px;
  border-bottom: 1px solid var(--border);
}
td { padding: 7px 10px 7px 2px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-scroll { overflow-x: auto; }

/* ---------- checklist ---------- */
.progress-wrap { position: sticky; top: 61px; z-index: 40; background: var(--bg); padding: 12px 0 10px; }
.progress-bar {
  height: 6px; border-radius: 999px; background: var(--well); overflow: hidden;
}
.progress-bar > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s ease; }
.progress-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.cl-group { margin: 22px 0; }
.cl-group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.cl-group-head h2 { font-size: 18px; margin: 0; }
.cl-group-head .count { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cl-item {
  border-top: 1px solid var(--border); padding: 9px 2px; display: flex; gap: 12px;
  align-items: flex-start; font-size: 13.5px;
}
.cl-item:last-child { border-bottom: 1px solid var(--border); }
.cl-item input[type="checkbox"] {
  appearance: none; width: 17px; height: 17px; margin-top: 2px; flex: none;
  border: 1.5px solid var(--muted); border-radius: 4px; cursor: pointer;
  display: grid; place-items: center; background: transparent;
}
.cl-item input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.cl-item input[type="checkbox"]:checked::after {
  content: "✓"; color: var(--accent-ink); font-size: 12px; font-weight: 800; line-height: 1;
}
.cl-item label { cursor: pointer; flex: 1; }
.cl-item.done label { color: var(--muted); text-decoration: line-through; text-decoration-color: hsl(0 0% 50% / .5); }
.cl-item .why {
  display: block; font-size: 12px; color: var(--muted); margin-top: 3px;
}
.cl-item .flag { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; }

.cl-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0 4px; }

/* ---------- wizard ---------- */
.wiz-shell { display: grid; grid-template-columns: 210px 1fr; gap: 26px; padding: 26px 0 60px; }
.wiz-side { position: sticky; top: 84px; align-self: start; }
.wiz-steps { list-style: none; margin: 0; padding: 0; }
.wiz-steps li {
  padding: 8px 10px; border-left: 2px solid var(--border); font-size: 12.5px;
  color: var(--muted); cursor: default;
}
.wiz-steps li.done { color: var(--fg); border-left-color: var(--dim); cursor: pointer; }
.wiz-steps li.done:hover { background: var(--hover); }
.wiz-steps li.cur { color: var(--accent); border-left-color: var(--accent); font-weight: 700; }
.wiz-main { min-width: 0; }
.q-block { margin-bottom: 22px; }
.q-block .q { font-weight: 600; font-size: 15px; margin-bottom: 3px; }
.q-block .hint { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.opts { display: grid; gap: 8px; }
.opts.cols { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.opt {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); padding: 11px 13px; cursor: pointer;
  display: flex; gap: 10px; align-items: flex-start;
  transition: border-color .12s ease;
}
.opt:hover { background: var(--hover); }
.opt.sel { border-color: var(--accent); background: var(--accent-bg); }
.opt .t { font-weight: 600; font-size: 13.5px; }
.opt .d { color: var(--muted); font-size: 12px; margin-top: 2px; }
.opt .mark {
  width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--muted);
  flex: none; margin-top: 2px; display: grid; place-items: center;
}
.opt.multi .mark { border-radius: 4px; }
.opt.sel .mark { border-color: var(--accent); background: var(--accent); }
.opt.sel .mark::after { content: "✓"; font-size: 10px; color: var(--accent-ink); font-weight: 800; }
.opt input { display: none; }
.wiz-nav { display: flex; gap: 10px; margin-top: 26px; align-items: center; }
.wiz-nav .spacer { flex: 1; }
.num-input {
  background: var(--well); color: var(--fg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px; font-size: 14px; width: 90px;
  font-family: inherit;
}
.num-input:focus { outline: none; border-color: var(--accent); }

.wiz-note {
  border-left: 2px solid var(--accent); background: var(--accent-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 8px 12px; font-size: 12.5px; margin-top: 10px;
}

/* ---------- plan output ---------- */
.plan-head { margin: 8px 0 20px; }
.plan-head h1 { font-size: 30px; }
.plan-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.plan-sec { margin: 26px 0; }
.plan-sec > h2 {
  display: flex; align-items: baseline; gap: 10px; font-size: 20px;
  border-bottom: 1px solid var(--border); padding-bottom: 8px;
}
.plan-sec > h2 .ph {
  font-size: 11px; letter-spacing: .08em; color: var(--accent);
  font-family: "DM Sans", sans-serif; font-weight: 700; text-transform: uppercase;
}
.step { display: flex; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--border); font-size: 13.5px; }
.step:first-of-type { border-top: none; }
.step .no {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--well); color: var(--muted); font-size: 11px; font-weight: 700;
  display: grid; place-items: center; margin-top: 1px; font-variant-numeric: tabular-nums;
}
.step .body { flex: 1; }
.step .body b { font-weight: 700; }
.step .detail { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.warn-list .w {
  display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius);
  margin-bottom: 8px; font-size: 13px; border: 1px solid var(--border);
}
.warn-list .w.crit { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.warn-list .w.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.warn-list .w.info { background: var(--panel); }
.warn-list .tag { font-weight: 800; font-size: 10.5px; letter-spacing: .06em; margin-top: 2px; flex: none; width: 62px; }
.warn-list .crit .tag { color: var(--bad); }
.warn-list .warn .tag { color: var(--warn); }
.warn-list .info .tag { color: var(--dim); }

.bom td:last-child, .bom th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.bom tr.total td { font-weight: 700; border-top: 2px solid var(--border); }

.footnote { color: var(--muted); font-size: 11.5px; margin: 30px 0 10px; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 60px; padding: 22px 0 34px;
  color: var(--muted); font-size: 11.5px;
}
.site-footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .entry-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .wiz-shell { grid-template-columns: 1fr; }
  .wiz-side { position: static; }
  .wiz-steps { display: flex; flex-wrap: wrap; gap: 4px; }
  .wiz-steps li { border-left: none; border-bottom: 2px solid var(--border); padding: 4px 8px; }
  .wiz-steps li.cur { border-bottom-color: var(--accent); }
  .wiz-steps li.done { border-bottom-color: var(--dim); }
  .hero h1 { font-size: 30px; }
  .site-header .brand .t small { display: none; }
}

/* ---------- print ---------- */
@media print {
  :root, :root[data-theme="light"] {
    --bg: #fff; --card: #fff; --panel: #fff; --well: #f0f0f0; --sunken: #f0f0f0;
    --border: #bbb; --muted: #444; --fg: #000;
    --accent: #b3261e; --accent-ink: #fff; --accent-bg: #f5e2e1;
    --good: #14683f; --warn: #7d5600; --bad: #a32e27; --dim: #444;
    --good-bg: #eaf2ed; --warn-bg: #f5efdd; --bad-bg: #f5e3e2;
    --hover: transparent; --shadow: none;
  }
  body { background: #fff !important; background-image: none !important; font-size: 12px; }
  .site-header, .site-footer, .wiz-side, .wiz-nav, .cl-tools, .no-print, .theme-toggle, .progress-wrap { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .wiz-shell { display: block; padding: 0; }
  .plan-sec, .cl-group { break-inside: avoid-page; }
  .step, .cl-item { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
