/*!
 * PrivacySafe Foundation Learn Online: page styles.
 * Tokens and component rules are taken from css/foundation.css on
 * privacysafe.foundation so these pages match the site. Only the components
 * the pages use are included, so they work from any folder.
 */

:root {
  --ink: #001235;
  --navy: #002753;
  --deep: #003566;
  --card: #04294B;
  --text: #FFFFFF;
  --mist: #D6EEF0;
  --body: #BBD6E8;
  --quiet: #8FB3CC;
  --green: #4FD1A5;
  --teal: #5CC8C6;
  --blue: #63B3E8;
  --orange: #FF7A45;
  --graphic-green: #20AA8A;
  --graphic-blue: #2077B6;
  --line: rgba(214, 238, 240, .14);
  --line-strong: rgba(214, 238, 240, .26);
  --fs-label: 14px;
  --fs-small: 17px;
  --fs-body: 19px;
  --fs-lead: clamp(21px, 2.2vw, 26px);
  --fs-h3: 24px;
  --fs-h2: clamp(2rem, 4.4vw, 3.8rem);
  --fs-h1: clamp(2.25rem, 4.9vw, 4.1rem);
  --gap-header: 22px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow: 0 18px 70px rgba(0, 6, 20, .42);
  --max: 1440px;
  color-scheme: dark;
  --font: "Inter", "Liberation Sans", "Helvetica Neue", Helvetica, Arial,
    "DejaVu Sans", Roboto, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "DejaVu Sans Mono", "Liberation Mono", Menlo,
    Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  color: var(--body);
  background:
    radial-gradient(circle at 14% 6%, rgba(32, 119, 182, .22), transparent 30rem),
    radial-gradient(circle at 86% 12%, rgba(56, 164, 162, .18), transparent 32rem),
    radial-gradient(circle at 50% 78%, rgba(32, 170, 138, .12), transparent 36rem),
    var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
img, video { max-width: 100%; }
body > main { flex: 1 0 auto; }
body > footer { flex: 0 0 auto; }
h1, h2, h3, h4, p, ul, ol, figure { margin-top: 0; }
h1, h2, h3, h4 { color: var(--text); font-weight: 700; font-kerning: normal; }
h1 { font-size: var(--fs-h1); line-height: 1.18; letter-spacing: -.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.18; letter-spacing: -.012em; }
h3 { font-size: var(--fs-h3); line-height: 1.18; }
p { line-height: 1.62; }

.wrap { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.section { padding: 34px 0; }
.band { background: linear-gradient(180deg, rgba(0, 39, 83, 0), rgba(0, 39, 83, .55) 18%, rgba(0, 39, 83, 0)); }
.section-head { max-width: 104ch; margin-bottom: 22px; }
.section-head h2 { margin-bottom: 10px; }
.section-head.center { max-width: none; text-align: center; }
.section-head.center > * { margin-inline: auto; }
.kicker { color: var(--body); margin-bottom: 0; line-height: 1.55; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  padding: 12px 18px; border-radius: 0 0 12px 0;
  background: var(--green); color: var(--ink); font-weight: 700;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

/* header */
.topbar {
  position: sticky; top: 0; z-index: 60; padding: 14px 0;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(0, 18, 53, .92), rgba(0, 18, 53, .66));
  border-bottom: 1px solid rgba(214, 238, 240, .07);
}
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 64px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 20px;
  background: rgba(0, 39, 83, .72); box-shadow: 0 8px 34px rgba(0, 6, 20, .3);
}
.brand { display: flex; align-items: center; text-decoration: none; min-width: 0; }
.brand-logo { display: block; width: clamp(196px, 17vw, 262px); height: auto; }
.navlinks { display: flex; gap: 4px; align-items: center; }
.navlinks a { padding: 9px 13px; font-size: var(--fs-small); color: var(--body); border-radius: 11px; transition: background .16s ease, color .16s ease; }
.navlinks a:hover, .navlinks a:focus-visible { color: var(--text); background: rgba(214, 238, 240, .09); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 0 22px;
  font-size: var(--fs-body); font-weight: 600; letter-spacing: -.005em; text-align: center; text-decoration: none; cursor: pointer;
  border: 2px solid var(--green); border-radius: var(--radius-pill);
  background: transparent; color: var(--text);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-1px); background: rgba(79, 209, 165, .14); box-shadow: 0 10px 26px rgba(32, 170, 138, .18); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.primary { background: var(--green); color: var(--ink); }
.btn.primary:hover, .btn.primary:focus-visible { background: #6FDDB6; border-color: #6FDDB6; box-shadow: 0 12px 30px rgba(32, 170, 138, .28); }
.btn.ghost { border-color: var(--line-strong); color: var(--body); }
.btn.ghost:hover, .btn.ghost:focus-visible { border-color: var(--blue); background: rgba(214, 238, 240, .08); box-shadow: 0 10px 26px rgba(0, 6, 20, .28); color: var(--text); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: var(--fs-small); }
.btn .ico { width: 18px; height: 18px; }
.ico { display: block; flex: 0 0 auto; max-width: 100%; max-height: 100%; }

/* hero */
.hero { padding: var(--gap-header) 0 34px; }
.hero-copy.center { max-width: none; text-align: center; }
.hero-copy.center > * { margin-inline: auto; }
.hero-copy.center .lead { max-width: 62ch; }
.hero-copy.center .hero-actions { justify-content: center; }
.hero h1 { margin: 22px 0 16px; text-wrap: balance; }
.accent-green { color: var(--green); }
.lead { color: var(--mist); font-size: var(--fs-lead); line-height: 1.52; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 26px; }

/* video stage */
.stage {
  max-width: 1120px;
  margin: 26px auto 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(32, 119, 182, .16), rgba(4, 41, 75, .9));
  box-shadow: var(--shadow);
}
.stage video {
  display: block; width: 100%; aspect-ratio: 16 / 9; height: auto;
  object-fit: contain; border-radius: 14px; background: var(--ink);
  border: 1px solid rgba(214, 238, 240, .12);
}
.stage video img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; }
.stage video p { margin: 10px 2px 0; color: var(--quiet); font-size: var(--fs-small); line-height: 1.5; }
.media-caption { margin: 12px 2px 0; color: var(--quiet); font-size: var(--fs-small); line-height: 1.5; }
.media-caption strong { color: var(--green); }

