/* ── Algrow Market — additions on top of skills_market.css ──────────────── */

/* hero keeps the original Silkscreen pixel headline (matches /skills). */

/* let the detail left column shrink instead of overflowing the grid track */
.detail-main { min-width: 0; }

/* product icons are text tier labels ("200", "1K"), not emoji */
.card-skill .card-icon {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: -.02em;
  color: var(--fg);
}
.detail-icon {
  font-family: var(--mono) !important; font-size: 19px !important; font-weight: 700;
  letter-spacing: -.02em;
}
.lb-icon { font-family: var(--mono); font-size: 10px !important; font-weight: 700; }

/* price on cards */
.price-tag { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--fg); }
.price-tag s { color: var(--faint-fg); font-weight: 400; margin-right: 6px; }

/* member discount messaging */
.member-pill {
  font-family: var(--mono); font-size: 12px; color: var(--green);
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
  background: color-mix(in srgb, var(--green) 8%, transparent);
  padding: 5px 12px; white-space: nowrap;
}
.member-banner {
  display: inline-block; margin: 26px auto 0;
  font-family: var(--mono); font-size: 12.5px; color: var(--green);
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
  background: color-mix(in srgb, var(--green) 7%, transparent);
  padding: 8px 16px;
}
.member-banner.dim-banner { color: var(--muted-fg); border-color: var(--border); background: var(--bg-raise); }
.member-banner a { text-decoration: underline; text-underline-offset: 3px; color: var(--fg); }
.member-banner b { color: var(--fg); }
.member-banner.dim-banner b { color: var(--green); }

