/* ==========================================================================
   trustyourphysio.com — main stylesheet
   Page content keeps its inline styles from the original design; this file
   holds the design tokens (colours, fonts, type scale), the shared components
   (header, menu, footer, forms, cookie banner) and the responsive rules.
   ========================================================================== */

:root {
  --navy-950: #040f26;
  --navy-900: #061634;
  --navy-800: #071c42;
  --navy-700: #0a2a63;
  --blue: #2196f3;
  --blue-300: #38a9ff;
  --blue-200: #7cc7ff;
  --green: #9fe870;
  --ink: #12233c;
  --muted: #5b6b80;
  --paper: #f4f8fb;
  --danger: #d93f3f;

  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;

  /* One type scale for the whole site, fluid between 375px and 1280px. */
  --fs-h1: clamp(2.125rem, 1.452rem + 2.873vw, 3.75rem);     /* 34 → 60 */
  --fs-h2: clamp(1.75rem, 1.336rem + 1.768vw, 2.75rem);      /* 28 → 44 */
  --fs-h3: clamp(1.375rem, 1.168rem + 0.884vw, 1.875rem);    /* 22 → 30 */
  --fs-h4: clamp(1.125rem, 1.047rem + 0.331vw, 1.3125rem);   /* 18 → 21 */
  --fs-lead: clamp(1rem, 0.948rem + 0.221vw, 1.125rem);      /* 16 → 18 */
  --fs-body: clamp(0.9375rem, 0.912rem + 0.11vw, 1rem);      /* 15 → 16 */
  --fs-small: clamp(0.8125rem, 0.787rem + 0.11vw, 0.875rem); /* 13 → 14 */

  --gutter: clamp(18px, 4.8vw, 26px);
  --header-h: 76px;
}

/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--navy-900);
  color: #fff;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
