:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --border: #dce3ea;
  --text: #0f172a;
  --muted: #475569;
  --brand: #0f5c6e;
  --brand-dark: #09404d;
  --brand-soft: #e6f4f7;
  --amber-bg: #fef3c7;
  --amber-text: #92400e;
  --amber-border: #f59e0b;
  --green-bg: #ecfdf5;
  --green-text: #065f46;
  --green-border: #10b981;
  --red-bg: #fef2f2;
  --red-text: #991b1b;
  --amazon-bg: #ffd814;
  --amazon-hover: #f7ca00;
  --amazon-text: #0f1111;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --max-w: 1200px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.num,
.price-val,
td.num,
th.num {
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Mandatory ASA Disclosure Bar (Always above the fold) */
.asa-bar {
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 0.5rem 0;
  border-bottom: 2px solid var(--brand);
}

.asa-bar p {
  margin: 0;
  text-align: center;
}

.asa-bar a {
  color: #7dd3fc;
  text-decoration: underline;
  margin-left: 0.4rem;
}

/* Header & Nav */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.85rem 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.site-brand:hover {
  text-decoration: none;
  color: var(--brand);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.15rem;
  font-size: 0.94rem;
  font-weight: 500;
}

.site-nav a {
  color: var(--muted);
  padding: 0.25rem 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 2px solid var(--brand);
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.9rem 0 0.25rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.4rem;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: #94a3b8;
}

/* Main Content */
main {
  padding: 1.25rem 0 3rem;
}

.hero {
  background: linear-gradient(135deg, #ffffff 0%, var(--brand-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.75rem;
}

.hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 72ch;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.section-heading {
  margin: 2rem 0 0.85rem;
  font-size: 1.35rem;
  line-height: 1.25;
}

.section-sub {
  margin: -0.4rem 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Cards & Grids */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  margin-top: 0;
  line-height: 1.3;
}

.scenario-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.scenario-card:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.scenario-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.45rem;
}

.scenario-card p {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.tag {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--muted);
  border: 1px solid var(--border);
}

.tag-brand {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: #b6dfe8;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 5px;
}

.badge-low {
  background: var(--green-bg);
  color: var(--green-text);
  border: 1px solid var(--green-border);
}

.badge-deal {
  background: var(--amber-bg);
  color: var(--amber-text);
  border: 1px solid var(--amber-border);
}

.badge-oos {
  background: var(--red-bg);
  color: var(--red-text);
  border: 1px solid #fca5a5;
}

.badge-stock {
  background: var(--green-bg);
  color: var(--green-text);
  border: 1px solid #a7f3d0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-amazon {
  background: var(--amazon-bg);
  color: var(--amazon-text);
  border-color: #eab308;
}

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

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-outline {
  background: var(--surface);
  color: var(--brand);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.btn-sm {
  padding: 0.42rem 0.75rem;
  font-size: 0.84rem;
}

/* Tariff Bar & Running Cost Calculator */
.tariff-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.tariff-input-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.tariff-input-group label {
  font-weight: 600;
  font-size: 0.86rem;
}

.tariff-input-group input {
  width: 92px;
  padding: 0.4rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tariff-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.calc-stat {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
}

.calc-stat .label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.calc-stat .value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

/* Comparison Tables */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow);
}

table.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 720px;
}

table.comp-table th,
table.comp-table td {
  padding: 0.6rem 0.48rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.comp-table thead th {
  background: var(--surface-alt);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  white-space: nowrap;
}

table.comp-table tbody tr:hover {
  background: #f8fafc;
}

table.comp-table tbody tr:last-child td {
  border-bottom: none;
}

.product-cell-name {
  font-weight: 600;
  color: var(--text);
  display: block;
}

.product-cell-brand {
  font-size: 0.8rem;
  color: var(--muted);
}

.price-cell {
  white-space: nowrap;
}

.price-main {
  font-weight: 700;
  font-size: 1rem;
  display: block;
}

.price-ts {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* Product Detail Page */
.product-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 860px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
}

.price-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.price-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem;
  margin: 0.4rem 0;
}

