/* =========================================================
   FX layer: modern look, motion and 3D containers.
   Loaded after styles.css. Everything degrades gracefully:
   no JS / no WebGL / reduced motion = the plain site.
   ========================================================= */

/* Cross-page transitions (Chromium 126+, ignored elsewhere) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

/* Display type */
h1, h2, .brand, .stat b, .kpi b, .cta-band h2 { font-family: "Space Grotesk", var(--font); letter-spacing: -.025em; }
h1 { font-weight: 700; }

/* Gradient accent text */
.grad {
  background: linear-gradient(100deg, #ffc27a 0%, #e0861a 45%, #45b3bd 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- dark glass header ---------- */
.site-header {
  background: rgba(10, 19, 33, .72); border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(14px) saturate(1.6); -webkit-backdrop-filter: blur(14px) saturate(1.6);
}
.site-header .brand { color: #fff; }
.site-header .brand small { color: #93a1b3; }
.site-header .nav-links a { color: #cdd6e1; }
.site-header .nav-links a:hover, .site-header .nav-links a.active { background: rgba(255,255,255,.08); color: #fff; }
.site-header .nav-links a.active { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 6px 6px 0 0; }
.nav-toggle { color: #fff; border-color: rgba(255,255,255,.2); }
@media (max-width: 1140px) {
  .site-header .nav-links { background: #0c1626; border-bottom-color: rgba(255,255,255,.08); }
}

/* Scroll progress */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 100; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--teal), var(--accent));
}

/* ---------- homepage 3D hero ---------- */
.hero { min-height: min(86vh, 800px); display: flex; align-items: center; isolation: isolate; }
.hero > .container { position: relative; z-index: 2; width: 100%; }
.hero-copy { max-width: 640px; }
.hero::before { /* soft glows behind the scene */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 75% 40%, rgba(69,179,189,.16), transparent 70%),
    radial-gradient(500px 360px at 90% 85%, rgba(224,134,26,.14), transparent 70%);
}
.hero-3d {
  position: absolute; inset: 0 0 0 30%; z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.35) 22%, #000 48%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.35) 22%, #000 48%);
}
.hero-copy .lead, .hero-copy h1 { text-shadow: 0 2px 18px rgba(10,19,33,.85); }
.hero-3d canvas { display: block; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity 1.4s ease; }
.hero-3d.ready canvas { opacity: 1; }
.hero-legend {
  position: absolute; right: 22px; bottom: 18px; z-index: 2; display: flex; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: .72rem; color: #8ea3bf; pointer-events: none;
}
.hero-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.hero-fallback { display: none; }
.no-webgl .hero-fallback { display: block; margin-top: 36px; max-width: 560px; }
.no-webgl .hero-legend { display: none; }
@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-3d { inset: 0; opacity: .38; -webkit-mask-image: none; mask-image: none; }
  .hero-legend { display: none; }
}

/* ---------- inner page hero background ---------- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; }
.page-hero > .container { position: relative; z-index: 2; }
.hero-bg {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.15) 0%, #000 65%);
          mask-image: linear-gradient(90deg, rgba(0,0,0,.15) 0%, #000 65%);
}
.hero-bg canvas { display: block; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity 1.2s ease; }
.hero-bg.ready canvas { opacity: .85; }
.hero-bg.ready:not(.scene-terrain) canvas { opacity: 1; }
.page-hero { min-height: 440px; display: flex; align-items: center; }
.page-hero > .container { width: 100%; }
.page-hero h1, .page-hero .lead { max-width: 640px; text-shadow: 0 2px 18px rgba(10,19,33,.85); }
.hero-bg:not(.scene-terrain) {
  -webkit-mask-image: linear-gradient(90deg, transparent 18%, rgba(0,0,0,.5) 38%, #000 58%);
          mask-image: linear-gradient(90deg, transparent 18%, rgba(0,0,0,.5) 38%, #000 58%);
}
@media (max-width: 900px) {
  .page-hero { min-height: 360px; }
  .hero-bg:not(.scene-terrain) { opacity: .35; -webkit-mask-image: none; mask-image: none; }
}

/* ---------- 3D QSRA panel ---------- */
.q3d-wrap { margin-top: 22px; border-radius: 12px; overflow: hidden; background: #0c1626; border: 1px solid #1f3552; }
.q3d-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid #1f3552; }
.q3d-head h4 { margin: 0; color: #fff; font-size: .95rem; }
.q3d-head .note { color: #8ea3bf; }
.q3d { height: 380px; position: relative; cursor: grab; touch-action: pan-y; }
.q3d:active { cursor: grabbing; }
.q3d canvas { display: block; width: 100% !important; height: 100% !important; }
.q3d-legend { position: absolute; left: 14px; bottom: 10px; font-family: var(--mono); font-size: .7rem; color: #8ea3bf; pointer-events: none; display: flex; gap: 14px; flex-wrap: wrap; }
.q3d-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
@media (max-width: 640px) { .q3d { height: 300px; } }

/* ---------- cards: spotlight + lift ---------- */
.card, a.card { position: relative; isolation: isolate; transition: border-color .25s, box-shadow .25s; } /* no transform/opacity transitions: GSAP owns those */
.btn { transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn:hover { transform: none; }
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 14%, transparent), transparent 50%);
  opacity: 0; transition: opacity .3s;
}
.card:hover::before { opacity: 1; }
a.card:hover { transform: none; box-shadow: 0 18px 40px -18px rgba(15,27,45,.35); }
.section.deep .card::before { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(69,179,189,.18), transparent 50%); }
.card .icon { transition: transform .35s cubic-bezier(.2,.8,.2,1), background .3s; }
a.card:hover .icon { transform: translateY(-3px) rotate(-6deg); background: var(--accent); color: #fff; }

/* ---------- buttons ---------- */
.btn-primary { position: relative; overflow: hidden; box-shadow: 0 8px 26px -10px rgba(224,134,26,.75); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.38) 50%, transparent 70%);
  transform: translateX(-130%); transition: transform .7s ease;
}
.btn-primary:hover::after { transform: translateX(130%); }

/* ---------- animated gradient border on CTA band ---------- */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.cta-band {
  border: 1px solid transparent;
  background:
    linear-gradient(120deg, #0f1b2d, #1a3150) padding-box,
    conic-gradient(from var(--ang), rgba(255,255,255,.06) 0 62%, var(--accent) 75%, var(--teal) 88%, rgba(255,255,255,.06) 100%) border-box;
  animation: ang-spin 7s linear infinite;
}
@keyframes ang-spin { to { --ang: 360deg; } }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: 40px; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--mono); font-size: .82rem; color: var(--muted); white-space: nowrap; letter-spacing: .04em; }
.marquee-track span b { color: var(--accent); font-weight: 600; margin-right: 8px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- lifecycle progress line ---------- */
.lifecycle { position: relative; }
.lifecycle .lc-step, .lifecycle .lc-step.on { border-top-color: var(--line); }
.lc-line {
  position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 1; transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--teal), var(--accent));
}
@media (max-width: 900px) { .lc-line { display: none; } .lifecycle .lc-step { border-top-color: var(--accent); } }