a { color: var(--blue-300); text-decoration: none; }
a:hover { color: var(--blue-200); }
::selection { background: var(--blue-300); color: var(--navy-900); }
img, video, iframe, svg { max-width: 100%; }
img { height: auto; }
button { font-family: inherit; }
input::placeholder, textarea::placeholder { color: #7e97b4; }
[hidden] { display: none !important; }
main [id] { scroll-margin-top: calc(var(--header-h) + 16px); }
main h1, main h2, main h3, main h4 { text-wrap: balance; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 200;
  background: #fff; color: var(--ink); padding: 12px 18px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Hover states of the original design (inline styles need !important here). */
[class*="hv"] { transition: background-color 0.18s, border-color 0.18s, color 0.18s; }
.hv1:hover { color: #9fe870 !important; }
.hv2:hover { background: #38a9ff !important; }
.hv3:hover { border-color: #38a9ff !important; color: #38a9ff !important; }
.hv4:hover { border-color: rgba(159, 232, 112, 0.6) !important; }
.hv5:hover { border-color: #38a9ff !important; }
.hv6:hover { background: #1a8ef0 !important; color: #fff !important; }
.hv7:hover { background: #e8f4ff !important; }
.hv8:hover { background: rgba(56, 169, 255, 0.3) !important; }
.hv9:hover { background: #1568c9 !important; }
.hv10:hover { border-color: #9fe870 !important; color: #9fe870 !important; }
.hv11:hover { background: rgba(255, 255, 255, 0.26) !important; }
.hv12:hover { background: #b3f088 !important; }
.hv13:hover { background: #0d7fd9 !important; }
.hv14:hover { background: #1a7fd4 !important; }
.hv15:hover { color: #fff !important; }
.hv16:hover { border-color: #9fe870 !important; }
.hv17:hover { border-color: #25d366 !important; }
.hv18:hover { border-color: #a98bff !important; }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--navy-900);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
/* account links: a thin bar above the menu on desktop, inside the menu on phones */
.site-header__top { background: var(--navy-950); border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.site-header__top-inner {
  max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); min-height: 34px;
  display: flex; align-items: center; justify-content: flex-end; gap: 22px;
}
.account-link {
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  color: #c5d5e6; font: inherit; font-size: 13.5px; line-height: 1.3; white-space: nowrap;
}
.account-link:hover { color: #fff; }
.account-logout { display: contents; }
.site-header__inner {
  max-width: 1440px; margin: 0 auto;
  padding: 10px var(--gutter);
  min-height: 76px;
  display: flex; align-items: center; gap: clamp(16px, 2.2vw, 36px);
}
.site-logo { flex: 0 0 auto; display: flex; align-items: center; }
.site-logo img { height: clamp(44px, 3.9vw, 54px); width: auto; display: block; }

/* Main menu: every item on a single line, never shrinking or wrapping. */
.site-nav {
  flex: 0 1 auto; min-width: 0;
  display: flex; align-items: center; gap: clamp(18px, 2.1vw, 34px);
}
.site-nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 0; margin: 0; background: none; border: 0; cursor: pointer;
  color: #fff; font-family: inherit; font-size: 15px; font-weight: 400; line-height: 1.3; white-space: nowrap;
  transition: color 0.18s;
}
.site-nav__link:hover { color: var(--blue-200); }
.site-nav__link[aria-current="page"], .site-nav__link.is-current { color: var(--blue-300); font-weight: 600; }

/* "Services": the four service pages open below it (hover, focus or click). */
.nav-group { position: relative; }
.nav-group__toggle svg { transition: transform 0.18s; }
.nav-group__menu {
  position: absolute; left: -18px; top: 100%; z-index: 70;
  min-width: 270px; padding: 8px;
  background: var(--navy-700); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.45);
  display: none;
}
.nav-group__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-group:hover .nav-group__menu,
.nav-group:focus-within .nav-group__menu,
.nav-group.is-open .nav-group__menu { display: grid; gap: 2px; }
.nav-group:hover .nav-group__toggle svg,
.nav-group.is-open .nav-group__toggle svg { transform: rotate(180deg); }
.nav-group__menu a {
  display: block; padding: 11px 14px; border-radius: 9px;
  color: #fff; font-size: 15px; line-height: 1.3; white-space: nowrap;
}
.nav-group__menu a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-group__menu a[aria-current="page"] { color: var(--blue-300); font-weight: 600; }
/* closed with Esc or after a tap outside, even while the pointer rests on it */
.nav-group.is-closed .nav-group__menu { display: none; }

.site-header__actions {
  flex: 0 0 auto; margin-left: auto;
  display: flex; align-items: center; gap: clamp(10px, 1.2vw, 18px);
}
.lang-switch {
  color: #fff; font-size: 14.5px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 4px;
}
.lang-switch:hover { color: var(--green); }
.site-header__phone { color: #fff; font-size: 14.5px; line-height: 1.25; white-space: nowrap; display: none; }
.site-header__phone:hover { color: var(--blue-200); }
.btn-cta {
  background: var(--blue); color: #fff;
  font-size: 14.5px; font-weight: 500; line-height: 1.2;
  padding: 12px 24px; border-radius: 999px; white-space: nowrap;
  transition: background-color 0.18s;
}
.btn-cta:hover { background: var(--blue-300); color: #fff; }
.btn-cta.btn-cta--block { display: block; text-align: center; padding: 15px 20px; font-size: 16px; }

.nav-toggle {
  display: none; flex: 0 0 auto;
  width: 44px; height: 44px; padding: 0;
  align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px; color: #fff; cursor: pointer;
}
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

/* the phone number joins the bar on wide screens */
@media (min-width: 1320px) {
  .site-header__phone { display: block; }
}

/* Below 1100px (tablets, phones) the menu moves behind the hamburger button. */
@media (max-width: 1099px) {
  .site-header__top { display: none; }
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header__inner { min-height: 68px; gap: 14px; }
  .btn-cta { font-size: 14px; padding: 11px 20px; }
}
@media (max-width: 559px) {
  .site-header__actions > .btn-cta { display: none; }
}

.mobile-menu {
  position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0; z-index: 59;
  background: var(--navy-700);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px var(--gutter) 32px;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.mobile-menu__nav { display: grid; max-width: 720px; margin: 0 auto; }
.mobile-menu__link {
  color: #fff; font-size: 17px; line-height: 1.35;
  padding: 15px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-menu__link[aria-current="page"] { color: var(--blue-300); font-weight: 600; }
.mobile-menu__foot { display: grid; gap: 16px; max-width: 720px; margin: 20px auto 0; }
.mobile-menu__phone { color: var(--green); font-size: 18px; font-weight: 600; padding: 6px; }
.lang-switch--menu { font-size: 16px; padding: 6px; justify-self: start; }
@media (min-width: 1100px) { .mobile-menu { display: none !important; } }

/* Scroll lock while the mobile menu is open. */
html.nav-open, html.nav-open body { overflow: hidden; }
html.nav-open .fab { display: none; }

/* ---- Newsletter band + footer ------------------------------------------- */
.newsletter { background: var(--navy-700); padding: 56px var(--gutter); border-top: 1px solid rgba(255, 255, 255, 0.07); }
.newsletter__inner {
  max-width: 1360px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(24px, 3.1vw, 40px); align-items: center;
}
.newsletter__title { color: #e4eefa; font-size: var(--fs-body); line-height: 1.7; margin: 0 0 14px; }
.newsletter__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: #b9cadd; font-size: var(--fs-body); }
.newsletter__button {
  display: inline-block; background: var(--blue); color: #fff; border-radius: 10px;
  padding: 16px 34px; font-size: var(--fs-body); font-weight: 500;
}
.newsletter__button:hover { color: #fff; }

.site-footer {
  background: var(--navy-950); color: #8fa6c0;
  padding: clamp(48px, 6vw, 72px) var(--gutter) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.site-footer__inner { max-width: 1360px; margin: 0 auto; }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px 32px; }

.site-footer__logos { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer__logos a { display: flex; }
.site-footer__logo { height: 48px; width: auto; display: block; }
.site-footer__program { height: 38px; width: auto; display: block; }
.site-footer__tagline { margin: 18px 0 0; max-width: 46ch; color: #9fb5cd; font-size: var(--fs-body); line-height: 1.7; }
.site-footer__contact { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-body); color: #9fb5cd; }
.site-footer__contact li { display: flex; align-items: center; gap: 11px; min-width: 0; }
.site-footer__contact svg { flex: none; color: var(--blue-300); }
.site-footer__contact a { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 3px 0; color: #b9cadd; overflow-wrap: anywhere; }
.site-footer__contact a:hover { color: var(--blue-200); }

.site-footer__heading {
  margin: 0 0 12px; color: #dce8f4;
  font-size: 12.5px; font-weight: 600; line-height: 1.4;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; font-size: var(--fs-small); }
.site-footer__list a, .site-footer__cookies { display: inline-block; padding: 6px 0; color: #93a9c2; transition: color 0.18s; }
.site-footer__list a:hover, .site-footer__cookies:hover { color: var(--blue-200); }
.site-footer__list a[aria-current="page"] { color: #dce8f4; font-weight: 600; }
.site-footer__cookies {
  background: none; border: 0; font: inherit; text-align: left; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

.site-footer__bottom {
  margin-top: clamp(40px, 5vw, 56px); padding: 20px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px;
}
.site-footer__copy { font-size: var(--fs-small); color: #7f95b0; }

/* tablet: brand spans the top, the link columns sit two-up below it */
@media (min-width: 640px) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 40px; }
  .site-footer__brand { grid-column: 1 / -1; max-width: 620px; }
}
/* desktop: brand + three link columns on one row */
@media (min-width: 1040px) {
  .site-footer__grid { grid-template-columns: minmax(260px, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 48px 44px; }
  .site-footer__brand { grid-column: auto; max-width: none; }
}
@media (max-width: 719px) {
  .site-footer__bottom { flex-direction: column; align-items: center; text-align: center; gap: 14px; }
  .pay-methods { justify-content: center; }
  .pay-note { flex-basis: 100%; justify-content: center; }
}

/* ---- Floating contact buttons ------------------------------------------- */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 50;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.fab__btn {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; line-height: 1.2;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transition: background-color 0.18s;
}
.fab__btn svg { flex: none; }
.fab__btn--anytime { background: #9fe870; color: #12331a; }
.fab__btn--anytime:hover { background: #b3f088; color: #12331a; }
.fab__btn--whatsapp { background: #25d366; color: #04361a; }
.fab__btn--whatsapp:hover { background: #4ae884; color: #04361a; }
.fab__btn--viber { background: #7360f2; color: #fff; }
.fab__btn--viber:hover { background: #8b7bff; color: #fff; }
@media (max-width: 1100px) {
  .fab__label { display: none; }
  .fab__btn { padding: 0; width: 52px; height: 52px; justify-content: center; }
}
@media (max-width: 559px) {
  .fab { right: 14px; bottom: 14px; gap: 10px; }
  .fab__btn { width: 48px; height: 48px; }
  .site-footer { padding-bottom: 96px; }
}

/* ---- Home: stats, programme phases, FAQ, video --------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 980px; margin: 0 auto; padding: clamp(22px, 3vw, 34px) 0; text-align: center;
  background: rgba(33, 150, 243, 0.08); border: 1px solid rgba(56, 169, 255, 0.22); border-radius: 16px;
}
.stat { padding: 4px clamp(14px, 2.6vw, 34px); }
.stat + .stat { border-left: 1px solid rgba(255, 255, 255, 0.12); }
.stat__num { font-family: var(--font-sans); font-size: var(--fs-h1); font-weight: 700; color: var(--blue-300); line-height: 1.1; letter-spacing: -0.01em; }
.stat__label { font-size: var(--fs-lead); font-weight: 600; color: #fff; margin-top: 6px; line-height: 1.3; }
.stat__text { font-size: var(--fs-small); color: #b9cadd; margin: 6px 0 0; line-height: 1.5; }
@media (max-width: 599px) {
  .stats { grid-template-columns: 1fr; padding: 6px clamp(16px, 5vw, 22px); text-align: left; }
  .stat { display: grid; grid-template-columns: 6rem minmax(0, 1fr); align-items: center; gap: 14px; padding: 16px 0; }
  .stat + .stat { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
  .stat__label { margin-top: 0; }
  .stat__text { margin-top: 3px; }
}

/* "Scroll" under the stats: a real link to the next section */
.scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content;
  margin: clamp(26px, 3.28vw, 42px) auto 0; padding: 6px 14px;
  color: #9fb4cc; font-size: var(--fs-small); font-weight: 500;
}
.scroll-cue:hover { color: #fff; }
.scroll-cue__icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25); animation: scroll-cue 1.8s ease-in-out infinite;
}
.scroll-cue:hover .scroll-cue__icon { border-color: var(--blue-300); }
@keyframes scroll-cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue__icon { animation: none; } }

.phase-tabs { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: clamp(34px, 4.4vw, 56px); }
.phase-tab {
  font-family: var(--font-serif); font-size: 15.5px; font-weight: 600; line-height: 1.3;
  padding: 14px 28px; border-radius: 999px; cursor: pointer;
  border: 1px solid #d5e0ec; background: #fff; color: #3d4f66;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.phase-tab:hover { border-color: #9db7d3; }
.phase-tab[aria-selected="true"] { border-color: transparent; background: #1e6fd9; color: #fff; box-shadow: 0 8px 22px rgba(30, 111, 217, 0.28); }
.phase-tab[data-phase="3"][aria-selected="true"] { background: #7ab648; }
.phase-tab[data-phase="4"][aria-selected="true"] { background: #0e7a5f; }
.phase-dots { display: flex; gap: 10px; justify-content: center; margin-top: clamp(32px, 4vw, 52px); }
.phase-dot {
  position: relative; border: 0; padding: 0; cursor: pointer;
  width: 10px; height: 4px; border-radius: 2px; background: #c3d0de;
  transition: width 0.18s, background-color 0.18s;
}
.phase-dot::after { content: ""; position: absolute; inset: -16px -5px; }
.phase-dot[aria-current="true"] { width: 34px; background: #1e6fd9; }

.faq-item { background: #fff; border-radius: 14px; box-shadow: 0 2px 14px rgba(18, 35, 60, 0.06); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: clamp(18px, 2.1vw, 26px) clamp(18px, 2.5vw, 32px);
  font-family: var(--font-serif); font-size: var(--fs-h4); font-weight: 700; line-height: 1.35; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
}
.faq-q__icon { color: var(--blue); line-height: 0; flex: none; transition: transform 0.2s; }
.faq-q[aria-expanded="true"] .faq-q__icon { transform: rotate(180deg); }
.faq-a { margin: 0; padding: 0 clamp(18px, 2.5vw, 32px) clamp(20px, 2.4vw, 30px); color: var(--muted); font-size: var(--fs-body); line-height: 1.8; }

.vsl {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0;
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.14); overflow: hidden;
  background: #03101f; color: #fff; font: inherit; text-align: left; cursor: pointer;
  transition: border-color 0.18s;
}
.vsl:hover, .vsl:focus-visible { border-color: rgba(159, 232, 112, 0.6); }
.vsl img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; display: block; }
.vsl__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 22, 52, 0.15) 0%, rgba(6, 22, 52, 0.4) 55%, rgba(6, 22, 52, 0.82) 100%); }
.vsl__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.vsl__play span {
  width: clamp(62px, 7vw, 86px); height: clamp(62px, 7vw, 86px); border-radius: 50%;
  background: rgba(255, 255, 255, 0.94); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
.vsl__play svg { width: 35%; height: auto; margin-left: 6%; }
.vsl__caption { position: absolute; left: clamp(14px, 2vw, 26px); right: clamp(14px, 2vw, 26px); bottom: clamp(12px, 1.9vw, 24px); }
.vsl__title { display: block; font-family: var(--font-serif); font-size: var(--fs-h4); font-weight: 700; line-height: 1.3; }
.vsl__note { display: block; font-size: 12.5px; line-height: 1.4; color: #cfdcea; margin-top: 4px; }
.vsl-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.14); background: #03101f; }

/* ---- Forms --------------------------------------------------------------- */
.form-card {
  background: #fff; border-radius: 18px; box-shadow: 0 2px 14px rgba(18, 35, 60, 0.06);
  padding: clamp(20px, 4vw, 44px);
}
.form { display: grid; gap: 24px; }
.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 24px; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 24px; }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field__label { font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--ink); }
.field__req { color: var(--danger); margin-left: 2px; }
.field__opt { color: #74869b; font-weight: 400; font-size: 13.5px; }
.control {
  display: block; width: 100%; min-height: 52px;
  background: #fff; border: 1.5px solid #cbd8e6; border-radius: 10px;
  padding: 13px 16px; margin: 0;
  font-family: inherit; font-size: 16px; line-height: 1.4; color: var(--ink);
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
textarea.control { min-height: 116px; resize: vertical; }
select.control {
  padding-right: 46px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b80' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
select.control:invalid, select.control.is-empty { color: #7a8ba0; }
.control::placeholder { color: #8b9bb0; }
.control:hover { border-color: #9fb5cc; }
.control:focus, .control:focus-visible {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.24);
}
.control[aria-invalid="true"] { border-color: var(--danger); background-color: #fff7f7; }
.control[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(217, 63, 63, 0.2); }
.field__error { margin: 0; color: #c22f2f; font-size: 13.5px; line-height: 1.4; font-weight: 500; }
.field__error::before { content: "⚠ "; }

.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.check {
  display: flex; align-items: center; gap: 12px; min-height: 50px;
  padding: 11px 14px; border: 1.5px solid #cbd8e6; border-radius: 10px; background: #fff;
  font-size: 15px; line-height: 1.35; color: #3c4f66; cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.check:hover { border-color: #9fb5cc; }
.check input, .consent input { width: 19px; height: 19px; margin: 0; flex: none; accent-color: var(--blue); cursor: pointer; }
.check:has(input:checked) { border-color: var(--blue); background: #f0f8ff; }
.check:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.24); }
.check input:focus-visible, .consent input:focus-visible { outline: none; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.6; color: #3c4f66; cursor: pointer; }
.consent input { margin-top: 3px; }
.consent input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.consent a { text-decoration: underline; text-underline-offset: 3px; color: #1470c4; }
.consent[data-invalid="true"] { color: #c22f2f; }

.form__submit {
  width: 100%; min-height: 56px; border: 0; border-radius: 10px; cursor: pointer;
  background: #1a7ff0; color: #fff; font-family: inherit; font-size: 16px; font-weight: 600;
  padding: 16px 24px; transition: background-color 0.18s, opacity 0.18s;
}
.form__submit:hover { background: #1568c9; }
.form__submit:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.form__submit[disabled] { opacity: 0.6; cursor: not-allowed; }
.form__status { border-radius: 10px; padding: 14px 16px; font-size: 15px; line-height: 1.55; font-weight: 500; }
.form__status--ok { background: #e8f8ee; border: 1px solid #9ad6ad; color: #15603a; }
.form__status--err { background: #fdeeee; border: 1px solid #efb1b1; color: #9b2424; }
.form__notice { border-radius: 10px; padding: 14px 16px; font-size: 15px; line-height: 1.55; background: #fff6e0; border: 1px solid #ecd08a; color: #6b4e00; }
.form__notice a { color: #0d5fb0; text-decoration: underline; }
.form .hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Dark variant — contact page. */
.form--dark { gap: 20px; }
.form--dark fieldset { gap: 20px; }
.form--dark .field__label { color: #c9dbec; font-weight: 400; font-size: 14.5px; }
.form--dark .field__opt { color: #8fa6c0; }
.form--dark .control { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.form--dark .control::placeholder { color: #7e97b4; }
.form--dark .control:hover { border-color: rgba(255, 255, 255, 0.38); }
.form--dark .control:focus, .form--dark .control:focus-visible { border-color: var(--blue-300); box-shadow: 0 0 0 4px rgba(56, 169, 255, 0.3); }
.form--dark .control[aria-invalid="true"] { border-color: #ff8a8a; background-color: rgba(255, 90, 90, 0.08); }
.form--dark .field__error { color: #ffb0b0; }
.form--dark .consent { color: #c9dbec; }
.form--dark .consent a { color: #9ed5ff; }
.form--dark .consent[data-invalid="true"] { color: #ffb0b0; }
.form--dark .form__submit { background: var(--blue); font-weight: 500; }
.form--dark .form__submit:hover { background: var(--blue-300); }
.form--dark .form__status--ok { background: rgba(159, 232, 112, 0.12); border-color: rgba(159, 232, 112, 0.5); color: #c8f5ab; }
.form--dark .form__status--err { background: rgba(255, 90, 90, 0.12); border-color: rgba(255, 138, 138, 0.5); color: #ffc4c4; }
.form--dark .form__notice { background: rgba(255, 201, 60, 0.1); border-color: rgba(255, 201, 60, 0.4); color: #ffe6a6; }
.form--dark .form__notice a { color: #9ed5ff; }

/* ---- Ebooks: purchase block --------------------------------------------- */
.split-cover { grid-template-columns: minmax(220px, 300px) minmax(280px, 1fr); }
@media (max-width: 760px) {
  .split-cover { grid-template-columns: 1fr; }
  .split-cover > :first-child { width: 100%; max-width: 300px; margin: 0 auto; }
}
.buy__note { color: #7f9ab5; font-size: 13.5px; line-height: 1.55; margin: 0; }

/* ---- Shop: ebooks, cart, checkout, account ------------------------------- */
.cart-link {
  position: relative; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 44px; color: #fff; border-radius: 10px;
}
.cart-link:hover { color: var(--green); }
.cart-link__count {
  position: absolute; top: 2px; right: -2px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--green); color: #12331a;
  font-size: 11.5px; font-weight: 700; line-height: 19px; text-align: center;
}
.mobile-menu__account { display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 0 6px; }
.mobile-menu__account .account-link { color: #fff; font-size: 16px; }
/* on phones the floating contact buttons would cover the cart and the checkout */
@media (max-width: 760px) { .is-shop .fab { display: none; } }

.pay-methods { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pay {
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 7px;
  padding: 4px 10px; color: #b9cadd; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pay-note { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; color: #7f95b0; font-size: 12.5px; }

.shop { background: radial-gradient(90% 90% at 50% 0%, #0c2f6e 0%, #061634 70%); padding: clamp(40px, 5.5vw, 70px) var(--gutter) clamp(56px, 7.03vw, 90px); }
.shop__inner { max-width: 1100px; margin: 0 auto; }
.shop__inner--mid { max-width: 820px; }
.shop__inner--narrow { max-width: 520px; }
.shop__eyebrow { color: var(--green); font-size: var(--fs-small); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 12px; }
.shop h1 { font-family: var(--font-serif); font-size: var(--fs-h2); font-weight: 700; line-height: 1.2; margin: 0 0 16px; }
.shop__lead { color: #b9cadd; font-size: var(--fs-lead); line-height: 1.7; margin: 0 0 28px; }
.shop__back { display: inline-block; color: #9ed5ff; font-size: var(--fs-body); font-weight: 600; margin-bottom: 24px; }
.shop__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.shop__alt { color: #b9cadd; font-size: var(--fs-body); margin: 20px 0 0; text-align: center; }
.shop a:not(.btn):not(.shop__back) { text-decoration: underline; text-underline-offset: 3px; }
.shop .product-card__title a, .shop .cart-item__title a { text-decoration: none; }

.panel { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 18px; padding: clamp(20px, 3vw, 32px); }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-family: var(--font-serif); font-size: var(--fs-h4); font-weight: 700; margin: 0 0 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 26px; border-radius: 12px; border: 1px solid transparent;
  font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, opacity 0.18s;
}
.btn svg { flex: none; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-300); color: #fff; }
.btn--green { background: var(--green); color: #12331a; }
.btn--green:hover { background: #b3f088; color: #12331a; }
.btn--ghost { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.btn--ghost:hover { border-color: var(--blue-300); color: var(--blue-300); }
.btn--block { width: 100%; }
.btn--small { min-height: 42px; padding: 8px 18px; font-size: 14.5px; border-radius: 10px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.alert { border: 1px solid; border-radius: 12px; padding: 14px 16px; font-size: 15px; line-height: 1.55; margin: 0 0 20px; }
.alert--ok { background: rgba(159, 232, 112, 0.12); border-color: rgba(159, 232, 112, 0.5); color: #c8f5ab; }
.alert--err { background: rgba(255, 90, 90, 0.12); border-color: rgba(255, 138, 138, 0.5); color: #ffc4c4; }
.alert--info { background: rgba(56, 169, 255, 0.12); border-color: rgba(56, 169, 255, 0.45); color: #cfe8ff; }

.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 360px)); gap: 24px; justify-content: center; margin-bottom: 34px; }
.product-card { display: flex; flex-direction: column; background: rgba(33, 150, 243, 0.07); border: 1px solid rgba(56, 169, 255, 0.22); border-radius: 20px; overflow: hidden; }
.product-card__cover { display: block; padding: 24px 24px 0; }
.product-card__body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 24px; }
.product-card__title { font-family: var(--font-serif); font-size: var(--fs-h4); font-weight: 700; line-height: 1.3; margin: 0; }
.product-card__title a { color: #fff; }
.product-card__title a:hover { color: var(--blue-200); }
.product-card__short { flex: 1; color: #b9cadd; font-size: var(--fs-body); line-height: 1.65; margin: 0; }
.product-card__price { font-family: var(--font-serif); font-size: var(--fs-h3); font-weight: 700; color: var(--green); }
.product-card__actions .buy-form { display: grid; gap: 10px; }
.buy-form { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

.cover {
  width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 1 / 1.414;
  display: flex; flex-direction: column; justify-content: space-between; padding: 11% 10%;
  background: linear-gradient(165deg, #0f47a0, #061634); border: 1px solid rgba(56, 169, 255, 0.3);
  border-radius: 14px; box-shadow: 0 22px 46px rgba(0, 0, 0, 0.4); overflow: hidden;
}
.cover--img { padding: 0; }
.cover--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover__logo { height: 36px; width: auto; align-self: flex-start; filter: brightness(0) invert(1); opacity: 0.9; }
.cover__kicker { color: var(--green); font-size: 11.5px; letter-spacing: 0.2em; margin-bottom: 10px; }
.cover__title { font-family: var(--font-serif); font-size: clamp(19px, 2.1vw, 25px); font-weight: 700; line-height: 1.2; color: #fff; }
.cover__rule { width: 44px; height: 3px; background: var(--green); border-radius: 2px; margin-top: 12px; }
.cover__author { color: #7f9ab5; font-size: 12.5px; }

.product { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: clamp(26px, 3.6vw, 46px); align-items: start; }
@media (max-width: 760px) { .product { grid-template-columns: 1fr; } }
.product__badge {
  display: inline-block; background: rgba(159, 232, 112, 0.14); border: 1px solid rgba(159, 232, 112, 0.4); color: var(--green);
  font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.product__meta { color: #8fa6c0; font-size: var(--fs-small); margin: 18px 0 0; }
.product__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 22px 0 14px; }
.product__price { font-family: var(--font-serif); font-size: var(--fs-h2); font-weight: 700; color: var(--green); line-height: 1; }
.prose.prose--dark { color: #c9d8e8; }
.prose.prose--dark h2, .prose.prose--dark h3, .prose.prose--dark h4, .prose.prose--dark strong { color: #fff; }
.prose.prose--dark a { color: #9ed5ff; }
.prose.prose--dark li::marker { color: var(--green); }
.prose.prose--dark blockquote { color: #b9cadd; }
.prose.prose--dark th, .prose.prose--dark td { border-color: rgba(255, 255, 255, 0.18); }

.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cart-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 14px; padding: 14px 18px;
}
.cart-item form { margin: 0; }
.cart-item__title { flex: 1 1 200px; min-width: 0; font-size: var(--fs-body); font-weight: 600; line-height: 1.4; }
.cart-item__title a { color: #fff; }
.cart-item__format { display: block; color: #8fa6c0; font-size: 13px; font-weight: 400; margin-top: 2px; }
.cart-item__price { font-weight: 600; color: var(--green); white-space: nowrap; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 18px; padding: 16px 2px 6px; border-top: 1px solid rgba(255, 255, 255, 0.16); font-size: var(--fs-lead); }
.cart-total strong { font-family: var(--font-serif); font-size: var(--fs-h3); color: #fff; }
.link-btn { background: none; border: 0; padding: 6px 0; color: #9ed5ff; font: inherit; font-size: 14.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: #fff; }

.checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 24px; align-items: start; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }
.summary { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: var(--fs-body); }
.summary li { display: flex; justify-content: space-between; gap: 16px; }
.summary li span:last-child { white-space: nowrap; color: #c9d8e8; }
.form__group { display: grid; gap: 20px; }
.checkline { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.6; color: #dce8f4; cursor: pointer; }
.checkline input { width: 19px; height: 19px; margin: 3px 0 0; flex: none; accent-color: var(--green); cursor: pointer; }
.checkline a { color: #9ed5ff; }
.checkline[data-invalid="true"] { color: #ffb0b0; }
.field__hint { margin: 0; color: #8fa6c0; font-size: 13.5px; line-height: 1.45; }
.control[readonly] { opacity: 0.75; cursor: default; }

.account-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 26px; }
.account-head h1 { margin-bottom: 8px; }
.account-head form { margin: 0; }
.table-scroll { overflow-x: auto; }
.table-simple { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 14.5px; }
.table-simple th, .table-simple td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); vertical-align: top; }
.table-simple th { color: #8fa6c0; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.table-simple tr:last-child td { border-bottom: 0; }

/* ---- Articles ------------------------------------------------------------ */
.article-card { display: block; background: #fff; border-radius: 16px; box-shadow: 0 2px 14px rgba(18, 35, 60, 0.06); overflow: hidden; }
.article-card__img { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.article-card__body { padding: clamp(22px, 2.7vw, 34px) clamp(20px, 2.7vw, 34px) clamp(20px, 2.4vw, 30px); }
.article-card__title a { color: var(--ink); }
.article-card__title a:hover { color: #1a8ef0; }
.article-hero { display: block; width: 100%; height: auto; border-radius: 16px; margin: 0 0 clamp(24px, 3vw, 36px); }
.prose { color: #3c4f66; font-size: var(--fs-body); line-height: 1.8; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 1.15em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--font-serif); color: var(--ink); line-height: 1.3; margin: 1.7em 0 0.6em; }
.prose h2 { font-size: var(--fs-h3); }
.prose h3 { font-size: var(--fs-h4); }
.prose h4 { font-size: var(--fs-lead); }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: #1470c4; text-decoration: underline; text-underline-offset: 3px; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 1.5em auto; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--blue); color: #54677f; font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid #dde6ef; padding: 10px 12px; text-align: left; }
.prose strong { color: var(--ink); }

/* ---- Cookie consent ------------------------------------------------------ */
.cookie {
  position: fixed; left: 22px; bottom: 22px; z-index: 100;
  width: min(520px, calc(100vw - 44px)); max-height: calc(100vh - 44px); overflow-y: auto;
  background: #0b2a5e; color: #e4eefa;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 16px;
  padding: 22px 22px 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.cookie__title { font-family: var(--font-serif); font-size: 20px; font-weight: 700; margin: 0 0 8px; color: #fff; }
.cookie__text { font-size: 14.5px; line-height: 1.6; margin: 0 0 16px; color: #cfdcea; }
.cookie__text a { color: #9ed5ff; text-decoration: underline; text-underline-offset: 3px; }
.cookie__prefs { display: grid; gap: 10px; margin: 0 0 16px; }
.cookie__opt {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; padding: 12px 14px;
}
.cookie__opt strong { display: block; font-size: 14.5px; font-weight: 600; color: #fff; }
.cookie__opt small { display: block; font-size: 13px; line-height: 1.5; color: #b9cadd; margin-top: 2px; }
.cookie__opt input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--green); cursor: pointer; }
.cookie__always { flex: none; font-size: 12.5px; font-weight: 600; color: var(--green); white-space: nowrap; margin-top: 2px; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie__btn {
  flex: 1 1 auto; min-height: 46px; padding: 11px 18px; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.2;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.34); color: #fff;
  transition: background-color 0.18s, border-color 0.18s;
}
.cookie__btn:hover { background: rgba(255, 255, 255, 0.16); }
.cookie__btn--primary { background: var(--blue); border-color: var(--blue); }
.cookie__btn--primary:hover { background: var(--blue-300); border-color: var(--blue-300); }
@media (max-width: 559px) {
  .cookie { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 18px 16px 16px; }
  .cookie__btn { flex: 1 1 100%; }
}
.cookie-settings-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: rgba(56, 169, 255, 0.16); border: 1px solid rgba(56, 169, 255, 0.5); color: #9ed5ff;
  border-radius: 10px; padding: 12px 20px; font-family: inherit; font-size: 15px; font-weight: 500;
}
.cookie-settings-btn:hover { background: rgba(56, 169, 255, 0.3); }

/* ---- 404 ----------------------------------------------------------------- */
.notfound { background: radial-gradient(90% 90% at 50% 0%, #0c2f6e 0%, #061634 70%); padding: clamp(64px, 9vw, 120px) var(--gutter); text-align: center; }
.notfound__code { font-family: var(--font-sans); font-size: clamp(72px, 14vw, 150px); font-weight: 700; line-height: 1; color: var(--blue-300); }
.notfound h1 { font-family: var(--font-serif); font-size: var(--fs-h2); font-weight: 700; margin: 18px 0 12px; }
.notfound p { color: #b9cadd; font-size: var(--fs-lead); margin: 0 auto 30px; max-width: 560px; }
.notfound__links { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; margin-top: 30px; font-size: var(--fs-body); }
.btn-pill {
  display: inline-flex; align-items: center; gap: 12px; background: var(--blue); color: #fff;
  font-size: 16px; font-weight: 500; padding: 16px 34px; border-radius: 999px; transition: background-color 0.18s;
}
.btn-pill:hover { background: var(--blue-300); color: #fff; }

/* ---- Responsive rules for the ported page content ------------------------ */
main video { display: block; }
main table { max-width: 100%; }

@media (max-width: 719px) {
  .phase-tabs { flex-direction: column; align-items: stretch; gap: 10px; }
  .phase-tab { padding: 13px 18px; text-align: center; }
}

@media print {
  .site-header, .fab, .cookie, .newsletter, .mobile-menu { display: none !important; }
  body { background: #fff; color: #000; }
}
