/* ==========================================================================
   Qalam Educative — storefront styles
   Lora (headings, long-form) + Poppins (interface, prices), self-hosted.
   ========================================================================== */

@font-face { font-family: "Lora"; src: url("../fonts/lora-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-italic-var.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --navy-950: #081627;
  --navy-900: #0A1A2E;
  --navy-800: #0F2440;
  --navy-700: #17345A;
  --navy-600: #23466F;
  --steel:    #2E5583;
  --gold:     #D2A044;
  --gold-hi:  #E2B65E;
  --gold-ink: #8A6520;
  --ivory:    #F4EEDF;
  --paper:    #F5F7FA;
  --white:    #FFFFFF;
  --line:     #DDE3EB;
  --line-strong: #C5CFDB;
  --text:     #13223A;
  --muted:    #56637A;
  --ok:       #1F6B47;
  --warn:     #8A5A00;
  --err:      #A6302A;
  --focus:    #0F2440;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans:  "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { text-wrap: balance; font-family: var(--serif); font-weight: 600; line-height: 1.18; margin: 0 0 .5em; color: var(--navy-800); letter-spacing: -0.005em; }
h1 { font-size: clamp(2.125rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); }
h3 { font-size: 1.3125rem; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.on-dark { --focus: var(--gold); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--navy-900); padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.375rem;
  border: 1.5px solid transparent; border-radius: 6px;
  font: 500 .9375rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-gold { background: var(--gold); color: var(--navy-950); }
.btn-gold:hover { background: var(--gold-hi); }
.btn-navy { background: var(--navy-800); color: var(--white); }
.btn-navy:hover { background: var(--navy-700); }
.btn-outline { border-color: var(--navy-800); color: var(--navy-800); background: transparent; }
.btn-outline:hover { background: var(--navy-800); color: var(--white); }
.btn-outline-light { border-color: rgba(244, 238, 223, .55); color: var(--ivory); background: transparent; }
.btn-outline-light:hover { border-color: var(--ivory); background: rgba(244, 238, 223, .08); }
.btn-lg { min-height: 56px; padding: .9rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.link { color: var(--navy-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.link:hover { color: var(--gold-ink); }

/* ---------- header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 1rem; }
.brand img { height: 50px; width: auto; }
.site-nav ul { list-style: none; display: flex; gap: .25rem; }
.site-nav a { display: block; padding: .6rem .9rem; text-decoration: none; font-weight: 500; font-size: .9375rem; color: var(--navy-800); border-radius: 4px; }
.site-nav a:hover { color: var(--gold-ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.site-nav li:last-child a { border: 1.5px solid var(--navy-800); border-radius: 6px; margin-left: .5rem; padding: .5rem 1rem; }
.site-nav li:last-child a:hover { background: var(--navy-800); color: var(--white); }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .header-inner { min-height: 64px; }
  .brand img { height: 40px; }
  .nav-toggle {
    display: inline-flex; align-items: center; min-height: 44px; padding: .5rem .9rem;
    background: transparent; border: 1.5px solid var(--navy-800); border-radius: 6px;
    font: 500 .875rem var(--sans); color: var(--navy-800); cursor: pointer;
  }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: .5rem var(--gutter) 1rem; }
  .site-nav a { padding: .85rem .25rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav li:last-child a { margin: .75rem 0 0; text-align: center; border-radius: 6px; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.section-white { background: var(--white); }
.section-head { max-width: 640px; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted); font-size: 1.0625rem; margin: 0; }

/* ---------- hero with bookshelf ---------- */
.hero { background: var(--navy-900); color: var(--ivory); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: end; padding-block: clamp(3rem, 7vw, 5.5rem) 0; }
.hero h1 { text-wrap: balance; color: var(--ivory); font-size: clamp(2.375rem, 5.2vw, 3.75rem); line-height: 1.08; letter-spacing: -0.015em; margin-bottom: .45em; }
.hero-lede { font-size: 1.125rem; line-height: 1.7; color: rgba(244, 238, 223, .82); max-width: 34rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: clamp(2.5rem, 6vw, 5.5rem); }
.hero-copy { align-self: center; padding-bottom: 2rem; }
.hero-inner > *, .bundle-grid > *, .checkout > *, .two-col > *, .product-top > * { min-width: 0; }

.shelf { position: relative; padding-top: 1rem; }
.shelf-row {
  list-style: none; display: flex; align-items: flex-end; gap: 6px;
  height: 430px; padding: 0 6px;
}
.spine-slot { --h: 92%; --w: 58px; --g: 58; flex: var(--g) 1 0px; min-width: 0; height: var(--h); display: flex; }
.spine {
  --bg: var(--navy-700);
  position: relative; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg);
  background-image: linear-gradient(90deg, rgba(255,255,255,.07) 0, rgba(255,255,255,0) 22%, rgba(0,0,0,0) 70%, rgba(0,0,0,.22) 100%);
  border-radius: 3px 3px 1px 1px;
  color: var(--ivory); text-decoration: none;
  transition: transform .18s ease;
}
.spine:hover, .spine:focus-visible { transform: translateY(-10px); }
.spine:focus-visible { outline-offset: 2px; }
.spine-band { width: 100%; height: 30px; border-radius: 3px 3px 0 0; background: var(--band, var(--gold)); flex: none; }
.spine-title {
  flex: 1; writing-mode: vertical-rl; transform: rotate(180deg);
  font: 600 1.125rem/1.1 var(--serif); letter-spacing: .01em;
  padding: 1rem 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spine-rule { width: 55%; height: 2px; background: var(--gold); opacity: .8; flex: none; }
.spine-price { font: 500 .6875rem/1 var(--sans); padding: .55rem 0 .7rem; color: var(--gold-hi); flex: none; }
.spine[data-type="course"] { --band: var(--steel); }
.spine[data-type="ebook"], .spine[data-type="workbook"] { --band: var(--gold); }
.spine[data-type="templates"] { --band: var(--ivory); }
.spine[data-type="bundle"] { --bg: var(--gold); --band: var(--navy-800); color: var(--navy-900); }
.spine[data-type="bundle"] .spine-rule { background: var(--navy-800); }
.spine[data-type="bundle"] .spine-price { color: var(--navy-900); }
.shelf-plank { position: relative; height: 14px; background: #5b4320; background-image: linear-gradient(180deg, var(--gold) 0 3px, #7a5a28 3px, #4a3519 100%); border-radius: 2px; margin-inline: -12px; box-shadow: 0 14px 30px rgba(0,0,0,.45); }
.shelf-key { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; list-style: none; margin: 1.1rem 0 2.25rem; font-size: .8125rem; color: rgba(244, 238, 223, .72); }
.shelf-key li { display: flex; align-items: center; gap: .45rem; }
.shelf-key i { width: 14px; height: 9px; border-radius: 1px; display: inline-block; }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 1rem; }
  .hero-copy { padding-bottom: 0; }
  .hero-actions { margin-bottom: 1.5rem; }
  .shelf-row { height: 360px; overflow-x: auto; overflow-y: visible; padding-top: 14px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .shelf-row::-webkit-scrollbar { display: none; }
  .spine-slot { flex: 0 0 var(--w); scroll-snap-align: start; }
}
@media (max-width: 560px) {
  .shelf-row { height: 300px; gap: 5px; }
  .spine-slot { flex-basis: calc(var(--w) * .82); }
  .spine-title { font-size: 1rem; }
  .hero-actions .btn { width: 100%; }
}

/* ---------- product tiles ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2.25rem; }
.filters button {
  background: none; border: 0; padding: .7rem 0; margin-bottom: -1px; cursor: pointer;
  font: 500 .9375rem var(--sans); color: var(--muted); border-bottom: 2px solid transparent;
}
.filters button:hover { color: var(--navy-800); }
.filters button[aria-pressed="true"] { color: var(--navy-800); border-bottom-color: var(--gold); }
.filters span { color: var(--muted); font-weight: 400; }

.tiles { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2.75rem 1.75rem; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 1rem; } }
.tile[hidden] { display: none; }
.tile a { display: flex; flex-direction: column; text-decoration: none; height: 100%; }
.tile-cover { display: block; margin-bottom: 1rem; border-radius: 3px; overflow: hidden; background: var(--navy-800);
  box-shadow: 0 1px 2px rgba(10,26,46,.2), 0 10px 24px -10px rgba(10,26,46,.45); aspect-ratio: 4 / 5; }
.tile-cover img { width: 100%; height: 100%; object-fit: cover; }
.tile-spec { font-size: .8125rem; color: var(--muted); margin-bottom: .2rem; }
.tile-title { font: 600 1.1875rem/1.25 var(--serif); color: var(--navy-800); margin-bottom: .3rem; }
.tile a:hover .tile-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.tile-sub { font-size: .875rem; line-height: 1.5; color: var(--muted); margin-bottom: .7rem; }
.tile-price { margin-top: auto; font-weight: 700; font-size: 1rem; color: var(--navy-800); font-variant-numeric: tabular-nums; }

/* ---------- steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; counter-reset: step; }
.steps li { counter-increment: step; border-top: 1px solid var(--line-strong); padding-top: 1.25rem; }
.steps li::before { content: counter(step); display: block; font: 600 2.75rem/1 var(--serif); color: var(--gold); margin-bottom: .9rem; }
.steps h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 1.75rem; } }

/* ---------- bundle band ---------- */
.bundle-band { background: var(--navy-800); color: var(--ivory); }
.bundle-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.bundle-cover { border-radius: 3px; overflow: hidden; box-shadow: 0 24px 50px -18px rgba(0,0,0,.6); }
.bundle-band h2 { color: var(--ivory); }
.bundle-price { font: 600 1.375rem var(--sans); color: var(--gold-hi); margin-bottom: .25rem; }
.bundle-note { color: rgba(244, 238, 223, .75); margin-bottom: 1.5rem; }
.bundle-list { list-style: none; columns: 2; column-gap: 2rem; margin-bottom: 2rem; }
.bundle-list li { break-inside: avoid; padding: .45rem 0; border-bottom: 1px solid rgba(244, 238, 223, .14); display: flex; justify-content: space-between; gap: 1rem; font-size: .9375rem; }
.bundle-list span { color: rgba(244, 238, 223, .6); font-variant-numeric: tabular-nums; }
.bundle-band .hero-actions { margin: 0; }
@media (max-width: 760px) { .bundle-grid { grid-template-columns: 1fr; } .bundle-cover { max-width: 240px; } .bundle-list { columns: 1; } }

/* ---------- founder ---------- */
.founder { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); }
.founder-mark { width: 120px; margin-bottom: 1.5rem; }
.prose { font-family: var(--serif); font-size: 1.125rem; line-height: 1.75; max-width: 40rem; }
.prose p { margin-bottom: 1.15em; }
.prose h2 { margin-top: 1.8em; font-size: 1.625rem; }
.prose h3 { margin-top: 1.6em; font-size: 1.25rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 1.15em; }
.prose li { margin-bottom: .45em; }
.prose a { color: var(--navy-700); text-underline-offset: 3px; }
.signature { font-family: var(--sans); font-size: .9375rem; color: var(--muted); }
@media (max-width: 800px) { .founder { grid-template-columns: 1fr; gap: 1rem; } }

/* ---------- questions ---------- */
.qa { max-width: 760px; border-top: 1px solid var(--line-strong); }
.qa details { border-bottom: 1px solid var(--line-strong); }
.qa summary { list-style: none; cursor: pointer; padding: 1.15rem 2.5rem 1.15rem 0; position: relative; font-weight: 500; font-size: 1.0625rem; color: var(--navy-800); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; position: absolute; right: .35rem; top: 50%; width: 12px; height: 12px; margin-top: -8px; border-right: 2px solid var(--gold-ink); border-bottom: 2px solid var(--gold-ink); transform: rotate(45deg); transition: transform .2s ease; }
.qa details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.qa .answer { padding: 0 2.5rem 1.25rem 0; color: var(--muted); }
.qa .answer p:last-child { margin: 0; }

/* ---------- page header (inner pages) ---------- */
.page-head { background: var(--white); border-bottom: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 3.75rem) clamp(2rem, 4vw, 2.75rem); }
.page-head p { color: var(--muted); font-size: 1.0625rem; max-width: 42rem; margin: 0; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; font-size: .8125rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--line-strong); }
.crumbs a { color: var(--muted); }

/* ---------- product page ---------- */
.product-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; padding-block: clamp(2rem, 5vw, 3.5rem); }
.product-cover { position: sticky; top: 1.5rem; }
.product-cover img { width: 100%; border-radius: 3px; box-shadow: 0 2px 4px rgba(10,26,46,.18), 0 28px 60px -24px rgba(10,26,46,.55); }
.product-spec { font-size: .875rem; color: var(--muted); margin-bottom: .5rem; }
.product-buy h1 { margin-bottom: .3em; }
.product-subtitle { font-family: var(--serif); font-size: 1.25rem; line-height: 1.5; color: var(--navy-700); margin-bottom: 1.75rem; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem 1rem; margin-bottom: 1.25rem; }
.price { font: 700 2rem/1 var(--sans); color: var(--navy-800); font-variant-numeric: tabular-nums; }
.price-note { font-size: .875rem; color: var(--muted); }
.save-note { background: var(--ivory); border-left: 3px solid var(--gold); padding: .75rem 1rem; font-size: .9375rem; margin-bottom: 1.25rem; }
.buy-actions { margin-bottom: 1rem; }
.pay-methods { font-size: .8125rem; color: var(--muted); margin-bottom: 2rem; }
.facts { display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--line); margin: 0; }
.facts dt, .facts dd { padding: .75rem 0; border-bottom: 1px solid var(--line); margin: 0; font-size: .9375rem; }
.facts dt { color: var(--muted); padding-right: 1.5rem; white-space: nowrap; }
.facts dd { color: var(--text); }
.product-lower { display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 300px); justify-content: space-between; gap: 3rem; align-items: start; }
.product-body { display: grid; grid-template-columns: minmax(0, 1fr); padding-bottom: 2rem; }
.product-body .contents li:last-child, .product-body .files li:last-child { border-bottom: 0; }
.buy-card { position: sticky; top: 1.5rem; margin-top: 2.25rem; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; display: grid; grid-template-columns: 72px 1fr; gap: .9rem 1rem; align-items: center; }
.buy-card img { border-radius: 2px; box-shadow: 0 6px 14px -8px rgba(10,26,46,.5); }
.buy-card strong { display: block; font: 600 1.0625rem/1.25 var(--serif); color: var(--navy-800); }
.buy-card span { font-size: .8125rem; color: var(--muted); }
.buy-card .price, .buy-card .btn, .buy-card .fine { grid-column: 1 / -1; margin: 0; }
.buy-card .price { font-size: 1.625rem; }
@media (max-width: 1000px) { .product-lower { grid-template-columns: minmax(0, 1fr); } .buy-card { display: none; } }
.product-body > section { padding-block: 2.25rem; border-top: 1px solid var(--line); }
.product-body h2 { font-size: 1.625rem; }
.contents { list-style: none; counter-reset: c; }
.contents li { display: grid; grid-template-columns: 2.25rem 1fr; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.contents.is-numbered li { counter-increment: c; }
.contents.is-numbered li::before { content: counter(c); font: 600 1.0625rem var(--serif); color: var(--gold-ink); }
.contents:not(.is-numbered) li::before { content: ""; width: 7px; height: 7px; background: var(--gold); margin-top: .62rem; border-radius: 1px; }
.contents b { display: block; font-weight: 500; color: var(--navy-800); }
.contents span { font-size: .9375rem; color: var(--muted); }
.contents a { text-decoration: none; }
.contents a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.contents .row-price { float: right; font-weight: 500; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.fit h3 { font-size: 1.0625rem; font-family: var(--sans); font-weight: 500; }
.fit ul { list-style: none; }
.fit li { padding: .5rem 0 .5rem 1.6rem; position: relative; font-size: .9375rem; }
.fit .yes li::before { content: ""; position: absolute; left: 0; top: .85rem; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.fit .no li::before { content: ""; position: absolute; left: 2px; top: 1.05rem; width: 11px; height: 2px; background: var(--muted); }
.files { list-style: none; }
.files li { padding: .7rem 0 .7rem 1.75rem; border-bottom: 1px solid var(--line); position: relative; font-size: .9375rem; }
.files li::before { content: ""; position: absolute; left: 0; top: .95rem; width: 12px; height: 15px; border: 1.5px solid var(--navy-600); border-radius: 1px 4px 1px 1px; }
@media (max-width: 860px) {
  .product-top { grid-template-columns: 1fr; }
  .product-cover { position: static; max-width: 340px; }
  .fit { grid-template-columns: 1fr; gap: 1rem; }
}
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(10,26,46,.08);
  padding: .7rem var(--gutter); display: none; align-items: center; justify-content: space-between; gap: 1rem;
  transform: translateY(100%); transition: transform .2s ease;
}
.buybar.is-visible { transform: none; }
.buybar strong { display: block; font: 600 1rem/1.2 var(--serif); color: var(--navy-800); }
.buybar span { font-weight: 700; font-size: .9375rem; }
@media (max-width: 860px) { .buybar { display: flex; } body.has-buybar { padding-bottom: 76px; } }

/* ---------- related ---------- */
.related .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .related .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- forms & checkout ---------- */
.checkout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 4.5rem); padding-block: clamp(2rem, 5vw, 3.5rem) 4rem; align-items: start; }
.summary { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; }
.summary-item { display: grid; grid-template-columns: 96px 1fr; gap: 1.1rem; align-items: start; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.summary-item img { border-radius: 2px; box-shadow: 0 6px 16px -8px rgba(10,26,46,.5); }
.summary-item h2 { font-size: 1.25rem; margin-bottom: .25rem; }
.summary-item p { font-size: .875rem; color: var(--muted); margin: 0; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; margin-bottom: 1.25rem; }
.summary-total strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; color: var(--navy-800); }
.summary h3 { font: 500 .9375rem var(--sans); color: var(--navy-800); margin-bottom: .6rem; }
.summary ol { padding-left: 1.2rem; font-size: .875rem; color: var(--muted); }
.summary ol li { margin-bottom: .4rem; }

