/* ==========================================================================
   UK BRIGHT MINDS — LEGAL & POLICY PAGES STYLESHEET
   Matches brand tokens, typography, and responsive layouts
   ========================================================================== */

:root {
  --paper: #f8f6f1;
  --paper-deep: #f1efeb;
  --paper-card: #ffffff;
  --ink: #20211f;
  --muted: #60635f;
  --muted-light: #878c85;
  --green: #58c9b9;
  --green-light: #dff5f1;
  --green-dark: #1b7a6c;
  --green-tint: rgba(27, 122, 108, 0.08);
  --lime: #ffc653;
  --orange: #e99ac6;
  --amber: #e68e14;
  --amber-light: #fdf8ee;
  --rose: #d93d5b;
  --rose-light: #fdf2f4;
  --line: rgba(32, 33, 31, .12);
  --line-strong: rgba(32, 33, 31, .2);
  --white: #fff;
  --shadow: 0 24px 70px rgba(31, 40, 37, .13);
  --shadow-sm: 0 4px 18px rgba(31, 40, 37, .06);
  --shadow-md: 0 10px 30px rgba(31, 40, 37, .08);
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --brand-navy: #123e76;
  --brand-red: #d9193e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand-navy); outline-offset: 4px; }

.wrap { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }

/* Top Announcement */
.announcement {
  background: #eeece6;
  color: var(--ink);
  text-align: center;
  padding: 10px 20px;
  font-size: 12px;
  letter-spacing: .01em;
  border-bottom: 1px solid rgba(32, 33, 31, .06);
}
.announcement strong { color: #19796e; font-weight: 750; }
.announcement a { color: var(--green-dark); text-decoration: underline; font-weight: 650; margin-left: 6px; }

/* Sticky Header */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 246, 241, .95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(31, 48, 42, .08);
}
.nav-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.045em;
  color: var(--brand-navy);
  flex-shrink: 0;
}
.brand-logo-crop {
  position: relative;
  display: block;
  width: 42px;
  height: 40px;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-logo-crop img {
  position: absolute;
  width: 88px;
  max-width: none;
  height: 88px;
  top: -12px;
  left: -22px;
}
.brand-type { display: flex; flex-direction: column; gap: 2px; }
.brand-type small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
  color: #405149;
}
.nav-links a { transition: color .18s ease; font-weight: 550; }
.nav-links a:hover { color: var(--green-dark); }
.nav-links a.active { color: var(--green-dark); font-weight: 700; }

.nav-cta, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  padding: 0 22px;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
  text-decoration: none;
}
.nav-cta:hover, .button:hover {
  background: #42b5a5;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(88, 201, 185, .32);
}
.button.secondary {
  color: var(--green-dark);
  background: white;
  border: 1.5px solid var(--line);
}
.button.secondary:hover {
  background: var(--green-light);
  border-color: var(--green-dark);
  box-shadow: none;
}

/* Breadcrumbs */
.breadcrumbs-bar {
  padding: 16px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--green-dark);
  font-weight: 600;
  transition: opacity .15s;
}
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs-sep { color: var(--muted-light); }
.breadcrumbs-current { color: var(--ink); font-weight: 650; }

/* Policy Hero */
.policy-hero {
  padding: 28px 0 44px;
  border-bottom: 1px solid var(--line);
}
.policy-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--green-light);
  border: 1px solid rgba(27, 122, 108, .2);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 14px;
}
.policy-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-dark);
}
.policy-title {
  margin: 0 0 14px;
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 820;
  letter-spacing: -.04em;
  line-height: 1.15;
  color: var(--ink);
}
.policy-subtitle {
  margin: 0 0 20px;
  font-size: 17px;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.6;
}
.policy-meta-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.meta-item { display: inline-flex; align-items: center; gap: 7px; }
.meta-item strong { color: var(--ink); }

/* Policy Content Grid */
.policy-main-section {
  padding: 48px 0 80px;
}
.policy-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

