:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  --bg: #f6f7fa;
  --ink: #17233b;
  --muted: #4c5b71;
  --line: #dce2ec;
  --accent: #2553c7;
  --accent-dark: #1d43a2;
  --navy: #111e3a;
  --paper: #fff;
  --radius: 16px;
  --content: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid #6689ef; outline-offset: 4px; }
button, input { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.5vw, 4rem); letter-spacing: -.05em; line-height: 1.09; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); letter-spacing: -.035em; line-height: 1.15; }
h3 { font-size: 1.15rem; line-height: 1.24; }
.container { width: min(var(--content), 100% - 72px); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.skip:focus { position: fixed; z-index: 5; inset: 12px auto auto 12px; padding: 12px 16px; background: white; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); min-height: 76px; }
.brand { color: var(--ink); font-size: 1.65rem; font-weight: 800; letter-spacing: -.07em; text-decoration: none; white-space: nowrap; }
.brand img { width: min(146px, 100%); max-height: 45px; object-fit: contain; object-position: left center; }
.brand-accent { color: var(--accent); }
.navigation { display: flex; flex-wrap: wrap; gap: 12px clamp(15px, 2vw, 30px); align-items: center; }
.navigation a { color: var(--ink); text-decoration: none; font-size: .91rem; font-weight: 600; }
.navigation a:hover, .navigation [aria-current] { color: var(--accent); }
.header-search { display: flex; align-items: center; position: relative; margin-left: auto; }
.header-search input { width: clamp(146px, 17vw, 215px); min-height: 42px; padding: 7px 40px 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font-size: .86rem; }
.search-button { position: absolute; right: 5px; top: 3px; width: 34px; height: 36px; border: 0; padding: 0; background: transparent; color: var(--ink); cursor: pointer; }
.search-icon { position: relative; display: block; margin: 0 auto; width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 2px; background: currentColor; right: -5px; bottom: -2px; transform: rotate(45deg); }

