@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Poppins:wght@300;400;500;600&display=swap');

:root {
  color-scheme: dark;
  --bg: #0A0F1D;
  --text: #F2F4F7;
  --text-muted: #8B93A6;
  --accent: #0066FF;
  --accent-2: #00C2FF;
  --panel-bg: rgba(242, 244, 247, 0.04);
  --panel-border: rgba(0, 102, 255, 0.25);
  --divider: #1c2540;
  --btn-secondary-border: #3a4468;
  --btn-text: #F2F4F7;

  /* Shared vertical-rhythm scale. Source of truth is the homepage (.hero /
     .services-overview), tuned through several rounds of direct feedback.
     Every page-level hero/section class below reads from these tokens
     instead of hardcoding its own values, so a future rhythm change is one
     edit here, not a hunt across every page's CSS block. */
  --page-side: 64px;
  --hero-pt: 14px;
  --hero-pb: 20px;
  --hero-inner-gap: 0px;
  --section-pt: 24px;
  --section-pb: 64px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F9FC;
  --text: #0A0F1D;
  --text-muted: #5B6478;
  --accent: #0057D8;
  --accent-2: #0090C2;
  --panel-bg: rgba(10, 15, 29, 0.03);
  --panel-border: rgba(0, 87, 216, 0.2);
  --divider: #DCE1EC;
  --btn-secondary-border: #C7CEDD;
  --btn-text: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Base fallback so every <select> (even outside .form-field, e.g. inline
   admin row actions) gets a real opaque dark/light color -- the native
   options popup renders on its own surface and won't pick up a
   translucent panel tint or rely on color-scheme alone in every browser. */
select {
  background-color: var(--bg);
  color: var(--text);
}
select option {
  background-color: var(--bg);
  color: var(--text);
}

html {
  background-color: var(--bg);
}

html, body {
  /* Safety net, not the primary fix -- individual elements should size
     themselves to fit (see .headline/.page-title using clamp()), but this
     stops any future oversized element from creating a horizontal scroll
     on the whole page instead of just looking wrong locally. */
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--hero-pt) var(--page-side) var(--hero-pb);
}

.hero-rays {
  position: absolute;
  top: 0;
  right: 0;
  width: 460px;
  height: 100%;
  opacity: 0.9;
  pointer-events: none;
}

.particle-globe {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 420px;
  height: 420px;
  pointer-events: none;
}

.nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-logo {
  height: 60px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-toggle-checkbox {
  display: none;
}

.nav-toggle-label {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  z-index: 20;
}

.nav-toggle-label span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.nav-links a:hover { color: var(--text); }

@media (max-width: 860px) {
  .nav-toggle-label {
    display: flex;
  }

  .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border: 1px solid var(--divider);
    border-radius: 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    z-index: 30;
  }

  .nav-toggle-checkbox:checked ~ .nav-links {
    /* Viewport-relative, not a guessed fixed number -- the list of links
       grows over time (it already has once), and a hardcoded max-height
       silently clips new items instead of adapting. overflow-y:auto is
       the safety net if it's ever still taller than the available space. */
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    opacity: 1;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border-bottom: 1px solid var(--divider);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  /* Theme toggle sits outside .nav-links (see layout.php) so it's always
     visible next to the hamburger, never hidden inside the collapsible
     menu. */
  .theme-toggle {
    order: 1;
  }

  .nav-toggle-label {
    order: 2;
  }
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--btn-secondary-border);
  color: var(--text);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.theme-toggle:hover { border-color: var(--accent); }

.eyebrow {
  position: relative;
  color: var(--accent-2);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin-bottom: 20px;
}

.headline {
  position: relative;
  max-width: 680px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  /* Fluid, not a fixed px value that only happens to fit desktop widths --
     scales continuously between mobile and desktop instead of overflowing
     narrow screens (see the "withstand" cut off the edge on mobile). */
  font-size: clamp(38px, 12vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 24px;
}

.headline .accent { color: var(--accent); }

.panel {
  position: relative;
  background: var(--panel-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 32px 36px;
  max-width: 480px;
}

.panel p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--btn-text);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 14px 28px;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.cta:hover { background: var(--accent-2); }

.cta-secondary {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--btn-secondary-border);
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 13px 27px;
  border-radius: 4px;
  text-decoration: none;
  margin-left: 12px;
  cursor: pointer;
}

.cta-secondary:hover {
  border-color: var(--accent);
}

.services-row {
  position: relative;
  display: flex;
  gap: 32px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  flex-wrap: wrap;
}

.services-row span {
  color: var(--text-muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 32px;
  text-align: center;
}

.section-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}

.services-overview {
  padding: var(--section-pt) var(--page-side) var(--section-pb);
  max-width: 1200px;
  margin: 0 auto;
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.service-cards-4col {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .service-cards-4col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .service-cards-4col {
    grid-template-columns: 1fr;
  }
}

.service-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--panel-bg);
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 40px 36px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--panel-border);
}

