@import url('https://fonts.googleapis.com/css2?family=Familjen+Grotesk:wght@400;500;600;700&display=swap');

/* Palette and type taken from the original Wix theme. */
:root {
  --navy: #06103c;          /* headings, primary buttons */
  --blue: #003a96;          /* Learn the Basics accent */
  --blue-mid: #4a90e2;
  --sky: #e5f0fe;           /* Learn the Basics background */
  --periwinkle: #43579a;    /* footer */
  --slate: #444c6d;
  --grey: #727272;
  --line: #d9dbe3;
  --white: #ffffff;
  --danger: #b3261e;

  --display: 'Familjen Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --text: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --wrap: 1400px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font: 300 16px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2.6rem, 6vw, 4.3rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.1; }
h3 { font-size: 1.5rem; line-height: 1.2; }
p { margin: 0 0 1em; }
strong { font-weight: 600; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 60px; }
@media (max-width: 900px) { .wrap { padding-inline: 32px; } }
@media (max-width: 640px) { .wrap, .site-header .wrap { padding-inline: 20px; } .site-header .wrap { height: 64px; } .brand { font-size: 1.05rem; gap: 10px; } .brand img { width: 36px; height: 36px; } .burger span { width: 32px; } .path { padding: 40px 26px; min-height: 0; } .post-card h2 { font-size: 1.5rem; } }
.narrow { max-width: 1060px; }
.muted { color: var(--grey); }
.small { font-size: .82rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--white);
  border-bottom: 1px solid var(--navy);
}
.site-header .wrap { max-width: none; padding-inline: 36px; display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; font: 700 1.3rem var(--display); color: var(--navy); }
.brand img { width: 44px; height: 44px; }
.burger { background: none; border: 0; padding: 10px 0 10px 10px; cursor: pointer; }
.burger span { display: block; width: 42px; height: 3px; background: var(--navy); margin: 8px 0; }