/* welcome */
.welcome { max-width: none; margin: 0; }
.welcome h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: 16px; }
.welcome p { color: var(--body); }
.pullout {
  margin: 22px 0 0; padding: 16px 20px;
  border: 1px solid var(--line); border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(32, 170, 138, .07); line-height: 1.6;
}
.pullout-lead { color: var(--green); }
code {
  font-family: var(--mono); font-size: .92em; color: var(--mist);
  background: rgba(0, 18, 53, .55); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px;
}

/* lesson cards */
.site-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.site-card {
  min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, rgba(32, 119, 182, .10), rgba(214, 238, 240, .015)), rgba(4, 41, 75, .7);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.site-card:hover, .site-card:focus-within {
  transform: translateY(-3px); border-color: rgba(79, 209, 165, .4);
  background: linear-gradient(180deg, rgba(32, 170, 138, .09), rgba(214, 238, 240, .018)), rgba(6, 53, 96, .78);
}
.site-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.site-thumb { position: relative; display: block; height: 210px; overflow: hidden; background: var(--ink); border-bottom: 1px solid var(--line); }
.site-thumb img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: top center; filter: saturate(.9) brightness(.82);
  transition: transform .25s ease, filter .25s ease;
}
.site-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 48%, rgba(0, 12, 32, .34)); pointer-events: none; }
.site-card:hover .site-thumb img, .site-card:focus-within .site-thumb img { transform: scale(1.02); filter: saturate(1) brightness(.96); }
.site-body { display: flex; flex-direction: column; flex: 1; padding: 20px 20px 22px; }
.site-body h3 { margin: 0 0 8px; color: var(--text); }
.site-url { display: block; margin-bottom: 12px; font-family: var(--mono); font-size: var(--fs-small); line-height: 1.35; color: var(--teal); overflow-wrap: anywhere; }
.site-description { display: block; color: var(--body); line-height: 1.55; }
.site-kicker { display: block; margin-top: auto; padding-top: 18px; color: var(--text); font-weight: 700; }
.site-kicker::after { content: " \2197"; color: var(--green); }

