/* P47.AI v3 — Refined Elite Green · Full Mobile-First Responsive
   ============================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garant:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&family=Inter:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* ── PALETTE ── */
:root {
  --cream:     #f4efe4;
  --cream-2:   #ece6d8;
  --cream-3:   #e2dccf;
  --dark:      #14110a;
  --dark-2:    #1e1a10;
  --dark-3:    #2a2416;
  --forest:    #3b5035;
  --forest-h:  #2e3f28;
  --teal:      #32ac4f;
  --sage:      #48936b;
  --khaki:     #c5ba68;
  --tan:       #9a8054;
  --bark:      #6c5e30;
  --ink:       #1a1208;
  --ink-2:     #3a3020;
  --ink-3:     #7a6a50;
  --ink-4:     #a89878;
  --rule:      #d8d0c0;
  --rule-2:    #c8bfac;
  --d-t1:      #f0ebe0;
  --d-t2:      #b8ad98;
  --d-t3:      #786a50;
  --d-rule:    #2e2818;
  --serif: 'Cormorant Garant', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  'Space Mono', 'Courier New', monospace;
  --nav-h: 62px;
  --max:   1240px;
  --pad:   60px;
  --r:     3px;
  --r2:    5px;
}

/* ── RESET ── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}
::selection { background: rgba(59,80,53,.18); }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 2px; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

/* ── NAVIGATION ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  background: rgba(244,239,228,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  gap: 8px;
}
.nav-logo { flex-shrink: 0; }
.nav-links { flex-shrink: 0; overflow: hidden; }
.nav-btns { flex-shrink: 0; display: flex; align-items: center; gap: 10px; }
.nav-logo {
  font-family: var(--sans); font-size: 15px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
  text-decoration: none;
}
.nav-logo span { color: var(--forest); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-a {
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  padding: 0 14px; height: var(--nav-h);
  display: inline-flex; align-items: center;
  transition: color .15s; text-decoration: none; white-space: nowrap;
}
.nav-a:hover { color: var(--ink); }
.nav-a.active { color: var(--forest); }
.nav-btns { display: flex; align-items: center; gap: 10px; }
.nav-outline {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); border: 1px solid var(--ink);
  padding: 8px 18px; border-radius: var(--r); transition: all .15s;
  text-decoration: none; white-space: nowrap;
}
.nav-outline:hover { background: var(--ink); color: var(--cream); }
.nav-cta {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  background: var(--forest); color: #fff;
  padding: 9px 20px; border-radius: var(--r);
  transition: all .15s; cursor: pointer; white-space: nowrap;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.nav-cta:hover { background: var(--forest-h); }

/* Mobile nav burger */
.nav-burger {
  display: none; background: none; border: 1px solid var(--rule-2);
  color: var(--ink); width: 40px; height: 40px; border-radius: var(--r);
  font-size: 17px; align-items: center; justify-content: center; cursor: pointer;
  flex-shrink: 0; transition: all .15s;
}
.nav-burger:hover { border-color: var(--ink-3); }
.nav-mob {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: rgba(244,239,228,.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
  padding: 8px var(--pad) 24px; flex-direction: column; z-index: 899;
  box-shadow: 0 12px 40px rgba(0,0,0,.1);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-mob.open { display: flex; }
.nav-ma {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  padding: 15px 0; border-bottom: 1px solid var(--rule);
  cursor: pointer; text-align: left; width: 100%;
  transition: color .15s; text-decoration: none; display: flex; align-items: center;
}
.nav-ma:hover { color: var(--ink); }
.nav-ma:last-of-type { border-bottom: none; }

/* ── LAYOUT ── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); width: 100%; box-sizing: border-box; }
.section-rule { border: none; border-top: 1px solid var(--rule); }

/* ── SECTION LABEL ── */
.sec-label {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--forest);
  margin-bottom: 20px;
}
.sec-label::before {
  content: ''; display: block; width: 28px; height: 1px;
  background: var(--forest); flex-shrink: 0;
}
.sec-label-d { color: var(--khaki); }
.sec-label-d::before { background: var(--khaki); }

/* ── HEADINGS ── */
.h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(38px, 5.5vw, 84px);
  color: var(--ink); line-height: 1.04; letter-spacing: -.02em;
  overflow-wrap: break-word; word-break: break-word; hyphens: auto;
}
.h1 em { font-style: italic; color: var(--forest); font-weight: 600; }
.h1-d { color: var(--d-t1); }
.h1-d em { color: var(--khaki); }
.h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(26px, 4vw, 60px);
  color: var(--ink); line-height: 1.08; letter-spacing: -.015em;
  overflow-wrap: break-word; word-break: break-word; hyphens: auto;
}
.h2 em { font-style: italic; color: var(--forest); font-weight: 600; }
.h2-d { color: var(--d-t1); }
.h2-d em { color: var(--khaki); }
.h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(18px, 2.5vw, 30px);
  color: var(--ink); line-height: 1.2; overflow-wrap: break-word;
}
.h3-d { color: var(--d-t1); }

