:root {
  color-scheme: light;
  --ink: #251f1b;
  --muted: #5e554d;
  --accent: #d85b07;
  --orange: #f58220;
  --peach: #fff1e4;
  --paper: #fffdfa;
  --line: #e5dcd4;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: #f8f6f3;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #ab4704; outline-offset: 3px; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar-inner, .screen, .footer { width: min(100% - 32px, 920px); margin-inline: auto; }
.topbar-inner { min-height: 83px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { width: 190px; max-width: 100%; height: auto; display: block; }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav a { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 10px; font-weight: 650; text-decoration: none; font-size: .87rem; }
nav a[aria-current="page"] { color: #973800; background: var(--peach); border-radius: 8px; }
#basket-count { background: #f3e3d3; color: #612e09; padding: 0 7px; border-radius: 20px; }
.screen { flex: 1; padding-block: clamp(24px, 6vw, 58px) 40px; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; border-top: 1px solid var(--line); padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); font-size: .85rem; color: var(--muted); }
.footer a { text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -.055em; line-height: 1.08; }
h2 { font-size: 1.12rem; line-height: 1.25; }
h3 { font-size: 1rem; line-height: 1.3; }
.eyebrow { margin-bottom: 12px; color: #983c03; font-size: .78rem; font-weight: 750; letter-spacing: .075em; text-transform: uppercase; }
.muted { color: var(--muted); }
.intro p:not(.eyebrow), .section-heading p { margin-top: 10px; }
.intro { padding: clamp(22px, 5vw, 44px); background: var(--paper); border: 1px solid var(--line); border-radius: 20px; }
.login { max-width: 520px; margin-inline: auto; }
.login .button { margin-top: 20px; }
.button { min-height: 48px; display: inline-flex; justify-content: center; align-items: center; padding: 10px 16px; border-radius: 11px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); cursor: pointer; text-decoration: none; text-align: center; font-weight: 720; }
.button:hover { background: var(--peach); }
.button.primary { background: var(--orange); border-color: var(--orange); color: #23160c; }
.button.primary:hover { background: #f6933e; }
.button.full { width: 100%; }
.home-grid, .review-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 12px; min-width: 0; }
.search { display: grid; min-width: 0; gap: 6px; margin-top: 22px; }
.search label { font-size: .88rem; font-weight: 700; }
.search input { width: 100%; min-height: 48px; min-width: 0; padding: 10px 13px; border: 1px solid #c9bdb2; border-radius: 11px; background: #fff; color: var(--ink); }
.actions { display: grid; gap: 10px; }
.action { text-align: left; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 66px; border: 1px solid var(--line); padding: 13px 17px; border-radius: 13px; background: var(--paper); color: var(--ink); text-decoration: none; cursor: pointer; }
.action strong { display: block; font-size: 1.08rem; }
.action small { display: block; margin-top: 4px; color: var(--muted); }
.action.featured { border-color: #ed924f; background: var(--peach); }
.action:hover { border-color: var(--accent); }
.arrow { font-size: 1.35rem; color: #963c04; }
.section-heading { margin-bottom: 20px; }
.section-heading h1 { font-size: clamp(1.8rem, 6vw, 2.55rem); }
.section-heading .search { max-width: 480px; }
.product, .request, .summary, .empty { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); padding: 15px; }
.product { display: grid; gap: 12px; grid-template-columns: 62px minmax(0, 1fr); align-items: start; }
.product img { width: 62px; height: 62px; object-fit: contain; border-radius: 9px; background: #fff; }
.product-description { display: grid; min-width: 0; gap: 4px; }
.product-details { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.product-price { font-variant-numeric: tabular-nums; font-weight: 750; white-space: nowrap; }
.product-actions { grid-column: 2; justify-self: start; }
.stock-note { color: #865100; font-size: .85rem; }
.stepper { display: grid; grid-template-columns: 44px minmax(45px, 68px) 44px; gap: 4px; align-items: center; }
.stepper button, .stepper input { min-height: 44px; min-width: 0; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.stepper button { cursor: pointer; font-size: 1.1rem; }
.stepper button:hover { background: var(--peach); }
.stepper input { width: 100%; }
.line-total { grid-column: 2; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.remove { color: #813100; border: 0; background: transparent; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; cursor: pointer; }
.summary { display: grid; gap: 12px; }
.summary-total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; padding: 12px; background: var(--peach); border-radius: 9px; }
.summary-total strong { font-size: 1.25rem; white-space: nowrap; }
.request { display: grid; gap: 10px; }
.request-heading { display: flex; gap: 8px 16px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.status { padding: 3px 8px; border-radius: 8px; color: #6b3607; background: var(--peach); font-size: .82rem; font-weight: 650; }
.request ul { margin: 0; padding-inline-start: 19px; }
.request .button { justify-self: start; }
.empty p, .empty .button { margin-top: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
@media (max-width: 640px) {
  .topbar-inner { align-items: flex-start; flex-direction: column; padding: 14px 0 4px; gap: 4px; }
  .topbar-inner:has(nav[hidden]) { padding-bottom: 14px; }
  .brand { width: 172px; }
  nav { width: 100%; justify-content: space-between; gap: 2px; }
  nav a { padding-inline: 6px; font-size: .82rem; }
  .home-grid, .review-grid { grid-template-columns: minmax(0, 1fr); }
  .footer { flex-direction: column; }
}
@media (max-width: 350px) {
  .topbar-inner, .screen, .footer { width: calc(100% - 24px); }
  nav a { padding-inline: 4px; font-size: .78rem; }
  .product { grid-template-columns: 48px minmax(0, 1fr); padding: 11px; gap: 8px; }
  .product img { width: 48px; height: 48px; }
}

.portal-login-form { display:grid; gap:12px; margin:16px 0 10px; }
.portal-login-form label { display:grid; gap:5px; font-weight:600; }
.portal-login-form input { min-width:0; width:100%; padding:11px 12px; font:inherit; color:#251f17; background:#fff; border:1px solid #cdbfb1; border-radius:8px; }
.portal-login-form p:empty { display:none; }
.login details summary { cursor:pointer; }
#portal-logout { min-height:36px; padding:6px 10px; }
