/* 00-tokens.css */
/* Design tokens. Company colour scheme "Graphite Teal". */
:root {
  --graphite-900: #111418;
  --graphite-800: #1d2127;
  --graphite-700: #2c2f36;
  --bg: #f4f6f7;
  --surface: #ffffff;
  --ink: #1d2127;
  --ink-2: #4a535e;
  --ink-3: #6b7580;
  --line: #dde2e6;
  --teal: #35c4b5;        /* accent on dark backgrounds */
  --teal-ink: #0b7268;    /* accent on light backgrounds, 5.6:1 on white */
  --teal-ink-2: #095b53;
  --teal-wash: #e3f6f3;
  --amber: #ffb627;
  --amber-wash: #fff4d9;
  --red: #c8372d;
  --red-wash: #fde9e7;
  --green: #1e8e4e;
  --green-wash: #e4f5ea;
  --blue: #4aa8ff;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgb(17 20 24 / 6%), 0 4px 16px rgb(17 20 24 / 6%);
  --shadow-lg: 0 8px 40px rgb(17 20 24 / 16%);
  --wrap: 1160px;
  --gap: 24px;
}

/* 10-base.css */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }

a { color: var(--teal-ink); text-underline-offset: 2px; }
a:hover { color: var(--teal-ink-2); }

