/* Sygnoses Shelf Price Intelligence. Prototype visual system, 11 October 2026. */
:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #efede6;
  --line: #d9d6cc;
  --line-strong: #b9b5a8;
  --text: #1c1b18;
  --text-2: #5d5a52;
  --text-3: #8a867b;
  --accent: #1e6f5c;
  --accent-ink: #ffffff;
  --accent-soft: #dcefe8;
  --accent-2: #b48a2c;   /* used only for the second series in a two-series chart */
  --warn: #9a4b1f;
  --ok: #1e6f5c;
  --muted-bar: #cfcbbf;
  --heat-0: #f2f0ea;
  --heat-1: #cfe5dc;
  --heat-2: #8ec7b2;
  --heat-3: #3f9a7e;
  --heat-4: #1e6f5c;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(0,0,0,.05);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  --measure: 72ch;
  --wrap: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a; --surface: #1d2024; --surface-2: #24282d; --line: #33383f; --line-strong: #4a515a;
    --text: #eceae4; --text-2: #b4b0a6; --text-3: #847f74;
    --accent: #5fc3a3; --accent-ink: #0d1b16; --accent-soft: #1f3a32; --accent-2: #d9b25b;
    --warn: #e0905c; --ok: #5fc3a3; --muted-bar: #3b4047;
    --heat-0: #1d2024; --heat-1: #1f3a32; --heat-2: #2b6a55; --heat-3: #3f9a7e; --heat-4: #5fc3a3;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --bg: #15171a; --surface: #1d2024; --surface-2: #24282d; --line: #33383f; --line-strong: #4a515a;
  --text: #eceae4; --text-2: #b4b0a6; --text-3: #847f74;
  --accent: #5fc3a3; --accent-ink: #0d1b16; --accent-soft: #1f3a32; --accent-2: #d9b25b;
  --warn: #e0905c; --ok: #5fc3a3; --muted-bar: #3b4047;
  --heat-0: #1d2024; --heat-1: #1f3a32; --heat-2: #2b6a55; --heat-3: #3f9a7e; --heat-4: #5fc3a3;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.45; font-feature-settings: "tnum" 1, "cv11" 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .35em; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.375rem; margin-top: 0; }
