/* ==========================================================================
   LOGS MARKET NG — Customer Store
   Light, trustworthy Nigerian commerce. Paper base, market green, hairlines.
   ========================================================================== */

:root{
  --paper:#F7F5EF;
  --card:#FFFFFF;
  --line:#E2DED4;
  --line-soft:#EDEAE3;
  --ink:#101917;
  --muted:#5E6963;

  --green:#128C4A;
  --green-deep:#0C3B2A;
  --green-mid:#12503A;
  --green-soft:#E8F3EC;
  --green-edge:#BFDECB;

  --amber:#F2A93B;
  --amber-bg:#FDF3E0;
  --amber-ink:#7A4E07;
  --amber-edge:#F0DDB6;

  --red:#C0392B;
  --red-bg:#FBEBE9;
  --red-edge:#EFC8C2;

  --r-sm:10px;
  --r-md:14px;
  --r-lg:20px;
  --shadow-sm:0 1px 2px rgba(16,25,23,.05);
  --shadow:0 2px 6px rgba(16,25,23,.05), 0 20px 34px -26px rgba(16,25,23,.4);
  --font-display:'Sora', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0;
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.6;
  color:var(--ink);
  background:var(--paper);
  -webkit-font-smoothing:antialiased;
  padding-bottom:82px;
  min-height:100vh;
}
@media (min-width:900px){ body{ padding-bottom:0; } }