.service-card-index {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.service-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.service-card p:last-child {
  margin-bottom: 0;
}

.card-link {
  display: inline-block;
  color: var(--accent-2);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s ease, color 0.2s ease;
}

.card-link:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.card-link:hover { color: var(--accent); }

.approach {
  padding: 0 64px 64px;
  max-width: 1200px;
  margin: 0 auto;
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  padding: 48px 0;
}

.approach-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
}

.approach-item p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

.pricing-teaser {
  padding: 0 64px 64px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.pricing-teaser .section-head { margin-bottom: 32px; }

.site-footer {
  border-top: 1px solid var(--divider);
  padding: 40px 64px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto 40px;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  height: 48px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-bottom a:hover { color: var(--accent-2); }

/* ============================================================
   Interior pages (security-services, web-services, pricing,
   about, contact, case-studies). Additive only — nothing above
   this line is renamed or removed.
   ============================================================ */

.page-hero {
  position: relative;
  padding: var(--hero-pt) var(--page-side) var(--hero-pb);
}

.page-hero-inner {
  margin-top: var(--hero-inner-gap);
  max-width: 760px;
}

.page-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 8vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 20px;
}

.page-sub {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.65;
  max-width: 640px;
}

.page-section {
  padding: var(--section-pt) var(--page-side) var(--section-pb);
  max-width: 1200px;
  margin: 0 auto;
}

.page-section-narrow {
  max-width: 800px;
}

.page-section-wide {
  max-width: 1600px;
}

.page-section-top {
  border-top: 1px solid var(--divider);
}

/* Pricing */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.pricing-card {
  background: var(--panel-bg);
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.pricing-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.pricing-card-price {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.pricing-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.pricing-note {
  max-width: 800px;
  margin: 40px auto 0;
  padding: 22px 26px;
  border: 1px dashed var(--btn-secondary-border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

/* About */

.about-lead {
  max-width: 760px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.75;
  margin: 0 auto 24px;
}

.about-lead + .about-lead {
  margin-top: 0;
}

/* Legal pages (terms, privacy) */

.legal-content {
  max-width: 760px;
  margin: 0 auto;
}

.legal-content .legal-updated {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 32px;
}

.legal-content .legal-toc {
  background: var(--panel-bg);
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 22px 26px;
  margin-bottom: 40px;
}

.legal-content .legal-toc-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  margin-bottom: 10px;
}

.legal-content .legal-toc ol {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.9;
}

.legal-content .legal-toc a { color: var(--text-muted); }
.legal-content .legal-toc a:hover { color: var(--accent-2); }

.legal-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 12px;
  scroll-margin-top: 24px;
}

.legal-content section:first-of-type h2 { margin-top: 0; }

.legal-content h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 8px;
}

.legal-content p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.legal-content ul, .legal-content ol {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 14px 22px;
}

.legal-content li { margin-bottom: 6px; }
.legal-content a { color: var(--accent-2); }
.legal-content strong { color: var(--text); }

.legal-content section {
  border-top: 1px solid var(--divider);
  padding-top: 8px;
}

.legal-content section:first-of-type {
  border-top: none;
  padding-top: 0;
}

/* Cookie notice */

.cookie-notice {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 500;
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg);
  background-image: linear-gradient(var(--panel-bg), var(--panel-bg));
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

/* Same specificity as the browser's own [hidden] rule, and this one loads
   later -- without this override, .cookie-notice's `display: flex` above
   wins over `hidden`, and dismissing the notice sets the attribute but
   never actually hides anything. */
.cookie-notice[hidden] {
  display: none;
}

.cookie-notice p {
  flex: 1 1 320px;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.cookie-notice a { color: var(--accent-2); }

.cookie-notice-btn {
  flex-shrink: 0;
  margin-left: 0;
  padding: 8px 18px;
  font-size: 13px;
}

@media (max-width: 560px) {
  .cookie-notice { left: 12px; right: 12px; bottom: 12px; padding: 16px 18px; }
}

/* Contact */

.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
}

@media (max-width: 760px) {
  .contact-layout { grid-template-columns: 1fr; }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.form-field input,
.form-field textarea {
  background: var(--panel-bg);
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 12px 14px;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-info-item {
  margin-bottom: 28px;
}

.contact-info-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.contact-info-item a,
.contact-info-item p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  text-decoration: none;
}

.contact-info-item a:hover { color: var(--accent-2); }

/* Case studies */

.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.cs-card {
  background: var(--panel-bg);
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 36px 32px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cs-card-tag {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  margin-bottom: 16px;
}

.cs-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.cs-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.cs-placeholder { opacity: 0.6; }

.coming-soon-banner {
  max-width: 700px;
  margin: 0 auto 64px;
  text-align: center;
  padding: 40px 32px;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  background: var(--panel-bg);
}

.coming-soon-banner p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

/* Booking page */

.booking-form {
  max-width: 640px;
  margin: 0 auto;
}

.form-field select {
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 12px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
}

.form-field select:focus {
  outline: none;
  border-color: var(--accent);
}

.booking-row {
  display: grid;
  /* minmax(0, 1fr), not bare 1fr -- a grid track's default minimum size is
     its content's min-content width, so a wide-enough child (e.g. a
     number input with spinner arrows) can force the track past its fair
     share and overflow the container, exactly what happened here. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

@media (max-width: 560px) {
  .booking-row { grid-template-columns: 1fr; }
}

.booking-status {
  max-width: 640px;
  margin: 0 auto 24px;
  padding: 16px 20px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.6;
}

.booking-status-success {
  background: var(--panel-bg);
  border: 1px solid var(--accent-2);
  color: var(--text);
}

.booking-status-error {
  background: var(--panel-bg);
  border: 1px solid #c0392b;
  color: var(--text);
}

/* ============================================================
   Pricing & consultations (pricing.php, consultations.php).
   Additive only — nothing above this line is renamed, removed,
   or modified.
   ============================================================ */

.pricing-card-featured {
  border-color: var(--accent-2);
}

.addon-grid {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--divider);
}

.addon-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--divider);
}

.addon-row-name {
  color: var(--text);
  font-size: 15px;
}

.addon-row-price {
  color: var(--accent-2);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 48px;
}

.feature-matrix {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
}

.feature-matrix th,
.feature-matrix td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid var(--divider);
}

.feature-matrix th:first-child,
.feature-matrix td:first-child {
  text-align: left;
  color: var(--text);
}

.feature-matrix thead th {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.feature-matrix tbody td {
  color: var(--text-muted);
}

.feature-matrix tbody td:not(:first-child) {
  color: var(--text);
}

/* Consultations escalation ladder */

.ladder-rung {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .ladder-rung { grid-template-columns: 1fr; }
}

.ladder-rung-index {
  font-family: 'Montserrat', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: var(--accent-2);
  opacity: 0.5;
  line-height: 1;
}

.ladder-rung-body p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 18px;
  max-width: 720px;
}

.ladder-rung-body .pricing-card-price {
  margin-bottom: 14px;
}

.callout-box {
  background: var(--panel-bg);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 14px 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  max-width: 720px;
  margin-bottom: 20px;
}

.callout-box a {
  color: var(--accent-2);
}

.chat-history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.chat-card {
  background: var(--panel-bg);
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 20px 24px;
}

.chat-card p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.chat-card p:last-child { margin-bottom: 0; }

.chat-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.chat-card-meta strong {
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
}

/* ============================================================
   Client portal (/account/*). Same sidebar mechanic as admin,
   restyled for the public brand instead of the dense admin look.
   ============================================================ */

.portal-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.portal-sidebar {
  width: 260px;
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
  border-right: 1px solid var(--divider);
  padding: 28px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.portal-sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.portal-sidebar-logo { height: 30px; width: auto; }

.portal-nav-toggle-checkbox { display: none; }
.portal-nav-toggle-label { display: none; }

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-bottom: 40px;
}

.portal-topbar-account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.portal-account-email {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 2px;
  text-align: right;
}

.portal-logout-link {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
}

.portal-sidebar-nav { flex: 1; }
.portal-sidebar-nav ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.portal-sidebar-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  padding: 11px 12px;
  border-radius: 4px;
  border-left: 2px solid transparent;
}