h3 { font-size: 1.0625rem; }
p { margin: 0 0 .75em; max-width: var(--measure); }
small, .small { font-size: .8125rem; color: var(--text-2); }
.num, td.n, th.n { font-variant-numeric: tabular-nums; text-align: right; }
[dir="rtl"] .num, [dir="rtl"] td.n, [dir="rtl"] th.n { text-align: left; }
code, .mono { font-family: var(--mono); font-size: .8125rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

/* layout */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
header.top { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
header.top .wrap { display: flex; align-items: center; gap: 14px; min-height: 56px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { font-weight: 700; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); display: inline-block; }
.brand small { font-weight: 500; color: var(--text-3); }
nav.main { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
nav.main a { padding: 6px 10px; border-radius: var(--radius); color: var(--text-2); font-size: .9375rem; }
nav.main a:hover { background: var(--surface-2); text-decoration: none; }
nav.main a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tools { display: flex; gap: 6px; }
.btn { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 5px 10px; font: inherit; font-size: .875rem; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
main { padding: 28px 0 56px; }
section { margin: 0 0 40px; scroll-margin-top: 72px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.section-head .q { color: var(--text-2); font-size: .9375rem; max-width: 60ch; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: minmax(0, 1fr); } h1 { font-size: 1.625rem; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin-bottom: 8px; }
.hero { padding: 24px 0 8px; }
.hero h1 { max-width: 24ch; }
.hero p.lead { font-size: 1.125rem; color: var(--text-2); max-width: 60ch; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 600; margin-bottom: 6px; }

/* stat tiles */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat .v { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .8125rem; color: var(--text-2); margin-top: 4px; }
.stat .s { font-size: .75rem; color: var(--text-3); margin-top: 2px; }

/* pills */
.pill { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-2); white-space: nowrap; vertical-align: middle; }
.pill.live { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill.pilot { background: var(--surface-2); color: var(--text); }
.pill.loaded { color: var(--text-2); }
.pill.warn { color: var(--warn); border-color: var(--warn); }
.pill.ok { color: var(--ok); border-color: var(--ok); }

/* tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .875rem; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
[dir="rtl"] th, [dir="rtl"] td { text-align: right; }
th { font-weight: 600; color: var(--text-2); font-size: .8125rem; background: var(--surface-2); position: sticky; top: 0; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
th.sortable { cursor: pointer; user-select: none; }
th.sortable::after { content: " \2195"; color: var(--text-3); font-size: .75rem; }
th.sorted-asc::after { content: " \2191"; color: var(--accent); }
th.sorted-desc::after { content: " \2193"; color: var(--accent); }
td.empty { color: var(--text-3); font-style: italic; }
table.compact th, table.compact td { padding: 4px 8px; font-size: .8125rem; }
.cellbar { display: inline-block; height: 8px; background: var(--accent); border-radius: 2px; vertical-align: middle; margin-inline-end: 6px; }
.cellbar.muted { background: var(--muted-bar); }

/* source line */
.src { font-size: .75rem; color: var(--text-3); margin-top: 8px; max-width: none; }
.src b { color: var(--text-2); font-weight: 600; }
.note { background: var(--surface-2); border-inline-start: 3px solid var(--accent); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; font-size: .9375rem; max-width: var(--measure); }
.note.warn { border-color: var(--warn); }
.empty-state { color: var(--text-2); font-style: italic; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); font-size: .9375rem; }

/* charts */
svg.chart { width: 100%; height: auto; display: block; font-family: var(--font); }
svg.chart text { fill: var(--text-2); font-size: 11px; }
svg.chart text.v { fill: var(--text); font-weight: 600; }
svg.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
svg.chart .bar { fill: var(--accent); }
svg.chart .bar.muted { fill: var(--muted-bar); }
svg.chart .bar.s2 { fill: var(--accent-2); }
svg.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
svg.chart .line.s2 { stroke: var(--accent-2); }
svg.chart .line.thin { stroke-width: 1.25; stroke: var(--text-3); }
svg.chart .area { fill: var(--accent); opacity: .12; }
svg.chart .band { fill: var(--accent-2); opacity: .15; }
svg.chart .pt { fill: var(--accent); }
svg.chart .step { fill: var(--accent); }
svg.chart .step.tax { fill: var(--accent-2); }
svg.chart .step.gap { fill: var(--muted-bar); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8125rem; color: var(--text-2); margin: 6px 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); margin-inline-end: 5px; vertical-align: -1px; }
.legend i.s2 { background: var(--accent-2); }
.legend i.muted { background: var(--muted-bar); }
.heat { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.heat .c { height: 26px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: .6875rem; color: var(--text); background: var(--heat-0); }
.heat .c.h1 { background: var(--heat-1); } .heat .c.h2 { background: var(--heat-2); } .heat .c.h3 { background: var(--heat-3); color: #fff; } .heat .c.h4 { background: var(--heat-4); color: #fff; }
.heat .c.peak { outline: 2px solid var(--text); outline-offset: -2px; }
.heat-labels { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; font-size: .625rem; color: var(--text-3); margin-top: 3px; text-align: center; }
table.heatmap td { padding: 3px 4px; }
table.heatmap td.c { text-align: center; font-size: .75rem; min-width: 34px; }

/* product cards */
.products { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.prod { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.prod .img { aspect-ratio: 1; background: #fff; border-radius: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line); }
.prod .img img { max-height: 100%; width: auto; object-fit: contain; }
.prod .name { font-size: .8125rem; line-height: 1.3; min-height: 2.6em; }
.prod .brand { font-size: .75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.prod .price { font-weight: 600; font-size: 1.0625rem; }
.prod .price small { font-weight: 400; color: var(--text-3); }
.prod .meta { font-size: .75rem; color: var(--text-2); }

/* category tiles */
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.tile:hover { border-color: var(--accent); text-decoration: none; }
.tile .t { font-weight: 600; display: flex; justify-content: space-between; gap: 6px 8px; align-items: flex-start; flex-wrap: wrap; }
.tile .t span:first-child { flex: 1 1 110px; }
.tile .v { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile .m { font-size: .75rem; color: var(--text-2); }
.tile.showcase { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* key-value */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: .9375rem; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; }
.toc { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 20px; }
.toc a { font-size: .8125rem; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); background: var(--surface); }
.toc a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
select, input[type="search"] { font: inherit; font-size: .875rem; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); }
footer { border-top: 1px solid var(--line); padding: 20px 0 32px; color: var(--text-3); font-size: .8125rem; }
footer p { max-width: none; }
.bridge-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.bridge-steps .st { background: var(--surface-2); border-radius: var(--radius); padding: 8px 10px; }
.bridge-steps .st .v { font-weight: 600; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.bridge-steps .st .l { font-size: .75rem; color: var(--text-2); }
.bridge-steps .st.gap { background: var(--accent-soft); }
@media (max-width: 760px) {
  header.top .wrap { gap: 8px; }
  .brand { flex: 1; }
  .tools { order: 2; }
  nav.main { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  nav.main::-webkit-scrollbar { display: none; }
  nav.main a { white-space: nowrap; font-size: .875rem; padding: 5px 9px; }
}
@media print { header.top, .tools, .toc { display: none; } .card { box-shadow: none; } }