/* Body text */
.body { font-size: 15px; color: var(--ink-2); line-height: 1.75; }
.body-d { color: var(--d-t2); }
.body-sm { font-size: 13px; color: var(--ink-3); line-height: 1.7; }
.body-sm-d { color: var(--d-t3); }

/* Stat numbers */
.stat-num {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(28px, 4vw, 52px);
  color: var(--ink); line-height: 1; letter-spacing: -.02em;
}
.stat-num-d { color: var(--d-t1); }
.stat-lbl {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
  margin-top: 4px;
}
.stat-lbl-d { color: var(--d-t3); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 14px 28px; border-radius: var(--r);
  cursor: pointer; transition: all .15s; white-space: nowrap;
  text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--forest); color: #fff; border-color: var(--forest); }
.btn-primary:hover { background: var(--forest-h); border-color: var(--forest-h); }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--cream); }
.btn-secondary-d { background: transparent; color: var(--d-t1); border: 1px solid var(--d-t2); }
.btn-secondary-d:hover { background: var(--d-t1); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--forest); border: none; padding-left: 0; padding-right: 0; }
.btn-ghost:hover { color: var(--forest-h); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Tag badges */
.tag {
  display: inline-block; font-family: var(--sans); font-size: 10px;
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 2px;
}
.tag-forest { background: var(--forest); color: #fff; }
.tag-teal { background: var(--teal); color: #fff; }
.tag-sage { background: var(--sage); color: #fff; }
.tag-dark { background: var(--ink); color: #fff; }
.tag-outline { background: transparent; color: var(--forest); border: 1px solid var(--forest); }

/* ── FORM PANEL ── */
.form-panel {
  background: var(--cream-3);
  border: 1px solid var(--rule-2);
  border-radius: 6px;
  padding: 36px 32px;
  box-shadow: 0 4px 24px rgba(26,18,8,.05);
}
.form-panel h3 {
  font-family: var(--serif); font-size: clamp(20px,2.5vw,28px); font-weight: 700;
  color: var(--ink); margin-bottom: 6px; line-height: 1.2;
}
.form-panel .fp-sub { font-size: 14px; color: var(--ink-3); margin-bottom: 24px; line-height: 1.6; }

/* Form fields */
.fg { margin-bottom: 14px; }
.fg label {
  display: block; font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 6px;
}
.fg input, .fg select, .fg textarea {
  width: 100%; background: #fff;
  border: 1px solid var(--rule-2); color: var(--ink);
  font-family: var(--sans); font-size: 14px;
  padding: 11px 14px; border-radius: var(--r);
  outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.fg input:focus, .fg select:focus, .fg textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(59,80,53,.08);
}
.fg input::placeholder, .fg textarea::placeholder { color: var(--ink-4); }
.fg select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237a6a50' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px;
}
.fg select option { background: #fff; }
.fg textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-submit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 50px; background: var(--forest); color: #fff;
  border: none; border-radius: var(--r);
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer; margin-top: 18px; transition: all .15s;
}
.form-submit:hover { background: var(--forest-h); }
.form-submit:disabled { opacity: .6; cursor: not-allowed; }
.form-note { font-size: 12px; color: var(--ink-4); margin-top: 10px; line-height: 1.6; }
.form-success { display: none; padding: 32px 0; text-align: center; }
.form-success-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(59,80,53,.12); border: 1px solid rgba(59,80,53,.3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.form-success-icon svg { width: 20px; height: 20px; stroke: var(--forest); fill: none; stroke-width: 2; }
.form-success h4 { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.form-success p { font-size: 13px; color: var(--ink-3); line-height: 1.6; }
.form-err {
  display: none; font-size: 12px; color: #c0392b;
  margin-top: 10px; padding: 10px 14px;
  border: 1px solid rgba(192,57,43,.2);
  border-radius: var(--r); background: rgba(192,57,43,.05);
}

/* Dark section form variant */
.form-panel-d { background: var(--dark-2); border-color: var(--d-rule); box-shadow: none; }
.form-panel-d h3 { color: var(--d-t1); }
.form-panel-d .fp-sub { color: var(--d-t2); }
.form-panel-d .fg label { color: var(--d-t2); }
.form-panel-d .fg input,
.form-panel-d .fg select,
.form-panel-d .fg textarea { background: var(--dark-3); border-color: var(--d-rule); color: var(--d-t1); }
.form-panel-d .fg input:focus,
.form-panel-d .fg select:focus,
.form-panel-d .fg textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(72,147,107,.1); }
.form-panel-d .fg input::placeholder,
.form-panel-d .fg textarea::placeholder { color: var(--d-t3); }
.form-panel-d .form-submit { background: var(--forest); }
.form-panel-d .form-note { color: var(--d-t3); }

/* ── PILLAR CARDS ── */
.pillar-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.pillar-card {
  padding: 32px 28px; border-right: 1px solid var(--rule);
  background: var(--cream); display: flex; flex-direction: column;
  text-decoration: none; color: inherit; transition: background .15s;
}
.pillar-card:hover { background: var(--cream-2); }
.pillar-card:last-child { border-right: none; }
.pillar-num {
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 16px; display: inline-block;
}
.pillar-title {
  font-family: var(--serif); font-size: clamp(17px,1.8vw,24px);
  font-weight: 700; color: var(--ink); line-height: 1.2; margin-bottom: 12px;
  overflow-wrap: break-word; word-break: break-word;
}
.pillar-body { font-size: 13px; color: var(--ink-3); line-height: 1.7; flex: 1; margin-bottom: 20px; overflow-wrap: break-word; word-break: break-word; }
.pillar-link {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--forest);
  display: inline-flex; align-items: center; gap: 6px; transition: gap .15s;
  margin-top: auto;
}
.pillar-card:hover .pillar-link { gap: 10px; }

/* 4-col pillar variant */
.pillar-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.pillar-grid-4 .pillar-card { border-right: 1px solid var(--rule); }
.pillar-grid-4 .pillar-card:last-child { border-right: none; }

/* ── STATS STRIP ── */
.stats-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat-item { padding: 32px 0 32px 24px; border-right: 1px solid var(--rule); }
.si-first { padding-left: 0!important; }
.stat-item:last-child { border-right: none; }

/* ── DARK CARDS ── */
.dark-card-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--d-rule); border-radius: 6px; overflow: hidden; }
.dark-card { background: var(--dark-2); padding: 32px 28px; transition: background .15s; }
.dark-card:hover { background: var(--dark-3); }
.dark-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--d-rule); }
.dark-card-lbl { font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--d-t3); }