/* Subtle grain on dark bands */
.hero::after, .page-hero::after, .section.deep::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.section.deep { position: relative; isolation: isolate; }
.section.deep > .container { position: relative; z-index: 1; }

/* Reduced motion: switch off decorative motion */
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .cta-band { animation: none; }
  .btn-primary::after { display: none; }
  @view-transition { navigation: none; }
}

/* =========================================================
   Components: header tools, announcement, testimonials,
   articles, search palette, cookie banner, utilities
   ========================================================= */
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.announce { background: linear-gradient(90deg, #13233a, #1a3150); color: #e8edf4; text-align: center; font-size: .88rem; padding: 7px 14px; }
.announce a { color: #ffc27a; font-weight: 600; }

.nav { gap: 14px; }
.nav-tools { display: flex; align-items: center; gap: 6px; order: 3; }
.nav-links { order: 2; margin-left: auto; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #cdd6e1; font: 500 .78rem var(--font);
}
.icon-btn:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.icon-btn { flex: none; }
.icon-btn svg { flex: none; width: 18px; height: 18px; max-width: none; }
.site-header .brand small { white-space: nowrap; }
@media (max-width: 1360px) and (min-width: 1141px) { .site-header .brand small { display: none; } }
@media (max-width: 560px) {
  .site-header .brand small { display: none; }
  .nav { gap: 8px; }
  .nav-tools { gap: 4px; }
  .icon-btn { padding: 0 8px; height: 34px; }
  .nav-toggle { padding: 6px 9px; }
}
.icon-btn kbd { font: 600 .66rem var(--mono); color: #8ea3bf; border: 1px solid rgba(255,255,255,.15); border-radius: 4px; padding: 1px 5px; }
.nav-links a { padding: 8px 10px; }
@media (max-width: 1360px) { .icon-btn kbd { display: none; } }
@media (max-width: 1140px) { .nav-links { margin-left: 0; } .nav-tools { margin-left: auto; } }

/* preview mode */
.preview-bar { position: fixed; left: 16px; bottom: 16px; z-index: 150; background: #0f1b2d; color: #fff; border: 1px solid var(--accent); padding: 10px 14px; border-radius: 10px; font-size: .85rem; display: flex; gap: 10px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.preview-bar b { color: #ffc27a; }
.preview-bar button { font: 600 .8rem var(--font); background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 5px 10px; cursor: pointer; }
.preview-bar a { color: #8ee0e8; }

/* testimonials */
.testimonials { max-width: 860px; margin: 30px auto 0; position: relative; }
.tm-track { display: grid; }
.tm-slide { grid-area: 1 / 1; margin: 0; padding: 34px 38px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .6s, transform .6s; pointer-events: none; }
.tm-slide.on { opacity: 1; transform: none; pointer-events: auto; }
.tm-mark { width: 38px; color: var(--accent); opacity: .85; }
.tm-slide blockquote { margin: 12px 0 20px; padding: 0; border: 0; font-style: normal; font-size: 1.2rem; line-height: 1.55; color: var(--ink); font-family: "Space Grotesk", var(--font); }
.tm-slide figcaption { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: .9rem; }
.tm-slide figcaption b { color: var(--ink); }
.tm-av { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--teal), var(--accent)); color: #fff; font-weight: 700; }
.tm-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.tm-dots button { width: 9px; height: 9px; border-radius: 99px; border: 0; background: var(--line); cursor: pointer; transition: .3s; padding: 0; }
.tm-dots button.on { width: 26px; background: var(--accent); }
.acc-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.acc { border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; font-weight: 600; font-size: .88rem; color: var(--muted); background: var(--bg); }

/* insights list + articles */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip-btn { font: 600 .85rem var(--font); padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.chip-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.badge-soon { font: 600 .66rem var(--mono); padding: 2px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; letter-spacing: .04em; }
div.card.art { opacity: .78; }
.card.art[hidden] { display: none; }
.art-meta { font-family: var(--mono); font-size: .8rem; color: var(--on-deep-muted); margin-top: 6px; }
.prose { font-size: 1.05rem; line-height: 1.75; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose li { color: var(--text); }
.prose ol { padding-left: 1.3em; }
.prose ol li { margin-bottom: 6px; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1.4em 0; padding: 4px 0 4px 18px; color: var(--ink); font-style: italic; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* team */
.team-ph { width: 100%; height: 170px; object-fit: cover; border-radius: 10px; margin-bottom: 14px; }
.team-ph.av { display: grid; place-items: center; font: 700 2.4rem "Space Grotesk", var(--font); color: #fff; background: linear-gradient(135deg, #13233a, #1a3150); position: relative; overflow: hidden; }
.team-ph.av::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 20%, rgba(69,179,189,.35), transparent 60%); }

/* search palette */
.palette { position: fixed; inset: 0; z-index: 300; background: rgba(5,10,18,.55); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.pal-box { width: min(620px, 100%); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: hidden; animation: palIn .18s ease-out; }
@keyframes palIn { from { transform: translateY(-8px) scale(.98); opacity: 0; } }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal-in input { border: 0; padding: 4px 0; font-size: 1.05rem; background: transparent; }
.pal-in input:focus { outline: none; }
.pal-in kbd, .pal-foot span { font: 600 .7rem var(--mono); color: var(--muted); }
.pal-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.pal-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.pal-list li.on, .pal-list li:hover { background: var(--accent-soft); }
.pal-list li em { font: 600 .7rem var(--mono); color: var(--teal); font-style: normal; text-transform: uppercase; white-space: nowrap; }
.pal-list .pal-none { color: var(--muted); cursor: default; }
.pal-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); background: var(--bg-alt); }

/* back to top + mobile CTA */
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 1.1rem; cursor: pointer; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.m-cta { display: none; }
@media (max-width: 760px) {
  .m-cta { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(10,19,33,.92); backdrop-filter: blur(10px); border-top: 1px solid rgba(255,255,255,.1); transform: translateY(110%); transition: transform .3s; }
  .m-cta.show { transform: none; }
  .m-cta .btn { flex: 1; justify-content: center; padding: 11px 10px; font-size: .88rem; }
  .m-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
  .to-top { bottom: 80px; }
  .site-footer { padding-bottom: 90px; }
}

/* cookie banner */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 160; max-width: 560px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.cookie p { font-size: .9rem; margin-bottom: 12px; }
.cookie .btn { padding: 9px 14px; font-size: .88rem; }
.cookie .btn-ghost { color: var(--ink); }

/* ---------- enquiry & newsletter forms ---------- */
.enq-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enq [aria-invalid="true"] { border-color: var(--bad); outline-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.enq-err { display: block; flex-basis: 100%; color: var(--bad); font-size: .8rem; font-weight: 600; margin-top: 5px; }
.enq-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; font-weight: 400; color: var(--muted); flex-wrap: wrap; cursor: pointer; }
.enq-consent input { width: auto; flex: none; margin-top: 3px; accent-color: var(--accent); }
.enq-consent span { flex: 1 1 0; min-width: 0; }
.enq-consent .enq-err { margin: 0 0 0 26px; }
.enq-consent a { color: inherit; text-decoration: underline; }
.enq-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.enq-msg { border-radius: 10px; padding: 12px 14px; font-size: .92rem; line-height: 1.5; }
.enq-msg.bad { background: color-mix(in srgb, var(--bad) 10%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.enq-msg.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); }
.enq-msg a { color: inherit; text-decoration: underline; }
.btn.is-busy { opacity: .7; cursor: progress; }
.enq-done { grid-column: 1 / -1; padding: 10px 4px; outline: none; }
.enq-done h3 { margin: 0 0 8px; }
.enq-done p { color: var(--muted); }
.enq-done::before { content: "✓"; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ok); color: #fff; font-weight: 700; font-size: 1.3rem; margin-bottom: 14px; }
.enq-inline { display: grid; gap: 10px; max-width: 460px; width: 100%; }
.enq-inline .enq-row { display: flex; gap: 8px; flex-wrap: wrap; }
.enq-inline .enq-row input { flex: 1 1 220px; min-width: 0; }
.cta-band .enq-consent { color: var(--on-deep-muted); }
.cta-band .enq-msg { color: #fff; }
.cta-band .enq-err { color: #ffb4a8; }

/* ---------- online booking ---------- */
#book { scroll-margin-top: 80px; }
.book-frame { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow, 0 10px 30px rgba(0,0,0,.08)); }
.book-frame iframe { display: block; width: 100%; height: var(--book-h, 760px); border: 0; }
.book-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #5b6b80; }
.book-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-top: 14px; }
.book-card { border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; gap: 16px 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--card, transparent); }
.book-card p { margin: 0; max-width: 520px; }
@media (max-width: 640px) { .book-frame iframe { height: max(var(--book-h, 760px), 900px); } }

/* ---------- free resources (lead magnets) ---------- */
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.res-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow); min-width: 0; }
.res-cover { position: relative; display: grid; place-items: center; padding: 30px 20px 0; background: radial-gradient(120% 90% at 80% 0%, #1f3a5c 0%, #0f1b2d 60%); height: 250px; overflow: hidden; }
.res-page { position: relative; width: 168px; aspect-ratio: 210 / 297; background: #0f1b2d; border: 1px solid rgba(255,255,255,.12); border-radius: 4px 4px 0 0; box-shadow: 0 18px 40px rgba(0,0,0,.45); padding: 14px 13px; display: flex; flex-direction: column; transform: translateY(18px) rotate(-3deg); transition: transform .4s cubic-bezier(.2,.8,.2,1); align-self: end; }
.res-card:hover .res-page { transform: translateY(6px) rotate(0deg); }
.res-brand { display: flex; align-items: center; gap: 5px; font: 700 7.5px/1 "Space Grotesk", sans-serif; color: #fff; }
.res-brand i { width: 9px; height: 9px; border-radius: 2px; background: linear-gradient(#e5484d 0 33%, #45b3bd 33% 66%, #e5484d 66%); }
.res-bars { display: grid; gap: 5px; margin: auto 0 0 8%; padding-bottom: 6px; }
.res-bars i { height: 5px; border-radius: 3px; background: #45b3bd; opacity: .6; }
.res-bars i:nth-child(odd) { background: #e5484d; opacity: .95; }
.res-bars i:nth-child(1) { width: 40%; } .res-bars i:nth-child(2) { width: 55%; margin-left: 20%; } .res-bars i:nth-child(3) { width: 35%; margin-left: 35%; }
.res-bars i:nth-child(4) { width: 50%; margin-left: 45%; } .res-bars i:nth-child(5) { width: 30%; margin-left: 70%; }
.res-kicker { margin-top: 22px; font: 600 5.5px/1.2 "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: #e0861a; }
.res-page b { font: 700 12.5px/1.15 "Space Grotesk", sans-serif; color: #fff; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.res-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.res-body h3 { margin: 0; }
.res-body p { margin: 0; }
.res-body .btn { margin-top: auto; align-self: flex-start; }
.res-body > p:last-of-type { margin-bottom: 10px; }
.res-meta { font: 600 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }

dialog.gate { width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 16px; padding: 30px 28px 26px; background: var(--bg); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: auto; }
dialog.gate::backdrop { background: rgba(8, 15, 26, .62); backdrop-filter: blur(3px); }
dialog.gate h2 { margin: 4px 0 6px; font-size: 1.45rem; }
.gate-x { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.gate-x:hover { background: var(--bg-alt); }
.gate-others { margin: 6px 0 0; padding-left: 18px; }
.gate-others li { margin: 4px 0; }
.gate-next { margin-top: 20px; padding: 14px 16px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: .92rem; }
.gate-next a { font-weight: 600; }
@media (max-width: 560px) { dialog.gate { padding: 26px 18px 20px; } dialog.gate .grid.g2 { grid-template-columns: 1fr; } }
/* outline buttons on the dark CTA band */
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); background: transparent; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* ---------- free XER health check ---------- */
.hc-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: stretch; }
@media (max-width: 860px) { .hc-in { grid-template-columns: 1fr; } }
.hc-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 230px; padding: 28px; border: 2px dashed color-mix(in srgb, var(--teal) 55%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--teal) 6%, var(--bg)); color: var(--ink); cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.hc-drop svg { color: var(--teal); }
.hc-drop:hover, .hc-drop.over { background: color-mix(in srgb, var(--teal) 12%, var(--bg)); border-color: var(--teal); }
.hc-drop.over { transform: scale(1.01); }
.hc-drop.busy { opacity: .6; cursor: progress; }
.hc-drop:focus-within { outline: 2px solid var(--teal); outline-offset: 3px; }
.hc-side { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: var(--bg); }
.hc-side h3 { margin-top: 0; }
.hc-side .btn { margin-top: 6px; }
#hc-results { margin-top: 40px; scroll-margin-top: 80px; }
.hc-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hc-bar select, .hc-bar input[type=date] { width: auto; margin-left: 6px; padding: 6px 8px; }
.hc-opts { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: .9rem; color: var(--muted); }
.hc-summary { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 26px; background: var(--bg); box-shadow: var(--shadow); }
@media (max-width: 700px) { .hc-summary { grid-template-columns: 1fr; justify-items: center; text-align: center; } .hc-proj dl { justify-content: center; } }
.hc-score { --c: var(--ok); width: 180px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), color-mix(in srgb, var(--c) 14%, var(--bg-alt)) 0); }
.hc-score.warn { --c: var(--warn); } .hc-score.bad { --c: var(--bad); }
.hc-score > div { width: 76%; aspect-ratio: 1; border-radius: 50%; background: var(--bg); display: grid; place-content: center; text-align: center; }
.hc-score b { font: 700 2.4rem/1 "Space Grotesk", var(--font); color: var(--ink); }
.hc-score span { font-size: .78rem; color: var(--muted); margin-top: 4px; padding: 0 12px; }
.hc-proj h2 { margin: 4px 0 12px; }
.hc-proj dl { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0 0 12px; }
.hc-proj dt { font: 600 .7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hc-proj dd { margin: 4px 0 0; color: var(--ink); font-weight: 600; }
.hc-proj dd small { font-weight: 400; color: var(--muted); }
.hc-verdict { margin: 0; }
.hc-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; margin-top: 30px; align-items: start; }
@media (max-width: 980px) { .hc-grid { grid-template-columns: 1fr; } }
.hc-check { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.hc-chip { justify-self: start; align-self: start; font: 700 .72rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; }
.hc-chip.pass { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.hc-chip.fail { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.hc-chip.adv { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.hc-chip.na { background: var(--bg-alt); color: var(--muted); }
.hc-name .ref, .hc-nec .ref { font: .74rem var(--mono); color: var(--teal); margin-left: 4px; }
.hc-val { margin-top: 3px; }
.hc-why { margin: 6px 0 0; font-size: .9rem; color: var(--muted); }
.hc-lock { margin-top: 8px; border: 1px dashed var(--line); background: var(--bg-alt); color: var(--ink); border-radius: 8px; padding: 6px 12px; font-size: .85rem; cursor: pointer; }
.hc-lock:hover { border-color: var(--accent); }
.hc-det { margin-top: 8px; }
.hc-det summary { cursor: pointer; color: var(--teal); font-weight: 600; font-size: .9rem; }
.hc-det table { font-size: .84rem; margin-top: 8px; }
.hc-nec, .hc-gate { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: var(--bg); margin-bottom: 20px; }
.hc-nec h3, .hc-gate h3 { margin: 4px 0 8px; }
.hc-nec ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
.hc-nec li { padding-left: 28px; position: relative; font-size: .92rem; }
.hc-nec li span { color: var(--muted); }
.hc-nec li::before { position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: #fff; }
.hc-nec li.ok::before { content: "✓"; background: var(--ok); }
.hc-nec li.no::before { content: "!"; background: var(--warn); }
.hc-gate { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.hc-full { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }

@media print {
  .site-header, .site-footer, .announce, .draft-banner, .page-hero, .hc-in, #hc-msg, .hc-gate, .m-cta, .to-top, .cookie, .preview-bar, .section.alt, .scroll-progress, .skip-link { display: none !important; }
  body { background: #fff; }
  #hc-results { margin: 0; }
  .hc-grid { grid-template-columns: 1fr; }
  .hc-check { break-inside: avoid; }
  .hc-det summary { display: none; }
}

/* the hidden attribute always wins over component display rules */
[hidden] { display: none !important; }