h1,h2,h3,h4{ font-family:var(--font-display); font-weight:600; line-height:1.22; letter-spacing:-.012em; margin:0; }
p{ margin:0; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; }
img,svg{ display:block; max-width:100%; }
::selection{ background:#CFE7D8; }
:focus-visible{ outline:2px solid var(--green); outline-offset:2px; border-radius:6px; }

.hidden{ display:none !important; }
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.muted{ color:var(--muted); }
.small{ font-size:13px; }
.mono{ font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:12.5px; }
.container{ width:100%; max-width:1100px; margin:0 auto; padding:16px 16px 8px; }

/* ---------- prices ---------- */
.price{
  font-family:var(--font-display);
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
  font-weight:600;
  color:var(--green-deep);
  white-space:nowrap;
  letter-spacing:-.01em;
}
.price .cur{ font-size:.74em; color:var(--muted); font-weight:600; margin-inline-end:1px; }
.price-lg{ font-size:30px; }
.price-xl{ font-size:36px; }

/* ---------- top bar ---------- */
.topbar{
  position:sticky; top:0; z-index:40;
  background:var(--green-deep);
  color:#fff;
  box-shadow:0 1px 0 rgba(0,0,0,.12);
}
.topbar-row{
  max-width:1100px; margin:0 auto;
  display:grid; gap:10px 12px; align-items:center;
  padding:10px 16px 12px;
  grid-template-columns:1fr auto;
  grid-template-areas:
    "brand actions"
    "search search";
}
@media (min-width:900px){
  .topbar-row{
    grid-template-columns:auto minmax(200px,1fr) auto auto;
    grid-template-areas:"brand search nav actions";
    padding:12px 20px;
    gap:14px;
  }
}
.brand{ grid-area:brand; display:inline-flex; align-items:center; gap:9px; min-width:0; }
.brand-mark{ width:32px; height:32px; border-radius:9px; background:#fff; color:var(--green-deep); display:grid; place-items:center; flex:0 0 auto; }
.brand-mark svg{ width:19px; height:19px; }
.brand-text{ font-family:var(--font-display); font-weight:700; font-size:14px; letter-spacing:.03em; white-space:nowrap; display:flex; align-items:baseline; gap:5px; }
.brand-text .b-sep{ color:rgba(255,255,255,.55); font-weight:500; }
.brand-text .b-ng{ color:#7BE0A6; }

.search-wrap{
  grid-area:search;
  position:relative; display:flex; align-items:center;
  background:#fff; border:1px solid transparent;
  border-radius:12px; padding:0 10px; height:44px;
  transition:box-shadow .15s ease;
}
.search-wrap:focus-within{ box-shadow:0 0 0 3px rgba(255,255,255,.22); }
.search-wrap > svg{ width:16px; height:16px; color:var(--muted); flex:0 0 auto; }
.search-wrap input{
  flex:1 1 auto; min-width:0; border:0; outline:0; background:transparent;
  font:inherit; font-size:15px; color:var(--ink); padding:0 8px;
  user-select:text;
}
.search-wrap input::placeholder{ color:#6F7973; }
.search-wrap input::-webkit-search-cancel-button{ -webkit-appearance:none; appearance:none; }
.search-clear{ width:28px; height:28px; border:0; background:transparent; display:grid; place-items:center; color:var(--muted); border-radius:50%; cursor:pointer; flex:0 0 auto; }
.search-clear svg{ width:13px; height:13px; }
.search-clear:hover{ background:var(--line-soft); color:var(--ink); }

.topnav{ grid-area:nav; display:none; gap:2px; }
@media (min-width:900px){ .topnav{ display:flex; } }
.topnav a{ padding:8px 11px; border-radius:9px; font-size:14px; font-weight:500; color:rgba(255,255,255,.72); transition:background .15s, color .15s; }
.topnav a:hover{ color:#fff; background:rgba(255,255,255,.1); }
.topnav a.active{ color:#fff; background:rgba(255,255,255,.16); font-weight:600; }

.topbar-actions{ grid-area:actions; display:flex; gap:7px; align-items:center; justify-self:end; }
.icon-btn{
  position:relative; width:44px; height:44px; border-radius:12px;
  border:1px solid rgba(255,255,255,.2);
  background:rgba(255,255,255,.08); color:#fff;
  display:grid; place-items:center; cursor:pointer;
  transition:background .15s, transform .1s, border-color .15s;
  -webkit-tap-highlight-color:transparent;
}
.icon-btn:hover{ background:rgba(255,255,255,.18); }
.icon-btn:active{ transform:scale(.94); }
.icon-btn svg{ width:19px; height:19px; }
.avatar-initial{ display:none; font-family:var(--font-display); font-weight:700; font-size:15px; }
.icon-btn.signed-in{ background:#fff; border-color:#fff; color:var(--green-deep); }
.icon-btn.signed-in svg{ display:none; }
.icon-btn.signed-in .avatar-initial{ display:block; }
.badge{
  position:absolute; top:-5px; right:-5px; min-width:19px; height:19px; padding:0 5px;
  border-radius:10px; background:var(--amber); color:#3A2600;
  font-size:11px; font-weight:700; line-height:19px; text-align:center;
  font-variant-numeric:tabular-nums; border:2px solid var(--green-deep);
}

/* ---------- bottom tabs ---------- */
.tabbar{
  position:fixed; left:0; right:0; bottom:0; z-index:45;
  display:grid; grid-template-columns:repeat(4,1fr);
  background:rgba(255,255,255,.97);
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  border-top:1px solid var(--line);
  padding:5px 4px;
}
@media (min-width:900px){ .tabbar{ display:none; } }
.tabbar a{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  min-height:52px; padding:6px 2px; border-radius:12px;
  font-size:11px; font-weight:600; letter-spacing:.01em; color:#5F6A64;
  -webkit-tap-highlight-color:transparent;
}
.tabbar a svg{ width:21px; height:21px; }
.tabbar a.active{ color:var(--green-deep); }
.tabbar a.active svg{ color:var(--green); }
.tabbar a:active{ background:var(--line-soft); }

/* ---------- hero & shop ---------- */
.hero{
  background:linear-gradient(168deg,#FFFFFF 0%,#F2F8F3 100%);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  padding:20px 18px 18px;
  box-shadow:var(--shadow-sm);
}
.eyebrow{ font-family:var(--font-display); font-size:11px; font-weight:600; letter-spacing:.13em; text-transform:uppercase; color:var(--green); margin:0 0 6px; }
.hero-title{ font-size:23px; letter-spacing:-.02em; }
.hero-sub{ color:var(--muted); font-size:14px; margin-top:7px; max-width:52ch; }
.hero-facts{ display:flex; flex-wrap:wrap; gap:6px; margin-top:14px; }
.hero-facts span{
  font-size:11.5px; font-weight:600; color:var(--green-deep);
  background:var(--green-soft); border:1px solid var(--green-edge);
  padding:4px 9px; border-radius:999px;
}

.setup-strip{
  display:flex; align-items:center; gap:9px;
  margin-top:12px; padding:10px 12px;
  background:var(--amber-bg); border:1px solid var(--amber-edge);
  border-radius:var(--r-md); color:var(--amber-ink);
  font-size:12.5px; font-weight:500; line-height:1.4;
}
.setup-strip svg{ width:15px; height:15px; flex:0 0 auto; }
.setup-strip span{ flex:1 1 auto; }
.setup-strip:hover{ border-color:var(--amber); }

.chip-row{ display:flex; gap:8px; overflow-x:auto; padding:14px 2px 4px; scrollbar-width:none; }
.chip-row::-webkit-scrollbar{ display:none; }
.chip{
  flex:0 0 auto; display:inline-flex; align-items:center; gap:2px;
  border:1px solid var(--line); background:#fff; color:var(--muted);
  border-radius:999px; padding:0 15px; min-height:44px; font-size:13px; font-weight:600;
  cursor:pointer; transition:background .15s, color .15s, border-color .15s;
  -webkit-tap-highlight-color:transparent; white-space:nowrap;
}
.chip:hover{ border-color:var(--green-edge); color:var(--green-deep); }
.chip.active{ background:var(--green-deep); border-color:var(--green-deep); color:#fff; }
.chip .chip-n{ opacity:.62; font-variant-numeric:tabular-nums; margin-inline-start:3px; }

.section-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 2px 10px; }
.section-head h2{ font-size:15px; font-weight:600; color:var(--ink); }
.sort-wrap select{
  appearance:none; -webkit-appearance:none;
  border:1px solid var(--line); background:#fff; color:var(--ink);
  border-radius:10px; min-height:44px; padding:0 32px 0 12px; font:inherit; font-size:13px; font-weight:500;
  cursor:pointer;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7570' stroke-width='2.2' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat:no-repeat; background-position:right 8px center; background-size:13px;
}

.product-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
@media (min-width:640px){ .product-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; } }
@media (min-width:980px){ .product-grid{ grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; } }

.product-card{
  position:relative; background:var(--card); border:1px solid var(--line);
  border-radius:var(--r-md); overflow:hidden;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  box-shadow:var(--shadow-sm);
}
@media (hover:hover){ .product-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow); border-color:#D3CEC2; } }
.card-link{ position:absolute; inset:0; z-index:1; border-radius:var(--r-md); }
.thumb{ aspect-ratio:1/1; display:grid; place-items:center; padding:12px; }
.thumb .dev{ width:86%; height:auto; }
.pc-body{ padding:0 12px 12px; }
.pc-brand{ font-size:10.5px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); margin-bottom:3px; }
.pc-name{ font-size:13.5px; font-weight:600; line-height:1.3; min-height:35px; }
.pc-foot{ display:flex; align-items:baseline; justify-content:space-between; gap:6px; margin-top:6px; }
.pc-foot .price{ font-size:15px; }
.pc-cat{ font-size:10.5px; color:var(--muted); font-weight:500; }
.quick-add{
  position:absolute; z-index:2; right:9px; top:9px;
  width:36px; height:36px; border-radius:50%;
  background:#fff; border:1px solid var(--line); color:var(--green-deep);
  display:grid; place-items:center; cursor:pointer;
  box-shadow:var(--shadow-sm); transition:background .15s, transform .12s, border-color .15s;
  -webkit-tap-highlight-color:transparent;
}
.quick-add svg{ width:15px; height:15px; }
.quick-add:hover{ background:var(--green); border-color:var(--green); color:#fff; }
.quick-add:active{ transform:scale(.9); }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:46px; padding:0 18px; border-radius:12px;
  border:1px solid transparent; background:var(--green); color:#fff;
  font-family:var(--font-body); font-size:14.5px; font-weight:600;
  cursor:pointer; transition:background .15s, border-color .15s, transform .1s, color .15s;
  -webkit-tap-highlight-color:transparent; text-align:center;
}
.btn:active{ transform:scale(.985); }
.btn:disabled{ opacity:.5; cursor:not-allowed; transform:none; }
.btn-primary:hover:not(:disabled){ background:#0E7A40; }
.btn-primary{ background:var(--green); color:#fff; }
.btn-dark{ background:var(--green-deep); color:#fff; }
.btn-dark:hover:not(:disabled){ background:#144A34; }
.btn-outline{ background:#fff; border-color:var(--line); color:var(--ink); }
.btn-outline:hover:not(:disabled){ border-color:var(--green-edge); background:var(--green-soft); color:var(--green-deep); }
.btn-ghost{ background:transparent; color:var(--green-deep); border-color:transparent; }
.btn-ghost:hover:not(:disabled){ background:var(--green-soft); }
.btn-sm{ min-height:38px; padding:0 13px; font-size:13px; border-radius:10px; }
.btn-block{ width:100%; }
.btn svg{ width:16px; height:16px; }

.link-more{ font-size:13px; font-weight:600; color:var(--green); display:inline-flex; align-items:center; gap:5px; }
.link-more:hover{ text-decoration:underline; }

/* ---------- cards / panels ---------- */
.card{ background:var(--card); border:1px solid var(--line); border-radius:var(--r-md); padding:16px; box-shadow:var(--shadow-sm); }
.card + .card{ margin-top:12px; }
.card-title{ font-size:14px; font-weight:600; margin-bottom:10px; }
.stack{ display:flex; flex-direction:column; gap:12px; }
.row{ display:flex; align-items:center; gap:10px; }
.row-between{ display:flex; align-items:center; justify-content:space-between; gap:12px; }

.page-head{ padding:4px 2px 14px; }
.page-head h1{ font-size:22px; }
.page-head p{ margin-top:5px; font-size:13.5px; color:var(--muted); }

/* ---------- notices ---------- */
.notice{ border-radius:var(--r-md); padding:12px 14px; font-size:13px; line-height:1.55; border:1px solid; }
.notice strong{ font-weight:600; }
.notice code{ font-family:ui-monospace, Menlo, monospace; font-size:12px; background:rgba(0,0,0,.05); padding:1px 5px; border-radius:5px; }
.notice-amber{ background:var(--amber-bg); border-color:var(--amber-edge); color:var(--amber-ink); }
.notice-amber strong{ color:#5C3A05; }
.notice-green{ background:var(--green-soft); border-color:var(--green-edge); color:#0F4F30; }
.notice-red{ background:var(--red-bg); border-color:var(--red-edge); color:#8A2A1F; }
.notice-neutral{ background:#F3F1EA; border-color:var(--line); color:var(--muted); }
.notice + .card, .card + .notice, .notice + .notice{ margin-top:12px; }

.chip-status{
  display:inline-flex; align-items:center; gap:6px;
  font-size:11.5px; font-weight:600; padding:4px 10px; border-radius:999px;
  border:1px solid; white-space:nowrap;
}
.chip-pending{ background:var(--amber-bg); border-color:var(--amber-edge); color:var(--amber-ink); }
.chip-ok{ background:var(--green-soft); border-color:var(--green-edge); color:#0F4F30; }
.chip-lock{ background:#F1EFE8; border-color:var(--line); color:var(--muted); }
.chip-dot{ width:6px; height:6px; border-radius:50%; background:currentColor; }

/* ---------- forms ---------- */
.field{ display:block; }
.field + .field{ margin-top:12px; }
.label{ display:block; font-size:12.5px; font-weight:600; color:var(--ink); margin-bottom:5px; }
.input, .select, .textarea{
  width:100%; min-height:46px; padding:10px 12px;
  border:1px solid var(--line); border-radius:11px;
  background:#fff; color:var(--ink); font:inherit; font-size:15px;
  transition:border-color .15s, box-shadow .15s;
  user-select:text;
}
.textarea{ min-height:104px; resize:vertical; line-height:1.55; }
.input:focus, .select:focus, .textarea:focus{ outline:0; border-color:var(--green); box-shadow:0 0 0 3px rgba(18,140,74,.13); }
.input::placeholder, .textarea::placeholder{ color:#6F7973; opacity:1; }
.select{ appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7570' stroke-width='2.2' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat:no-repeat; background-position:right 12px center; background-size:14px; padding-right:34px; }
.input.invalid, .select.invalid{ border-color:var(--red); box-shadow:0 0 0 3px rgba(192,57,43,.1); }
.err{ font-size:12px; color:var(--red); margin-top:4px; font-weight:500; }
.hint{ font-size:12px; color:var(--muted); margin-top:5px; }
.form-error{ font-size:13px; color:#8A2A1F; background:var(--red-bg); border:1px solid var(--red-edge); border-radius:10px; padding:9px 11px; margin-bottom:12px; }
.form-error:empty{ display:none; }
.field-grid{ display:grid; gap:12px; }
@media (min-width:640px){ .field-grid.two{ grid-template-columns:1fr 1fr; } }

/* ---------- quantity stepper ---------- */
.qty{ display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:11px; background:#fff; overflow:hidden; }
.qty button{
  width:40px; height:42px; border:0; background:transparent; cursor:pointer;
  display:grid; place-items:center; color:var(--green-deep);
  -webkit-tap-highlight-color:transparent;
}
.qty button:hover{ background:var(--green-soft); }
.qty button:active{ background:var(--green-edge); }
.qty button svg{ width:14px; height:14px; }
.qty span{ min-width:34px; text-align:center; font-weight:600; font-variant-numeric:tabular-nums; font-size:14px; }

/* ---------- cart / lines ---------- */
.line-item{ display:grid; grid-template-columns:64px 1fr auto; gap:12px; align-items:start; padding:14px 0; border-bottom:1px solid var(--line-soft); }
.line-item:last-child{ border-bottom:0; }
.line-thumb{ width:64px; height:64px; border-radius:11px; display:grid; place-items:center; padding:6px; }
.line-thumb .dev{ width:100%; }
.line-name{ font-size:13.5px; font-weight:600; line-height:1.3; }
.line-meta{ font-size:12px; color:var(--muted); margin-top:2px; }
.line-right{ text-align:right; display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.remove-btn{ border:0; background:transparent; color:var(--muted); font-size:12px; font-weight:600; cursor:pointer; padding:0 2px; min-height:44px; display:inline-flex; align-items:center; }
.remove-btn:hover{ color:var(--red); }

.summary{ background:#fff; border:1px solid var(--line); border-radius:var(--r-md); padding:16px; box-shadow:var(--shadow-sm); }
.summary-row{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; font-size:14px; padding:5px 0; }
.summary-row .k{ color:var(--muted); }
.summary-row .v{ font-weight:600; font-variant-numeric:tabular-nums; }
.summary-total{ border-top:1px solid var(--line); margin-top:8px; padding-top:12px; font-size:15px; }
.summary-total .v .price{ font-size:22px; }

/* ---------- stepper ---------- */
.stepper{ list-style:none; display:flex; align-items:center; gap:6px; margin:0 0 16px; padding:0; }
.stepper li{ display:flex; align-items:center; gap:7px; }
.stepper .dot{
  width:26px; height:26px; border-radius:50%; display:grid; place-items:center;
  font-size:12px; font-weight:700; font-family:var(--font-display);
  background:#fff; border:1px solid var(--line); color:var(--muted); flex:0 0 auto;
  font-variant-numeric:tabular-nums;
}
.stepper .lbl{ font-size:12px; font-weight:600; color:var(--muted); }
.stepper li.active .dot{ background:var(--green-deep); border-color:var(--green-deep); color:#fff; }
.stepper li.active .lbl{ color:var(--ink); }
.stepper li.done .dot{ background:var(--green-soft); border-color:var(--green-edge); color:var(--green); }
.stepper li.done .lbl{ color:var(--green-deep); }
.stepper-sep{ flex:1 1 auto; height:1px; background:var(--line); min-width:10px; }
@media (max-width:430px){ .stepper .lbl{ font-size:11px; } .stepper{ gap:4px; } }

/* ---------- payment options ---------- */
.option{
  display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center;
  border:1px solid var(--line); border-radius:var(--r-md); padding:14px; background:#fff;
  cursor:pointer; transition:border-color .15s, background .15s;
}
.option + .option{ margin-top:10px; }
.option:hover{ border-color:var(--green-edge); }
.option.selected{ border-color:var(--green); background:var(--green-soft); }
.option.disabled{ opacity:.62; cursor:not-allowed; background:#FAF9F5; }
.option input{ accent-color:var(--green); width:18px; height:18px; margin:0; }
.option-name{ font-size:14px; font-weight:600; }
.option-sub{ font-size:12px; color:var(--muted); }

/* ---------- ledger table ---------- */
.table-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid var(--line); border-radius:var(--r-md); background:#fff; }
table.doc-table, table.ledger{ width:100%; border-collapse:collapse; font-size:13px; min-width:520px; }
table.ledger{ min-width:560px; }
table th{
  text-align:left; font-size:11px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--muted); font-weight:600; padding:11px 12px;
  border-bottom:1px solid var(--line); background:#FBFAF6; white-space:nowrap;
}
table td{ padding:11px 12px; border-bottom:1px solid var(--line-soft); vertical-align:top; color:var(--ink); }
table tr:last-child td{ border-bottom:0; }
table td.num{ text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
table.ledger thead th:nth-child(n+3){ text-align:right; }
.ledger-empty{ padding:22px 16px; text-align:center; color:var(--muted); font-size:13px; }

/* ---------- timeline ---------- */
.timeline{ list-style:none; margin:0; padding:0; }
.timeline li{ display:grid; grid-template-columns:22px 1fr; gap:12px; padding-bottom:16px; position:relative; }
.timeline li:last-child{ padding-bottom:0; }
.timeline li::before{
  content:''; position:absolute; left:10px; top:20px; bottom:0; width:2px; background:var(--line);
}
.timeline li:last-child::before{ display:none; }
.timeline .tl-dot{
  width:22px; height:22px; border-radius:50%; display:grid; place-items:center;
  background:#fff; border:2px solid var(--line); color:var(--muted); z-index:1;
}
.timeline .tl-dot svg{ width:11px; height:11px; }
.timeline li.current .tl-dot{ background:var(--green-deep); border-color:var(--green-deep); color:#fff; }
.timeline li.current::before{ background:var(--line); }
.timeline .tl-title{ font-size:13.5px; font-weight:600; }
.timeline li.locked .tl-title{ color:var(--muted); font-weight:500; }
.timeline .tl-sub{ font-size:12px; color:var(--muted); margin-top:2px; }

/* ---------- empty states ---------- */
.empty{ text-align:center; padding:34px 18px; background:#fff; border:1px dashed var(--line); border-radius:var(--r-lg); }
.empty-art{ width:84px; height:84px; margin:0 auto 14px; color:#B9C3BC; }
.empty h3{ font-size:16px; margin-bottom:6px; }
.empty p{ font-size:13.5px; color:var(--muted); max-width:38ch; margin:0 auto; }
.empty .btn{ margin-top:16px; }

/* ---------- account ---------- */
.seg{ display:grid; grid-template-columns:1fr 1fr; gap:4px; background:#F0EEE7; border:1px solid var(--line); border-radius:12px; padding:4px; margin-bottom:14px; }
.seg-btn{ border:0; background:transparent; border-radius:9px; padding:9px 8px; font-size:13.5px; font-weight:600; color:var(--muted); cursor:pointer; transition:background .15s, color .15s; }
.seg-btn.active{ background:#fff; color:var(--green-deep); box-shadow:var(--shadow-sm); }

.acct-head{ display:flex; align-items:center; gap:13px; }
.acct-avatar{
  width:52px; height:52px; border-radius:16px; flex:0 0 auto;
  background:var(--green-deep); color:#fff; display:grid; place-items:center;
  font-family:var(--font-display); font-weight:700; font-size:19px;
}
.acct-name{ font-size:16px; font-weight:600; }
.acct-mail{ font-size:13px; color:var(--muted); word-break:break-all; }

.menu-list{ list-style:none; margin:0; padding:0; background:#fff; border:1px solid var(--line); border-radius:var(--r-md); overflow:hidden; }
.menu-list li + li{ border-top:1px solid var(--line-soft); }
.menu-list a, .menu-list button{
  display:flex; align-items:center; gap:12px; width:100%;
  padding:14px 15px; border:0; background:transparent; text-align:left;
  font-size:14px; font-weight:500; cursor:pointer; color:var(--ink);
}
.menu-list a:hover, .menu-list button:hover{ background:#FBFAF6; }
.menu-list .mi-icon{ width:32px; height:32px; border-radius:9px; background:var(--green-soft); color:var(--green-deep); display:grid; place-items:center; flex:0 0 auto; }
.menu-list .mi-icon svg{ width:16px; height:16px; }
.menu-list .mi-label{ flex:1 1 auto; }
.menu-list .mi-sub{ font-size:12px; color:var(--muted); font-weight:400; }
.menu-list .mi-arrow{ color:#B9C3BC; }
.menu-list .danger .mi-icon{ background:var(--red-bg); color:var(--red); }
.menu-list .danger .mi-label{ color:var(--red); }

/* ---------- wallet ---------- */
.wallet-card{
  background:linear-gradient(155deg,var(--green-deep),var(--green-mid));
  color:#fff; border-radius:var(--r-lg); padding:20px;
  box-shadow:var(--shadow); position:relative; overflow:hidden;
}
.wallet-card::after{
  content:''; position:absolute; right:-40px; top:-50px; width:170px; height:170px;
  border-radius:50%; background:rgba(255,255,255,.06);
}
.wallet-label{ font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:rgba(255,255,255,.62); font-weight:600; }
.wallet-amount{ font-family:var(--font-display); font-weight:700; font-size:34px; letter-spacing:-.02em; margin:4px 0 2px; font-variant-numeric:tabular-nums; }
.wallet-sub{ font-size:12.5px; color:rgba(255,255,255,.68); }
.wallet-actions{ display:flex; gap:8px; margin-top:16px; position:relative; z-index:1; }
.wallet-actions .btn{ min-height:40px; font-size:13px; }
.btn-on-dark{ background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.24); color:#fff; }
.btn-on-dark:hover:not(:disabled){ background:rgba(255,255,255,.24); }

/* ---------- footer ---------- */
.site-footer{
  margin-top:32px; border-top:1px solid var(--line);
  padding:22px 16px 26px; max-width:1100px; margin-inline:auto;
}
.footer-top{ display:flex; flex-wrap:wrap; gap:16px; justify-content:space-between; }
.footer-brand{ font-family:var(--font-display); font-weight:700; letter-spacing:.05em; font-size:13px; color:var(--green-deep); }
.footer-note{ font-size:12px; color:var(--muted); margin-top:3px; }
.footer-links{ display:flex; flex-wrap:wrap; gap:14px; font-size:12.5px; font-weight:500; }
.footer-links a{ color:var(--muted); }
.footer-links a:hover{ color:var(--green-deep); }
.footer-legal{ font-size:11.5px; color:#5F6A64; margin-top:16px; line-height:1.6; max-width:70ch; }

/* ---------- toasts ---------- */
.toast-host{ position:fixed; left:50%; transform:translateX(-50%); bottom:92px; z-index:80; pointer-events:none; width:max-content; max-width:min(92vw,420px); }
@media (min-width:900px){ .toast-host{ bottom:24px; } }
.toast{
  font-size:13px; font-weight:500; padding:11px 16px; border-radius:12px;
  box-shadow:0 12px 30px -12px rgba(16,25,23,.5);
  opacity:0; transform:translateY(8px); transition:opacity .2s ease, transform .2s ease;
  display:flex; align-items:center; gap:8px;
}
.toast-host.show .toast{ opacity:1; transform:translateY(0); }
.toast-ok{ background:var(--green-deep); color:#fff; }
.toast-warn{ background:var(--amber-bg); color:var(--amber-ink); border:1px solid var(--amber-edge); }
.toast-err{ background:var(--red-bg); color:#8A2A1F; border:1px solid var(--red-edge); }

/* ---------- skeleton / boot ---------- */
.skeleton{ background:linear-gradient(90deg,#EEEBE3 25%,#F6F4EE 37%,#EEEBE3 63%); background-size:400% 100%; animation:shimmer 1.4s ease infinite; border-radius:var(--r-md); }
@keyframes shimmer{ 0%{ background-position:100% 50%; } 100%{ background-position:0 50%; } }
.skeleton-hero{ height:132px; margin-top:4px; }
.skeleton-row{ display:grid; grid-template-columns:repeat(2,1fr); gap:12px; margin-top:16px; }
@media (min-width:640px){ .skeleton-row{ grid-template-columns:repeat(4,1fr); } }
.skeleton-card{ height:186px; }
.boot-line{ font-size:12.5px; color:var(--muted); margin-top:14px; text-align:center; }

/* ---------- product detail ---------- */
.pdp{ display:grid; gap:18px; }
@media (min-width:840px){ .pdp{ grid-template-columns:minmax(0,1fr) minmax(0,1.05fr); gap:28px; align-items:start; } }
.pdp-visual{ border:1px solid var(--line); border-radius:var(--r-lg); padding:22px; display:grid; place-items:center; aspect-ratio:1/1; }
.pdp-visual .dev{ width:min(78%,260px); height:auto; }
.pdp-title{ font-size:25px; letter-spacing:-.02em; margin-top:4px; }
.pdp-price{ margin:12px 0 6px; }
.pdp-blurb{ color:var(--muted); font-size:14px; }
.meta-list{ margin:0; padding:0; list-style:none; border-top:1px solid var(--line); margin-top:18px; }
.meta-list li{ display:flex; justify-content:space-between; gap:14px; padding:10px 0; border-bottom:1px solid var(--line-soft); font-size:13.5px; }
.meta-list .k{ color:var(--muted); }
.meta-list .v{ font-weight:600; text-align:right; }
.buy-row{ display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.buy-row .btn{ flex:1 1 160px; }

/* ---------- misc ---------- */
.doc h2{ font-size:17px; margin:26px 0 8px; scroll-margin-top:150px; }
.doc h3{ font-size:14px; margin:18px 0 6px; }
.doc p, .doc li{ font-size:13.5px; color:#28322E; line-height:1.65; }
.doc ul{ margin:8px 0; padding-inline-start:20px; }
.doc li + li{ margin-top:5px; }
.doc code{ font-family:ui-monospace, Menlo, monospace; font-size:12px; background:#F1EFE8; padding:1.5px 5px; border-radius:5px; border:1px solid var(--line-soft); }
.doc pre{ background:#0F1A16; color:#DCEFE2; padding:14px; border-radius:12px; overflow-x:auto; font-size:12px; line-height:1.65; margin:10px 0; max-height:420px; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.doc .table-wrap table td code{ white-space:normal; }
.doc .notice + .card, .doc .card + .card{ margin-top:12px; }
.doc pre code{ background:none; border:0; padding:0; color:inherit; font-size:12px; }
.doc-lede{ font-size:14px; color:var(--muted); margin-bottom:14px; }
.copy-row{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:10px; }
.anchor-nav{ display:flex; flex-wrap:wrap; gap:7px; margin:14px 0 4px; }

/* ==========================================================================
   Deep-fix pass: focus, touch targets, contrast, overflow safety
   ========================================================================== */

.skip-link{
  position:absolute; left:12px; top:-70px; z-index:100;
  background:#fff; color:var(--green-deep);
  border:1px solid var(--line); border-radius:10px;
  padding:11px 15px; font-size:13px; font-weight:600;
  box-shadow:var(--shadow); transition:top .18s ease; cursor:pointer;
}
.skip-link:focus{ top:12px; }

/* programmatic focus on the route container must not draw a ring */
#view:focus, #view:focus-visible{ outline:none; }

a:focus-visible, button:focus-visible, select:focus-visible,
input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible{
  outline:2px solid var(--green); outline-offset:2px;
}
.topbar a:focus-visible, .topbar button:focus-visible, .topbar input:focus-visible{
  outline-color:#7BE0A6; outline-offset:2px;
}

/* long names, references and error text must wrap instead of pushing layout */
.pc-name, .line-name, .acct-mail, .tl-sub, .notice, .doc td, .doc code, .doc pre, .summary-row .k{ overflow-wrap:anywhere; }

/* expand sub-44px controls to a full touch target without changing their look */
.quick-add::after{ content:''; position:absolute; inset:-5px; border-radius:50%; }
.search-clear{ position:relative; }
.search-clear::after{ content:''; position:absolute; inset:-8px; }

/* clearer interactive states */
.option:focus-within{ border-color:var(--green); box-shadow:0 0 0 3px rgba(18,140,74,.13); }
.btn:disabled, .btn[disabled]{ opacity:.55; }
.link-more{ min-height:32px; }

/* keep the checkout steps on one line on the narrowest phones */
@media (max-width:400px){
  .stepper .lbl{ font-size:10.5px; }
  .stepper .dot{ width:24px; height:24px; font-size:11px; }
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
  .skip-link{ transition:none; }
}