.form { display: grid; gap: 1.15rem; }
.field label { display: block; font-weight: 500; font-size: .9375rem; color: var(--navy-800); margin-bottom: .35rem; }
.field .hint { display: block; font-size: .8125rem; color: var(--muted); margin-top: .35rem; }
.field .error { display: block; font-size: .8125rem; color: var(--err); margin-top: .35rem; }
.input, .textarea, .select {
  width: 100%; min-height: 50px; padding: .7rem .9rem;
  font: 400 1rem var(--sans); color: var(--text);
  background: var(--white); border: 1.5px solid var(--line-strong); border-radius: 6px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--navy-800); box-shadow: 0 0 0 3px rgba(15, 36, 64, .15); }
.input[aria-invalid="true"] { border-color: var(--err); }
.phone-wrap { display: flex; }
.phone-wrap span { display: flex; align-items: center; padding: 0 .85rem; border: 1.5px solid var(--line-strong); border-right: 0; border-radius: 6px 0 0 6px; background: var(--paper); color: var(--muted); }
.phone-wrap .input { border-radius: 0 6px 6px 0; }
.gw-choice { border: 0; padding: 0; margin: 0; }
.gw-choice legend { font-weight: 500; font-size: .9375rem; color: var(--navy-800); margin-bottom: .5rem; }
.gw-choice label { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; border: 1.5px solid var(--line-strong); border-radius: 6px; margin-bottom: .5rem; cursor: pointer; background: var(--white); }
.gw-choice label:has(input:checked) { border-color: var(--navy-800); box-shadow: 0 0 0 1px var(--navy-800); }
.gw-choice small { color: var(--muted); margin-left: auto; font-size: .8125rem; }
.hp { position: absolute; left: -5000px; }
.fine { font-size: .8125rem; color: var(--muted); margin: 0; }