/* stock tags */
.tag-box.stock-ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.tag-box.stock-low { color: #e8a33d; border-color: color-mix(in srgb, #e8a33d 45%, transparent); }
.tag-box.stock-out { color: #e5534b; border-color: color-mix(in srgb, #e5534b 40%, transparent); }

/* how many are left — same wording on cards and the product page */
.stock-line {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted-fg);
}
.stock-dot { width: 6px; height: 6px; flex-shrink: 0; background: currentColor; }
.stock-line.ok { color: var(--green); }
.stock-line.low { color: #e8a33d; }
.stock-line.out { color: #e5534b; }

/* "How every account is tested" — storefront strip + product-page list */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-item { border: 1px solid var(--border); background: var(--card); padding: 16px 18px; }
.trust-head {
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .04em;
  color: var(--green); margin-bottom: 8px;
}
.trust-item p { color: var(--muted-fg); font-size: 13.5px; line-height: 1.55; margin: 0; }

.test-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.test-list li { display: flex; flex-direction: column; gap: 4px; }
.test-list b {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: .03em;
  color: var(--green);
}
.test-list span { color: var(--muted-fg); font-size: 13.5px; line-height: 1.55; }

/* card stock row, between the tagline and the price foot */
.card-stock { margin-top: 2px; }
.card-skill.is-out { opacity: .72; }
.card-skill.is-out:hover { opacity: 1; }

/* stock row in the buy panel */
.buy-stock {
  margin: -4px 0 14px; padding: 9px 11px;
  border: 1px solid var(--border); background: var(--bg-raise);
}
.buy-stock .stock-line { font-size: 12.5px; }
.qty-note { font-size: 12px; color: var(--muted-fg); margin: -6px 0 12px; line-height: 1.45; }

/* buy panel */
.buy-panel .buy-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.buy-panel .buy-price .now { font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.buy-panel .buy-price .orig { font-family: var(--mono); font-size: 17px; color: var(--faint-fg); text-decoration: line-through; }
.save-tag {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--green);
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent); padding: 2.5px 8px;
}
.member-hint {
  font-size: 12.5px; color: var(--muted-fg); border: 1px dashed var(--border);
  padding: 10px 12px; margin-bottom: 14px; line-height: 1.5;
}
.member-hint a { text-decoration: underline; text-underline-offset: 3px; color: var(--fg); }
.member-hint b { color: var(--green); }
.qty-label {
  display: block; font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted-fg); margin-bottom: 7px;
}
.qty-select {
  width: 100%; margin-bottom: 12px;
  background: var(--bg-raise); border: 1px solid var(--border); color: var(--fg);
  font-family: var(--mono); font-size: 13px; padding: 9px 10px; outline: none;
}
.qty-select:focus { border-color: var(--border-strong); }
/* restock / notify-me box on sold-out products */
.restock-box { text-align: left; }
.restock-head {
  font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--fg); margin-bottom: 6px;
}
.restock-sub { color: var(--muted-fg); font-size: 13px; margin-bottom: 14px; }
.restock-form { display: flex; flex-direction: column; gap: 10px; }
.restock-form input {
  width: 100%; background: var(--bg-raise); border: 1px solid var(--border); color: var(--fg);
  font-family: var(--mono); font-size: 13px; padding: 10px 12px; outline: none;
}
.restock-form input:focus { border-color: var(--border-strong); }
.restock-form .btn { justify-content: center; }
.restock-ok {
  font-family: var(--mono); font-size: 13px; color: var(--green);
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
  background: color-mix(in srgb, var(--green) 8%, transparent); padding: 10px 12px;
}
.restock-err {
  font-family: var(--mono); font-size: 13px; color: #e5534b;
  border: 1px solid color-mix(in srgb, #e5534b 40%, transparent); padding: 10px 12px;
}

.daily-hint {
  font-family: var(--mono); font-size: 12px; color: var(--muted-fg);
  border: 1px dashed var(--border); padding: 8px 11px; margin-bottom: 12px;
}
.daily-hint b { color: var(--fg); }
.daily-hint a { text-decoration: underline; text-underline-offset: 3px; color: var(--fg); }

.buy-subtotal {
  font-family: var(--mono); font-size: 13px; color: var(--muted-fg);
  margin-bottom: 12px;
}
.buy-subtotal b { color: var(--fg); font-size: 15px; }
.buy-btn { width: 100%; justify-content: center; padding: 12px 14px; font-size: 14px; }
.buy-btn:disabled { opacity: .5; cursor: not-allowed; }
.buy-fine { font-family: var(--mono); font-size: 11px; color: var(--faint-fg); margin-top: 12px; text-align: center; }
.buy-fine a { text-decoration: underline; text-underline-offset: 3px; }

/* specs + order summary */
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table td { padding: 7px 0; border-bottom: 1px solid var(--border); }
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table td:first-child { color: var(--muted-fg); font-family: var(--mono); font-size: 12px; }
.spec-table td:last-child { text-align: right; font-weight: 600; }

.delivery-note { font-size: 14px; color: var(--fg); }
.delivery-note.faint { color: var(--muted-fg); font-size: 12.5px; margin-top: 8px; }

.error-panel { border-color: color-mix(in srgb, #e5534b 45%, transparent); color: #e5534b; font-family: var(--mono); font-size: 13px; }

/* ── phone verification (accounts delivered with a number) ────────────────
   Two readings on one card: the number to paste out, and the code coming
   back. The number is the loud one until a code exists, because copying it is
   the only thing to do first; the code then takes the emphasis, because from
   that moment it's the only thing left to do. */
.sms-intro { font-size: 13px; color: var(--muted-fg); line-height: 1.55; margin: 0 0 14px; }
.sms-num { border: 1px solid var(--border); background: var(--bg-raise); padding: 4px 14px 12px; margin-bottom: 12px; }
.sms-num + .sms-num { margin-top: 0; }
.sms-row { display: flex; align-items: flex-end; gap: 12px; padding: 10px 0; }
.sms-coderow { border-top: 1px solid var(--border); }
.sms-field { min-width: 0; }
.sms-label {
  display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--faint-fg); margin-bottom: 6px;
}
.sms-value {
  display: flex; align-items: center; gap: 9px; background: none; border: 0; padding: 0;
  color: var(--fg); font-family: var(--mono); font-size: 21px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: .01em; cursor: pointer;
  text-align: left; word-break: break-all;
}
.sms-value:hover { color: var(--green); }
.sms-flag { font-size: 17px; line-height: 1; }
.sms-code { color: var(--green); }
.sms-status { font-family: var(--mono); font-size: 12.5px; color: var(--muted-fg); }
.sms-num.listening .sms-status { color: var(--fg); }
.sms-num.has-code .sms-status { color: var(--green); }
.sms-copied {
  margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--green);
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
  background: color-mix(in srgb, var(--green) 8%, transparent); padding: 4px 9px;
}
.sms-retry {
  margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--fg);
  background: none; border: 1px solid var(--border); padding: 6px 11px; cursor: pointer;
}
.sms-retry:hover { border-color: var(--border-strong); }
.sms-expiry { font-family: var(--mono); font-size: 11px; color: var(--faint-fg); margin: 2px 0 0; }