.price-hero .current {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.price-hero .rrp {
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: line-through;
}

.timestamp-line {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.25rem 0 0.85rem;
}

.amazon-disclaimer {
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface-alt);
  border-left: 3px solid var(--border);
  padding: 0.55rem 0.75rem;
  border-radius: 0 6px 6px 0;
  margin-top: 0.9rem;
}

/* Specs Table */
table.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.specs-table th,
table.specs-table td {
  padding: 0.58rem 0.4rem;
  border-bottom: 1px solid var(--border);
}

table.specs-table th {
  width: 46%;
  color: var(--muted);
  font-weight: 500;
  text-align: left;
}

table.specs-table td {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

table.specs-table tr:last-child th,
table.specs-table tr:last-child td {
  border-bottom: none;
}

/* SVG Price Chart */
.chart-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.chart-tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.chart-tab {
  border: none;
  background: var(--surface);
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.chart-tab + .chart-tab {
  border-left: 1px solid var(--border);
}

.chart-tab.active {
  background: var(--brand);
  color: #ffffff;
}

.chart-container {
  position: relative;
  width: 100%;
  min-height: 210px;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-caption {
  font-size: 0.83rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Editorial / Legal copy */
.prose {
  max-width: 74ch;
}

.prose h2 {
  margin-top: 1.5rem;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 2rem 0;
  font-size: 0.86rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.site-footer h3 {
  color: #ffffff;
  font-size: 0.95rem;
  margin: 0 0 0.6rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.35rem;
}

.site-footer a {
  color: #93c5fd;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.comp-table .btn-amazon {
  white-space: nowrap;
}

table.comp-table td:first-child {
  min-width: 165px;
  max-width: 230px;
}
.comp-table .btn-amazon {
  padding: 0.42rem 0.65rem;
  font-size: 0.8rem;
}

/* Editorial Guides, Quick Answer (GEO), TOC, FAQ & Pagination */
.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
}

.quick-answer {
  background: var(--brand-soft);
  border: 1px solid #b6dfe8;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.5rem;
}

.quick-answer-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-dark);
  margin-bottom: 0.35rem;
}

.quick-answer p {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 920px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }
}

.toc-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.toc-box h2 {
  font-size: 0.95rem;
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.toc-list,
.toc-list ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.toc-list ul {
  padding-left: 0.9rem;
  margin-top: 0.25rem;
}

.toc-list li {
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  line-height: 1.35;
}

.guide-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.guide-body h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
  font-size: 1.35rem;
  scroll-margin-top: 1rem;
}

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

.guide-body h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.45rem;
  font-size: 1.1rem;
  scroll-margin-top: 1rem;
}

.guide-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.88rem;
  display: block;
  overflow-x: auto;
}

.guide-body th,
.guide-body td {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  text-align: left;
}

.guide-body thead th {
  background: var(--surface-alt);
}

.guide-body blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--surface-alt);
  border-left: 3px solid var(--brand);
  border-radius: 0 6px 6px 0;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
}

.faq-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 0.42rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 600;
}

.pagination .current {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}


/* Accessible caption helper */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Product photos (Amazon CDN URLs, never rehosted) */
.product-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 16rem;
}
.product-thumb-link {
  flex: 0 0 auto;
  display: block;
}
.product-img {
  background: #f3f6f5;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: contain;
}
.product-thumb {
  width: 64px;
  height: 64px;
}
.product-hero-photo {
  margin: 0;
}
.product-img-hero {
  width: 100%;
  height: auto;
  max-height: 420px;
  border-radius: 12px;
  background: #f3f6f5;
}
.product-card-photo {
  width: 100%;
  height: 160px;
  object-fit: contain;
  margin-bottom: 0.7rem;
  background: #f3f6f5;
}

/* Guide covers */
.guide-cover {
  margin: 1.15rem 0 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #eef3f1;
}
.guide-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.card-cover-link {
  display: block;
  margin: 0 0 0.85rem;
}
.card-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #eef3f1;
}