/* Sticky Sidebar Table of Contents */
.policy-sidebar {
  position: sticky;
  top: 96px;
  background: var(--paper-card);
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.sidebar-title {
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--green-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.toc-link {
  display: block;
  font-size: 12.5px;
  color: #43544d;
  padding: 7px 11px;
  border-radius: 8px;
  transition: all .18s ease;
  line-height: 1.4;
  border-left: 2.5px solid transparent;
}
.toc-link:hover {
  background: var(--paper-deep);
  color: var(--green-dark);
  border-left-color: var(--green);
  padding-left: 14px;
}
.toc-divider {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.sidebar-cta-card {
  background: var(--amber-light);
  border: 1.5px solid rgba(230, 142, 20, 0.28);
  border-radius: 14px;
  padding: 16px;
  font-size: 12px;
}
.sidebar-cta-card strong {
  display: block;
  color: #92400e;
  font-size: 13px;
  margin-bottom: 4px;
}
.sidebar-cta-card p {
  margin: 0 0 12px;
  color: #78350f;
  line-height: 1.5;
}
.sidebar-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #92400e;
  font-size: 11.5px;
  text-decoration: underline;
}

/* Article Body */
.policy-article {
  background: var(--paper-card);
  padding: 44px 50px;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: #2e3532;
  font-size: 15px;
  line-height: 1.75;
}

.policy-article h2 {
  font-size: 24px;
  font-weight: 780;
  color: var(--ink);
  letter-spacing: -.03em;
  margin: 38px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.policy-article h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.policy-article h2 .sec-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--green-dark);
}
.policy-article h3 {
  font-size: 18px;
  font-weight: 720;
  color: var(--ink);
  letter-spacing: -.02em;
  margin: 24px 0 10px;
  scroll-margin-top: 96px;
}
.policy-article p {
  margin: 0 0 16px;
}
.policy-article ul, .policy-article ol {
  margin: 0 0 20px;
  padding-left: 24px;
}
.policy-article li {
  margin-bottom: 8px;
}
.policy-article strong {
  color: var(--ink);
  font-weight: 700;
}

/* Callout Highlights */
.callout {
  margin: 24px 0;
  padding: 20px 24px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.65;
}
.callout-info {
  background: var(--green-light);
  border-left: 4.5px solid var(--green-dark);
  color: #164f45;
}
.callout-amber {
  background: var(--amber-light);
  border-left: 4.5px solid var(--amber);
  color: #78350f;
}
.callout-rose {
  background: var(--rose-light);
  border-left: 4.5px solid var(--rose);
  color: #881337;
}
.callout strong { display: block; margin-bottom: 5px; font-size: 15px; }

/* Tables */
.policy-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}
.policy-table th {
  background: var(--paper-deep);
  color: var(--ink);
  font-weight: 720;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.policy-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(32, 33, 31, .07);
  vertical-align: top;
}
.policy-table tr:last-child td { border-bottom: 0; }
.policy-table tr:nth-child(even) td { background: rgba(248, 246, 241, .45); }

/* Contact Card Box */
.contact-highlight-box {
  background: linear-gradient(135deg, #f7faf8 0%, #edf7f4 100%);
  border: 1.5px solid rgba(27, 122, 108, .2);
  border-radius: 18px;
  padding: 28px 32px;
  margin: 36px 0 16px;
}
.contact-highlight-box h3 {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 19px;
  font-weight: 780;
}
.contact-highlight-box p {
  margin: 0 0 16px;
  font-size: 14px;
  color: #3b4e47;
}
.contact-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.contact-channel-item {
  background: #ffffff;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(27, 122, 108, .12);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.contact-channel-label {
  font-size: 10.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.contact-channel-val {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--green-dark);
  word-break: break-all;
}
.contact-channel-val:hover { text-decoration: underline; }

/* Enhanced Modern Footer */
footer.legal-footer {
  background: #eae8e0;
  padding: 60px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer-top-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-col-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-logo-link { display: inline-block; width: 140px; }
.footer-logo-link img { width: 100%; height: auto; object-fit: contain; }
.footer-brand-desc {
  font-size: 13px;
  color: #49544e;
  line-height: 1.6;
  max-width: 320px;
  margin: 0;
}
.footer-tagline-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.footer-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  color: #2e433a;
}
.footer-col h4 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink);
}
.footer-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-link-list a {
  color: #405149;
  transition: color .18s;
  font-size: 13px;
}
.footer-link-list a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}
.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 12.5px;
}
.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #405149;
}
.footer-contact-list a {
  color: var(--green-dark);
  font-weight: 650;
}
.footer-contact-list a:hover { text-decoration: underline; }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(32, 33, 31, .1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
}
.footer-bottom-copy { color: var(--muted); }
.footer-bottom-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-bottom-links a {
  color: #405149;
}
.footer-bottom-links a:hover {
  color: var(--green-dark);
}

/* Responsive Rules */
@media (max-width: 960px) {
  .policy-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .policy-sidebar {
    position: static;
  }
  .policy-article {
    padding: 32px 28px;
  }
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .policy-article {
    padding: 24px 18px;
    font-size: 14px;
  }
  .policy-article h2 {
    font-size: 20px;
  }
  .policy-title {
    font-size: 28px;
  }
  .nav-inner { min-height: 64px; }
  .nav-links { display: none; }
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
}