/* ── INSIGHT GRID ── */
.insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.insight-card { background: var(--cream); padding: 28px; transition: background .15s; }
.insight-card:hover { background: var(--cream-2); }
.insight-title { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.25; margin-bottom: 10px; overflow-wrap: break-word; }
.insight-body { font-size: 13px; color: var(--ink-3); line-height: 1.65; margin-bottom: 18px; }
.insight-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--rule); margin-top: auto; }
.insight-author { font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); }
.insight-link { font-size: 16px; color: var(--forest); }

/* ── INVENTORY TABLE ── */
.inv-wrap { border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.inv-head { display: grid; grid-template-columns: minmax(160px,2fr) 120px 70px 100px 90px 70px 110px 120px 70px 140px; padding: 10px 22px; background: var(--cream-2); border-bottom: 1px solid var(--rule); }
.inv-th { font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.inv-row { display: grid; grid-template-columns: minmax(160px,2fr) 120px 70px 100px 90px 70px 110px 120px 70px 140px; padding: 16px 22px; border-bottom: 1px solid var(--rule); align-items: center; transition: background .12s; }
.inv-row:last-child { border-bottom: none; }
.inv-row:hover { background: var(--cream-2); }
.td-name { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--forest); line-height: 1; margin-bottom: 2px; letter-spacing: -.01em; }
.td-ff { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); }
.td-qty { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.td-mono { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.td-upd { font-family: var(--mono); font-size: 11px; color: var(--ink-4); line-height: 1.5; }
.badge-avail { display: inline-flex; align-items: center; gap: 5px; font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sage); background: rgba(72,147,107,.1); border: 1px solid rgba(72,147,107,.3); border-radius: 100px; padding: 4px 10px; }
.badge-avail::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--sage); flex-shrink: 0; }
.gpu-cards { display: none; gap: 12px; grid-template-columns: repeat(auto-fill,minmax(min(100%,280px),1fr)); }
@media(max-width:1100px) { .inv-wrap { display: none; } .gpu-cards { display: grid; } }
.gpu-card { background: var(--cream-2); border: 1px solid var(--rule); border-radius: 6px; padding: 20px; transition: background .15s; }
.gpu-card:hover { background: var(--cream-3); }
.gc-name { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--forest); margin-bottom: 2px; }
.gc-ff { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-4); display: block; margin-bottom: 10px; }
.gc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.gc-dt { font-family: var(--sans); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-4); margin-bottom: 2px; }
.gc-dd { font-size: 13px; color: var(--ink-2); }
.gc-qty { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ink); }
.gc-acts { display: flex; gap: 8px; margin-top: 12px; }