img { max-width: 100%; height: auto; display: block; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-3); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal-ink); margin: 0 0 10px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: var(--radius-sm);
}
.skip:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* 20-layout.css */
/* Header */
.site-header { background: var(--graphite-900); color: #f4f6f7; position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand:hover { color: #fff; }
.brand-mark { width: 26px; height: 26px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a, .cart-link {
  color: #c9d1d8; text-decoration: none; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 0.95rem;
}
.nav a:hover, .cart-link:hover, .nav a[aria-current="page"] { color: #fff; background: var(--graphite-700); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cart-link { display: flex; align-items: center; gap: 8px; }
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--teal); color: var(--graphite-900);
  font-size: 0.78rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.cart-link svg, .nav-toggle svg { width: 20px; height: 20px; flex: none; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }

@media (max-width: 720px) {
  .nav-toggle { display: block; order: 3; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column;
    background: var(--graphite-800); padding: 8px 12px 14px; margin: 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* Footer */
.site-footer { background: var(--graphite-900); color: #9aa4ae; margin-top: 64px; font-size: 0.92rem; }
.site-footer .wrap { padding-top: 48px; padding-bottom: 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.site-footer h2 { color: #f4f6f7; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #c9d1d8; text-decoration: none; }
.site-footer a:hover { color: var(--teal); }
.footer-note { max-width: 36ch; }
.footer-bottom {
  border-top: 1px solid var(--graphite-700); margin-top: 36px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Page heads and grids */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 36px 0 28px; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 6px; }
.crumbs { font-size: 0.875rem; color: var(--ink-3); margin-bottom: 10px; }
.crumbs a { color: var(--ink-3); }
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* 30-components.css */
/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal-ink); color: #fff; }
.btn-primary:hover { background: var(--teal-ink-2); color: #fff; }
.btn-accent { background: var(--teal); color: var(--graphite-900); }
.btn-accent:hover { background: #55d3c6; color: var(--graphite-900); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-ghost-dark { background: transparent; border-color: #4a535e; color: #f4f6f7; }
.btn-ghost-dark:hover { border-color: #9aa4ae; color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }

/* Badges and notices */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-in { background: var(--green-wash); color: var(--green); border-color: transparent; }
.badge-low { background: var(--amber-wash); color: #8a5a00; border-color: transparent; }
.badge-out { background: var(--red-wash); color: var(--red); border-color: transparent; }
.badge-soon { background: var(--teal-wash); color: var(--teal-ink); border-color: transparent; }

.notice { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); margin-bottom: 16px; }
.notice-ok { background: var(--green-wash); border-color: #bfe5cd; }
.notice-warn { background: var(--amber-wash); border-color: #f3d894; }
.notice-bad { background: var(--red-wash); border-color: #f3c2bd; }
.test-banner { background: var(--amber); color: #1d2127; text-align: center; font-weight: 700; padding: 8px 16px; font-size: 0.9rem; }

/* Forms */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.input, .select {
  width: 100%; padding: 10px 12px; border: 1px solid #b9c2ca; border-radius: var(--radius-sm); background: var(--surface);
}
.input:focus, .select:focus { border-color: var(--teal-ink); }
.qty { width: 84px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 600; color: var(--ink-2); }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

/* Totals list */
.totals { margin: 0; }
.totals div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.totals dt { color: var(--ink-2); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 1.2rem; font-weight: 700; }
.totals .grand dt { color: var(--ink); }

/* 40-home.css */
/* Hero */
.hero {
  background:
    radial-gradient(900px 420px at 85% 10%, rgb(53 196 181 / 18%), transparent 60%),
    linear-gradient(180deg, var(--graphite-900), var(--graphite-800));
  color: #f4f6f7; padding: 72px 0 80px; overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.hero .eyebrow { color: var(--teal); }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero p { color: #c9d1d8; font-size: 1.15rem; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-figure { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); background: #e9ecee; }
.hero-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 28px 0 0; padding: 0; list-style: none; color: #9aa4ae; font-size: 0.92rem; }
.hero-facts strong { color: #fff; font-weight: 600; }
@media (max-width: 900px) {
  .hero { padding: 48px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
}

/* Feature tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 28px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.tile h3 { margin-bottom: 6px; }
.tile p { margin: 0; color: var(--ink-2); font-size: 0.96rem; }
.tile-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--teal-wash); color: var(--teal-ink);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.tile-icon svg { width: 22px; height: 22px; }

/* Product cards */
.product-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow 0.15s, transform 0.15s; }
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); color: inherit; }
.product-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #e9ecee; }
.product-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card h3 { margin: 0; font-size: 1.2rem; }
.product-card p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.product-card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; }
.price { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Trust strip */
.trust { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust ul { list-style: none; margin: 0; padding: 22px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px 28px; }
.trust li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.94rem; color: var(--ink-2); }
.trust strong { display: block; color: var(--ink); }
.trust svg { width: 22px; height: 22px; color: var(--teal-ink); flex: none; margin-top: 2px; }

/* Category chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.chips a { display: block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 0.92rem; }
.chips a[aria-current="page"], .chips a:hover { border-color: var(--teal-ink); color: var(--teal-ink); }

/* 50-product.css */
/* Product page */
.product-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 40px; align-items: start; padding: 32px 0 8px; }
@media (max-width: 900px) { .product-top { grid-template-columns: 1fr; gap: 24px; } }

.gallery-main { border-radius: var(--radius); overflow: hidden; background: #e9ecee; border: 1px solid var(--line); }
.gallery-main img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 10px; padding: 0; list-style: none; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: #e9ecee; display: block; width: 100%; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--teal-ink); }
.gallery-thumbs img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.buy { position: sticky; top: 88px; }
.buy h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 6px; }
.buy .tagline { color: var(--ink-2); font-size: 1.08rem; margin-bottom: 18px; }
.buy-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.buy-price .price { font-size: 2rem; }
.buy-row { display: flex; gap: 12px; align-items: flex-end; margin: 20px 0 10px; }
.buy-row .btn { flex: 1; height: 46px; }
.buy-row .field { margin: 0; }
.buy-row .select { height: 46px; }
.buy-msg { min-height: 1.6em; font-size: 0.92rem; margin: 0 0 14px; }
.buy-points { list-style: none; padding: 16px 0 0; margin: 0; border-top: 1px solid var(--line); font-size: 0.93rem; color: var(--ink-2); }
.buy-points li { display: flex; gap: 10px; margin-bottom: 9px; }
.buy-points svg { width: 18px; height: 18px; color: var(--teal-ink); flex: none; margin-top: 3px; }

.product-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; padding: 40px 0 0; max-width: 860px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: ""; position: absolute; left: 4px; top: 0.45em; width: 12px; height: 7px;
  border-left: 2.5px solid var(--teal-ink); border-bottom: 2.5px solid var(--teal-ink); transform: rotate(-45deg);
}

.spec { width: 100%; border-collapse: collapse; margin-bottom: 28px; font-size: 0.95rem; }
.spec caption { text-align: left; font-weight: 700; font-size: 1.02rem; padding: 0 0 8px; }
.spec th, .spec td { text-align: left; padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.spec th { width: 34%; font-weight: 500; color: var(--ink-2); background: #fafbfb; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .spec th { width: 42%; } }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.info-grid h3 { font-size: 0.95rem; margin-bottom: 6px; }
.info-grid p, .info-grid address { margin: 0; font-style: normal; color: var(--ink-2); font-size: 0.93rem; }
.fine { font-size: 0.875rem; color: var(--ink-3); }

/* 60-cart.css */
/* Cart, checkout and order pages */
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line:first-child { padding-top: 0; }
.cart-line:last-child { padding-bottom: 0; border-bottom: 0; }
.cart-line img { width: 96px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; background: #e9ecee; }
.cart-line h3 { margin: 0 0 2px; font-size: 1.05rem; }
.cart-line h3 a { color: inherit; text-decoration: none; }
.cart-line h3 a:hover { color: var(--teal-ink); }
.cart-line-end { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-line-ctl { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink-3); text-decoration: underline; cursor: pointer; font-size: 0.875rem; }
.link-btn:hover { color: var(--red); }
@media (max-width: 520px) {
  .cart-line { grid-template-columns: 72px minmax(0, 1fr); }
  .cart-line img { width: 72px; }
  .cart-line-end { grid-column: 2; flex-direction: row; justify-content: space-between; align-items: center; }
}

.summary { position: sticky; top: 88px; }
.summary h2 { font-size: 1.15rem; }
.summary .btn { margin-top: 18px; }
.summary-note { font-size: 0.875rem; color: var(--ink-2); margin: 12px 0 0; }
.empty { text-align: center; padding: 56px 20px; }
.empty p { color: var(--ink-2); }

.pay-box { margin-top: 20px; }
.pay-box > div { margin-bottom: 14px; }
#paypal-buttons { min-height: 48px; }
.pay-safe { display: flex; gap: 10px; font-size: 0.875rem; color: var(--ink-2); margin-top: 6px; }
.pay-safe svg { width: 18px; height: 18px; flex: none; color: var(--teal-ink); margin-top: 2px; }

.mini-lines { list-style: none; margin: 0 0 14px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.mini-lines li { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.mini-lines span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }

.order-head { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-bottom: 20px; }
.order-head div { min-width: 140px; }
.order-head dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.order-head dd { margin: 2px 0 0; font-weight: 600; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--teal-ink);
  animation: spin 0.8s linear infinite; margin: 24px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 70-prose.css */
/* Long text pages: policies, support, about */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8em; font-size: 1.35rem; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: 0.4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border: 1px solid var(--line); vertical-align: top; }
.prose th { background: #fafbfb; }
.prose address { font-style: normal; margin-bottom: 1em; }
.updated { color: var(--ink-3); font-size: 0.9rem; }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; }
.faq details > div { padding: 0 16px 14px; color: var(--ink-2); }
.faq details > div p:last-child { margin-bottom: 0; }

/* Admin */
.admin h2 { font-size: 1.2rem; margin-top: 28px; }
.admin .table { font-size: 0.875rem; }
.admin .flag { color: var(--red); font-weight: 700; }
.admin .prot-bad { color: var(--red); font-weight: 700; }
.admin .row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin .row-actions .input { width: 130px; padding: 6px 8px; }
.admin address { font-style: normal; white-space: pre-line; }
.admin-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }

/* Print: the order page doubles as a receipt */
@media print {
  .site-header, .site-footer, .no-print, .skip { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .card { border: 0; box-shadow: none; }
  .card-pad { padding: 0; }
  a { color: inherit; text-decoration: none; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
