/* Linitis Plastica Research Foundation: shared styles for every page. */

:root {
  --ink: #172d40;
  --ink-soft: #3f5262;
  --muted: #5a6c7a;
  --brand: #164d79;
  --brand-deep: #064873;
  --night: #0f2b42;
  --accent: #62c7d4;
  --link: #125782;
  --line: #d3dfe7;
  --line-strong: #b9cad6;
  --wash: #f2f6f8;
  --paper: #ffffff;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --measure: 1240px;
  --section: clamp(56px, 7vw, 104px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure, dl, dd, ol, ul { margin: 0; }
h1, h2, h3, h4 { font-weight: normal; }
img { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
[id] { scroll-margin-top: 96px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 16px; background: var(--brand); color: #fff; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Utility bar ---------- */
.utility { background: var(--night); color: #c5d8e6; font-size: 13.5px; }
.utility .wrap { display: flex; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; padding-block: 8px; }
.utility a { color: #fff; }

/* ---------- Masthead ---------- */
.mast {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15, 43, 66, .04);
  backdrop-filter: saturate(1.4) blur(6px);
}
.mast .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 86px; }
.identity { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--ink); }
.identity .lp {
  display: grid; place-content: center; flex: none;
  width: 48px; height: 48px;
  background: #174f7d; color: #fff;
  font: 25px/1 var(--serif);
  border-bottom: 5px solid #76c6d6;
}
.identity strong { font: 600 23px/1.05 var(--serif); letter-spacing: -.01em; }
.identity strong span { display: block; margin-top: 4px; font: 600 12.5px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }

.primary-nav ul { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); list-style: none; padding: 0; }
.primary-nav a {
  display: block; padding: 8px 0;
  color: #204568; font-size: 15px; font-weight: 600; text-decoration: none;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover { border-bottom-color: var(--line-strong); }
.primary-nav a[aria-current="page"] { border-bottom-color: var(--brand); color: var(--ink); }
.nav-toggle {
  display: none;
  align-items: center; gap: 9px;
  min-height: 44px; padding: 8px 14px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 2px;
  font: 600 14px/1 var(--sans); cursor: pointer;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s;
}
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
  color: #14658c;
  font: 600 15px/1.4 var(--sans);
}
.eyebrow::before { content: ""; flex: none; width: 28px; height: 3px; background: var(--accent); }
.display {
  font: 600 clamp(30px, 3.1vw, 46px)/1.1 var(--sans);
  letter-spacing: -.03em;
  color: var(--ink);
}
.lede { font: clamp(17px, 1.3vw, 19.5px)/1.6 var(--sans); color: var(--ink-soft); max-width: 64ch; }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px clamp(32px, 6vw, 96px); align-items: end; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head .lede { justify-self: start; }
.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--line); }
.section.tint { background: var(--wash); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.tint + .section { border-top: 0; }

.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--link); font-weight: 600; font-size: 15px; text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.text-link:hover { color: var(--ink); }
.text-link span[aria-hidden] { transition: transform .2s; }
.text-link:hover span[aria-hidden] { transform: translateX(3px); }

.button {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 12px 22px;
  background: var(--brand-deep); color: #fff;
  border: 1px solid var(--brand-deep); border-radius: 2px;
  font: 600 15px/1.2 var(--sans); text-decoration: none;
}
.button:hover { background: #0a3a5d; }
.button.light { background: #fff; color: var(--brand-deep); border-color: #fff; }
.button.light:hover { background: #e7f3f6; }

.source-note { margin-top: 22px; color: var(--muted); font-size: 13.5px; line-height: 1.5; max-width: 90ch; }

/* ---------- Page header for inner pages ---------- */
.page-head { background: var(--brand-deep); color: #fff; border-bottom: 5px solid var(--accent); }
.page-head .wrap { padding-block: clamp(44px, 6vw, 84px); }
.page-head .eyebrow { color: #b7e5ed; }
.page-head .eyebrow::before { background: var(--accent); }
.page-head h1 { font: 600 clamp(36px, 4.2vw, 58px)/1.04 var(--sans); letter-spacing: -.035em; max-width: 20ch; }
.page-head p { margin-top: 20px; font: clamp(17px, 1.4vw, 20px)/1.55 var(--sans); color: #dceef4; max-width: 62ch; }
.page-head.compact .wrap { padding-block: clamp(32px, 4vw, 52px); }
.page-head.compact h1 { font-size: clamp(32px, 3.4vw, 46px); }
.crumbs { margin-bottom: 22px; font-size: 14px; color: #b7d6e4; }
.crumbs a { color: #fff; }

/* ---------- Notice ---------- */
.notice {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px;
  padding: 24px clamp(18px, 3vw, 32px);
  background: #fff; border: 1px solid var(--line-strong); border-left: 4px solid var(--brand);
}
.notice svg { width: 26px; height: 26px; color: var(--brand); margin-top: 2px; }
.notice h2 { font: 600 17px/1.4 var(--sans); margin-bottom: 6px; color: var(--ink); }
.notice p { color: var(--ink-soft); max-width: 92ch; }

/* ---------- Footer ---------- */
.site-foot { background: var(--night); color: #d6e4ee; font-size: 15px; }
.site-foot .wrap { padding-block: clamp(48px, 6vw, 72px) 28px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 40px clamp(32px, 5vw, 80px); }
.foot-brand .identity { color: #fff; }
.foot-brand .identity strong span { color: #b9d2e2; }
.foot-brand p { margin-top: 20px; max-width: 42ch; color: #b9cddb; }
.site-foot h2 { font: 700 13px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #8fc9dc; margin-bottom: 16px; }
.site-foot ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  margin-top: clamp(40px, 5vw, 60px); padding-top: 22px;
  border-top: 1px solid #2a4a63; color: #9fb7c8; font-size: 13.5px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .mast .wrap { min-height: 72px; flex-wrap: wrap; gap: 0 16px; }
  .nav-toggle { display: inline-flex; }
  .primary-nav { flex-basis: 100%; display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0 14px; }
  .primary-nav a { padding: 13px 2px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .primary-nav li:last-child a { border-bottom: 0; }
  .primary-nav a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 3px 0 0 var(--brand); padding-left: 12px; }
  .js-off .primary-nav { display: block; }
}
@media (max-width: 520px) {
  .utility span:last-child { display: none; }
  .utility .wrap { font-size: 12.5px; }
  .identity .lp { width: 42px; height: 42px; font-size: 22px; }
  .identity strong { font-size: 19px; }
  .identity strong span { font-size: 11.5px; }
  .foot-grid { grid-template-columns: 1fr; }
  .notice { grid-template-columns: 1fr; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