/* Toolbar / filters */
.toolbar { background: var(--cream); border-bottom: 1px solid var(--rule); padding: 14px var(--pad); position: sticky; top: var(--nav-h); z-index: 100; }
.toolbar-inner { max-width: var(--max); margin: 0 auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.srch { position: relative; flex: 2; min-width: 200px; }
.srch-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-4); font-size: 13px; pointer-events: none; }
.srch-inp { width: 100%; height: 42px; background: var(--cream-2); border: 1px solid var(--rule); color: var(--ink); font-family: var(--sans); font-size: 14px; padding: 0 12px 0 34px; border-radius: var(--r); outline: none; appearance: none; transition: border-color .15s; }
.srch-inp::placeholder { color: var(--ink-4); }
.srch-inp:focus { border-color: var(--forest); }
.fsel { height: 42px; background: var(--cream-2); border: 1px solid var(--rule); color: var(--ink); font-family: var(--sans); font-size: 13px; padding: 0 32px 0 12px; border-radius: var(--r); outline: none; appearance: none; cursor: pointer; flex: 1; min-width: 130px; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237a6a50' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; transition: border-color .15s; }
.fsel option { background: var(--cream); }
.fsel:focus { border-color: var(--forest); }
.clr-btn { height: 42px; background: transparent; border: 1px solid var(--rule); color: var(--ink-3); font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 0 16px; border-radius: var(--r); cursor: pointer; transition: all .15s; }
.clr-btn:hover { border-color: var(--ink); color: var(--ink); }
.inv-meta { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; margin-bottom: 6px; }
.inv-meta span { font-family: var(--sans); font-size: 11px; font-weight: 500; color: var(--ink-4); letter-spacing: .06em; }
.inv-meta strong { color: var(--forest); }

/* Reserve / BOM buttons */
.btn-reserve { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--forest); background: transparent; border: 1px solid var(--forest); border-radius: var(--r); padding: 8px 16px; cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.btn-reserve:hover { background: var(--forest); color: #fff; }
.btn-bom { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); background: var(--cream-2); border: 1px solid var(--rule); border-radius: var(--r); padding: 8px 14px; cursor: pointer; transition: all .15s; }
.btn-bom:hover { border-color: var(--ink-3); color: var(--ink); }

/* ── TABS ── */
.tabs { display: flex; border-bottom: 1px solid var(--rule); margin-bottom: 28px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-btn { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); background: none; border: none; border-bottom: 2px solid transparent; padding: 12px 18px; cursor: pointer; transition: all .15s; white-space: nowrap; margin-bottom: -1px; }
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--forest); border-bottom-color: var(--forest); }
.tab-panel { display: none; }
.tab-panel.active { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

/* Training method visual */
.mvis { background: var(--cream-2); border: 1px solid var(--rule); border-radius: 6px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.mvis-row { background: #fff; border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 15px; display: flex; align-items: flex-start; gap: 10px; }
.mvis-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--forest); flex-shrink: 0; margin-top: 4px; }
.mvis-t { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink); }
.mvis-s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* App cards */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,260px),1fr)); gap: 12px; }
.app-card { background: var(--cream-2); border: 1px solid var(--rule); border-radius: 6px; padding: 20px; transition: background .15s; }
.app-card:hover { background: var(--cream-3); border-color: var(--rule-2); }
.app-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.app-card-name { font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.app-desc { font-size: 12px; color: var(--ink-3); line-height: 1.65; }
.app-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 10px; }
.app-tag { font-family: var(--sans); font-size: 9px; font-weight: 600; padding: 2px 7px; border-radius: 2px; background: var(--cream-3); color: var(--ink-3); border: 1px solid var(--rule); text-transform: uppercase; letter-spacing: .06em; }
.tier-tag { font-family: var(--sans); font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: 2px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.t-basic { background: rgba(59,80,53,.12); color: var(--forest); border: 1px solid rgba(59,80,53,.25); }
.t-adv { background: rgba(72,147,107,.12); color: var(--sage); border: 1px solid rgba(72,147,107,.3); }
.t-extra { background: rgba(197,186,104,.15); color: var(--bark); border: 1px solid rgba(197,186,104,.35); }

/* Contact table */
.ct { border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.ct-row { display: flex; align-items: baseline; border-bottom: 1px solid var(--rule); }
.ct-row:last-child { border-bottom: none; }
.ct-k { font-size: 13px; color: var(--ink-3); padding: 12px 16px; width: 140px; flex-shrink: 0; background: var(--cream-2); border-right: 1px solid var(--rule); }
.ct-v { font-family: var(--mono); font-size: 13px; color: var(--ink); padding: 12px 16px; flex: 1; overflow-wrap: break-word; word-break: break-all; }
.ct-v a { color: var(--forest); }
.ct-v a:hover { color: var(--forest-h); }
.ct-vg { color: var(--forest); }

/* ── MODAL ── */
.modal-ov { position: fixed; inset: 0; background: rgba(20,17,10,.75); backdrop-filter: blur(4px); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }
.modal-ov.open { display: flex; }
.modal { background: var(--cream); border: 1px solid var(--rule-2); border-radius: 8px; padding: 36px; width: 100%; max-width: 520px; position: relative; max-height: 92vh; overflow-y: auto; animation: mfade .2s ease; box-shadow: 0 24px 64px rgba(0,0,0,.2); }
@keyframes mfade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 14px; right: 14px; background: var(--cream-2); border: 1px solid var(--rule); color: var(--ink-3); width: 32px; height: 32px; border-radius: var(--r); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.modal-close:hover { border-color: var(--ink-3); color: var(--ink); }
.modal-lbl { font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--forest); margin-bottom: 8px; }
.modal h3 { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.modal-sub { font-size: 14px; color: var(--ink-3); margin-bottom: 20px; line-height: 1.65; }
.modal-sku { display: flex; gap: 16px; flex-wrap: wrap; background: var(--cream-2); border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 16px; margin-bottom: 16px; }
.sku-l { font-family: var(--sans); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-4); display: block; margin-bottom: 2px; }
.sku-v { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--forest); }