.hero { position: relative; background: var(--navy); color: white; overflow: hidden; }
.hero::before { position: absolute; inset: 0 0 0 43%; content: ""; background: repeating-linear-gradient(0deg, transparent 0 39px, #7294df17 40px), repeating-linear-gradient(90deg, transparent 0 39px, #7294df17 40px), radial-gradient(ellipse at 85% 66%, #253d75, transparent 68%); mask-image: linear-gradient(90deg, transparent, #000 35%); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.83fr) minmax(270px, 1fr); align-items: center; gap: clamp(35px, 5vw, 74px); padding-block: clamp(51px, 5vw, 76px); }
.hero h1 { font-size: clamp(2.55rem, 4.45vw, 4.2rem); text-wrap: initial; font-weight: 740; }
.hero-copy > p { color: #d3def4; font-size: clamp(1rem, 1.5vw, 1.19rem); line-height: 1.58; margin: 24px 0 29px; max-width: 51ch; }
.primary-link { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 48px; padding: 10px 17px; background: var(--accent); border-radius: 8px; color: white; text-decoration: none; font-weight: 650; }
.primary-link:hover { background: var(--accent-dark); color: white; }
.hero .primary-link { background: #e3ecff; color: #1e386e; }
.hero .primary-link:hover { background: white; }
.hero-guide { align-self: center; max-width: 430px; padding: 24px 27px 12px; border: 1px solid #8fadd948; border-radius: 16px; background: #162548e0; }
.guide-label { display: block; color: #b4c8f5; font-size: .9rem; font-weight: 650; margin-bottom: 9px; }
.hero-guide a { display: flex; justify-content: space-between; align-items: start; gap: 15px; padding: 15px 0; border-top: 1px solid #788fb641; color: white; font-size: 1rem; line-height: 1.34; font-weight: 600; text-decoration: none; }
.hero-guide a:hover { color: #b4c8f5; }

.home-content { padding-block: 46px 74px; }
.section-block + .section-block { margin-top: 54px; }
.section-block > h2, .section-heading { margin-bottom: 22px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; }
.section-heading > a { font-weight: 650; white-space: nowrap; }
.topic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.topic-card { display: flex; flex-direction: column; gap: 10px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); padding: 20px; border-radius: 12px; text-decoration: none; }
.topic-card:hover { border-color: #93aae5; }
.topic-heading { display: flex; justify-content: space-between; gap: 8px; line-height: 1.25; font-size: 1.05rem; font-weight: 740; }
.topic-heading > span { color: var(--accent); font-size: .95rem; }
.topic-summary { color: var(--muted); font-size: .91rem; line-height: 1.42; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.card { min-width: 0; display: flex; flex-direction: column; position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card:has(a):hover { border-color: #93aae5; }
.card-media { aspect-ratio: 1.9; background: #e8edf6; border-bottom: 1px solid var(--line); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px; }
.card h3 { font-size: 1.18rem; overflow-wrap: anywhere; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card h3 a::after { position: absolute; inset: 0; content: ""; }
.card h3 a:focus-visible::after { outline: 3px solid #6689ef; outline-offset: -4px; border-radius: var(--radius); }
.card-topic { color: var(--accent-dark); font-size: .79rem; line-height: 1.3; font-weight: 710; }
.card-summary { color: var(--muted); font-size: .94rem; line-height: 1.5; }
time, .byline { color: var(--muted); font-size: .85rem; }
.card time { margin-top: auto; padding-top: 7px; }
.card-text .card-body { border-top: 4px solid #d6e2ff; }

.listing-shell, .error-shell { min-height: 58vh; padding-block: 28px 70px; }
.listing-shell h1 { margin: 20px 0 28px; overflow-wrap: anywhere; }
.breadcrumbs { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.pagination { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 27px; }
.pagination[hidden] { display: none; }
.pagination a { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: white; text-decoration: none; font-weight: 650; }
.directory { display: grid; gap: 12px; max-width: 940px; }
.directory details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 20px; background: white; }
.directory summary { cursor: pointer; padding-block: 4px; font-weight: 700; }
.directory summary span { color: var(--muted); font-weight: 500; padding-left: 9px; }
.directory ul { list-style: none; margin: 10px 0 0; padding: 0; }
.directory li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.directory li a { overflow-wrap: anywhere; }
.directory time { white-space: nowrap; }

.reading-shell { display: grid; grid-template-columns: minmax(0, 835px) minmax(190px, 1fr); align-items: start; gap: 20px 30px; padding-block: 28px 74px; }
.reading-shell > .breadcrumbs { grid-column: 1 / -1; }
.reading { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: clamp(24px, 4.3vw, 60px); }
.reading-header h1 { font-size: clamp(2rem, 4vw, 3.55rem); text-wrap: initial; margin: 9px 0 16px; overflow-wrap: anywhere; }
.byline { display: flex; flex-wrap: wrap; gap: 5px; }
.article-cover { margin: 25px 0 0; }
.article-cover img { border-radius: 10px; max-height: 420px; width: auto; object-fit: contain; }
.prose { min-width: 0; margin-top: 28px; line-height: 1.72; font-size: clamp(1rem, 1.65vw, 1.105rem); overflow-wrap: anywhere; color: #24324a; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure, .prose pre { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-inline-start: 1.5em; }
.prose li + li { margin-top: .35em; }
.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { line-height: 1.22; margin: 1.4em 0 .55em; color: var(--ink); }
.prose img { object-fit: contain; border-radius: 8px; }
.prose figcaption, .prose .caption { margin: .35em 0 1.1em; color: var(--muted); font-size: .88em; }
.prose blockquote, .discussion blockquote { padding: 10px 14px; border-left: 3px solid #9fb8ec; background: var(--bg); }
.prose table { display: block; overflow: auto; max-width: 100%; border-collapse: collapse; margin: 0 0 1.3em; font-size: .93em; }
.prose td, .prose th { border: 1px solid var(--line); padding: .55em; }
.prose th, .prose pre { background: var(--bg); }
.prose pre { display: block; padding: 12px; overflow: auto; }
.discussion { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 25px; }
.discussion blockquote { margin: 1em 0 0; line-height: 1.55; overflow-wrap: anywhere; }
.reading-nav { display: grid; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.reading-nav strong { margin-bottom: 10px; }
.reading-nav a { border-top: 1px solid var(--line); padding: 10px 0; font-size: .93rem; display: flex; justify-content: space-between; gap: 9px; text-decoration: none; }

.search-form { display: flex; max-width: 740px; gap: 9px; margin-bottom: 26px; }
.search-form input { flex: 1; min-width: 0; border: 1px solid #c5cddd; border-radius: 9px; padding: 12px 15px; }
.search-form button { background: var(--accent); color: white; cursor: pointer; border: 0; border-radius: 9px; padding: 11px 20px; font-weight: 650; }
.search-form button:hover { background: var(--accent-dark); }
.result-list { display: grid; gap: 10px; max-width: 900px; margin-top: 15px; }
.result-list article { padding: 17px 21px; border: 1px solid var(--line); border-radius: 12px; background: white; overflow-wrap: anywhere; }
.result-list h2 { font-size: 1.2rem; margin: 5px 0 9px; }
.result-list article p { line-height: 1.42; color: var(--muted); }
.result-list time { display: block; margin-top: 9px; }
#search-info { color: var(--muted); }
.error-shell { padding-top: 65px; }
.error-shell h1 { margin: 12px 0; }
.error-shell p { margin-bottom: 20px; }
.text-link { display: inline-block; margin-left: 10px; font-weight: 650; }

.site-footer { background: #edf0f7; border-top: 1px solid var(--line); }
.footer-content { min-height: 126px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 22px; padding-block: 22px; }
.wordmark { text-decoration: none; font-size: 1.28rem; font-weight: 800; letter-spacing: -.05em; color: var(--ink); }
.footer-content p { color: var(--muted); font-size: .86rem; line-height: 1.42; }
.footer-content nav { justify-self: center; display: flex; gap: 13px; flex-wrap: wrap; }
.footer-content nav a { color: var(--ink); font-size: .88rem; }
.disclosure { max-width: 38ch; justify-self: end; }

@media (max-width: 980px) {
  .container { width: min(var(--content), 100% - 42px); }
  .topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .masthead { gap: 19px; }
  .navigation { gap: 10px 14px; }
  .reading-shell { grid-template-columns: minmax(0, 1fr); }
  .reading-nav { max-width: 420px; }
}
@media (max-width: 740px) {
  .container { width: calc(100% - 32px); }
  .masthead { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(125px, 1fr); gap: 10px 15px; padding-block: 11px; min-height: auto; }
  .navigation { grid-row: 2; grid-column: 1 / -1; gap: 0 12px; padding-top: 2px; }
  .navigation a { min-height: 35px; display: inline-flex; align-items: center; }
  .header-search { grid-row: 1; grid-column: 2; width: 100%; max-width: 230px; }
  .header-search input { width: 100%; }
  .brand img { max-width: 125px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-block: 44px; gap: 24px; }
  .hero h1 { font-size: clamp(2.15rem, 7.9vw, 3.45rem); }
  .hero-copy > p { margin: 15px 0 20px; }
  .hero-guide { width: 100%; max-width: 100%; padding: 17px 18px 7px; }
  .hero-guide a { padding: 12px 0; }
  .home-content { padding-block: 34px 55px; }
  .section-block + .section-block { margin-top: 35px; }
  .topic-grid, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .topic-card, .card-body { padding: 15px; }
  .reading { padding: 23px 18px; }
  .footer-content { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .footer-content nav, .disclosure { justify-self: start; }
}
@media (max-width: 420px) {
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .section-heading { align-items: start; }
  .section-heading > a { white-space: normal; text-align: right; }
  .topic-summary { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