/* full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--navy); color: #fff;
  display: flex; flex-direction: column;
  padding: 0 40px 40px;
}
.menu[hidden] { display: none; }
.menu-top { display: flex; justify-content: flex-end; height: 74px; align-items: center; }
.menu-close { background: none; border: 0; color: #fff; font: 400 1rem/1 var(--text); cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.menu-close svg { stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.menu nav { margin: auto 0; display: flex; flex-direction: column; gap: 6px; }
.menu nav a { text-decoration: none; font: 700 clamp(2.2rem, 6vw, 4rem)/1.15 var(--display); color: #fff; opacity: .75; }
.menu nav a:hover, .menu nav a.active { opacity: 1; }

/* ---------- buttons (square, Wix style) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 36px;
  font: 400 1.05rem var(--text);
  text-decoration: none; border: 1px solid transparent; border-radius: 0;
  cursor: pointer; transition: background .2s, color .2s;
}
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: var(--sky); }
.btn-navy { background: var(--navy); color: #fff; padding: 11px 28px; font-size: .92rem; }
.btn-navy:hover { background: var(--slate); }
.btn-blue { background: var(--blue); color: #fff; padding: 11px 28px; font-size: .92rem; }
.btn-blue:hover { background: var(--navy); }
.btn-outline { background: transparent; border-color: currentColor; padding: 11px 28px; font-size: .92rem; }
.btn-danger { background: var(--danger); color: #fff; padding: 9px 18px; font-size: .88rem; }
.btn-sm { padding: 7px 16px; font-size: .85rem; }

/* ---------- home: hero ---------- */
.hero {
  background: linear-gradient(90deg, #e5f0fe 0%, #8db8ec 20%, #4a90e2 34%, #1e4f8f 50%, #002461 62%, #001d4b 80%, #06103c 100%);
  min-height: 650px;
  display: flex; align-items: flex-start;
}
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; width: 100%; padding-top: 150px; padding-bottom: 150px; }
.hero h1 { font-size: clamp(3rem, 6vw, 4.3rem); max-width: 7ch; line-height: 1.05; }
.hero-side { display: flex; gap: 70px; align-items: flex-start; justify-content: flex-end; padding-top: calc(clamp(3rem, 6vw, 4.3rem) * .26 - 7px); }
.hero-side p { color: #fff; font-size: 1.15rem; line-height: 1.55; max-width: 430px; margin: 0; }
@media (max-width: 860px) {
  .hero { min-height: 0; background: linear-gradient(160deg, #e5f0fe 0%, #4a90e2 35%, #001d4b 75%, #06103c 100%); }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-top: 80px; padding-bottom: 80px; }
  .hero-side { flex-direction: column; gap: 24px; justify-content: flex-start; padding-top: 60px; min-width: 0; }
  .hero-side p { max-width: 100%; }
}

/* ---------- home: scroll story ----------
   home.js sets the progress variables on .story-stage while you scroll:
   --a title gathers, --c crack, --s split, --t word fades, --d sections appear, --f halves settle,
   --ra..--re stagger each half's label, headline, button, numeral and highlight. */
.story { position: relative; }
.story.is-live { height: 460vh; }
@media (max-width: 640px) { .story.is-live { height: 380vh; } }
.story-stage {
  /* defaults are the finished split, shown when the animation is off */
  --a: 1; --c: 1; --s: 1; --t: 1; --d: 1; --f: 1;
  --ra: 1; --rb: 1; --rc: 1; --rd: 1; --re: 1; --ax: 1; --dot: 1; --b1: 1; --b2: 1; --b3: 1; --b4: 1;
  --pad: 60; --k: 2.4; --gap: 16; --lift: 0; --tilt: 0;
  position: relative; height: min(650px, 85vh); overflow: hidden; background: var(--white);
}
.story.is-live .story-stage { position: sticky; top: 74px; height: calc(100vh - 74px); height: calc(100dvh - 74px); }
@media (max-width: 640px) {
  .story.is-live .story-stage { top: 64px; height: calc(100vh - 64px); height: calc(100dvh - 64px); }
}
.story-half { position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden; will-change: transform; }
.story-left {
  left: 0; transform-origin: 100% 50%;
  transform: translate(calc(var(--gap) * -.5px), calc(var(--lift) * -1px)) rotate(calc(var(--tilt) * -1deg));
}
.story-right {
  left: 50%; transform-origin: 0 50%;
  transform: translate(calc(var(--gap) * .5px), calc(var(--lift) * 1px)) rotate(calc(var(--tilt) * 1deg));
}
.story-layer { position: absolute; top: 0; bottom: 0; left: 0; width: 200%; }
.story-right .story-layer { left: -100%; }
.story-bg { position: absolute; inset: 0; background: linear-gradient(90deg, #e5f0fe 0%, #8db8ec 20%, #4a90e2 34%, #1e4f8f 50%, #002461 62%, #001d4b 80%, #06103c 100%); }
.story-navy { position: absolute; inset: 0; background: var(--navy); opacity: calc(var(--a) * .9); }
.story-right .story-navy { opacity: max(calc(var(--a) * .9), var(--d)); }
.story-sky { position: absolute; inset: 0; background: var(--sky); opacity: var(--d); }
.story-title {
  position: absolute; top: 50%; margin: 0;
  left: calc(var(--pad) * 1px + (50% - var(--pad) * 1px) * var(--a));
  transform: translate(calc(var(--a) * -50%), -50%);
  font: 700 clamp(48px, 6vw, 70px)/1.05 var(--display);
  color: color-mix(in srgb, #fff calc(var(--a) * 100%), var(--navy));
  opacity: calc(1 - var(--t));
  white-space: nowrap;
}
.story-title span { display: block; }
.t-rcds { transform: translateY(calc(var(--a) * -140px)); opacity: calc(1 - var(--a) * 1.4); }
.t-econ { transform: scale(calc(1 + (var(--k) - 1) * var(--a))); }
.t-jour { transform: translateY(calc(var(--a) * 140px)); opacity: calc(1 - var(--a) * 1.4); }
.story-side {
  position: absolute; top: 22%; right: clamp(20px, 4.5vw, 64px); max-width: 46%;
  display: flex; flex-wrap: wrap; gap: 28px 64px; align-items: flex-start; justify-content: flex-end;
  opacity: calc(1 - var(--a) * 2); transform: translateX(calc(var(--a) * 90px));
}
.story-side p { margin: 0; max-width: 250px; color: #fff; font-size: clamp(16px, 1.45vw, 21px); line-height: 1.4; }
.story-stage[data-side-off] .story-side { pointer-events: none; }
@media (max-width: 640px) {
  .story-bg { background: linear-gradient(160deg, #e5f0fe 0%, #4a90e2 38%, #001d4b 78%, #06103c 100%); }
  .story-title { top: 38%; }
  .story-side { top: auto; bottom: 12%; left: 20px; right: 20px; max-width: none; flex-direction: column; gap: 22px; justify-content: flex-start; }
  .story-hint { display: none !important; }
}
.story-reveal {
  position: absolute; top: 0; bottom: 0; left: 0; width: 50%; box-sizing: border-box;
  padding: 0 clamp(18px, 5vw, 80px);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 22px;
  overflow: hidden; pointer-events: none;
}
.story-left .story-reveal { padding-left: calc(clamp(18px, 5vw, 80px) + var(--gap) * .5px + var(--tilt) * 6px); }
.story-right .story-reveal { left: 50%; padding-right: calc(clamp(18px, 5vw, 80px) + var(--gap) * .5px); }
.story-stage[data-reveal-on] .story-reveal { pointer-events: auto; }
/* staggered entrance: label, then headline, then button; the numeral rises behind */
.reveal-label { display: flex; align-items: center; gap: 14px; opacity: var(--ra); transform: translateY(calc((1 - var(--ra)) * 28px)); }
.reveal-label i { display: block; height: 2px; width: calc(var(--ra) * 40px); background: var(--blue); }
.reveal-label span { font: 600 .8rem var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--blue); }
.story-right .reveal-label i { background: #a9b8e8; }
.story-right .reveal-label span { color: #a9b8e8; }
.story-reveal h2 {
  position: relative; margin: 0; max-width: 11em;
  font-size: clamp(26px, 4vw, 58px); line-height: 1.02; letter-spacing: -.015em;
  opacity: var(--rb); transform: translateY(calc((1 - var(--rb)) * 36px));
}
.story-right .story-reveal h2 { color: #fff; }
.story-reveal .mark {
  padding: 0 .04em; background-repeat: no-repeat; background-position: 0 88%;
  background-image: linear-gradient(#8db8ec, #8db8ec);
  background-size: calc(var(--re) * 100%) .32em;
}
.story-right .story-reveal .mark { background-image: linear-gradient(var(--blue), var(--blue)); }
.reveal-cta {
  gap: 12px; min-height: 48px; padding: 0 26px; font-size: .95rem;
  opacity: var(--rc); transform: translateY(calc((1 - var(--rc)) * 28px));
}
.reveal-cta svg { transition: transform .2s ease; }
.reveal-cta:hover svg { transform: translateX(4px); }
.reveal-num {
  position: absolute; right: -.04em; bottom: -.2em; pointer-events: none;
  font: 700 clamp(160px, 24vw, 380px)/1 var(--display);
  color: transparent; -webkit-text-stroke: 2px rgba(0, 58, 150, .22);
  opacity: var(--rd); transform: translateY(calc((1 - var(--rd)) * 80px));
}
.story-right .reveal-num { -webkit-text-stroke-color: rgba(229, 240, 254, .16); }
@media (max-width: 560px) { .reveal-cta { padding: 0 14px; } }
/* small charts that draw themselves in each half: supply & demand, then a rising bar chart */
.reveal-chart {
  position: absolute; top: 13%; right: clamp(20px, 5vw, 80px);
  width: clamp(140px, 15vw, 220px); height: auto; overflow: visible; pointer-events: none;
  opacity: var(--d);
}
.reveal-chart path { fill: none; }
.reveal-chart .draw { stroke-dasharray: 1; }
.reveal-chart .axis { stroke-dashoffset: calc(1 - var(--ax)); }
.reveal-chart .line { stroke-dashoffset: calc(1 - var(--rd)); }
.reveal-chart .dot { opacity: var(--dot); }
.reveal-chart text { font: 700 14px var(--display); }
.reveal-chart .b1 { opacity: var(--b1); } .reveal-chart .b2 { opacity: var(--b2); }
.reveal-chart .b3 { opacity: var(--b3); } .reveal-chart .b4 { opacity: var(--b4); }
@media (max-width: 640px) { .reveal-chart { display: none; } }
.story-crack {
  position: absolute; left: 50%; top: 0; width: 2px; margin-left: -1px;
  height: calc(var(--c) * 100%);
  background: var(--sky); box-shadow: 0 0 18px 4px rgba(229, 240, 254, .75);
  opacity: calc(min(1, var(--c) * 3) * (1 - var(--s)));
}
.story-gap-label {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(180deg);
  writing-mode: vertical-rl; white-space: nowrap;
  font: 600 13px var(--display); letter-spacing: .32em; text-transform: uppercase; color: var(--navy);
  opacity: calc(var(--s) * (1 - var(--f)));
}
.story-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: none; flex-direction: column; align-items: center; gap: 10px;
  color: #fff; font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  opacity: calc(1 - var(--a) * 5);
}
.story.is-live .story-hint { display: flex; }
.story-hint i { display: block; width: 1px; height: 40px; background: #fff; }

/* ---------- footer ---------- */
.site-footer { background: var(--periwinkle); color: #fff; padding-block: 70px; overflow: hidden; }
.site-footer .top { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 60px; }
@media (max-width: 760px) { .site-footer .top { grid-template-columns: 1fr; } }
.site-footer .reach { font: 700 clamp(1.8rem, 3vw, 2.6rem)/1.2 var(--display); color: #fff; max-width: 400px; margin: 0; }
.site-footer .info { font-size: .9rem; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-content: start; }
.site-footer .info a { display: block; color: #fff; text-decoration: none; padding: 2px 0; opacity: .85; }
.site-footer .info a:hover { opacity: 1; text-decoration: underline; }
.wordmark { display: inline-block; font: 700 6vw/1 var(--display); color: var(--navy); text-transform: uppercase; white-space: nowrap; letter-spacing: -.01em; }

/* ---------- blog (journal) list ---------- */
.blog { padding-block: 80px 90px; }
.blog h1 { font-size: 2.3rem; margin: 0 0 50px 20px; }
.post-list { display: flex; flex-direction: column; gap: 30px; }
.post-card {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line); text-decoration: none; background: #fff;
  height: 340px;
}
.post-card:hover h2 { color: var(--blue); }
.post-card .thumb { overflow: hidden; background: var(--sky); border-right: 1px solid var(--line); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.post-card .info { padding: 40px 30px 30px 26px; display: flex; flex-direction: column; }
.post-card .date { font-size: .85rem; margin-bottom: 18px; }
.post-card h2 { font-size: 1.85rem; margin: 0 0 14px; transition: color .2s; }
.post-card .excerpt { color: var(--slate); font-size: .95rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .tags { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--grey); }
@media (max-width: 760px) {
  .post-card { grid-template-columns: 1fr; height: auto; }
  .post-card .thumb { height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* text-only cover when an issue has no image */
.text-cover { height: 100%; min-height: 220px; background: var(--navy); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 30px; }
.text-cover .wm { font: 700 1.7rem/1 var(--display); text-transform: uppercase; border-bottom: 2px solid #fff; padding-bottom: 12px; margin-bottom: 12px; }
.text-cover .ed { font-size: .9rem; opacity: .75; }

/* ---------- post (issue) page ---------- */
.post-wrap { padding-block: 90px 100px; }
.post { border: 1px solid var(--line); padding: 50px 76px 70px; background: #fff; }
@media (max-width: 760px) { .post { padding: 30px 22px 40px; } }
.post .date { font-size: .85rem; margin-bottom: 22px; }
.post > .byline { font-weight: 600; margin: -6px 0 28px; }
.post > h1 { font-size: 2.3rem; margin-bottom: 18px; }
.post .summary { font-size: 1.1rem; color: var(--slate); margin-bottom: 30px; }
.post .draft { display: inline-block; background: #fff3cd; color: #6b4e00; font-size: .8rem; padding: 4px 10px; margin-bottom: 16px; }
.pages img { width: 100%; margin: 0 0 20px; border: 1px solid var(--line); }
.toc { border-top: 1px solid var(--navy); border-bottom: 1px solid var(--line); padding: 18px 0; margin: 10px 0 20px; }
.toc strong { font: 700 .8rem var(--display); letter-spacing: .14em; text-transform: uppercase; }
.toc ol { margin: 10px 0 0; padding-left: 20px; }
.toc li { padding: 3px 0; }
.article { padding: 40px 0 30px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.article:last-child { border-bottom: 0; }
.article .topic { font: 500 .78rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--periwinkle); margin-bottom: 10px; }
.article h2 { font-size: 1.9rem; text-transform: uppercase; font-weight: 600; letter-spacing: .01em; }
.article .byline { font-weight: 600; font-size: .95rem; margin-bottom: 20px; }
.abstract { font-style: italic; color: var(--slate); border-left: 3px solid var(--navy); padding-left: 16px; margin: 0 0 22px; }
.article-body { font-size: 1.05rem; text-align: justify; hyphens: auto; }
.article-body h3 { margin-top: 1.3em; text-align: left; }
.back { display: inline-block; margin-bottom: 26px; font-size: .9rem; color: var(--slate); text-decoration: none; }
.back:hover { text-decoration: underline; }


/* ---------- about ---------- */
.team { padding-block: 90px; }
.team h2 { margin: 0 0 18px; }
.team-lead { font-size: 1.15rem; color: var(--slate); max-width: 680px; margin: 0 0 40px; }
.team-box { background: #f1f2f5; padding: clamp(28px, 4vw, 48px); display: grid; gap: 28px; }
.member h3 { margin: 0 0 4px; font-size: 1.35rem; }
.member p { margin: 0; color: var(--slate); }

/* ---------- forms / admin ---------- */
.form-card { background: #fff; border: 1px solid var(--line); padding: 34px; }
label { display: block; font-weight: 600; font-size: .88rem; margin: 16px 0 6px; }
input[type=text], input[type=password], input[type=date], textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #c1c3ce; border-radius: 0;
  font: 400 1rem var(--text); background: #fff; color: var(--navy);
}
input:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; }
textarea { min-height: 90px; resize: vertical; }
textarea.tall { min-height: 220px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.hint { font-size: .82rem; color: var(--grey); margin-top: 4px; font-weight: 400; }
.error { color: var(--danger); font-size: .9rem; min-height: 1.3em; margin-top: 12px; }

.admin-bar { background: var(--navy); color: #fff; }
.admin-bar .wrap { display: flex; justify-content: space-between; align-items: center; height: 70px; gap: 10px; }
.admin-bar .brand { color: #fff; font-size: 1.1rem; }
.admin-bar .brand img { width: 36px; height: 36px; background: #fff; border-radius: 50%; }
.admin-bar a { color: #c1c3ce; text-decoration: none; font-size: .9rem; }
.admin-shell { padding-block: 40px 80px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
.admin-table th, .admin-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .93rem; vertical-align: middle; }
.admin-table th { background: #f5f6fa; font: 600 .75rem var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
.admin-table td.actions { white-space: nowrap; text-align: right; }
.admin-table td.actions .btn { margin-left: 6px; }
.admin-table img { width: 54px; height: 40px; object-fit: cover; object-position: top; border: 1px solid var(--line); }
.badge { display: inline-block; padding: 3px 10px; font-size: .75rem; font-weight: 600; }
.badge.pub { background: var(--sky); color: var(--blue); }
.badge.draft { background: #fff3cd; color: #6b4e00; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .row-2 { grid-template-columns: 1fr; } }
.issue-form { max-width: 900px; }
.issue-title-preview { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 8px 0 26px; }
.drop-zone { border: 1px dashed #c1c3ce; padding: 16px 18px 18px; transition: background .15s, border-color .15s; }
.drop-zone.over { background: var(--sky); border-color: var(--blue); }
.drop-help { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 14px; }
.drop-help .hint { margin: 0; }
.page-thumbs { display: flex; flex-wrap: wrap; gap: 14px; }
.page-thumbs:empty { display: none; }
.page-thumbs figure { margin: 0; width: 120px; position: relative; }
.page-thumbs img { width: 120px; height: 160px; object-fit: cover; object-position: top; border: 1px solid var(--line); background: #fff; }
.page-thumbs figcaption { display: flex; justify-content: space-between; font-size: .75rem; margin-top: 4px; }
.page-thumbs button { background: none; border: 0; cursor: pointer; font-size: .8rem; color: var(--slate); padding: 0 2px; }
.page-thumbs button.rm { color: var(--danger); }
.preview-tag { position: absolute; top: 6px; left: 6px; background: var(--navy); color: #fff; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sticky-actions {
  position: sticky; bottom: 0; background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line); padding: 14px 0; margin-top: 30px;
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; align-items: center;
}
.empty { text-align: center; color: var(--grey); padding: 40px; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff; padding: 12px 22px; font-size: .9rem; z-index: 50;
}

/* ---------- loading screen (js/loader.js) ---------- */
/* A production possibilities curve shifting outward through three positions,
   drawn like the home page charts. Earlier positions stay as faint traces. */
html.is-loading { overflow: hidden; }
html.is-loading body > :not(.loader) { visibility: hidden; }
.loader {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: var(--sky);
  transition: opacity .5s ease, visibility .5s;
}
html.loader-quiet .loader:not(.is-visible) { opacity: 0; }
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-chart { width: clamp(170px, 22vw, 250px); height: auto; overflow: visible; }
.ppc-axis { fill: none; stroke: var(--navy); stroke-width: 1.5; stroke-dasharray: 1; animation: ppc-axis .7s ease-out both; }
.ppc-label { font: 600 8.5px var(--display); letter-spacing: .08em; text-transform: uppercase; fill: var(--slate); opacity: .75; }
.ppc-curve { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; animation: 4.8s ease-in-out infinite both; }
.ppc-1 { stroke: #43579a; animation-name: ppc-1; }
.ppc-2 { stroke: #4a90e2; animation-name: ppc-2; }
.ppc-3 { stroke: var(--blue); animation-name: ppc-3; }
.ppc-dot { fill: var(--navy); animation: ppc-dot 4.8s ease-in-out infinite both; }
.loader-label { display: flex; align-items: center; gap: 12px; }
.loader-label i { display: block; width: 32px; height: 2px; background: var(--blue); }
.loader-label span { font: 600 .78rem var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--blue); }

@keyframes ppc-axis { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
/* 0–14% first curve draws · 33–47% second · 66–80% third · 88–98% all fade, then repeat */
@keyframes ppc-1 {
  0% { stroke-dashoffset: 1; opacity: 1; }
  14% { stroke-dashoffset: 0; opacity: 1; }
  33% { opacity: 1; }
  44%, 88% { stroke-dashoffset: 0; opacity: .25; }
  98%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes ppc-2 {
  0%, 32.9% { stroke-dashoffset: 1; opacity: 0; }
  33% { stroke-dashoffset: 1; opacity: 1; }
  47% { stroke-dashoffset: 0; opacity: 1; }
  66% { opacity: 1; }
  77%, 88% { stroke-dashoffset: 0; opacity: .25; }
  98%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes ppc-3 {
  0%, 65.9% { stroke-dashoffset: 1; opacity: 0; }
  66% { stroke-dashoffset: 1; opacity: 1; }
  80% { stroke-dashoffset: 0; opacity: 1; }
  88% { stroke-dashoffset: 0; opacity: 1; }
  98%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
/* the dot rides the frontier outward: 45° point of each curve */
@keyframes ppc-dot {
  0%, 10% { transform: translate(69.5px, 96.2px); opacity: 0; }
  14%, 33% { transform: translate(69.5px, 96.2px); opacity: 1; }
  45%, 66% { transform: translate(97.8px, 74.9px); opacity: 1; }
  78%, 88% { transform: translate(126.1px, 56.6px); opacity: 1; }
  98%, 100% { transform: translate(126.1px, 56.6px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  /* a still picture of the finished shift */
  .ppc-axis, .ppc-curve, .ppc-dot { animation: none; stroke-dashoffset: 0; }
  .ppc-1, .ppc-2 { opacity: .25; }
  .ppc-dot { transform: translate(126.1px, 56.6px); }
}