/* admin orders */
.order-admin.needs-fulfillment { border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.order-admin-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.order-admin-head .price-tag { margin-left: auto; }
.order-admin-meta { font-family: var(--mono); font-size: 12px; color: var(--muted-fg); margin-top: 8px; }
.mono-dim { color: var(--faint-fg); }
.fulfill-form { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.fulfill-form textarea {
  width: 100%; background: var(--bg-raise); border: 1px solid var(--border); color: var(--fg);
  font-family: var(--mono); font-size: 12.5px; padding: 12px; outline: none; resize: vertical;
}
.fulfill-form textarea:focus { border-color: var(--border-strong); }
.fulfill-form .btn { align-self: flex-start; }
.fulfilled-note { margin-top: 12px; }
.fulfilled-note summary { font-family: var(--mono); font-size: 12px; color: var(--muted-fg); cursor: pointer; }
.fulfilled-note pre {
  margin-top: 10px; background: var(--bg-raise); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px; padding: 12px; white-space: pre-wrap; word-break: break-word;
}

/* ── admin dashboard: stat tiles + charts ────────────────────────────────
   One accent hue carries every measure; grey carries the de-emphasised
   reference marks. The second hue exists for exactly one job — naming the two
   sides of the partner split — and is never used as "another series". Blue
   against green survives red/green colour blindness, where an orange or a
   lighter green would not. Every step is validated against its own surface, so
   the dark ones are NOT the light ones brightened. */
:root { --chart-accent: #1faa35; --chart-accent-alt: #4a90e2; --chart-surface: var(--card); }
[data-theme="light"] { --chart-accent: #1a9e31; --chart-accent-alt: #2f74c0; }

.stat-row {
  /* auto-fill, not auto-fit: a short last row keeps tile-width tiles instead
     of two stretched slabs. */
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 2px; margin-bottom: 20px;
}
/* Tiles carry their own hairline rather than sitting on a filled seam grid —
   a short last row then just ends, instead of leaving a block of bare seam. */
.stat { background: var(--card); border: 1px solid var(--border); padding: 14px 16px; }
.stat .val { font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.stat.hero { grid-column: span 2; }
.stat.hero .val { font-size: 34px; letter-spacing: -.035em; }
.stat .lab {
  font-family: var(--mono); font-size: 11.5px; color: var(--faint-fg);
  margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat .sub-val { font-family: var(--mono); font-size: 11.5px; color: var(--muted-fg); margin-top: 5px; }
.stat .delta { font-family: var(--mono); font-size: 12px; font-weight: 600; margin-top: 5px; }
.stat .delta.flat { font-weight: 400; }
.stat .delta.up { color: var(--chart-accent); }
.stat .delta.down { color: #e5534b; }
.stat .delta.flat { color: var(--muted-fg); }

/* meter: fill = the share won, track = a quieter step of the same surface */
.meter { height: 6px; background: var(--muted); margin-top: 9px; }
.meter-fill { height: 100%; background: var(--chart-accent); }

.chart-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 4px;
}
.chart-range { display: flex; gap: 2px; background: var(--border); border: 1px solid var(--border); }
.chart-range button {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted-fg);
  background: var(--card); border: 0; padding: 5px 11px;
}
.chart-range button:hover { color: var(--fg); background: var(--card-hover); }
.chart-range button[aria-pressed="true"] { color: var(--fg); background: var(--muted); }

.chart { position: relative; margin-top: 16px; }
.chart-legend {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted-fg); margin-bottom: 10px;
}
.legend-key { display: inline-flex; align-items: center; gap: 7px; }
.key-bar { width: 9px; height: 11px; background: var(--chart-accent); }
.key-bar-alt { background: var(--chart-accent-alt); }
.key-line { width: 15px; height: 2px; background: var(--muted-fg); }
.key-line-accent { background: var(--chart-accent); }
.key-line-alt { background: var(--chart-accent-alt); }
.chart-plot { width: 100%; }
.chart-plot svg { display: block; width: 100%; }
.chart-plot svg:focus-visible { outline: 1px solid var(--border-strong); outline-offset: 2px; }
.chart-empty {
  font-family: var(--mono); font-size: 12.5px; color: var(--faint-fg);
  border: 1px dashed var(--border); padding: 22px; text-align: center;
}

.chart-tip {
  position: absolute; z-index: 5; pointer-events: none;
  background: var(--bg-raise); border: 1px solid var(--border-strong);
  padding: 9px 11px; font-family: var(--mono); font-size: 11.5px;
  color: var(--muted-fg); min-width: 132px; box-shadow: 0 6px 22px rgb(0 0 0 / .35);
}
.chart-tip .tip-day { color: var(--fg); font-weight: 700; margin-bottom: 5px; }
.chart-tip .tip-line { display: flex; justify-content: space-between; gap: 14px; }
.chart-tip .tip-line b { color: var(--fg); font-weight: 600; }
.chart-tip .tip-tiers { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.chart-tip .tip-pct { color: var(--faint-fg); font-weight: 400; }
.chart-tip[hidden] { display: none; }

/* horizontal tier bars — every value is labelled, so nothing needs a hover */
.tier-rows { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
/* Fixed value columns, so every track is the same width and bar lengths stay
   comparable down the ladder. */
.tier-row { display: grid; grid-template-columns: 118px 1fr 92px 86px; gap: 12px; align-items: center; }
.tier-row .tier-name { font-family: var(--mono); font-size: 12px; color: var(--muted-fg); }
.tier-track { height: 14px; background: var(--muted); }
.tier-fill { height: 100%; background: var(--chart-accent); min-width: 2px; border-radius: 0 3px 3px 0; }
.tier-row .tier-val {
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; text-align: right;
  font-variant-numeric: tabular-nums;
}
.tier-row .tier-sub { font-family: var(--mono); font-size: 11.5px; color: var(--faint-fg); text-align: right; }

.chart-table-toggle {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted-fg);
  background: none; border: 0; padding: 8px 0 0; text-decoration: underline; text-underline-offset: 3px;
}
.chart-table-toggle:hover { color: var(--fg); }
.chart-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.chart-table td, .chart-table th { font-variant-numeric: tabular-nums; }
.chart-table th + th, .chart-table td + td { padding-left: 16px; }
.chart-table th {
  text-align: right; font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  color: var(--faint-fg); padding: 7px 0; border-bottom: 1px solid var(--border);
}
.chart-table th:first-child, .chart-table td:first-child { text-align: left; }
.chart-table td { text-align: right; font-size: 12.5px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.chart-table .mono-dim { font-family: var(--mono); font-size: 11.5px; color: var(--faint-fg); margin-left: 8px; }
/* the settle-up line — heavier rule above it, no rule below, so it reads as
   the sum of the rows rather than one more of them */
.chart-table .row-total td { border-bottom: 0; border-top: 1px solid var(--border-strong); padding-top: 9px; }

@media (max-width: 640px) {
  .stat.hero { grid-column: span 1; }
  .stat.hero .val { font-size: 27px; }
  /* no room to sit a date beside the deal — it goes under it */
  .chart-table .mono-dim { display: block; margin-left: 0; }
  /* too narrow for four columns — the numbers drop under their own bar */
  .tier-row {
    grid-template-columns: 1fr auto auto; gap: 4px 10px;
    grid-template-areas: "name val sub" "track track track";
  }
  .tier-row .tier-name { grid-area: name; }
  .tier-track { grid-area: track; }
  .tier-row .tier-val { grid-area: val; }
  .tier-row .tier-sub { grid-area: sub; }
}

/* svg marks — thin, hairline grid, one accent hue */
.chart-svg { overflow: visible; }
.ax-grid { stroke: var(--grid-line); stroke-width: 1; }
.ax-base { stroke: var(--border); stroke-width: 1; }
.ax-lab {
  font-family: var(--mono); font-size: 10.5px; fill: var(--faint-fg);
  font-variant-numeric: tabular-nums;
}
.mark-bar { fill: var(--chart-accent); }
.mark-bar-alt { fill: var(--chart-accent-alt); }
/* deal-change marker — a rule the data didn't draw, so it stays dashed and thin */
.mark-rule { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.mark-note { font-family: var(--mono); font-size: 10.5px; fill: var(--muted-fg); }
.mark-avg { fill: none; stroke: var(--muted-fg); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mark-line { fill: none; stroke: var(--chart-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mark-line-alt { fill: none; stroke: var(--chart-accent-alt); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mark-wash { fill: var(--chart-accent); fill-opacity: .1; }
.mark-dot { fill: var(--chart-accent); stroke: var(--chart-surface); stroke-width: 2; }
.mark-dot-alt { fill: var(--chart-accent-alt); stroke: var(--chart-surface); stroke-width: 2; }
/* Labels sit over the marks they name, so they carry a surface-coloured halo
   rather than being nudged around to dodge a line that moves with the data. */
.mark-lab, .mark-note {
  paint-order: stroke; stroke: var(--chart-surface); stroke-width: 3px; stroke-linejoin: round;
}
.mark-lab { font-family: var(--mono); font-size: 11px; font-weight: 600; fill: var(--fg); }
.hover-band { fill: var(--fg); fill-opacity: .06; }
.hover-band[hidden] { display: none; }

/* ── Your orders ──
   The filter bar shares the order rows' edges: the storefront's .search-box is
   a 580px centred hero field, which under a 640px list left three different
   left margins on one page (heading, chips, field). Here it's a plain row that
   starts and ends where the orders do. */
.orders-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.orders-bar .chips { margin: 0; justify-content: flex-start; flex-wrap: nowrap; }
.orders-bar .search-box { max-width: none; margin: 0; flex: 1; }
.orders-bar .search-box input { padding: 9px 0; }
@media (max-width: 620px) {
  .orders-bar { flex-direction: column; align-items: stretch; }
  .orders-bar .chips { flex-wrap: wrap; }
}
/* Every order reads as the same two lines whether or not it shipped a number —
   what it was, then where to find it. A number is the one part of a delivery
   worth showing here, so it sits in the meta line at full strength. */
.order-row .order-admin-meta .num { color: var(--fg); }
