:root {
  --navy: #0d2240;
  --navy-deep: #08162c;
  --slate: #5d7e9c;
  --gold: #e0b24a;
  --cream: #f6f3ec;
  --paper: #fffdf8;
  --ink: #172033;
  --muted: #5b6575;
  --line: #d9d3c6;
  --ok: #1f6b4a;
  --err: #9b1c23;
  --shadow: 0 10px 30px rgba(13, 34, 64, 0.08);
  --radius: 16px;
  --font: "Segoe UI", "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
h1, h2, h3 { line-height: 1.2; color: var(--navy-deep); }
h1 { font-size: 1.85rem; margin: 0 0 0.6rem; }
h2 { font-size: 1.25rem; margin: 0 0 0.75rem; }
p { margin: 0 0 0.85rem; }
.visually-hidden, .skip-link {
  position: absolute; left: -999px; top: auto;
}
.skip-link:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 10; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 0.35rem;
}
.lede { color: var(--muted); max-width: 42rem; }
.sf-header, .portal-header {
  background: var(--navy-deep);
  color: #fff;
}
.sf-header-inner, .portal-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}
.sf-brand { color: #fff; text-decoration: none; display: flex; flex-direction: column; }
.sf-brand-kicker { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.sf-brand-name { font-weight: 700; font-size: 1.05rem; }
.sf-nav { display: none; width: 100%; flex-direction: column; gap: 0.2rem; }
.sf-nav a, .sf-nav a:visited {
  color: #fff; text-decoration: none; padding: 0.5rem 0.15rem; border-bottom: 2px solid transparent;
}
.sf-nav a.is-active, .sf-nav a:hover { border-bottom-color: var(--gold); color: var(--gold); }
.nav-toggle {
  margin-left: auto;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}
.sf-nav.is-open { display: flex; }
.deadline-bar {
  background: #b91c1c;
  color: #ffffff;
  padding: 0.65rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.95rem;
}
.deadline-bar p { margin: 0; }
.deadline-bar a { color: #ffffff; }
.deadline-bar strong { margin-right: 0.3rem; }
.countdown { font-weight: 700; margin-left: 0.4rem; }
.deadline-ship { font-size: 0.85rem; }
main { max-width: 1120px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.sf-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; padding: 1.5rem 1rem 2.5rem; text-align: center; }

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  min-height: 220px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("/static/owl/alderwood-banner-bg.png") left center / cover no-repeat;
  opacity: 0.55;
}
.hero-art { position: absolute; inset: 0; pointer-events: none; }
.owl {
  width: 150px; height: 150px;
  background: url("/static/owl/alderwood-owl-spritesheet.webp") 0 0 / 900px 450px no-repeat;
  position: absolute; bottom: -6px; right: 4%;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,0.25));
}
.owl.flying { background-position-y: 0; animation: owl6 .5s steps(6) infinite, owl-enter 1.6s ease-out both; }
.owl.perched { background-position-y: -150px; animation: owl4 1.5s steps(4) infinite; }
.owl.waving { background-position-y: -300px; animation: owl4wave .5s steps(4) infinite; }
@keyframes owl6 { from { background-position-x: 0; } to { background-position-x: -900px; } }
@keyframes owl4 { from { background-position-x: 0; } to { background-position-x: -600px; } }
@keyframes owl4wave { from { background-position-x: 0; } to { background-position-x: -600px; } }
@keyframes owl-enter {
  from { transform: translateX(80px) translateY(-30px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.owl-fallback {
  background: var(--slate);
  border-radius: 50%;
}
.hero-copy { position: relative; padding: 1.5rem 1.15rem 5.5rem; max-width: 28rem; }
.hero-copy h1 { color: #fff; font-size: 2rem; }
.hero-copy .lede { color: rgba(255,255,255,0.9); }

.product-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.product-card {
  display: flex; flex-direction: column; background: var(--paper);
  border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: var(--shadow); height: 100%; border: 1px solid var(--line);
}
.product-card-media { background: #eef3f7; aspect-ratio: 1; display: grid; place-items: center; padding: 0.6rem; }
.product-card-media img { max-height: 100%; object-fit: contain; }
.product-card-copy { padding: 0.75rem 0.8rem 1rem; }
.product-card-copy h2 { font-size: 0.98rem; margin: 0 0 0.3rem; }
.price { font-weight: 700; color: var(--navy); margin: 0; }

.product-layout { display: grid; gap: 1.25rem; }
.product-media { background: #fff; border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.back-link { display: inline-block; margin-bottom: 0.8rem; }
.buy-form { display: grid; gap: 0.45rem; margin-top: 1rem; }
.buy-form label, .auth-form label { font-weight: 650; font-size: 0.9rem; }
.buy-form select, .buy-form input, .auth-form input, .search-form input {
  width: 100%; padding: 0.7rem 0.75rem; border: 1px solid var(--line);
  border-radius: 10px; font: inherit; background: #fff;
}
.req { color: var(--err); }
.form-help, .kpi-note, .chart-note, .meta { color: var(--muted); font-size: 0.85rem; }
.btn-primary, .btn-secondary, .btn-text {
  font: inherit; cursor: pointer; border-radius: 999px; border: 0;
}
.btn-primary {
  background: var(--navy); color: #fff; padding: 0.8rem 1.2rem; font-weight: 700;
  text-decoration: none; display: inline-block; text-align: center;
}
.btn-secondary { background: #fff; border: 1px solid var(--navy); color: var(--navy); padding: 0.65rem 1rem; }
.btn-text { background: transparent; color: #fff; padding: 0.3rem 0.5rem; }
.ship-note { font-weight: 650; color: var(--ok); }

.info-page, .auth-card, .panel, .kpi {
  background: var(--paper); border-radius: var(--radius); padding: 1.15rem 1.1rem;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.info-page { padding: 1.4rem 1.15rem 2rem; }
.info-page h2 { margin-top: 1.6rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.5rem 0.55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--navy); font-size: 0.8rem; letter-spacing: 0.02em; }
.size-table td, .size-table th { white-space: nowrap; }
.faq dt { font-weight: 700; margin-top: 1rem; color: var(--navy); }
.faq dd { margin: 0.25rem 0 0; }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.auth-card { max-width: 28rem; width: 100%; }
.auth-form { display: grid; gap: 0.45rem; }
.banner { padding: 0.7rem 0.8rem; border-radius: 10px; }
.banner.ok { background: #e8f6ee; color: var(--ok); }
.banner.error { background: #fdecea; color: var(--err); }
.launch-list { padding-left: 1.1rem; }
.launch-list li { margin: 0.4rem 0; }

.portal-main { padding-top: 1.25rem; }
.portal-user { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; color: #fff; }
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1rem 0 1.25rem; }
.kpi { margin: 0; }
.kpi-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0; }
.kpi-value { font-size: 1.55rem; font-weight: 750; color: var(--navy-deep); margin: 0.15rem 0; }
.panel { margin-bottom: 1.15rem; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; align-items: center; margin-bottom: 0.7rem; }
.search-form { display: flex; gap: 0.5rem; margin-bottom: 0.8rem; }
.trend { display: flex; align-items: flex-end; gap: 0.55rem; min-height: 140px; padding-top: 0.5rem; }
.trend-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex: 1; min-width: 3rem; }
.trend-bar { width: 70%; min-height: 4px; background: linear-gradient(180deg, var(--gold), var(--navy)); border-radius: 6px 6px 0 0; }
.trend-label, .trend-meta { font-size: 0.7rem; color: var(--muted); }
code { font-size: 0.8rem; word-break: break-all; }

@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .sf-nav { display: flex; flex-direction: row; width: auto; margin-left: auto; gap: 1rem; }
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  .product-layout { grid-template-columns: 1fr 1fr; align-items: start; gap: 2rem; }
  .hero { min-height: 280px; }
  .hero-copy { padding: 2.2rem 2rem 2rem; }
  .owl { width: 210px; height: 210px; background-size: 1260px 630px; right: 6%; bottom: -10px; }
  .owl.perched { background-position-y: -210px; }
  .owl.waving { background-position-y: -420px; }
  @keyframes owl6 { from { background-position-x: 0; } to { background-position-x: -1260px; } }
  @keyframes owl4 { from { background-position-x: 0; } to { background-position-x: -840px; } }
  @keyframes owl4wave { from { background-position-x: 0; } to { background-position-x: -840px; } }
  .kpi-grid { grid-template-columns: repeat(5, 1fr); }
  .kpi-wide { grid-column: auto; }
  h1 { font-size: 2.15rem; }
  .deadline-bar { flex-direction: row; justify-content: space-between; align-items: center; padding: 0.7rem 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .owl, .owl.flying, .owl.perched, .owl.waving { animation: none !important; background-position: 0 -150px; }
}


/* Mobile hero: keep subtitle on a navy wash so it does not overlap the PTA wordmark. */
@media (max-width: 719px) {
  .hero { min-height: 260px; }
  .hero-bg {
    background-position: 100% center;
    background-size: auto 100%;
    opacity: 0.4;
    -webkit-mask-image: linear-gradient(90deg, transparent 0 42%, #000 78%);
    mask-image: linear-gradient(90deg, transparent 0 42%, #000 78%);
  }
  .hero-copy {
    max-width: 100%;
    padding: 1.15rem 1.1rem 5.4rem;
    background: linear-gradient(90deg, rgba(8, 22, 44, 0.94) 0%, rgba(8, 22, 44, 0.88) 58%, rgba(8, 22, 44, 0.15) 100%);
  }
  .hero-copy h1 { font-size: 1.7rem; max-width: 14rem; }
  .hero-copy .lede {
    max-width: 16.5rem;
    margin-bottom: 0;
    text-shadow: 0 1px 10px rgba(8, 22, 44, 0.9);
    color: #fff;
  }
  .owl { width: 120px; height: 120px; background-size: 720px 360px; right: 2%; bottom: -8px; }
  .owl.perched { background-position-y: -120px; }
  .owl.waving { background-position-y: -240px; }
  @keyframes owl6 { from { background-position-x: 0; } to { background-position-x: -720px; } }
  @keyframes owl4 { from { background-position-x: 0; } to { background-position-x: -480px; } }
  @keyframes owl4wave { from { background-position-x: 0; } to { background-position-x: -480px; } }
}


.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: 0 0 1.15rem;
}
.chart-card { margin: 0; padding: 0.9rem 0.9rem 0.7rem; }
.chart-card figcaption { margin: 0 0 0.35rem; }
.chart-card h2 { margin: 0 0 0.2rem; }
.chart-card .chart-note { margin: 0 0 0.45rem; }
.chart-frame { width: 100%; overflow: hidden; }
.chart-svg { display: block; width: 100%; height: auto; }
.chart-svg-donut { max-width: 26rem; margin: 0 auto; }
.chart-hit { cursor: pointer; }
.chart-tooltip {
  position: fixed;
  z-index: 40;
  background: var(--navy-deep);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  pointer-events: none;
  max-width: 16rem;
}
.kpi-grid { margin-bottom: 0.9rem; }
.kpi { padding: 0.85rem 0.9rem; }
@media (min-width: 900px) {
  .chart-grid {
    grid-template-columns: 1fr 1fr;
  }
  .chart-card-wide { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .chart-card-profit { grid-column: 1 / -1; }
  .chart-frame-donut { display: flex; justify-content: center; }
  .chart-svg-donut { max-width: 28rem; }
}

.surface-portal h1 { font-size: 1.7rem; margin-bottom: 0.35rem; }
.surface-portal .lede { margin-bottom: 0.65rem; }
.surface-portal .kpi-grid { margin-top: 0.65rem; margin-bottom: 0.75rem; }
.surface-portal .kpi { padding: 0.7rem 0.8rem; }
.surface-portal .kpi-value { font-size: 1.4rem; }
.surface-portal .chart-card { padding: 0.75rem 0.85rem 0.55rem; }
.surface-portal .chart-card h2 { font-size: 1.12rem; }
@media (min-width: 720px) {
  .surface-portal h1 { font-size: 1.85rem; }
}

.breadcrumbs { margin: 0 0 0.9rem; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; font-size: 0.88rem; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.5rem; color: var(--line); }
.breadcrumbs a { color: var(--navy); }
