/* WebletGPT storefront. Kindle-store structure (top bar, department sidebar, result grid,
   detail page with buy box) in WebletGPT's own navy/blue palette. System fonts only:
   nothing is fetched before the page can be read, and the CSP stays 'self'. */

:root {
  --bg: #ffffff;
  --panel: #f5f7fa;
  --ink: #14181d;
  --muted: #55606c;
  --line: #dfe3e8;
  --nav: #0f1b2d;
  --nav-2: #1b2b45;
  --nav-ink: #e9eef6;
  --brand: #1657c8;
  --brand-deep: #0f429b;
  --link: #1657c8;
  --ok: #157347;
  --warn-bg: #fff8e6;
  --warn-line: #f0d48a;
  --shadow: 0 2px 4px rgba(20, 24, 29, .06), 0 18px 40px rgba(20, 24, 29, .12);
  --body: Verdana, Helvetica, Arial, sans-serif;
  --display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1320px;
  --radius: 8px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--body);
  overflow-x: hidden;
}

h1, h2, p, ul, ol, dl, dd { margin: 0; }

a { color: var(--link); }

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

main { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; padding: 8px 12px; background: #fff; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--nav); color: var(--nav-ink); }

.topbar-inner, .catstrip-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 8px 24px;
  flex-wrap: wrap;
}

.topbar-inner { padding-block: 12px; }

.wordmark {
  color: #fff;
  text-decoration: none;
  font: 700 1.6rem/1 var(--display);
  letter-spacing: -.03em;
}

