/* One Life Enrollment — styles for the Privacy, Terms and page-not-found pages.
   Loaded after styles.css. It reuses the brand colours, glass cards and buttons from
   styles.css and adds only what these three pages need. No scripts: styles alone.
   Every class here starts with "doc-" (Privacy and Terms) or "lost-" (page not found). */

/* ---------- Page frame (Privacy and Terms) ---------- */
.doc {
  padding-block: clamp(40px, 7vw, 88px) clamp(16px, 3vw, 32px);
}

/* Privacy uses the full content width, so its edges line up with the top bar and footer,
   as on the home page. Terms is one centred reading column. */
.doc-inner {
  margin-inline: auto;
}

.doc-solo {
  max-width: 820px;
}

/* Page heading: brand tile, big title, date chip */
.doc-head {
  display: grid;
  justify-items: start;
  gap: 18px;
  margin-bottom: clamp(28px, 5vw, 52px);
}

.doc-head-tile {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(60px 40px at 0% 0%, rgba(255, 255, 255, 0.35), transparent 70%),
    var(--grad-solid);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 16px 32px -14px var(--glow);
}

.doc-head-tile svg {
  width: 30px;
  height: 30px;
}

.doc-head h1 {
  color: var(--ink);
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.doc-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--bar);
  border: 1px solid var(--card-edge);
  box-shadow: var(--card-shadow);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.doc-date svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--accent);
}

/* Two columns on wide screens: contents on the left, reading column on the right */
.doc-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 980px) {
  .doc-grid {
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }
}

/* ---------- Contents list (Privacy) ---------- */
.doc-toc.card {
  padding: 18px 14px 14px;
}

.doc-toc-title {
  padding-inline: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.doc-toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.doc-toc a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 550;
  line-height: 1.3;
  text-decoration: none;
}

.doc-toc a:hover {
  color: var(--ink);
  background: var(--line);
}

/* phones, tablets and touch screens: 44px tall to tap */
@media (max-width: 979.98px), (pointer: coarse) {
  .doc-toc a {
    min-height: 44px;
  }
}

@media (min-width: 980px) {
  .doc-toc {
    position: sticky;
    top: 104px;
  }

  .doc-toc ol {
    grid-template-columns: 1fr;
  }

  .doc-toc a {
    position: relative;
    padding-left: 22px;
  }

  /* a small rail mark that lights up on hover */
  .doc-toc a::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 4px;
    height: 4px;
    margin-top: -2px;
    border-radius: 50%;
    background: var(--muted);
    opacity: 0.55;
  }

  .doc-toc a:hover::before {
    background: var(--sky);
    opacity: 1;
  }
}

/* ---------- The short version card (Privacy) ---------- */
.doc-short.card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: clamp(22px, 3.4vw, 32px);
  margin-bottom: clamp(36px, 5vw, 48px);
}

