/* ============================================================
   Amazon Integration — navy + Amazon orange + gradient texture
============================================================ */

:root {
  --amzn: #232F3E;        /* Amazon navy */
  --amzn-orange: #FF9900; /* Amazon orange */
  --amzn-cta: #FFA41C;
  --amzn-tint: color-mix(in srgb, #FF9900 12%, transparent);
}

.nav-links a.active { color: var(--ink); font-weight: 500; }
.nav-links a.active::after {
  content: "";
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink);
  margin-left: 6px;
  vertical-align: middle;
}

/* subnav */
.subnav {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 65px;
  z-index: 40;
}
.subnav-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px var(--pad-x);
  overflow-x: auto;
}
.subnav-eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.subnav-inner a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap;
  padding: 4px 0;
}
.subnav-inner a:hover { color: var(--ink); }
.subnav-inner a.active {
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
}

/* Hero background: gradient + grain texture */
.hero-amzn { position: relative; overflow: hidden; }
.amzn-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.amzn-grad {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 80% 0%, rgba(255,153,0,0.10), transparent 60%),
    radial-gradient(ellipse 80% 60% at 0% 30%, rgba(122,142,240,0.06), transparent 60%);
}
.amzn-grain {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(var(--ink-rgb),0.012) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(var(--ink-rgb),0.012) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  opacity: 0.6;
}
.hero-amzn .container { position: relative; z-index: 1; }

.kicker.amzn { background: var(--amzn-tint); border-color: rgba(255,153,0,0.25); color: #FFB84D; }
.kicker .dot.amzn { background: var(--amzn-orange); box-shadow: 0 0 0 3px rgba(255,153,0,0.22); }
.hero-amzn .display { font-size: clamp(56px, 8.8vw, 116px); line-height: 0.94; }

.btn-amzn {
  background: var(--amzn);
  color: #fff;
  border-color: var(--amzn);
  background: linear-gradient(180deg, #2E3B4E 0%, #232F3E 100%);
}
.btn-amzn:hover { background: linear-gradient(180deg, #3A4658 0%, #2E3B4E 100%); transform: translateY(-1px); }
.btn-amzn.full { width: 100%; justify-content: center; }
.amzn-mark {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--amzn);
  color: var(--amzn-orange);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  font-family: var(--f-sans);
}
.amzn-mark.sm { width: 18px; height: 18px; font-size: 11px; border-radius: 4px; }

/* ============================================================
   HERO PEEK — Amazon listing manager
============================================================ */
.amzn-peek .peek-frame { background: var(--bg-card); }
.amzn-toolbar { background: var(--bg-soft); }
.chip.amzn-live i {
  width: 7px; height: 7px;
  background: var(--amzn-orange);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255,153,0,0.22);
  animation: pulse 2s ease-in-out infinite;
}

.amzn-dash {
  display: grid;
  grid-template-columns: 1fr 320px;
  min-height: 560px;
}
@media (max-width: 920px){ .amzn-dash { grid-template-columns: 1fr; } }

.ad-listing {
  padding: 22px 26px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.adl-h { display: flex; gap: 14px; align-items: flex-start; }
.adl-tn {
  width: 64px; height: 80px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2A2A26, #4A4A45);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.adl-tn::before {
  content: ""; position: absolute;
  inset: 14px 10px 8px 10px;
  background: rgba(255,255,255,0.10);
  border-radius: 4px 4px 0 0;
}
.adl-info { flex: 1; min-width: 0; }
.adl-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.3;
  margin-bottom: 8px;
  color: #45B8D2;
}
.adl-meta {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.adl-bsr {
  font-family: var(--f-mono);
  background: var(--amzn-tint);
  color: #FFB84D;
  padding: 2px 7px;
  border-radius: 4px;
}

.adl-meter {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
}
.adlm-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 8px;
}
.adlm-l { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.adlm-c b { font-weight: 500; }
.adlm-bar {
  height: 4px;
  background: rgba(var(--ink-rgb),0.08);
  border-radius: 2px;
  overflow: hidden;
}
.adlm-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--amzn), var(--amzn-orange));
}