.wordmark span { color: #7fb0ff; }

.topbar-tag { color: #aebbd0; font-size: 13px; }

.topnav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; }

.topnav a { color: var(--nav-ink); text-decoration: none; }

.topnav a:hover { text-decoration: underline; }

.topnav-follow { padding: 6px 12px; border: 1px solid #4a5d7e; border-radius: 6px; }

.catstrip { background: var(--nav-2); }

.catstrip-inner { gap: 0; overflow-x: auto; scrollbar-width: none; }

.catstrip a {
  padding: 9px 12px;
  color: var(--nav-ink);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}

.catstrip a:first-child { padding-left: 0; }

.catstrip a:hover { border-color: #8aa0c2; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 999px;
  font: 700 15px/1 var(--display);
  text-decoration: none;
  transition: background .2s, transform .2s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary, .btn-buy { background: var(--brand); color: #fff; }

.btn-primary:hover, .btn-buy:hover { background: var(--brand-deep); }

.btn-secondary { background: var(--nav); color: #fff; }

.btn-secondary:hover { background: var(--nav-2); }

.btn-ghost { color: var(--ink); border: 1px solid var(--ink); }

.btn-ghost:hover { background: var(--panel); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-top: clamp(20px, 3vw, 32px);
  padding: clamp(24px, 4vw, 48px);
  border-radius: 14px;
  background: linear-gradient(135deg, #eaf1ff 0%, #f7f9fc 60%, #ffffff 100%);
  border: 1px solid var(--line);
}

.eyebrow { color: var(--brand); font: 700 12px/1.4 var(--display); letter-spacing: .08em; text-transform: uppercase; }

.hero h1 {
  margin-top: 10px;
  font: 700 clamp(2rem, 5vw, 3.6rem)/1.05 var(--display);
  letter-spacing: -.03em;
}

.hero-copy > p:not(.eyebrow) { margin-top: 16px; max-width: 54ch; color: var(--muted); font-size: 16px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-stack { position: relative; list-style: none; padding: 0; height: clamp(200px, 26vw, 320px); }

.hero-stack li { position: absolute; width: 72%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

.hero-stack li:nth-child(1) { left: 0; top: 0; transform: rotate(-4deg); }
.hero-stack li:nth-child(2) { left: 14%; top: 14%; transform: rotate(2deg); }
.hero-stack li:nth-child(3) { left: 28%; top: 28%; transform: rotate(-1deg); }

/* ---------- How it works ---------- */
.how { padding-block: clamp(28px, 4vw, 44px) 8px; }

.how h2, .results-head h2, .section h2, .band h2, .author h2 {
  font: 700 clamp(1.3rem, 2.4vw, 1.7rem)/1.2 var(--display);
  letter-spacing: -.02em;
}

.how ol {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}

.how li {
  counter-increment: step;
  padding: 18px 18px 18px 60px;
  position: relative;
  background: var(--panel);
  border-radius: var(--radius);
  font-size: 14px;
}

.how li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--nav);
  color: #fff;
  font: 700 14px/1 var(--display);
}

.how strong { display: block; }

.how-note { margin-top: 12px; color: var(--muted); font-size: 13px; }

/* ---------- Store: sidebar + results ---------- */
.store {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  padding-block: clamp(24px, 4vw, 40px);
}

.sidebar { font-size: 13px; }

.sidebar h2 { margin: 18px 0 6px; font: 700 14px/1.3 var(--display); }

.sidebar h2:first-child { margin-top: 0; }

.sidebar ul { list-style: none; padding: 0; }

.sidebar li a { display: block; padding: 4px 0; color: var(--ink); text-decoration: none; }

.sidebar li a:hover { color: var(--brand); text-decoration: underline; }

.sidebar li a[aria-current] { font-weight: 700; }

.sidebar li span, .sidebar p { color: var(--muted); }

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.results-head p { color: var(--muted); font-size: 13px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 28px 24px;
  margin-top: 20px;
  padding: 0;
  list-style: none;
}

.tile { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }

.tile-link { color: var(--ink); text-decoration: none; }

.tile-cover {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: var(--nav);
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-bottom: 10px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

.tile-link:hover .tile-cover { transform: translateY(-3px); box-shadow: var(--shadow); }

.tile-title { font: 700 15px/1.35 var(--display); }

.tile-link:hover .tile-title { color: var(--brand); text-decoration: underline; }

.tile-by, .tile-pitch { color: var(--muted); }

.tile-format { margin-top: 4px; font-weight: 700; }

.badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 4px;
  background: #e6f4ec;
  color: var(--ok);
  font-size: 11px;
}

.tile-price { font: 700 1.4rem/1.2 var(--display); }

.tile-price span { color: var(--muted); font: 400 12px var(--body); }

/* ---------- Bands ---------- */
.band { margin-block: 16px; padding: clamp(24px, 4vw, 40px); border-radius: 14px; }

.band-lead { margin-top: 8px; max-width: 62ch; color: var(--muted); }

.band .btn { margin-top: 16px; }

.responsible { background: var(--nav); color: var(--nav-ink); }

.responsible .band-lead { color: #b9c6da; }

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
  margin-top: 20px;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.pillars li { padding-top: 12px; border-top: 2px solid #7fb0ff; color: #cfd8e6; }

.pillars strong { display: block; color: #fff; }

.custom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  background: #eaf1ff;
}

.follow { background: var(--panel); text-align: center; }

.follow .band-lead { margin-inline: auto; }

/* ---------- Author ---------- */
.author {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-block: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.author-photo { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; }

.author-name { margin-top: 8px; font: 700 17px/1.3 var(--display); }

.author-role { color: var(--muted); font-size: 13px; }

.author p + p { margin-top: 10px; }

.author-links { display: flex; flex-wrap: wrap; gap: 16px; font-weight: 700; }

.author-compact .author-photo { width: 120px; height: 120px; }

.author-compact { grid-template-columns: 120px minmax(0, 1fr); }

/* ---------- Product detail page ---------- */
.crumbs { padding-block: 14px; color: var(--muted); font-size: 13px; }

.crumbs a { color: var(--muted); }

.pdp {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.25fr) 260px;
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.pdp-media img { border-radius: var(--radius); border: 1px solid var(--line); }

.look-link { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 14px; }

.pdp-info h1 { font: 700 clamp(1.5rem, 2.6vw, 2.1rem)/1.15 var(--display); letter-spacing: -.02em; }

.pdp-by { margin-top: 6px; color: var(--muted); font-size: 13px; }

.formats { display: flex; gap: 8px; margin-top: 14px; }

.format {
  display: grid;
  gap: 2px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}

.format-on { border: 2px solid var(--brand); background: #f2f6ff; }

.pdp-pitch { margin-top: 16px; font: 700 17px/1.4 var(--display); }

.pdp-info > p:not(.pdp-by):not(.pdp-pitch) { margin-top: 10px; color: #333a42; font-size: 14px; }

.pdp-sub { margin-top: 22px; font: 700 15px/1.3 var(--display); }

.includes { margin-top: 8px; padding: 0; list-style: none; font-size: 14px; }

.includes li { padding-block: 3px; }

.includes li::before { content: "+ "; color: var(--brand); font-weight: 700; }

.limits {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  background: var(--warn-bg);
  font-size: 13px;
}

.limits .pdp-sub { margin-top: 0; margin-bottom: 4px; }

.buybox {
  position: sticky;
  top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
}

.buybox-price { font: 700 2rem/1 var(--display); }

.buybox-terms { margin-top: 6px; color: var(--muted); }

.buybox-stock { margin-top: 10px; color: var(--ok); font-weight: 700; font-size: 15px; }

.btn-buy { display: block; margin-top: 14px; text-align: center; }

.buybox-facts { margin-top: 14px; padding: 12px 0 0 18px; border-top: 1px solid var(--line); color: var(--muted); }

.section { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }

.section > h2 { margin-bottom: 14px; }

.preview-video, .preview-img { width: 100%; max-width: 960px; border-radius: var(--radius); background: #000; }

.section .btn { margin-top: 14px; }

.spec { display: grid; gap: 0; max-width: 760px; font-size: 14px; }

.spec div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); }

.spec dt { font-weight: 700; }

.qa { max-width: 860px; border-bottom: 1px solid var(--line); }

.qa summary { padding: 12px 0; cursor: pointer; font: 700 15px/1.4 var(--display); }

.qa p { padding-bottom: 14px; color: #333a42; font-size: 14px; }

.grid-row { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }

/* ---------- Footer, 404 ---------- */
.site-footer { margin-top: 48px; background: var(--nav); color: var(--nav-ink); font-size: 13px; }

.footer-cols {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px var(--gutter) 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 24px;
}

.footer-cols h2 { margin-bottom: 8px; color: #fff; font: 700 14px/1.3 var(--display); }

.footer-cols a { display: block; padding: 3px 0; color: #c3cfe2; text-decoration: none; overflow-wrap: anywhere; }

.footer-cols a:hover { color: #fff; text-decoration: underline; }

.fineprint {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px var(--gutter) 28px;
  border-top: 1px solid #2a3a55;
  color: #8f9db3;
  font-size: 12px;
}

.notfound { padding-block: 60px; }

.notfound h1 { font: 700 clamp(2rem, 5vw, 3rem)/1.1 var(--display); margin-bottom: 20px; }

/* ---------- ARAF pattern page (field green + soil, from the Mosaic Desk cover) ---------- */
.araf { --field: #2f6b3a; --field-deep: #1f3d25; --field-pale: #eef5ec; --soil: #9a4f1d; --straw: #f7f3e6; }

.araf .eyebrow { color: var(--field); }

.araf-hero {
  margin-top: 4px;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px);
  border-radius: 14px;
  background: linear-gradient(160deg, var(--straw) 0%, var(--field-pale) 100%);
  border: 1px solid #dfe6d5;
}

.araf-hero h1 {
  margin-top: 10px;
  max-width: 18ch;
  color: var(--field-deep);
  font: 800 clamp(2rem, 5.2vw, 3.6rem)/1.04 var(--display);
  letter-spacing: -.03em;
}

.araf-lead { margin-top: 18px; max-width: 60ch; font: 400 clamp(1.05rem, 1.6vw, 1.25rem)/1.55 var(--display); color: #2b332c; }

.araf-note {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 12px;
  border-left: 4px solid var(--soil);
  background: rgba(255, 255, 255, .7);
  font-size: 13px;
  color: #4a3a2c;
}

.araf-sec { margin-top: clamp(36px, 5vw, 56px); }

.araf-sec > h2, .araf-loop h2, .araf-cta h2 {
  color: var(--field-deep);
  font: 700 clamp(1.35rem, 2.4vw, 1.75rem)/1.2 var(--display);
  letter-spacing: -.01em;
}

.araf-body { margin-top: 12px; max-width: 68ch; color: #333a42; }

.araf-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 16px; }

.araf-stat { padding: 18px 20px; border-top: 3px solid var(--soil); background: var(--straw); border-radius: 0 0 var(--radius) var(--radius); font-size: 14px; }

.araf-stat strong { display: block; color: var(--soil); font: 800 clamp(1.4rem, 2.6vw, 1.9rem)/1.15 var(--display); }

.araf-stat span { color: var(--muted); font-size: 12px; }

.araf-elements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 14px;
  margin-top: 18px;
  padding: 0;
  list-style: none;
  counter-reset: el;
}

.araf-elements li {
  counter-increment: el;
  padding: 18px;
  border: 1px solid #dfe6d5;
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}

.araf-elements li:hover { border-color: var(--field); transform: translateY(-2px); }

.araf-elements li::before { content: "0" counter(el); color: var(--soil); font: 800 13px/1 var(--display); letter-spacing: .08em; }

.araf-elements h3 { margin: 8px 0 6px; color: var(--field-deep); font: 700 16px/1.3 var(--display); }

.araf-elements p { font-size: 13.5px; color: #3d454d; }

.araf-loop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  padding: clamp(20px, 4vw, 36px);
  border-radius: 14px;
  background: var(--field-pale);
}

.araf-svg { width: 100%; height: auto; font-family: var(--display); }

.araf-arms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin-top: 18px;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.araf-arms li { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }

.araf-arms li:last-child { border: 2px solid var(--field); background: #fbfdf9; }

.arm-svg { width: 100%; height: auto; margin-bottom: 12px; border-radius: 6px; }

.arm-key { color: var(--field-deep); font: 800 15px/1.3 var(--display); margin-bottom: 4px; }

.arm-why { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 13px; }

.araf-callout { margin-top: 18px; max-width: 72ch; padding: 14px 18px; border-left: 4px solid var(--field); background: var(--field-pale); font-size: 14px; }

.araf-targets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 0;
  margin-top: 16px;
  padding: 0;
  list-style: none;
  border: 1px dashed #b9c7b0;
  border-radius: var(--radius);
}

.araf-targets li { display: grid; gap: 4px; padding: 16px; border-right: 1px dashed #b9c7b0; }

.araf-targets li:last-child { border-right: 0; }

.tgt-n { color: var(--field); font: 800 1.6rem/1 var(--display); }

.tgt-l { color: #3d454d; font-size: 13px; }

.araf-approvals { display: grid; max-width: 720px; margin-top: 14px; font-size: 14px; }

.araf-approvals div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }

.araf-approvals dt { font-weight: 700; color: var(--field-deep); }

.araf .responsible { margin-top: clamp(36px, 5vw, 56px); background: var(--field-deep); }

.araf .responsible .band-lead { color: #c8d8c8; }

.araf .pillars li { border-top-color: #9fcf8f; }

.araf-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
  padding: clamp(20px, 4vw, 36px);
  border-radius: 14px;
  background: var(--straw);
  border: 1px solid #e6dfc8;
}

.araf-cta .btn { margin-top: 16px; }

.araf-tile { grid-template-columns: 1fr; max-width: 280px; }

.araf-refs { margin-top: 12px; padding-left: 20px; max-width: 80ch; color: #3d454d; font-size: 13px; }

.araf-refs li { padding-block: 3px; }

.araf-fine { margin-top: 12px; max-width: 80ch; color: var(--muted); font-size: 12.5px; }

.araf .btn-primary { background: var(--field); }

.araf .btn-primary:hover { background: var(--field-deep); }

.pdp-learn { font-weight: 700; }

.feature .eyebrow { margin-bottom: 4px; }

@media (max-width: 760px) {
  .araf-loop, .araf-cta { grid-template-columns: 1fr; }
  .araf-targets li { border-right: 0; border-bottom: 1px dashed #b9c7b0; }
  .araf-targets li:last-child { border-bottom: 0; }
  .araf-approvals div { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .araf-elements li:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .pdp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .buybox { grid-column: 1 / -1; position: static; }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-stack { display: none; }
  .store { grid-template-columns: 1fr; }
  .sidebar ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .sidebar li a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; }
  .sidebar li a[aria-current] { border-color: var(--brand); color: var(--brand); }
  .sidebar h2:not(:first-child), .sidebar p { display: none; }
  .pdp { grid-template-columns: 1fr; }
  .topbar-tag { display: none; }
  .topnav { margin-left: 0; width: 100%; }
  .author, .author-compact { grid-template-columns: 1fr; }
  .spec div { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .tile-link:hover .tile-cover { transform: none; }
}

.pdp-media-book img { max-width: 340px; width: 100%; box-shadow: var(--shadow); }

.look-note { margin-bottom: 12px; color: var(--muted); }