.notice { border-radius: 8px; padding: 1rem 1.15rem; font-size: .9375rem; border: 1px solid; margin-bottom: 1.25rem; }
.notice p:last-child { margin: 0; }
.notice-info { background: #EEF3FA; border-color: #C8D6EA; color: var(--navy-800); }
.notice-ok { background: #EBF5EF; border-color: #BFDCCB; color: #154D33; }
.notice-warn { background: #FBF4E4; border-color: #EBD5A2; color: #5E4100; }
.notice-err { background: #FBECEB; border-color: #EBC2BF; color: #7A231F; }
.status-line:empty { display: none; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } .summary { order: 2; } }

/* ---------- order page ---------- */
.order-wrap { max-width: 760px; padding-block: clamp(2rem, 5vw, 3.5rem) 4rem; }
.order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.15rem 1.35rem; margin-bottom: 2rem; }
.order-meta div { font-size: .8125rem; color: var(--muted); }
.order-meta b { display: block; font-size: .9375rem; color: var(--text); font-weight: 500; }
.dl-group { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.35rem; margin-bottom: 1rem; }
.dl-group header { display: grid; grid-template-columns: 56px 1fr; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.dl-group header img { border-radius: 2px; }
.dl-group h2 { font-size: 1.1875rem; margin: 0; }
.dl-group header p { font-size: .8125rem; color: var(--muted); margin: 0; }
.dl-list { list-style: none; }
.dl-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.dl-list .meta { font-size: .8125rem; color: var(--muted); display: block; }
.dl-list .btn { min-height: 42px; padding: .5rem 1rem; font-size: .875rem; flex: none; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--navy-800); border-radius: 50%; animation: spin 0.9s linear infinite; margin-bottom: 1.25rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- simple content pages ---------- */
.content { padding-block: clamp(2.5rem, 5vw, 3.5rem) 4.5rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 6vw, 4.5rem); align-items: start; }
.aside-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; }
.aside-card h2 { font-size: 1.25rem; }
.aside-card dl { margin: 0; }
.aside-card dt { font-size: .8125rem; color: var(--muted); margin-top: .9rem; }
.aside-card dd { margin: 0; font-weight: 500; }
.principles { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 2.5rem; margin-top: 1rem; }
.principles h3 { font-size: 1.125rem; margin-bottom: .3rem; }
.principles p { color: var(--muted); margin: 0; font-size: .9375rem; }
.policy-updated { font-size: .875rem; color: var(--muted); }
@media (max-width: 860px) { .two-col, .principles { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-950); color: rgba(244, 238, 223, .78); padding-top: 4rem; font-size: .9375rem; --focus: var(--gold); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr); gap: 2.25rem; padding-bottom: 3rem; }
.footer-brand img { height: 58px; width: auto; margin-bottom: 1.1rem; }
.footer-brand p { max-width: 20rem; font-size: .875rem; line-height: 1.7; }
.site-footer h2 { font: 500 .9375rem var(--sans); color: var(--ivory); margin-bottom: .85rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { text-decoration: none; color: rgba(244, 238, 223, .78); }
.site-footer a:hover { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; }
.footer-contact a { overflow-wrap: anywhere; }
.footer-base { border-top: 1px solid rgba(244, 238, 223, .12); padding-block: 1.4rem 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; font-size: .8125rem; color: rgba(244, 238, 223, .55); }
.footer-base p { margin: 0; }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