/* learning cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(4, 41, 75, .7); box-shadow: 0 14px 42px rgba(0, 6, 20, .24); }
.card h3 { margin-bottom: 9px; }
.card p { margin: 0; color: var(--body); }
.card-icon {
  width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 18px;
  border: 1px solid rgba(79, 209, 165, .3); border-radius: 14px;
  background: rgba(32, 170, 138, .12); color: var(--green);
}
.card-icon .ico { width: 24px; height: 24px; }

/* footer */
footer { padding: 34px 0 42px; color: var(--body); }
.footer-inner { border-top: 1px solid var(--line); padding-top: 22px; display: grid; justify-items: center; gap: 16px; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; align-content: start; }
.footer-links a { padding: 8px 10px; color: var(--body); border-radius: 11px; transition: background .16s ease, color .16s ease; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--text); background: rgba(214, 238, 240, .09); }
.fine { width: 100%; justify-self: stretch; line-height: 1.62; margin: 0; text-align: left; }

/* text links inside prose: dotted underline, per WCAG 1.4.1 */
:where(p, li, figcaption, .kicker, .fine, .media-caption) a:not(.btn) {
  color: var(--blue); text-decoration: underline; text-decoration-style: dotted;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
  transition: color .16s ease, text-decoration-color .16s ease;
}
:where(p, li, figcaption, .kicker, .fine, .media-caption) a:not(.btn):hover,
:where(p, li, figcaption, .kicker, .fine, .media-caption) a:not(.btn):focus-visible { color: var(--mist); text-decoration-style: solid; }