.doc-short h2 {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.doc-short p {
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(1.08rem, 1.7vw, 1.22rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

@media (max-width: 479px) {
  .doc-short.card {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ---------- Long-text sections ---------- */
.doc-body {
  min-width: 0;
}

/* a jump from the contents list lands 16px under the floating top bar (88px), the same as
   the home page's section jumps */
.doc-section {
  scroll-margin-top: 104px;
}

.doc-section + .doc-section {
  margin-top: clamp(28px, 4vw, 40px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--line);
  /* the divider line slips under the bar and the heading lands 16px below it */
  scroll-margin-top: calc(104px - clamp(28px, 4vw, 40px));
}

.doc-section h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-size: clamp(1.3rem, 2.4vw, 1.55rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.doc-tile.icon-tile {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.doc-tile.icon-tile svg {
  width: 21px;
  height: 21px;
}

.doc-section p,
.doc-list,
.doc-contact {
  max-width: 40em;
  margin-top: 14px;
  line-height: 1.7;
  text-wrap: pretty;
}

/* On wider screens the words line up with the heading text, not the icon */
@media (min-width: 640px) {
  .doc-section > :not(h2) {
    margin-left: 56px;
  }
}

.doc a:not(.btn) {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.doc a:not(.btn):hover {
  text-decoration-thickness: 2px;
}

.doc-nowrap {
  white-space: nowrap;
}

/* Bulleted list */
.doc-list {
  display: grid;
  gap: 10px;
}

.doc-list li {
  position: relative;
  padding-left: 26px;
}

.doc-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

/* A short line that deserves to stand out */
.doc-section .doc-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin-top: 20px;
  padding: 12px 18px 12px 14px;
  border-radius: 14px;
  color: var(--ink);
  background: var(--tile-bg);
  border: 1px solid var(--card-edge);
  font-weight: 650;
  line-height: 1.45;
}

.doc-callout svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--tile-ink);
}

/* Contact details: name, phone, email stacked */
.doc-contact {
  display: grid;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  list-style: none;
}

.doc-contact.card {
  padding: 12px 24px 12px 16px;
}

.doc-contact li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  min-width: 0;
  color: var(--ink);
  font-weight: 600;
}

.doc-contact a {
  font-weight: 600;
}

/* the phone and email links fill the row's full 44px height, so they are easy to tap */
.doc-contact li > a {
  display: flex;
  align-items: center;
  align-self: stretch;
  min-width: 0;
}

.doc-contact-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: var(--tile-ink);
  background: var(--tile-bg);
  border: 1px solid var(--card-edge);
}

.doc-contact-icon svg {
  width: 17px;
  height: 17px;
}

/* The section someone jumped to gets a soft ring on its icon */
.doc-section:target .doc-tile {
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.28);
}

/* ---------- Terms: the whole text on one glass sheet ---------- */
.doc-paper.card {
  padding: clamp(22px, 4.6vw, 48px);
}

.doc-paper .doc-contact {
  margin-top: 12px;
}

/* ---------- Phone call bar (styled in styles.css) ----------
   These pages' main area already has the side margins, so the bar does not add its own. */
.doc > .callbar,
.lost > .callbar {
  margin-inline: 0;
}

.lost > .callbar {
  justify-self: stretch;
  align-self: end;
  width: 100%;
}

/* ---------- Footer: mark the page you are on (footer links are styled in styles.css) ---------- */
.footer-col a[aria-current="page"] {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--sky-soft);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* ---------- Page not found ---------- */
.lost {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  /* divided by --zoom: on very wide screens this part is drawn bigger (styles.css), and the
     window height would be scaled with it */
  /* 150px: the top strip and the floating bar. The card then sits in the middle of the first
     screen, and the footer starts just below it. */
  min-height: calc(100vh / var(--zoom, 1) - 150px);
  min-height: calc(100svh / var(--zoom, 1) - 150px);
  padding-block: clamp(40px, 9vw, 112px);
}

.lost-stage {
  position: relative;
  width: 100%;
  max-width: 660px;
}

/* a soft blue glow behind the card */
.lost-stage::before {
  content: "";
  position: absolute;
  inset: 8% 0 -10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  filter: blur(30px);
  opacity: 0.55;
}

.lost-card.card-lit {
  padding: clamp(28px, 6vw, 52px);
}

.lost-tile {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 17px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.lost-tile svg {
  width: 28px;
  height: 28px;
}

.lost-label,
.lost-card h1,
.lost-line,
.lost-actions {
  position: relative;
  z-index: 1;
}

.lost-label {
  margin-top: 26px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lost-card h1 {
  margin-top: 10px;
  color: #fff;
  font-size: clamp(2.1rem, 5.6vw, 3.3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.lost-line {
  max-width: 30em;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.lost-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.lost-btn-home {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 14px 28px -14px rgba(8, 17, 32, 0.6);
}

.lost-btn-home:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px -14px rgba(8, 17, 32, 0.7), 0 0 0 4px rgba(255, 255, 255, 0.22);
}

.lost-btn-call {
  color: #fff;
  background: rgba(8, 17, 32, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.lost-btn-call:hover {
  transform: translateY(-2px);
  background: rgba(8, 17, 32, 0.3);
  border-color: #fff;
}

/* the focus ring must show on the blue card too */
.lost-card :focus-visible {
  outline-color: #fff;
}

.lost-mark {
  position: absolute;
  right: -56px;
  bottom: -64px;
  width: 260px;
  height: 260px;
  opacity: 0.12;
  pointer-events: none;
}

@media (max-width: 479px) {
  .lost-actions .btn {
    width: 100%;
  }
}

/* ---------- More contrast, and Windows high-contrast mode (see styles.css) ---------- */
@media (prefers-contrast: more) {
  .lost-label,
  .lost-line {
    color: #fff;
  }
}

@media (forced-colors: active) {
  .lost-btn-home {
    border: 1px solid;
  }
}

/* ---------- Movement (only for people who have not asked for less motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .doc-d1 {
    animation-delay: 0.1s;
  }

  .doc-d2 {
    animation-delay: 0.2s;
  }

  .doc-toc a {
    transition: background-color 0.2s, color 0.2s;
  }

  .doc-tile.icon-tile {
    transition: box-shadow 0.4s;
  }
}

/* ---------- Printing: plain black on white, no decoration ---------- */
@media print {
  .skip,
  .backdrop,
  .topbar,
  .doc-toc,
  .doc-head-tile,
  .doc-tile,
  .doc-contact-icon,
  .doc-callout svg,
  .doc-date svg,
  .lost-tile,
  .lost-mark,
  .lost-actions {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 11pt;
  }

  .doc,
  .lost {
    min-height: 0;
    padding-block: 0;
  }

  .doc-head h1,
  .doc-section h2,
  .doc-short p,
  .doc-contact li,
  .lost-card h1,
  .lost-label,
  .lost-line {
    color: #000;
  }

  .card,
  .card-lit,
  .doc-date,
  .doc-callout {
    color: #000;
    background: none !important;
    border: 1px solid #999;
    box-shadow: none !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .doc-grid {
    display: block;
  }

  .doc-section > :not(h2) {
    margin-left: 0;
  }

  .doc-section {
    break-inside: avoid;
  }

  .doc-list {
    padding-left: 1.2em;
    list-style: disc;
  }

  .doc-list li {
    padding-left: 0;
  }

  .doc-list li::before {
    display: none;
  }

  a {
    color: #000;
  }

  .footer {
    border-color: #999;
    color: #000;
  }
}
