/* ------------------------------------------------------------
   Store stylesheet
   Palette: cool film-paper base, deep radiograph ink, cobalt
   signal accent, and a single amber used only for the Rx notice.
------------------------------------------------------------- */
:root {
  --paper: #F4F6F7;
  --surface: #FFFFFF;
  --ink: #0F2230;
  --ink-2: #3D4F5C;
  --muted: #66757F;
  --line: #D9E0E4;
  --line-strong: #B9C4CA;
  --signal: #1659C7;
  --signal-ink: #0E3F91;
  --signal-tint: #E8EFFB;
  --amber: #A86A00;
  --amber-tint: #FFF4DF;
  --film: #0C1A24;
  --ok: #18794E;

  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --radius-sm: 6px;
  --radius: 10px;
  --wrap: 1180px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--signal); text-underline-offset: 3px; }
a:hover { color: var(--signal-ink); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 600; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Notice bar ---------- */
.notice-bar { background: var(--film); color: #DCE6EC; font-size: 14px; }
.notice-bar .wrap { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; text-align: center; }
.notice-bar a { color: #fff; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 18px; }
.brand:hover { color: var(--ink); }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.main-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.main-nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--signal); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-phone { color: var(--ink-2); text-decoration: none; font-size: 15px; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 10px; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }

@media (max-width: 960px) {
  .header-phone { display: none; }
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 16px 16px; }
  .main-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 16px; border-radius: var(--radius-sm); padding: 13px 22px; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color .15s ease; }
.btn-primary { background: var(--signal); color: #fff; }
.btn-primary:hover { background: var(--signal-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { background: #9AA9B3; cursor: not-allowed; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 14px; color: var(--muted); padding: 18px 0 0; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); }

/* ---------- Product section ---------- */
.product { padding: 20px 0 64px; }
.product-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 900px) { .product-grid { grid-template-columns: 1fr; gap: 32px; } }

.gallery-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.gallery-thumbs button { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0; aspect-ratio: 1/1; cursor: pointer; overflow: hidden; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.gallery-note { font-size: 13px; color: var(--muted); margin-top: 10px; }

.buybox h1 { margin-bottom: 10px; }
.buybox .brand-line { color: var(--muted); font-size: 15px; margin-bottom: 6px; }
.buybox .lede { color: var(--ink-2); font-size: 18px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); background: var(--surface); }
.tag.ok { border-color: #B6DCC8; background: #EDF7F1; color: var(--ok); }
.tag .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.price-block { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; margin-bottom: 22px; }
.price { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.price-note { color: var(--muted); font-size: 14px; margin: 2px 0 0; }

fieldset.size-picker { border: 0; margin: 0 0 20px; padding: 0; }
fieldset.size-picker legend { font-weight: 600; font-size: 15px; margin-bottom: 10px; padding: 0; }
.size-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.size-option { position: relative; }
.size-option input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.size-option label { display: block; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer; background: var(--surface); }
.size-option label strong { display: block; font-size: 16px; }
.size-option label span { font-size: 13px; color: var(--muted); }
.size-option input:checked + label { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); background: var(--signal-tint); }
.size-option input:focus-visible + label { outline: 3px solid var(--signal); outline-offset: 2px; }

.qty-row { display: flex; gap: 12px; align-items: stretch; margin-bottom: 14px; }
.qty { display: flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.qty button { width: 42px; background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--ink); }
.qty input { width: 44px; text-align: center; border: 0; font: inherit; font-weight: 600; background: transparent; color: var(--ink); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-row .btn { flex: 1; }

.rx-box { background: var(--amber-tint); border: 1px solid #EED4A4; border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; color: #5C3D00; margin: 16px 0; }
.rx-box strong { color: #4A3100; }

.assurances { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.assurances li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; font-size: 15px; color: var(--ink-2); }
.assurances svg { width: 22px; height: 22px; color: var(--signal); margin-top: 1px; }
.assurances strong { color: var(--ink); display: block; font-weight: 600; }
.assurances a { font-size: 14px; }

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

/* ---------- Resolution band (signature element) ---------- */
.resolution { background: var(--film); color: #E7EEF2; padding: 72px 0; overflow: hidden; }
.resolution-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
@media (max-width: 900px) { .resolution-grid { grid-template-columns: 1fr; gap: 32px; } }
.resolution h2 { color: #fff; }
.resolution p { color: #B7C6CF; max-width: 52ch; }
.resolution .figure { font-size: clamp(64px, 9vw, 112px); font-weight: 600; line-height: 1; letter-spacing: -0.04em; color: #fff; margin: 0 0 6px; }
.resolution .figure small { font-size: 0.32em; font-weight: 500; letter-spacing: 0; color: #9FB3BF; margin-left: 8px; }
.lp-gauge { width: 100%; height: auto; }
.lp-caption { font-size: 13px; color: #8EA3AF; margin-top: 10px; }

/* ---------- Generic sections ---------- */
.section { padding: 72px 0; }
.section + .section { padding-top: 0; }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head p { color: var(--ink-2); }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.feature { padding: 28px 32px 28px 0; border-bottom: 1px solid var(--line); }
.feature:nth-child(odd) { border-right: 1px solid var(--line); }
.feature:nth-child(even) { padding-left: 32px; padding-right: 0; }
.feature p { color: var(--ink-2); margin: 0; }
@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(even) { padding: 24px 0; border-right: 0; }
  .feature:nth-child(odd) { border-right: 0; }
}

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

.spec-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.spec-table caption { text-align: left; font-size: 14px; color: var(--muted); padding: 0 0 12px; caption-side: bottom; padding-top: 14px; }
.spec-table th, .spec-table td { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table thead th { font-size: 14px; color: var(--muted); font-weight: 500; background: var(--paper); }
.spec-table tbody th { font-weight: 500; color: var(--ink-2); width: 38%; }
.spec-table tbody tr:last-child th, .spec-table tbody tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }
@media (max-width: 600px) { .spec-table th, .spec-table td { padding: 12px 12px; font-size: 15px; } }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.box-list { list-style: none; margin: 0; padding: 0; }
.box-list li { display: flex; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.box-list li:last-child { border-bottom: 0; }
.box-list .qty-badge { flex: none; min-width: 34px; height: 26px; border-radius: 6px; background: var(--signal-tint); color: var(--signal-ink); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.panel-pad { padding: 24px; }
.panel h3 { margin-bottom: 12px; }
.check-list { margin: 0; padding-left: 20px; color: var(--ink-2); }
.check-list li { margin-bottom: 8px; }

.policy-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .policy-strip { grid-template-columns: 1fr; } }
.policy-strip .panel { padding: 24px; }
.policy-strip p { color: var(--ink-2); font-size: 16px; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 24px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 20px; color: var(--ink-2); max-width: 75ch; }

/* ---------- Content (policy) pages ---------- */
.page-hero { padding: 28px 0 32px; border-bottom: 1px solid var(--line); background: var(--surface); }
.page-hero p { color: var(--ink-2); max-width: 70ch; margin: 0; }
.page-hero .updated { color: var(--muted); font-size: 14px; margin-top: 10px; }
.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 80px; }
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; gap: 24px; } }
.doc-nav { position: sticky; top: 92px; align-self: start; font-size: 15px; }
.doc-nav p { font-weight: 600; margin-bottom: 8px; }
.doc-nav ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.doc-nav a { display: block; padding: 6px 0 6px 14px; color: var(--ink-2); text-decoration: none; margin-left: -1px; border-left: 2px solid transparent; }
.doc-nav a:hover { color: var(--signal); }
.doc-nav a[aria-current="page"] { color: var(--signal); border-left-color: var(--signal); font-weight: 500; }
@media (max-width: 900px) { .doc-nav { position: static; } }

.prose { max-width: 74ch; }
.prose h2 { font-size: 24px; margin-top: 40px; padding-top: 8px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; margin-top: 26px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 16px; background: var(--surface); border: 1px solid var(--line); }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { background: var(--paper); font-size: 14px; color: var(--muted); font-weight: 500; }
.callout { background: var(--signal-tint); border-left: 3px solid var(--signal); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 0 0 20px; color: var(--ink); }
.callout.amber { background: var(--amber-tint); border-left-color: var(--amber); }
.address-block { font-style: normal; line-height: 1.7; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; padding-top: 48px; padding-bottom: 80px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; }
.contact-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list li:first-child { border-top: 1px solid var(--line); }
.contact-list .label { display: block; font-size: 14px; color: var(--muted); }
.contact-list a, .contact-list span.value { font-size: 18px; font-weight: 500; color: var(--ink); text-decoration: none; }
form.contact-form { display: grid; gap: 16px; padding: 28px; }
.field label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
.field textarea { min-height: 150px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-size: 13px; color: var(--muted); margin: 0; }
.form-status { font-size: 15px; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--film); color: #B7C6CF; font-size: 15px; padding: 56px 0 28px; }
.site-footer a { color: #E2EAEF; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-brand { color: #fff; font-weight: 600; font-size: 18px; margin-bottom: 10px; }
.footer-legal { border-top: 1px solid #23394A; margin-top: 40px; padding-top: 22px; font-size: 13px; color: #8EA3AF; display: grid; gap: 8px; }
.footer-legal p { margin: 0; max-width: 110ch; }
.pay-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pay-row span { border: 1px solid #2E4658; border-radius: 4px; padding: 3px 8px; font-size: 12px; color: #C9D6DD; }

/* ---------- Sticky mobile buy bar ---------- */
.mobile-buy { display: none; }
@media (max-width: 900px) {
  .mobile-buy { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px; gap: 12px; align-items: center; justify-content: space-between; transform: translateY(110%); transition: transform .2s ease; }
  .mobile-buy.show { transform: none; }
  .mobile-buy .mb-price { font-weight: 600; font-size: 18px; }
  .mobile-buy .mb-size { font-size: 13px; color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) { .mobile-buy { transition: none; } }

/* ---------- 404 ---------- */
.not-found { padding: 96px 0; text-align: center; }
.not-found p { color: var(--ink-2); }

@media (max-width: 600px) {
  .notice-bar span:not(:first-child) { display: none; }
  .header-actions .btn { display: none; }
  .site-header .wrap { gap: 12px; }
  .brand { min-width: 0; }
}
.size-options.single { grid-template-columns: 1fr; }
.feature-figure { margin: 0 0 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: center; gap: 24px; padding: 16px 28px 16px 16px; }
.feature-figure img { width: 100%; height: auto; }
.feature-figure figcaption { color: var(--ink-2); font-size: 16px; max-width: 46ch; }
@media (max-width: 700px) { .feature-figure { grid-template-columns: 1fr; padding: 12px; } }
.gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
.software-figure { margin: 0 0 22px; }
.software-figure img { width: 100%; max-width: 328px; height: auto; border-radius: var(--radius-sm); }
.software-figure figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
