/* Retire Beyond Borders: shared styles */

@font-face {
  font-family: 'Jost';
  src: url('/assets/fonts/jost.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/assets/fonts/source-serif.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/assets/fonts/source-serif-italic.woff2') format('woff2');
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --navy: #0F1F38;
  --navy-2: #1A2F4E;
  --navy-deep: #0A1527;
  --brass: #C9A96E;
  --brass-hi: #E0C48C;
  --paper: #FFFFFF;
  --mist: #EEF1F6;
  --line: #D3DAE5;
  --ink: #0F1F38;
  --ink-soft: #44526A;
  --link: #14407D;
  --on-dark: rgba(255, 255, 255, 0.86);
  --on-dark-soft: rgba(255, 255, 255, 0.74);
  --error-on-dark: #FFB9AD;
  --display: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --text: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --wrap: 1120px;
  --measure: 46rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0;
}
h1 { font-size: clamp(2.25rem, 5.2vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.dark :focus-visible { outline-color: var(--brass); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--brass); color: var(--navy);
  padding: 10px 16px; border-radius: 6px; font-family: var(--display); font-weight: 600;
}
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border: 2px solid var(--brass); border-radius: 6px;
  background: var(--brass); color: var(--navy);
  font-family: var(--display); font-weight: 600; font-size: 1.0625rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--brass-hi); border-color: var(--brass-hi); }