.adl-bullets {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.adlb-h {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.adlb {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
  line-height: 1.5;
}
.adlb:last-child { border-bottom: none; }
.adlb-n { color: var(--amzn-orange); font-weight: 700; }
.adlb-body { color: var(--ink); }
.adlb-c { color: var(--muted); font-size: 11px; align-self: flex-end; }

/* Sidebar */
.ad-side {
  background: var(--bg-soft);
  padding: 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.ads-section { display: flex; flex-direction: column; gap: 10px; }
.ads-h {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.attr-list { display: flex; flex-direction: column; gap: 0; }
.attr {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}
.attr:last-child { border-bottom: none; }
.attr.warn { color: var(--warn); }
.attr-k { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.attr.warn .attr-k { color: var(--warn); }
.attr-v { color: var(--ink); }
.attr.warn .attr-v { color: var(--warn); font-family: var(--f-mono); }

.bk-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bk-words {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.bk-w {
  font-family: var(--f-mono);
  font-size: 10.5px;
  padding: 3px 7px;
  background: rgba(var(--ink-rgb),0.06);
  border-radius: 4px;
  color: var(--ink);
}
.bk-meter { display: flex; flex-direction: column; gap: 5px; padding-top: 8px; border-top: 1px dashed var(--line); }
.bk-bytes b { font-weight: 500; }
.bk-bar {
  height: 4px;
  background: rgba(var(--ink-rgb),0.08);
  border-radius: 2px;
  overflow: hidden;
}
.bk-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--amzn-orange), #FFB84D);
}

/* ============================================================
   STAT STRIP
============================================================ */
.amzn-trust { padding: 50px 0 30px; }
.trust-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 4vw, 60px);
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
@media (max-width: 720px){ .trust-stats { grid-template-columns: 1fr 1fr; gap: 30px; } }
.ts { display: flex; flex-direction: column; gap: 6px; }
.ts b {
  font-weight: 500;
  font-size: clamp(34px, 4.2vw, 52px);
  letter-spacing: -0.035em;
  line-height: 1;
}
.ts span { font-size: 13px; color: var(--muted); }

/* ============================================================
   BYTES OPTIMIZER CARD
============================================================ */
.bytes-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.bytes-card::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(255,153,0,0.08), transparent 50%);
  pointer-events: none;
}
.bc-h {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.bc-tag {
  font-family: var(--f-mono);
  font-size: 11.5px;
  background: var(--amzn);
  color: var(--amzn-orange);
  padding: 4px 10px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}
.bc-meta { font-size: 12px; color: var(--muted); }
.bc-pool {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bc-w {
  font-family: var(--f-mono);
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  transition: background .25s ease, color .25s ease;
}
.bc-w.on {
  background: var(--amzn);
  color: var(--amzn-orange);
}
.bc-w.dim {
  background: rgba(var(--ink-rgb),0.05);
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(var(--ink-rgb),0.30);
}

.bc-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}
.bc-stat { display: flex; flex-direction: column; gap: 3px; }
.bc-l {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.bc-stat b {
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.bc-bar-wrap { display: flex; align-items: center; gap: 12px; }
.bc-bar {
  flex: 1;
  height: 6px;
  background: rgba(var(--ink-rgb),0.08);
  border-radius: 3px;
  overflow: hidden;
}
.bc-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--amzn-orange), #FFD080);
  border-radius: 3px;
  animation: bcGrow 2.2s cubic-bezier(.2,.7,.3,1) infinite;
}
@keyframes bcGrow {
  0%   { transform: scaleX(0.7); transform-origin: left; }
  50%  { transform: scaleX(1); }
  100% { transform: scaleX(0.7); }
}
.bc-hint { font-family: var(--f-mono); font-size: 11px; color: var(--amzn-orange); white-space: nowrap; }

/* ============================================================
   SCHEMA MAPPING GRID
============================================================ */
.schema-grid {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  gap: 0;
  align-items: stretch;
  margin-top: 20px;
}
@media (max-width: 820px){
  .schema-grid { grid-template-columns: 1fr; gap: 16px; }
  .schema-flow { display: none; }
}
.schema-col {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.schema-col.amzn-col {
  background: var(--amzn);
  color: rgba(255,255,255,0.92);
  border-color: var(--amzn);
}
.schema-col .sc-h {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.schema-col.amzn-col .sc-h { color: var(--amzn-orange); border-color: rgba(255,255,255,0.15); }
.sc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
  align-items: baseline;
}
.schema-col.amzn-col .sc-row { border-color: rgba(255,255,255,0.08); }
.sc-row:last-child { border-bottom: none; }
.sc-row .mono { font-size: 11.5px; color: var(--muted); }
.schema-col.amzn-col .sc-row .mono { color: var(--amzn-orange); }
.sc-row span:last-child { color: var(--ink); }
.schema-col.amzn-col .sc-row span:last-child { color: rgba(255,255,255,0.92); }
.sc-row.map { background: rgba(255,153,0,0.08); margin: 0 -8px; padding: 7px 8px; border-radius: 5px; }
.sc-row.warn { color: rgba(255,255,255,0.45); }
.sc-row.warn .muted { color: rgba(255,255,255,0.50); }

.schema-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 22px 0;
}
.schema-flow svg { width: 100%; height: 100%; }
.schema-flow path {
  fill: none;
  stroke: var(--amzn-orange);
  stroke-width: 1.4;
  stroke-dasharray: 5 4;
  animation: dashflow 2s linear infinite;
}
@keyframes dashflow { to { stroke-dashoffset: -18; } }

.schema-foot {
  text-align: center;
  font-size: 13px;
  margin: 28px auto 0;
  max-width: 720px;
  line-height: 1.55;
}

/* ============================================================
   LOCALE COMPARE (dark)
============================================================ */
.locale-cmp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 820px){ .locale-cmp { grid-template-columns: 1fr; } }
.loc {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.loc-h {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-light);
}
.loc-flag { font-size: 28px; line-height: 1; }
.loc-h b { display: block; font-size: 15px; font-weight: 600; color: #fff; }
.loc-h .muted { font-size: 12px; color: rgba(255,255,255,0.55); font-family: var(--f-mono); }

.loc-section { display: flex; flex-direction: column; gap: 5px; }
.loc-l {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.loc-v {
  font-size: 13.5px;
  color: rgba(255,255,255,0.92);
  line-height: 1.5;
}
.loc-c { font-size: 11px; color: rgba(255,255,255,0.5); }
.loc-kw {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(255,153,0,0.14);
  color: #FFB84D;
  border-radius: 4px;
  margin: 2px 4px 2px 0;
}

/* ============================================================
   VALIDATION GATE
============================================================ */
.vgate-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow);
}
.vg-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.vg-tag {
  font-family: var(--f-mono);
  font-size: 11.5px;
  background: var(--amzn);
  color: var(--amzn-orange);
  padding: 4px 10px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}
.vg-meta { font-size: 12px; color: var(--muted); }
.vg-rules { display: flex; flex-direction: column; gap: 0; }
.vg-rule {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.vg-rule:last-child { border-bottom: none; }
.vg-rule.warn { color: var(--warn); background: rgba(180,122,18,0.06); margin: 0 -8px; padding: 9px 8px; border-radius: 5px; }
.vg-rule-l { color: var(--ink); }
.vg-rule.warn .vg-rule-l { color: var(--warn); }
.vg-rule-v { color: var(--muted); font-size: 11.5px; }
.vg-rule.pass .vg-rule-v { color: var(--ok); }
.vg-rule.warn .vg-rule-v { color: var(--warn); }
.vg-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.vg-status { font-size: 13px; color: var(--ink); font-weight: 500; }

/* ============================================================
   MULTI MARKETPLACE LIST
============================================================ */
.mp-list { padding: 0; overflow: hidden; }
.mp-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.mp-row:last-child { border-bottom: none; }
.mp-row.dim { background: var(--bg-soft); color: var(--muted); }
.mp-flag { font-size: 24px; line-height: 1; }
.mp-meta { display: flex; flex-direction: column; gap: 2px; }
.mp-meta b { font-family: var(--f-mono); font-size: 13.5px; font-weight: 500; }
.mp-meta .muted { font-size: 12px; }

/* ============================================================
   COMPARE TABLE
============================================================ */
.compare-table { padding: 0; overflow: hidden; }
.cmp-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.cmp-row:last-child { border-bottom: none; }
.cmp-row > span { display: inline-flex; align-items: center; gap: 8px; }
.cmp-row .hl.amzn-hl {
  background: rgba(var(--ink-rgb),0.05);
  margin: -16px 0;
  padding: 16px 14px;
  font-weight: 500;
}
.cmp-row.cmp-head {
  background: var(--bg-soft);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 24px;
}
.cmp-row.cmp-head .hl.amzn-hl {
  background: var(--amzn);
  color: var(--amzn-orange);
  margin: -14px 0;
  padding: 14px 14px;
}
.cmp-row .dim { color: var(--muted-2); }
.cmp-row .dim.partial { color: var(--warn); }
.cmp-row .dt { width: 9px; height: 9px; }
@media (max-width: 720px){
  .cmp-row { grid-template-columns: 1.4fr 1fr 1fr 1fr; padding: 12px 14px; font-size: 12.5px; }
  .cmp-row.cmp-head { padding: 12px 14px; }
  .cmp-row .hl.amzn-hl { padding: 12px 8px; margin: -12px 0; }
}

.foot-cols a.on { color: #fff; }

/* ── White mode (html[data-theme="light"]) overrides ── */
html[data-theme="light"] {
  --amzn-tint: #FBF1E0;
}
html[data-theme="light"] .amzn-grad {
  background:
    radial-gradient(ellipse 80% 60% at 80% 0%, rgba(255,153,0,0.10), transparent 60%),
    radial-gradient(ellipse 80% 60% at 0% 30%, rgba(35,47,62,0.05), transparent 60%);
}
html[data-theme="light"] .kicker.amzn { color: #5B3A0C; }
html[data-theme="light"] .adl-title { color: #007185; }
html[data-theme="light"] .adl-bsr { color: #5B3A0C; }
