:root {
  --brand: #1764aa;
  --brand-dark: #0b315c;
  --ink: #17202a;
  --accent: #f6bb21;
  --paper: #f7f4ed;
  --paper-2: #ece7dc;
  --line: #d5cec0;
  --muted: #6f6c65;
  --max: 1240px;
  --reading: 740px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
.skip-link { position: fixed; left: 18px; top: -60px; z-index: 20; background: #fff; padding: 12px 18px; border-radius: 4px; }
.skip-link:focus { top: 18px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  padding: 12px max(24px, calc((100vw - var(--max)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  background: color-mix(in srgb, var(--brand-dark) 94%, black);
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 4px 22px rgb(0 0 0 / .18);
}

.archive-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 20px; letter-spacing: -.02em; }
.archive-brand strong { font-weight: 800; }
.archive-mark { width: 34px; height: 30px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 3px; transform: skew(-12deg); }
.archive-mark i { display: block; background: var(--accent); }
.archive-mark i:nth-child(1) { height: 52%; }
.archive-mark i:nth-child(2) { height: 76%; }
.archive-mark i:nth-child(3) { height: 100%; }

.header-controls { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.company-tools { display: flex; align-items: flex-end; gap: 12px; min-width: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.company-search { position: relative; width: 240px; flex: 0 1 240px; }
.search-input-group { display: flex; min-height: 42px; border: 1px solid rgb(255 255 255 / .4); border-radius: 4px; background: rgb(255 255 255 / .11); }
.search-input-group:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.company-search input { min-width: 0; width: 100%; padding: 11px 10px 11px 13px; border: 0; outline: none; border-radius: 4px; color: #fff; background: transparent; font: inherit; font-size: 13px; }
.company-search input::placeholder { color: rgb(255 255 255 / .85); opacity: 1; }
.company-search button { display: grid; place-items: center; min-width: 42px; padding: 9px; border: 0; border-left: 1px solid rgb(255 255 255 / .2); border-radius: 0 4px 4px 0; color: #fff; background: transparent; cursor: pointer; }
.company-search button:hover { background: rgb(255 255 255 / .14); }
.company-search button svg { width: 20px; height: 20px; }
.search-results { position: absolute; z-index: 15; top: calc(100% + 9px); right: 0; width: min(430px, calc(100vw - 48px)); max-height: min(440px, 65dvh); overflow-y: auto; border: 1px solid var(--line); border-radius: 4px; color: #29231e; background: #fff; box-shadow: 0 16px 45px rgb(0 0 0 / .22); }
.search-results[hidden] { display: none; }
.search-status { margin: 0; padding: 13px 16px; color: #62594e; background: #f4f0e8; font-size: 12px; line-height: 1.5; }
.search-results ul { margin: 0; padding: 0; list-style: none; }
.search-results a { display: block; padding: 15px 16px; border-top: 1px solid #e7e0d4; text-decoration: none; }
.search-results a:hover, .search-results a:focus-visible { background: #fff4e8; }
.search-results strong { display: block; margin-bottom: 5px; font-size: 14px; }
.search-results span { display: block; font-size: 12px; line-height: 1.55; color: #62594e; }
.contribute-link { padding: 10px 13px; color: #fff; border: 1px solid rgb(255 255 255 / .3); border-radius: 4px; font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.contribute-link:hover { background: rgb(255 255 255 / .1); }

.company-picker { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.company-picker select {
  width: 245px;
  padding: 11px 40px 11px 14px;
  border: 1px solid rgb(255 255 255 / .32);
  border-radius: 4px;
  color: #fff;
  background: rgb(255 255 255 / .11);
  font: inherit;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
}
.company-picker option { color: #111; }

.archive-disclosure { padding: 10px max(24px, calc((100vw - var(--max)) / 2)); color: #e7e1d6; background: #20252a; font-size: 11px; line-height: 1.55; }
.archive-disclosure strong { color: var(--accent); }
.archive-disclosure a { margin-left: 5px; color: #fff; font-weight: 800; text-underline-offset: 3px; }

.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(122deg, var(--brand-dark), var(--brand) 70%, color-mix(in srgb, var(--brand) 72%, white)); }
.hero::after { content: ""; position: absolute; inset: 0; opacity: .12; background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0); background-size: 22px 22px; }
.hero-inner { position: relative; z-index: 2; width: min(var(--max), calc(100% - 48px)); margin: auto; padding: clamp(72px, 10vw, 132px) 0 64px; }
.overline, .section-label { margin: 0 0 18px; color: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.hero .overline { color: rgb(255 255 255 / .9); }
.hero h1 { max-width: 950px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(50px, 9vw, 112px); font-weight: 500; line-height: .9; letter-spacing: -.055em; }
.period { margin: 22px 0 0; color: rgb(255 255 255 / .9); font-size: 15px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.standfirst { max-width: 860px; margin: 28px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(22px, 3vw, 36px); line-height: 1.35; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 38px; color: rgb(255 255 255 / .76); font-size: 13px; }
.hero-meta span + span::before { content: "•"; margin-right: 22px; color: var(--accent); }
.hero-route { position: absolute; z-index: 1; right: -10%; bottom: -80px; width: 55%; height: 230px; border-top: 2px solid rgb(255 255 255 / .25); transform: rotate(-8deg); }
.hero-route::before, .hero-route::after { content: ""; position: absolute; width: 78%; border-top: 1px solid rgb(255 255 255 / .18); transform-origin: right; }
.hero-route::before { top: 45px; right: 4%; transform: rotate(16deg); }
.hero-route::after { top: 94px; right: 15%; transform: rotate(-14deg); }
.hero-route i { position: absolute; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.hero-route i:nth-child(1) { left: 10%; }.hero-route i:nth-child(2) { left: 44%; }.hero-route i:nth-child(3) { left: 72%; }.hero-route i:nth-child(4) { left: 92%; }

.profile-band { background: #fff; border-bottom: 1px solid var(--line); }
.profile-band dl { width: min(var(--max), calc(100% - 48px)); margin: auto; padding: 24px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.profile-band dl > div { padding-right: 20px; border-right: 1px solid var(--line); }
.profile-band dl > div:last-child { border-right: 0; }
.profile-band dt { margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.profile-band dd { margin: 0; font-size: 15px; font-weight: 750; }

.reading-layout { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; padding: 80px 0 120px; display: grid; grid-template-columns: 220px minmax(0, var(--reading)); gap: clamp(56px, 9vw, 130px); align-items: start; }
.contents { position: sticky; top: 112px; }
.contents > p { margin: 0 0 18px; font-size: 11px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.contents nav { display: grid; }
.contents nav a { padding: 10px 0; color: #57544f; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.35; text-decoration: none; transition: color .2s, padding .2s; }
.contents nav a:hover { padding-left: 5px; color: var(--brand); }
.contents nav span { display: block; color: var(--brand); font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.sources-jump { display: block; margin-top: 14px; color: var(--brand); font-size: 12px; font-weight: 800; line-height: 1.4; text-decoration: none; }

.story-intro { padding-bottom: 62px; border-bottom: 1px solid var(--line); }
.story-intro h2, .research-note h2, .media-resources h2, .sources h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 5vw, 57px); font-weight: 500; line-height: 1.08; letter-spacing: -.035em; }
.story-intro > p:last-child { margin: 27px 0 0; color: #4b4945; font-family: Georgia, "Times New Roman", serif; font-size: 22px; line-height: 1.65; }

.history-chapter { display: grid; grid-template-columns: 126px minmax(0, 1fr); gap: 32px; padding: 70px 0; border-bottom: 1px solid var(--line); }
.year-marker { padding-top: 9px; }
.year-marker time { display: block; max-width: 100%; color: var(--brand); border-top: 3px solid var(--accent); padding-top: 8px; font-size: 10px; font-weight: 900; line-height: 1.35; letter-spacing: .075em; overflow-wrap: anywhere; text-transform: uppercase; }
.chapter-copy h2 { margin: 0 0 28px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(29px, 4vw, 42px); font-weight: 500; line-height: 1.14; letter-spacing: -.025em; }
.chapter-copy p { margin: 0 0 22px; color: #302f2c; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.82; }
.chapter-copy p:last-child { margin-bottom: 0; }
.chapter-copy .chapter-references { margin-top: 24px; color: var(--muted); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 11px; line-height: 1.6; }
.chapter-references a { color: var(--brand-dark); text-underline-offset: 3px; }
.story-intro .section-label,
.media-resources > .section-label,
.sources > .section-label { color: var(--brand-dark); }
@media (min-width: 861px) {
  .contents { max-height: calc(100dvh - 144px); overflow-y: auto; scrollbar-width: thin; padding-right: 10px; }
}

.research-note { margin: 74px 0; padding: 38px 40px; color: #fff; background: var(--brand-dark); border-top: 5px solid var(--accent); }
.research-note h2 { font-size: 35px; }
.research-note .section-label { color: rgb(255 255 255 / .9); }
.research-note > p:last-child { margin: 22px 0 0; color: rgb(255 255 255 / .82); font-family: Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.75; }

.media-resources { padding: 20px 0 76px; border-bottom: 1px solid var(--line); }
.media-intro { margin: 24px 0 36px; color: #55514a; font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.7; }
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.media-card { overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: 0 14px 34px rgb(30 27 20 / .08); }
.media-visual { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: color-mix(in srgb, var(--brand-dark) 88%, black); }
.media-visual img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .25s ease; }
.media-visual:hover img { transform: scale(1.025); }
.media-video .media-visual::before { content: "HISTORISK FILM"; position: absolute; right: 18px; bottom: 14px; color: rgb(255 255 255 / .22); font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.play-badge { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; display: grid; place-items: center; padding-left: 4px; color: #fff; background: var(--brand); border: 3px solid rgb(255 255 255 / .9); border-radius: 50%; box-shadow: 0 8px 24px rgb(0 0 0 / .35); transform: translate(-50%, -50%); }
.media-copy { padding: 22px; }
.media-copy .media-type { margin: 0 0 10px; color: var(--brand); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.media-copy h3 { margin: 0 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 500; line-height: 1.16; }
.media-copy > p:not(.media-type) { margin: 0 0 16px; color: #5b5750; font-size: 13px; line-height: 1.6; }
.media-copy a { color: var(--brand); font-size: 12px; font-weight: 850; text-underline-offset: 4px; }
.media-copy small { display: block; margin-top: 14px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.archive-notice { margin: 0 0 34px; padding: 22px 24px; background: color-mix(in srgb, var(--brand) 7%, white); border-left: 4px solid var(--accent); }
.archive-notice strong { font-size: 14px; }
.archive-notice p { margin: 7px 0 0; color: #5d5951; font-size: 13px; line-height: 1.6; }
.resource-heading { margin: 42px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 500; }
.resource-list { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; }
.resource-link a { min-height: 100%; display: flex; flex-direction: column; padding: 20px; background: #fff; border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.resource-link a:hover { border-color: var(--brand); box-shadow: 0 10px 26px rgb(30 27 20 / .08); transform: translateY(-2px); }
.resource-label { margin-bottom: 12px; color: var(--brand); font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.resource-link strong { font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 500; line-height: 1.22; }
.resource-link p { margin: 9px 0 18px; color: #666158; font-size: 12px; line-height: 1.55; }
.resource-open { margin-top: auto; color: var(--brand); font-size: 11px; font-weight: 850; }
.resource-open i { font-style: normal; }
.link-check { margin: 22px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.sources { padding-top: 24px; }
.sources-intro { margin: 24px 0 38px; color: #55514a; font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.7; }
.sources ol { margin: 0; padding: 0; list-style: none; }
.sources li { display: grid; grid-template-columns: 40px 1fr; gap: 20px; padding: 24px 0; border-top: 1px solid var(--line); }
.sources li > span { color: var(--brand); font-size: 12px; font-weight: 900; }
.sources strong { font-size: 16px; }
.sources li p { margin: 7px 0 10px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.sources li a { color: var(--brand); font-size: 13px; font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.site-footer { padding: 42px max(24px, calc((100vw - var(--max)) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #fff; background: #15181b; }
.site-footer p { max-width: 580px; margin: 0; color: rgb(255 255 255 / .62); font-size: 12px; line-height: 1.6; text-align: right; }
.chatgpt-credit { display: block; margin-top: 9px; color: rgb(255 255 255 / .8); }

@media (min-width: 861px) and (max-width: 1150px) {
  .site-header { padding-inline: 24px; gap: 12px; }
  .archive-brand { font-size: 18px; gap: 9px; }
  .contribute-link { font-size: 11px; padding: 9px 10px; }
  .header-controls { gap: 12px; }
  .company-picker { flex-direction: column; align-items: flex-start; gap: 6px; }
  .company-picker > span { font-size: 9px; }
  .company-picker select { width: 200px; }
  .company-search { width: 190px; flex-basis: 190px; }
}

@media (max-width: 860px) {
  .site-header { position: relative; align-items: stretch; flex-direction: column; }
  .header-controls { align-items: stretch; flex-direction: column; gap: 10px; }
  .company-tools { align-items: flex-end; }
  .company-picker { flex: 1; flex-direction: column; align-items: stretch; gap: 8px; }
  .company-search { width: auto; flex: 1; }
  .contribute-link { width: max-content; }
  .company-picker { justify-content: space-between; }
  .company-picker select { width: 100%; }
  .profile-band dl { grid-template-columns: repeat(2, 1fr); }
  .profile-band dl > div:nth-child(2) { border-right: 0; }
  .reading-layout { grid-template-columns: 1fr; padding-top: 54px; }
  .contents { position: static; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
  .contents nav { grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
  .media-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .company-tools { flex-wrap: wrap; }
  .company-picker, .company-search { flex-basis: 100%; }
  .search-results { width: 100%; }
  .hero-inner, .profile-band dl, .reading-layout { width: min(100% - 32px, var(--max)); }
  .hero-meta { display: grid; }
  .hero-meta span + span::before { display: none; }
  .profile-band dl { grid-template-columns: 1fr; }
  .profile-band dl > div { padding: 0 0 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .history-chapter { grid-template-columns: 1fr; gap: 12px; padding: 54px 0; }
  .year-marker { padding: 0; }
  .chapter-copy p { font-size: 18px; line-height: 1.72; }
  .contents nav { grid-template-columns: 1fr; }
  .research-note { margin-inline: -16px; padding: 32px 24px; }
  .resource-list { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .site-footer p { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