/* ── TICKER ── */
.ticker { background: var(--dark); border-top: 1px solid var(--d-rule); padding: 11px 0; overflow: hidden; }
.ticker-track { display: flex; animation: tsroll 30s linear infinite; width: max-content; }
.ti { display: flex; align-items: center; gap: 10px; padding: 0 28px; border-right: 1px solid var(--d-rule); white-space: nowrap; }
.ti-m { font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--khaki); letter-spacing: .06em; }
.ti-f { font-family: var(--mono); font-size: 11px; color: var(--d-t3); }
@keyframes tsroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── FOOTER ── */
.footer { background: var(--dark); padding: 60px var(--pad) 36px; border-top: 1px solid var(--d-rule); }
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 44px; padding-bottom: 40px; margin-bottom: 32px; border-bottom: 1px solid var(--d-rule); }
.footer-logo { font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 12px; }
.footer-logo span { color: var(--khaki); }
.footer-tagline { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--d-t2); margin-bottom: 8px; line-height: 1.4; }
.footer-desc { font-size: 13px; color: var(--d-t3); line-height: 1.65; max-width: 240px; }
.footer-col h5 { font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--d-t3); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; color: var(--d-t2); margin-bottom: 9px; cursor: pointer; transition: color .15s; text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-col a.dim { color: var(--d-t3); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-copy { font-family: var(--sans); font-size: 11px; color: var(--d-t3); letter-spacing: .06em; }
.footer-legal { display: flex; gap: 18px; }
.footer-legal a { font-family: var(--sans); font-size: 11px; color: var(--d-t3); text-decoration: none; cursor: pointer; transition: color .15s; }
.footer-legal a:hover { color: var(--d-t2); }

/* ── CHECK / BULLET LISTS ── */
.check-list { display: flex; flex-direction: column; gap: 11px; }
.check-item { display: flex; gap: 10px; font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.check-item::before { content: '+'; color: var(--forest); flex-shrink: 0; font-weight: 700; font-size: 14px; margin-top: 1px; }
.bull-list { display: flex; flex-direction: column; gap: 10px; }
.bull-item { display: flex; gap: 10px; font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.bull-item::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--forest); flex-shrink: 0; margin-top: 8px; }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.fu { animation: fadeUp .5s ease forwards; opacity: 0; }
.d1 { animation-delay: .07s; }
.d2 { animation-delay: .14s; }
.d3 { animation-delay: .21s; }

/* ── iOS / browser resets ── */
input[type=email], input[type=tel], input[type=text], input[type=number] {
  -webkit-appearance: none; border-radius: var(--r);
}
html { -webkit-text-size-adjust: 100%; }
a, button { -webkit-tap-highlight-color: transparent; }

/* 3-col variant (auto-collapses on mobile) */
.pillar-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.pillar-grid-3 .pillar-card { border-right: 1px solid var(--rule); }
.pillar-grid-3 .pillar-card:last-child { border-right: none; }
@media(max-width:900px) {
  .pillar-grid-3 { grid-template-columns: 1fr; }
  .pillar-grid-3 .pillar-card { border-right: none; border-bottom: 1px solid var(--rule); }
  .pillar-grid-3 .pillar-card:last-child { border-bottom: none; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE SYSTEM — Complete rewrite for mobile-first
   Tested against: iPhone SE (375px), iPhone 14 (390px),
   Android (360px), iPad (768px), Desktop (1280px+)
   ═══════════════════════════════════════════════════════ */

/* ── 1280px: large desktop ── */
@media (max-width: 1280px) {
  :root { --pad: 48px; }
}

/* ── 1024px: small desktop / large tablet ── */
@media (max-width: 1024px) {
  :root { --pad: 36px; }

  .pillar-grid-4 { grid-template-columns: 1fr 1fr; }
  .pillar-grid-4 .pillar-card:nth-child(2) { border-right: none; }
  .pillar-grid-4 .pillar-card:nth-child(3) { border-top: 1px solid var(--rule); border-right: 1px solid var(--rule); }
  .pillar-grid-4 .pillar-card:nth-child(4) { border-top: 1px solid var(--rule); border-right: none; }

  .stats-strip { grid-template-columns: 1fr 1fr; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-top: 1px solid var(--rule); }
  .stat-item:nth-child(4) { border-top: 1px solid var(--rule); border-right: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ── 900px: tablet — nav collapses ── */
@media (max-width: 900px) {
  :root { --nav-h: 56px; --pad: 28px; }

  .nav { padding: 0 var(--pad); }
  .nav-links { display: none !important; }
  .nav-btns  { display: none !important; }
  .nav-burger { display: flex !important; }

  .toolbar { padding: 10px var(--pad); position: static; }
  .pillar-grid { grid-template-columns: 1fr; }
  .pillar-grid .pillar-card { border-right: none; border-bottom: 1px solid var(--rule); }
  .pillar-grid .pillar-card:last-child { border-bottom: none; }
  .pillar-grid-3 { grid-template-columns: 1fr !important; }
  .pillar-grid-3 .pillar-card { border-right: none !important; border-bottom: 1px solid var(--rule); }
  .pillar-grid-3 .pillar-card:last-child { border-bottom: none; }
  .dark-card-grid { grid-template-columns: 1fr; gap: 0; }
  .dark-card { border-bottom: 1px solid var(--d-rule); }
  .dark-card:last-child { border-bottom: none; }
  .insight-grid { grid-template-columns: 1fr; }
  .tab-panel.active { grid-template-columns: 1fr; gap: 24px; }
  .tabs { gap: 0; }
  .tab-btn { padding: 10px 12px; font-size: 10px; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .stat-item { padding: 24px 16px; }
  .si-first { padding-left: 0 !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* ── 640px: MOBILE (iPhone, Android) ── */
@media (max-width: 640px) {
  :root { --nav-h: 52px; --pad: 18px; }

  /* ── Global safety ── */
  html, body { overflow-x: hidden !important; }

  /* ── Nav: logo + burger ONLY ── */
  .nav { padding: 0 var(--pad); gap: 0; }
  .nav-links  { display: none !important; }
  .nav-btns   { display: none !important; }
  .nav-burger { display: flex !important; width: 40px; height: 40px; }
  .nav-logo   { font-size: 14px; }
  .nav-mob    { padding: 8px var(--pad) 20px; }

  /* ── Typography scales ── */
  .h1 {
    font-size: clamp(28px, 8.5vw, 40px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.01em !important;
  }
  .h2 {
    font-size: clamp(22px, 6.5vw, 32px) !important;
    line-height: 1.12 !important;
  }
  .h3 { font-size: clamp(16px, 4.5vw, 20px) !important; }
  .body { font-size: 14px; line-height: 1.65; }
  .sec-label { font-size: 10px; letter-spacing: 0.13em; margin-bottom: 12px; }
  .stat-num { font-size: clamp(20px, 6vw, 30px) !important; }

  /* ── Buttons ── */
  .btn-row { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
  .btn-row .btn { width: 100% !important; justify-content: center !important; }
  .btn { padding: 13px 18px; font-size: 11px; letter-spacing: 0.12em; }

  /* ── Hero ── */
  .hero {
    padding: calc(var(--nav-h) + 28px) var(--pad) 0 !important;
    overflow: visible !important;
  }
  .hero-grid {
    display: block !important;
    padding-bottom: 0 !important;
  }
  .hero-grid > :first-child { margin-bottom: 32px; }
  .hero-location { font-size: 10px; margin-bottom: 14px; }

  /* ── Sections ── */
  .home-sec-inner,
  .home-sec-dark-inner { padding: 36px var(--pad) !important; }
  .two-col { display: block !important; }
  .two-col > * + * { margin-top: 24px; }
  .contact-grid { display: block !important; }
  .contact-grid > * + * { margin-top: 24px; }

  /* ── Form panel ── */
  .form-panel {
    padding: 22px var(--pad) !important;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
  }
  .form-panel h3 { font-size: 20px !important; margin-bottom: 4px; line-height: 1.2; }
  .form-panel .fp-sub { font-size: 13px !important; margin-bottom: 16px; }
  .fg { margin-bottom: 12px; }
  .fg label { font-size: 9px; margin-bottom: 5px; }
  .fg input, .fg select, .fg textarea {
    padding: 11px 12px;
    font-size: 16px !important;
    min-height: 46px;
  }
  .fg textarea { min-height: 80px; }
  .form-submit { height: 48px; font-size: 11px; margin-top: 14px; }
  .f2 { grid-template-columns: 1fr !important; gap: 0 !important; }

  /* ── Pillar cards ── */
  .pillar-grid-4, .pillar-grid-3 {
    display: block !important;
    border-radius: 4px;
  }
  .pillar-grid-4 .pillar-card,
  .pillar-grid-3 .pillar-card {
    border-right: none !important;
    border-bottom: 1px solid var(--rule);
    padding: 22px var(--pad);
  }
  .pillar-grid-4 .pillar-card:last-child,
  .pillar-grid-3 .pillar-card:last-child { border-bottom: none; }
  .pillar-title { font-size: 16px !important; }
  .pillar-body  { font-size: 12px !important; }

  /* ── Stats strip ── */
  .stats-strip {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }
  .stat-item { padding: 18px 14px; }
  .si-first { padding-left: 0 !important; }
  .stat-lbl { font-size: 9px; }

  /* ── Dark cards ── */
  .dark-card { padding: 22px var(--pad); }
  .dark-card-grid { border-radius: 4px; }

  /* ── Ticker ── */
  .ticker { padding: 8px 0; }
  .ti { padding: 0 14px; }
  .ti-m { font-size: 11px; }
  .ti-f { font-size: 10px; }

  /* ── Toolbar (filters) ── */
  .toolbar { padding: 10px var(--pad); position: static; }
  .toolbar-inner { flex-direction: column; gap: 8px; align-items: stretch; }
  .srch { width: 100%; flex: none; min-width: 0; }
  .fsel { width: 100%; flex: none; min-width: 0; font-size: 16px !important; }
  .clr-btn { width: 100%; }

  /* ── GPU / App grids ── */
  .gpu-cards { grid-template-columns: 1fr; }
  .app-grid  { grid-template-columns: 1fr; }

  /* ── Contact table ── */
  .ct-k { width: 90px; font-size: 11px; padding: 10px 12px; }
  .ct-v { font-size: 11px; padding: 10px 12px; overflow-wrap: break-word; word-break: break-all; }

  /* ── Tabs ── */
  .tabs { -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { padding: 10px 12px; font-size: 10px; white-space: nowrap; }

  /* ── Modal ── */
  .modal {
    padding: 24px var(--pad);
    margin: 10px;
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    box-sizing: border-box;
    border-radius: 6px;
  }
  .modal h3 { font-size: 20px !important; }
  .modal .f2 { grid-template-columns: 1fr !important; gap: 0 !important; }
  .modal-sku { flex-direction: column; gap: 8px; }

  /* ── Inv meta bar ── */
  .inv-meta { flex-direction: column; align-items: flex-start; gap: 4px; }

  /* ── Footer ── */
  .footer { padding: 36px var(--pad) 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-desc { max-width: 100%; }

  /* ── Sub-page hero ── */
  .pg-hero { padding: calc(var(--nav-h) + 24px) var(--pad) 28px !important; }
  .pg-hero-top { display: block !important; }
  .pg-hero-top > * + * { margin-top: 16px; }
  .pg-stats { text-align: left !important; }
  .bom-grid  { display: block !important; }
  .bom-grid  > * + * { margin-top: 24px; }
  .enq-grid  { display: block !important; }
  .enq-grid  > * + * { margin-top: 24px; }
  .demo-grid { display: block !important; }
  .demo-grid > * + * { margin-top: 24px; }
  .pg-content { padding: 0 var(--pad) 32px !important; }
  .bom-inner  { padding: 32px var(--pad) !important; }
  .pg-sec-inner { padding: 36px var(--pad) !important; }
  .stat-strip > div { min-width: 0; flex: 1; }
}

/* ── 400px: very small Android / iPhone SE ── */
@media (max-width: 400px) {
  :root { --nav-h: 50px; --pad: 14px; }
  .h1 { font-size: clamp(25px, 9vw, 34px) !important; }
  .h2 { font-size: clamp(20px, 7.5vw, 28px) !important; }
  .form-panel { padding: 18px var(--pad) !important; }
  .form-panel h3 { font-size: 18px !important; }
  .stat-num { font-size: clamp(18px, 6.5vw, 26px) !important; }
  .nav-logo { font-size: 13px; }
}

/* ── Universal touch targets ── */
.btn, .srch-inp, .fsel, .clr-btn,
.fg input, .fg select, .fg textarea,
.modal-close, .tab-btn, .nav-burger,
.btn-reserve, .btn-bom, .form-submit,
.nav-a, .nav-ma { min-height: 44px; }

/* ── iOS: prevent zoom on input focus ── */
@media (max-width: 768px) {
  .fg input, .fg select, .fg textarea,
  .srch-inp, .fsel { font-size: 16px !important; }
}

/* ── iOS safe area (notch / home indicator) ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .footer  { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .nav-mob { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
