/* Templar public stock list. Same tokens and table language as the internal stock desk. */
:root {
  --ink: #101b33; --ink-2: #3b475f; --muted: #6b7590;
  --gold: #a8822b; --gold-soft: #e9dcbb;
  --ground: #ffffff; --surface: #f4f6fa;
  --rule: #dce1ea; --rule-2: #eceff5;
  --b-ongula: #1f5a3c; --b-omeyablu: #4e9a6f; --b-jokotwo: #2a8c8c;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0a1020; --surface: #111a2d; --ink: #eef1f7; --ink-2: #b6c0d4; --muted: #8892a9;
    --rule: #25304a; --rule-2: #1a2438; --gold: #d6b15c; --gold-soft: #372f1c;
    --b-ongula: #5fae86; --b-omeyablu: #8bcba6; --b-jokotwo: #6cc4c4;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0a1020; --surface: #111a2d; --ink: #eef1f7; --ink-2: #b6c0d4; --muted: #8892a9;
  --rule: #25304a; --rule-2: #1a2438; --gold: #d6b15c; --gold-soft: #372f1c;
  --b-ongula: #5fae86; --b-omeyablu: #8bcba6; --b-jokotwo: #6cc4c4;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--serif); font-size: 17px; line-height: 1.5; }
.page { max-width: 1040px; margin: 0 auto; padding: 32px 16px 48px; }
.mast .label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.mast h1 { font-weight: 400; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 6px 0 4px; }
.mast .lede { margin: 0 0 24px; color: var(--ink-2); }
.empty { padding: 18px 6px; color: var(--muted); font-size: 14px; }

table.rows { width: 100%; border-collapse: collapse; font-size: 14px; }
table.rows th { text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 6px; border-bottom: 1px solid var(--rule); }
table.rows th.n, table.rows td.n { text-align: right; }
table.rows tbody tr.line { border-bottom: 1px solid var(--rule-2); }
table.rows td { padding: 10px 6px; vertical-align: top; }
table.rows td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; border-left: 1px solid var(--rule-2); }
table.rows .name { display: flex; align-items: center; gap: 10px; line-height: 1.3; }
table.rows .thumb { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; flex: none; background: var(--surface); }
table.rows .sub { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 2px; }
table.rows .ask { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* brand groups: swatch, colour line above the first product, thick colour bar down the side */
table.rows tr.group td { padding: 22px 6px 8px; border-left: 6px solid transparent; border-bottom: 6px solid var(--rule-2); }
table.rows tbody:first-of-type tr.group td { padding-top: 10px; }
table.rows .gh { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
table.rows .gname { font-size: 17px; }
table.rows .gtot { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 8px; background: var(--muted); }
table.rows tr.line td:first-child { border-left: 6px solid var(--rule-2); }
.b-ongula .swatch { background: var(--b-ongula); }
.b-omeyablu .swatch { background: var(--b-omeyablu); }
.b-jokotwo .swatch { background: var(--b-jokotwo); }
table.rows .b-ongula tr.group td { border-bottom-color: var(--b-ongula); }
table.rows .b-omeyablu tr.group td { border-bottom-color: var(--b-omeyablu); }
table.rows .b-jokotwo tr.group td { border-bottom-color: var(--b-jokotwo); }
table.rows .b-ongula tr.line td:first-child { border-left-color: var(--b-ongula); }
table.rows .b-omeyablu tr.line td:first-child { border-left-color: var(--b-omeyablu); }
table.rows .b-jokotwo tr.line td:first-child { border-left-color: var(--b-jokotwo); }

.foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 12px; color: var(--muted); display: grid; gap: 4px; }

table.rows thead th { position: sticky; top: 0; z-index: 2; background: var(--ground); box-shadow: 0 1px 0 var(--rule); }
table.rows td.price { color: var(--ink); }
table.rows .unit { color: var(--muted); font-size: 12px; }
table.rows .ask { color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 13px; }

/* photos */
.namebtn { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; text-decoration: underline dotted var(--gold); text-underline-offset: 3px; }
.thumbbtn { position: relative; border: 0; padding: 0; background: none; cursor: pointer; flex: none; border-radius: 4px; }
.thumbbtn:focus-visible, .linkbtn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.thumbbtn .count { position: absolute; right: -4px; bottom: -4px; background: var(--ink); color: var(--ground); font-family: var(--mono); font-size: 10px; border-radius: 8px; padding: 0 5px; line-height: 16px; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--gold); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
body.noscroll { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(8, 12, 24, .82); display: grid; place-items: center; padding: 16px; }
.viewer[hidden] { display: none; }
.v-box { background: var(--ground); color: var(--ink); border-radius: 10px; width: min(980px, 100%); max-height: 100%; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.v-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px 8px; }
.v-title { font-size: 18px; }
.v-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 2px; }
.v-close { border: 1px solid var(--rule); background: var(--ground); color: var(--ink); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; flex: none; }
.v-stage { position: relative; display: grid; place-items: center; background: var(--surface); min-height: 0; }
.v-stage img { max-width: 100%; max-height: min(70vh, 720px); object-fit: contain; display: block; }
.v-nav { position: absolute; top: 50%; transform: translateY(-50%); border: 0; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.85); color: #101b33; font-size: 28px; cursor: pointer; }
.v-nav[hidden] { display: none; }
#v-prev { left: 10px; } #v-next { right: 10px; }
.v-strip { display: flex; gap: 6px; padding: 10px 16px 14px; overflow-x: auto; }
.v-strip button { border: 2px solid transparent; padding: 0; background: none; border-radius: 4px; cursor: pointer; flex: none; }
.v-strip button.on { border-color: var(--gold); }
.v-strip img { width: 64px; height: 48px; object-fit: cover; display: block; border-radius: 2px; }

@media (max-width: 640px) {
  table.rows { font-size: 13px; }
  /* phone: each product becomes a small card with labelled values */
  table.rows thead { display: none; }
  table.rows tr.line { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 10px 8px; }
  table.rows tr.line td { padding: 0; border-left: 0; text-align: left; }
  table.rows tr.line td.prod { grid-column: 1 / -1; font-size: 15px; margin-bottom: 4px; padding-left: 8px; }
  table.rows tr.line td.n::before { content: attr(data-label); display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  table.rows tr.line td.n { padding-left: 8px; }
  table.rows tr.line { border-left: 6px solid var(--rule-2); }
  table.rows .b-ongula tr.line { border-left-color: var(--b-ongula); }
  table.rows .b-omeyablu tr.line { border-left-color: var(--b-omeyablu); }
  table.rows .b-jokotwo tr.line { border-left-color: var(--b-jokotwo); }
  table.rows tr.line td:first-child { border-left: 0 !important; }
  table.rows tr.group td { display: block; }
  table.rows .thumb { width: 36px; height: 36px; }
}