@media (max-width: 1060px) {
  .navlinks { display: none; }
  .grid-3, .site-grid { grid-template-columns: 1fr; }
  .site-thumb { height: 190px; }
}
@media (max-width: 760px) {
  .wrap { width: min(100% - 28px, var(--max)); }
  .nav { border-radius: 18px; }
  .brand-logo { width: min(200px, 54vw); }
  .nav-actions .btn.ghost { display: none; }
  .hero { padding-top: 14px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .section { padding: 26px 0; }
  .stage { padding: 12px; }
  .site-thumb { height: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none; animation: none; }
  .btn:hover, .btn:focus-visible, .btn:active,
  .site-card:hover, .site-card:focus-within,
  .site-card:hover .site-thumb img, .site-card:focus-within .site-thumb img { transform: none; }
}

/* quick start panel */
.quick { max-width: 980px; margin: 26px auto 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(160deg, rgba(32, 119, 182, .16), rgba(4, 41, 75, .9)); box-shadow: var(--shadow); text-align: left; }
.quick h2 { font-size: 1.35rem; margin: 0 0 12px; }
pre.code { margin: 0; background: var(--ink); color: var(--mist); border: 1px solid rgba(214, 238, 240, .14); border-radius: 14px; padding: 16px 20px; font-family: var(--mono); font-size: 15.5px; line-height: 1.7; overflow-x: auto; white-space: pre; }
pre.code .c { color: var(--quiet); }
.quick p.media-caption { margin-top: 14px; }

.versions { margin: 22px 0 0; text-align: center; color: var(--body); font-size: var(--fs-small); }

/* Foundation footer: newsletter card, support and follow panels, social links */
.newsletter { padding-top: 10px; }
.newsletter-card { padding: 22px 26px 18px; }
.newsletter-head { display: flex; gap: 18px; align-items: flex-start; }
.newsletter-icon { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 12px; }
.newsletter-title { font-size: 1.3rem; line-height: 1.25; margin: 0 0 6px; color: var(--text); letter-spacing: 0; }
.newsletter-text p { margin: 0; }
.card-footnote-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.newsletter-note { margin: 18px 0 0; font-size: var(--fs-small); color: var(--quiet); }
.footer-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-bottom: 34px; }
.footer-panel { padding: 28px 30px 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(150deg, rgba(4, 41, 75, .82), rgba(0, 26, 62, .74)); box-shadow: 0 14px 42px rgba(0, 6, 20, .24); }
.footer-panel h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); line-height: 1.1; margin: 10px 0 14px; color: var(--text); }
.footer-panel p { margin: 0 0 14px; }
.footer-logo { display: block; width: auto; height: 62px; max-width: 100%; }
.social-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.social-link { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(92, 200, 198, .6); color: var(--text); transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.social-link:hover, .social-link:focus-visible { background: rgba(79, 209, 165, .16); border-color: var(--green); transform: translateY(-1px); }
.social-link .ico { width: 20px; height: 20px; }
@media (max-width: 860px) { .footer-panels { grid-template-columns: minmax(0, 1fr); } .newsletter-head { flex-direction: column; gap: 10px; } }
@media (prefers-reduced-motion: reduce) { .social-link { transition: none; } .social-link:hover, .social-link:focus-visible { transform: none; } }

/* two-column card grid, used on the lessons index */
@media (min-width: 861px) { .site-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* two-column grids that end with a full-width card when the count is odd */
@media (min-width: 861px) {
  .grid-3.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-grid.two > :last-child:nth-child(odd), .grid-3.two > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .site-grid.two > .site-card:last-child:nth-child(odd) .site-link { flex-direction: row; }
  .site-grid.two > .site-card:last-child:nth-child(odd) .site-thumb { flex: 0 0 42%; height: auto; min-height: 210px; border-bottom: 0; border-right: 1px solid var(--line); }
}

/* near-square video stage and a text description below it */
.stage.portrait { max-width: 760px; }
.stage.portrait video { aspect-ratio: 9 / 8; }
.media-alt { margin: 14px 2px 0; color: var(--body); }
.media-alt summary { cursor: pointer; color: var(--green); font-weight: 600; }
.media-alt ol { margin: 10px 0 0; padding-left: 22px; line-height: 1.55; }

/* age notice: asks, does not check, stores nothing */
.age-modal { width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; margin: auto; padding: 34px 32px 26px; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--navy); color: var(--text); text-align: center; box-shadow: 0 24px 70px rgba(0, 6, 20, .6); }
.age-modal::backdrop { background: rgba(0, 8, 24, .82); backdrop-filter: blur(5px); }
.age-badge { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 16px; border: 3px solid var(--orange); border-radius: 50%; font-size: 1.55rem; font-weight: 800; line-height: 1; color: var(--text); }
.age-modal h2 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 12px; color: var(--text); letter-spacing: 0; }
.age-modal p { margin: 0 0 12px; }
.age-modal .age-small { font-size: .92rem; line-height: 1.5; color: var(--mist); margin: 14px 0 0; }
.age-modal .age-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.age-modal .age-actions .btn { width: 100%; justify-content: center; padding-top: 14px; padding-bottom: 14px; font-size: 1.05rem; text-align: center; }
.age-modal .age-link { display: inline-block; margin-top: 12px; padding: 6px 10px; border: 0; background: none; color: var(--mist); font: inherit; font-size: .92rem; text-decoration: underline; cursor: pointer; }
.age-modal .age-link:hover, .age-modal .age-link:focus-visible { color: var(--text); }
.age-modal .age-result { margin: 8px 0 0; color: var(--text); }
.age-modal .age-result:empty { display: none; }
@media (max-width: 480px) { .age-modal .age-actions { grid-template-columns: 1fr; } }
.age-badge[hidden] { display: none; }
.age-modal .age-count { margin: 4px 0 8px; font-size: .98rem; color: var(--mist); }
.age-modal .age-bar { height: 6px; margin: 16px auto 16px; max-width: 360px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.age-modal .age-bar span { display: block; height: 100%; width: 100%; background: var(--orange); }
html:has(.age-modal[open]) { overflow: hidden; }
.age-notice { max-width: 920px; margin: 0 auto; padding: 24px 28px; border: 1px solid var(--line-strong); border-left: 6px solid var(--orange); border-radius: var(--radius-lg); background: rgba(4, 41, 75, .7); box-shadow: 0 14px 42px rgba(0, 6, 20, .24); }
.age-notice h2 { font-size: 1.5rem; line-height: 1.2; margin: 0 0 10px; color: var(--text); letter-spacing: 0; }
.age-notice p { margin: 0 0 12px; }
.age-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.age-result { margin: 12px 0 0; min-height: 1.5em; color: var(--mist); }
.age-result .btn { margin-top: 8px; }
.age-actions[hidden] { display: none; }

/* full-width text blocks, and the materials panel on lesson pages */
.welcome { max-width: none; margin: 0; }
.materials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 26px; }
.materials-card { padding: 22px 26px 12px; }
.materials-card h3 { margin: 0 0 4px; font-size: var(--fs-h3); color: var(--text); }
.materials-note { margin: 0 0 14px; color: var(--quiet); font-size: var(--fs-small); line-height: 1.5; }
.materials-list { list-style: none; margin: 0; padding: 0; }
.materials-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.materials-label { flex: 1 1 11em; color: var(--text); font-weight: 600; }
.materials-label small { display: block; color: var(--quiet); font-weight: 400; font-size: var(--fs-small); }
.materials-links { display: flex; flex-wrap: wrap; gap: 8px; }
.materials-file { font-family: var(--mono); font-size: 16px; }
.materials > .materials-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 860px) { .materials { grid-template-columns: minmax(0, 1fr); } }