.portal-sidebar-nav a:hover { color: var(--text); background: rgba(0, 102, 255, 0.1); }
.portal-sidebar-nav a.active {
  color: var(--text);
  background: rgba(0, 102, 255, 0.14);
  border-left: 2px solid var(--accent);
  font-weight: 600;
}
.portal-sidebar-nav a.locked { color: var(--text-muted); }
.portal-lock-icon { flex-shrink: 0; opacity: 0.6; }

.portal-main {
  flex: 1;
  min-width: 0;
  padding: 48px 56px 96px;
  max-width: 920px;
}

.portal-page-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.portal-page-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 36px;
}

.portal-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.portal-stat-card {
  background: var(--panel-bg);
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 22px;
}

.portal-stat-value {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 30px;
  margin-bottom: 6px;
}

.portal-stat-label {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-locked-panel {
  text-align: center;
  max-width: 440px;
  margin: 64px auto;
  padding: 40px 32px;
  background: var(--panel-bg);
  border: 1px solid var(--divider);
  border-radius: 4px;
}

.portal-locked-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 102, 255, 0.12);
  color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.portal-locked-panel h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 10px;
}

.portal-locked-panel p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .portal-shell { flex-direction: column; }
  .portal-sidebar {
    width: auto;
    flex: none;
    position: static;
    height: auto;
    padding: 16px 20px;
  }
  .portal-nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
  }
  .portal-nav-toggle-label span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .portal-nav-toggle-checkbox:checked ~ .portal-sidebar-brand .portal-nav-toggle-label span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .portal-nav-toggle-checkbox:checked ~ .portal-sidebar-brand .portal-nav-toggle-label span:nth-child(2) { opacity: 0; }
  .portal-nav-toggle-checkbox:checked ~ .portal-sidebar-brand .portal-nav-toggle-label span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .portal-sidebar-nav {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    margin: 0;
    padding: 0;
  }
  .portal-nav-toggle-checkbox:checked ~ .portal-sidebar-nav {
    max-height: 1000px;
    opacity: 1;
    margin-top: 16px;
  }
  .portal-topbar { justify-content: space-between; flex-wrap: wrap; row-gap: 12px; margin-bottom: 28px; }
  .portal-account-email, .portal-logout-link { text-align: left; }
  .portal-main { padding: 32px 24px 64px; }
}

/* ============================================================
   Book page item selector (book.php). Additive only.
   ============================================================ */

.item-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.item-card {
  text-align: left;
  background: var(--panel-bg);
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 24px 22px;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.item-card:hover,
.item-card:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.item-card-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.item-card-price {
  color: var(--accent-2);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.item-card-blurb {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}