.btn:disabled { opacity: 0.7; cursor: progress; }
.btn-quiet { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-quiet:hover { background: var(--mist); border-color: var(--navy); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 0.95rem; }

/* Header */
.site-header { background: var(--navy); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.brand { display: block; flex: none; }
.brand img { height: 56px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) {
  font-family: var(--display); font-weight: 500; font-size: 0.975rem;
  color: var(--on-dark); text-decoration: none; padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:not(.btn):hover, .nav a[aria-current="page"] { border-bottom-color: var(--brass); color: #fff; }
@media (max-width: 800px) {
  .site-header .wrap { min-height: 72px; }
  .brand img { height: 46px; }
  .nav { gap: 16px; }
  .nav a:not(.btn) { font-size: 0.9rem; }
  .nav a.nav-optional { display: none; }
}

/* Hero: photo on the right, copy on navy on the left */
.hero { background: var(--navy); color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.hero-copy { align-self: center; padding: 72px 56px 80px max(24px, calc((100vw - var(--wrap)) / 2 + 24px)); }
.hero-photo { position: relative; min-height: 600px; background: var(--navy-2); }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.hero h1 { max-width: 14ch; }
.lede { margin-top: 24px; max-width: 34rem; font-size: 1.25rem; line-height: 1.55; color: var(--on-dark); }

.signup { margin-top: 36px; max-width: 34rem; }
.signup label { display: block; margin-bottom: 8px; font-family: var(--display); font-weight: 500; font-size: 0.975rem; }
.signup-row { display: flex; flex-wrap: wrap; gap: 12px; }
.signup input[type="email"] {
  flex: 1 1 220px; min-width: 0; min-height: 52px; padding: 0 16px;
  border: 2px solid #fff; border-radius: 6px; background: #fff; color: var(--navy);
  font-family: var(--text); font-size: 1.0625rem;
}
.signup input[type="email"]::placeholder { color: #6B7789; }
.signup input[type="email"]:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.signup .btn { flex: 1 1 auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin-top: 14px; font-size: 0.9rem; line-height: 1.5; color: var(--on-dark-soft); }
.form-note a { color: #fff; }
.form-msg { min-height: 1.5em; margin-top: 10px; font-family: var(--display); font-weight: 500; font-size: 0.975rem; color: var(--error-on-dark); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; min-height: 0; height: 250px; }
  .hero-copy { padding: 40px 24px 56px; }
  .hero h1 { max-width: 16ch; }
}
@media (max-width: 620px) { .signup .btn { width: 100%; flex-basis: 100%; } }

/* Sections */
.section { padding: 88px 0; }
.section-mist { background: var(--mist); }
.section-head { max-width: 40rem; margin-bottom: 40px; }
.section-head p { margin-top: 14px; color: var(--ink-soft); }
@media (max-width: 700px) { .section { padding: 64px 0; } }

.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.offer { border-top: 3px solid var(--brass); padding-top: 20px; }
.offer p { margin-top: 12px; color: var(--ink-soft); }
@media (max-width: 760px) { .two-up { grid-template-columns: 1fr; gap: 36px; } }

/* Guide cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 0; padding: 0; list-style: none; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brass); }
.card-link { display: flex; flex-direction: column; flex: 1; padding: 24px 24px 22px; text-decoration: none; }
.card h3 { font-size: 1.3rem; }
.card p { margin-top: 10px; color: var(--ink-soft); font-size: 1rem; line-height: 1.55; flex: 1; }
.card .card-meta { margin-top: 16px; font-family: var(--display); font-weight: 500; font-size: 0.9rem; color: var(--ink-soft); }
.card-link:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.section-mist .card { background: #fff; }
@media (max-width: 980px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }
.more-link { margin-top: 32px; font-family: var(--display); font-weight: 500; }

/* About blocks */
.about { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 64px; align-items: center; }
.photo-frame { position: relative; padding: 28px; }
.photo-frame::before, .photo-frame::after { content: ''; position: absolute; width: 72px; height: 72px; border: 2px solid var(--brass); }
.photo-frame::before { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.photo-frame::after { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.photo-frame img { display: block; width: 100%; height: auto; }
.about-copy p { margin-top: 18px; max-width: 34rem; }
.about-copy h2 { margin-bottom: 4px; }
.notice { background: var(--mist); border-left: 4px solid var(--brass); padding: 28px; }
.notice p { margin-top: 12px; color: var(--ink-soft); font-size: 1rem; }
.notice h3 { font-size: 1.2rem; }
.notice-wide { margin-top: 64px; max-width: 52rem; }
.section-mist .notice { background: #fff; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 28px; } .notice-wide { margin-top: 40px; } }

/* FAQ */
.faq { max-width: var(--measure); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px 0; cursor: pointer; list-style: none;
  font-family: var(--display); font-weight: 500; font-size: 1.2rem; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy);
  transform: rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 0 22px; max-width: 40rem; color: var(--ink-soft); }

/* Closing call to action */
.cta { position: relative; isolation: isolate; overflow: hidden; background: var(--navy-2); color: #fff; padding: 88px 0; }
.cta-bg { position: absolute; inset: 0; z-index: -2; }
.cta-bg img { width: 100%; height: 100%; object-fit: cover; }
.cta::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 21, 39, 0.93), rgba(10, 21, 39, 0.72)); }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.cta p.lede { margin-top: 16px; }
.cta .signup { margin-top: 0; }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; gap: 32px; } .cta { padding: 64px 0; } }

/* Footer */
.site-footer { background: var(--navy-deep); color: var(--on-dark-soft); padding: 56px 0 48px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; align-items: start; }
.site-footer .brand img { height: 52px; }
.footer-blurb { margin-top: 18px; max-width: 26rem; font-size: 0.95rem; line-height: 1.6; }
.footer-title { font-family: var(--display); font-weight: 500; font-size: 0.95rem; color: #fff; margin-bottom: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; font-family: var(--display); font-weight: 500; font-size: 0.975rem; margin: 0; padding: 0; list-style: none; }
.footer-links a, .footer-links button {
  color: var(--on-dark); background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.copyright { margin-top: 36px; font-size: 0.85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Article pages */
.breadcrumb { font-family: var(--display); font-weight: 500; font-size: 0.9rem; color: var(--ink-soft); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: '/'; margin-right: 10px; color: var(--line); }
.breadcrumb a { color: var(--ink-soft); }
.page-head { max-width: var(--measure); margin: 0 auto; padding: 40px 24px 0; }
.page-head.wide { max-width: var(--wrap); }
.page-head h1 { max-width: 22ch; margin-top: 22px; font-size: clamp(2rem, 4.6vw, 3.1rem); }
.page-head .standfirst { margin-top: 20px; max-width: 40rem; font-size: 1.25rem; line-height: 1.55; color: var(--ink-soft); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 22px; font-family: var(--display); font-weight: 500; font-size: 0.925rem; color: var(--ink-soft); }
.banner { margin-top: 36px; height: 280px; overflow: hidden; background: var(--navy-2); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .banner { height: 180px; } }

.article { max-width: var(--measure); margin: 0 auto; padding: 48px 24px 24px; }
.article > section { margin-top: 48px; }
.article > section:first-of-type { margin-top: 0; }
.article h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.article h3 { margin-top: 28px; }
.article p { margin-top: 16px; }
.article ul, .article ol { margin: 16px 0 0; padding-left: 1.3rem; }
.article li { margin-top: 8px; }
.article a { color: var(--link); }
.article em { font-style: italic; }

.takeaways { background: var(--mist); border-left: 4px solid var(--brass); padding: 26px 28px; margin: 0 0 40px; }
.takeaways h2 { font-size: 1.35rem; }
.takeaways ul { margin-top: 12px; }
.toc { margin: 0 0 8px; padding: 0 0 28px; border-bottom: 1px solid var(--line); }
.toc h2 { font-size: 1.1rem; }
.toc ol { margin: 12px 0 0; padding-left: 1.3rem; }
.toc li { margin-top: 6px; font-size: 1rem; }

.table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--line); }
.table-wrap:focus-visible { outline: 3px solid var(--navy); }
table.data { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; min-width: 34rem; }
table.data caption { text-align: left; padding: 14px 16px; font-family: var(--display); font-weight: 500; font-size: 1.05rem; background: var(--mist); }
table.data th, table.data td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
table.data thead th { font-family: var(--display); font-weight: 500; font-size: 0.95rem; background: #fff; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
.table-note { margin-top: 10px; font-size: 0.925rem; color: var(--ink-soft); line-height: 1.5; }

.callout { margin-top: 24px; padding: 22px 24px; border: 1px solid var(--line); border-left: 4px solid var(--navy); background: #fff; }
.callout h3 { margin-top: 0; font-size: 1.15rem; }
.callout p { margin-top: 10px; }

.inline-cta { margin: 48px 0 0; padding: 32px 28px; background: var(--navy); color: #fff; }
.inline-cta h2 { font-size: 1.6rem; color: #fff; }
.inline-cta p { margin-top: 10px; color: var(--on-dark); }
.inline-cta .signup { margin-top: 22px; }

.sources ol { padding-left: 1.3rem; }
.sources li { margin-top: 10px; font-size: 1rem; }
.sources .src-note { margin-top: 6px; font-size: 0.925rem; color: var(--ink-soft); }
.disclaimer { margin-top: 40px; padding: 22px 24px; background: var(--mist); font-size: 0.975rem; line-height: 1.6; color: var(--ink-soft); }
.disclaimer strong { font-family: var(--display); font-weight: 500; color: var(--ink); }

.related { max-width: var(--wrap); margin: 0 auto; padding: 24px 24px 88px; }
.related h2 { font-size: 1.6rem; margin-bottom: 24px; }

/* Legal and thank-you pages */
.doc { max-width: var(--measure); margin: 0 auto; padding: 56px 24px 96px; }
.doc h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); margin-top: 20px; }
.doc h2 { font-size: 1.5rem; margin-top: 40px; }
.doc p, .doc ul { margin-top: 14px; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-top: 6px; }
.doc a { color: var(--link); }
.doc .updated { color: var(--ink-soft); font-size: 1rem; margin-top: 10px; }
.back { font-family: var(--display); font-weight: 500; }

.thanks-banner { height: 220px; overflow: hidden; background: var(--navy); }
.thanks-banner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.thanks-steps { margin: 32px 0 0; padding: 0; list-style: none; counter-reset: step; }
.thanks-steps li { position: relative; padding: 0 0 28px 56px; counter-increment: step; margin-top: 0; }
.thanks-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border: 2px solid var(--brass); border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); font-weight: 600; color: var(--navy);
}
.thanks-steps h3 { margin: 0 0 4px; }
.thanks-steps p { color: var(--ink-soft); margin-top: 0; }
.share { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.share-msg { margin-top: 10px; font-family: var(--display); font-weight: 500; font-size: 0.95rem; min-height: 1.4em; }

/* Cookie notice */
.cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: #fff; color: var(--navy); border-top: 3px solid var(--brass);
  box-shadow: 0 -12px 40px rgba(10, 21, 39, 0.18);
}
.cookie .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 20px; padding-bottom: 20px; }
.cookie p { font-size: 1rem; line-height: 1.5; max-width: 46rem; }
.cookie a { color: var(--link); }
.cookie-actions { display: flex; gap: 12px; flex: none; }
@media (max-width: 760px) {
  .cookie .wrap { flex-direction: column; align-items: stretch; gap: 16px; }
  .cookie-actions .btn { flex: 1; }
}

@media print {
  .site-header, .site-footer, .cookie, .inline-cta, .cta, .related { display: none !important; }
  body { font-size: 11pt; }
}
