/* ============================================================
   exchangeyear.org — editorial publication
   "By BFE alumni & education professionals" — transparent attribution.
   Navy + cream + forest-teal palette (deliberately NOT BFE brand).
   Serif-heavy (Fraunces) for editorial credibility.
   ============================================================ */

:root {
  --ink:           #14202E;
  --ink-soft:      #3F4B5C;
  --ink-mute:      #6D7689;
  --ink-faint:     rgba(20,32,46,0.45);

  --paper:         #FFFFFF;
  --cream:         #F7F1E5;
  --cream-soft:    #FBF6EC;
  --cream-deep:    #ECE3D0;

  --rule:          #D9D0BD;
  --border:        rgba(20,32,46,0.10);

  --teal:          #1A5E5E;
  --teal-soft:     #E0EFEC;
  --teal-deep:     #0F4040;

  --gold:          #BB8B3A;

  --serif:         'Fraunces', 'Times New Roman', Georgia, 'Noto Serif TC', serif;
  --sans:          'Inter', -apple-system, BlinkMacSystemFont, 'Noto Sans TC', 'PingFang TC', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--teal); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
h1 { font-size: clamp(40px, 5.5vw, 72px); letter-spacing: -0.025em; line-height: 1.05; }
h2 { font-size: clamp(28px, 3.4vw, 42px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); }
h4 { font-size: 18px; font-weight: 600; }

p { color: var(--ink-soft); font-size: 16px; line-height: 1.75; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 28px; }

.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.section-cream-deep { background: var(--cream-deep); }

.divider {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 56px 0;
  width: 100%;
}

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 16px;
}

.dropcap::first-letter {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 4.2em;
  float: left;
  line-height: 0.85;
  margin: 6px 8px 0 0;
  color: var(--teal-deep);
}

/* ============================================================
   Masthead — newspaper-style header
   ============================================================ */
.issue-bar {
  background: var(--ink);
  color: var(--cream);
  padding: 10px 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: center;
}
.issue-bar strong { color: #fff; font-weight: 700; }

.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1240px; margin: 0 auto;
  padding: 22px 28px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 10px;
  text-decoration: none;
  line-height: 1;
}
.brand .logo-main {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand .logo-main i { font-style: italic; color: var(--teal-deep); font-weight: 700; }
.brand .logo-tld {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.brand-publisher {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 6px;
  letter-spacing: 0.10em;
}
.masthead-nav {
  display: flex; gap: 6px; align-items: center;
}
.masthead-nav a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 4px;
  transition: color 0.15s;
}
.masthead-nav a:hover {
  color: var(--teal-deep);
  text-decoration: none;
  background: var(--cream-soft);
}
@media (max-width: 720px) {
  .masthead-nav a:not(.masthead-cta) { display: none; }
}
.masthead-cta {
  background: var(--teal) !important;
  color: #fff !important;
  padding: 9px 16px !important;
}
.masthead-cta:hover {
  background: var(--teal-deep) !important;
}

/* ============================================================
   Hero — feature article style
   ============================================================ */
.hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.hero-meta {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  font-family: var(--sans);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 22px;
}
.hero-meta .dot { color: var(--ink-mute); font-weight: 400; }
.hero-meta .tag-feature {
  background: var(--teal);
  color: var(--cream);
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 0.12em;
}
.hero h1 { max-width: 900px; margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--teal-deep); }
.hero-sub {
  max-width: 760px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(18px, 1.9vw, 22px);
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 32px;
}
.byline {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-mute);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  max-width: 600px;
}
.byline .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-soft) 0%, var(--teal) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--serif); font-weight: 700; font-size: 17px;
  flex: none;
}
.byline .name { color: var(--ink); font-weight: 700; }

/* ============================================================
   Intro / TOC grid
   ============================================================ */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) { .intro-grid { grid-template-columns: 1fr; gap: 32px; } }

.intro-body p { margin-bottom: 18px; font-size: 17px; }
.intro-body p:first-child { font-size: 19px; }

.summary-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 26px 24px;
  border-radius: var(--radius-md);
  position: sticky; top: 24px;
}
.summary-card .label {
  font-family: var(--sans);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--teal-deep);
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.summary-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  line-height: 1.35;
}
.summary-card p { font-size: 14px; line-height: 1.65; margin-bottom: 18px; }
.summary-card ol {
  font-family: var(--sans);
  font-size: 14px; font-weight: 500;
  color: var(--ink);
  padding-left: 22px;
  line-height: 1.85;
}
.summary-card ol li::marker { color: var(--teal); font-weight: 700; }
.summary-card ol li.winner {
  font-weight: 700;
  color: var(--teal-deep);
}

/* ============================================================
   Criteria checklist
   ============================================================ */
.criteria-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 28px;
  margin-top: 28px;
}
@media (max-width: 720px) { .criteria-grid { grid-template-columns: 1fr; } }
.criteria-item {
  display: flex; gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.criteria-num {
  font-family: var(--serif);
  font-size: 22px; font-weight: 700;
  color: var(--teal-deep);
  flex: none;
  line-height: 1;
  width: 32px;
}
.criteria-text strong {
  display: block;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.criteria-text p { font-size: 14px; line-height: 1.6; margin: 0; }

/* ============================================================
   Top 5 Rankings
   ============================================================ */
.rank-item {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 96px 1fr;
}
@media (max-width: 720px) { .rank-item { grid-template-columns: 1fr; } }
.rank-item.rank-1 {
  border-color: var(--teal);
  border-width: 2px;
  box-shadow: 0 12px 32px -16px rgba(26, 94, 94, 0.30);
}
.rank-item .rank-num {
  background: var(--cream-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 64px; font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.rank-item.rank-1 .rank-num {
  background: var(--teal);
  color: var(--cream);
}
.rank-body { padding: 26px 28px 28px; }
.rank-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 4px; flex-wrap: wrap; }
.rank-head h3 { font-size: 24px; margin-bottom: 2px; line-height: 1.2; }
.rank-head h3 small { display: block; font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--ink-mute); letter-spacing: 0.04em; margin-top: 4px; text-transform: uppercase; }

.rank-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #fff;
  background: var(--gold);
  padding: 5px 11px; border-radius: 999px;
  white-space: nowrap;
}

.rank-summary {
  margin: 14px 0 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px; line-height: 1.55;
  color: var(--ink);
  padding-left: 16px;
  border-left: 3px solid var(--teal);
}
.proscons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
  margin-top: 16px;
}
@media (max-width: 600px) { .proscons { grid-template-columns: 1fr; } }
.proscons h4 {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--sans);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 10px;
}
.proscons h4.pros { color: var(--teal-deep); }
.proscons h4.cons { color: #B85540; }
.proscons ul {
  list-style: none; padding: 0; margin: 0;
}
.proscons ul li {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  padding: 4px 0 4px 18px;
  position: relative;
}
.proscons ul li::before {
  position: absolute; left: 0; top: 4px;
  font-weight: 800; font-size: 13px;
}
.proscons .pros + ul li::before { content: '+'; color: var(--teal); }
.proscons .cons + ul li::before { content: '−'; color: #B85540; }

.rank-details {
  margin-top: 18px; padding-top: 18px;
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 18px;
  font-family: var(--sans); font-size: 13px; color: var(--ink-mute);
}
.rank-details span strong { color: var(--ink); font-weight: 700; }

/* ============================================================
   Deep-dive box (after the ranking)
   ============================================================ */
.deepdive {
  background: var(--ink);
  color: var(--cream);
  padding: 56px 48px;
  border-radius: var(--radius-lg);
  margin: 56px 0;
  position: relative;
}
@media (max-width: 720px) { .deepdive { padding: 40px 28px; } }
.deepdive .eyebrow { color: var(--teal-soft); }
.deepdive h2 { color: #fff; margin-bottom: 16px; }
.deepdive h2 em { font-style: italic; color: var(--teal-soft); }
.deepdive p { color: rgba(247, 241, 229, 0.85); font-size: 17px; max-width: 760px; }
.deepdive .reasons {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 22px; margin-top: 36px;
}
@media (max-width: 720px) { .deepdive .reasons { grid-template-columns: 1fr; } }
.reason {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(247, 241, 229, 0.12);
  border-radius: var(--radius-md);
  padding: 22px 22px;
}
.reason .num {
  font-family: var(--serif);
  font-size: 32px; font-weight: 700;
  color: var(--teal-soft);
  line-height: 1; margin-bottom: 8px;
}
.reason h4 { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 6px; font-family: var(--sans); }
.reason p { font-size: 14px; line-height: 1.65; color: rgba(247, 241, 229, 0.75); margin: 0; }

.deepdive-cta {
  margin-top: 36px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cream); color: var(--ink) !important;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
  transition: transform 0.2s;
}
.deepdive-cta:hover { transform: translateY(-2px); }

/* ============================================================
   FAQ
   ============================================================ */
.faq-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '＋';
  flex: none;
  font-family: var(--sans);
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  color: var(--teal-deep);
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: '−'; transform: rotate(180deg); }
.faq-item p {
  margin-top: 12px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ============================================================
   Disclosure / About box (prominent, not hidden)
   ============================================================ */
.disclosure-box {
  background: var(--cream-deep);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--teal);
  padding: 28px 32px;
  border-radius: var(--radius-md);
  margin: 40px 0;
}
.disclosure-box .label {
  font-family: var(--sans);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 12px;
}
.disclosure-box p {
  font-family: var(--serif);
  font-size: 16px; line-height: 1.7;
  color: var(--ink);
  font-style: italic;
}
.disclosure-box p strong { font-style: normal; font-weight: 700; color: var(--ink); }
.disclosure-box .author-row {
  display: flex; gap: 12px; align-items: center;
  margin-top: 18px; padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 13px;
  font-style: normal;
  color: var(--ink-mute);
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  background: var(--ink);
  color: rgba(247, 241, 229, 0.70);
  padding: 56px 0 28px;
}
footer .container {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 36px;
  margin-bottom: 36px;
}
@media (max-width: 720px) { footer .container { grid-template-columns: 1fr; gap: 28px; } }
footer .brand { color: #fff; }
footer .brand .logo-main { color: #fff; }
footer .brand .logo-tld { color: rgba(247, 241, 229, 0.55); }
.footer-publisher {
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal-soft);
  margin-top: 14px;
  display: block;
}
.footer-blurb {
  font-size: 13px; line-height: 1.7;
  margin-top: 12px;
  max-width: 320px;
  color: rgba(247, 241, 229, 0.65);
}
footer h4 {
  font-family: var(--sans);
  color: #fff; font-size: 11px; font-weight: 800;
  letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 16px;
}
footer a {
  color: rgba(247, 241, 229, 0.70);
  display: block; padding: 4px 0; font-size: 14px;
}
footer a:hover { color: var(--teal-soft); }
.footer-bottom {
  border-top: 1px solid rgba(247, 241, 229, 0.10);
  padding-top: 20px;
  font-size: 12px;
  color: rgba(247, 241, 229, 0.45);
  text-align: center;
  letter-spacing: 0.04em;
  font-family: var(--sans);
}

/* Reveal */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0; transform: translateY(16px);
    transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
  }
  .reveal.in { opacity: 1; transform: none; }
}

/* ============================================================
   CRAFT LAYER v0.1 — editorial polish (2026-05-29). Appended last;
   fully reversible (delete from this banner down). Preserves the
   navy/cream/teal/gold identity — adds tactile paper grain, subtle
   depth, optical type, and refined motion. Pagespeed-safe: CSS-only,
   NO new fonts (reuses Fraunces/Inter already loaded).
   ============================================================ */

/* Optical sizing — Fraunces is variable; sharpens display, smooths text */
h1, h2, h3, h4, h5, .brand .logo-main { font-optical-sizing: auto; }

/* 1 · Paper grain — tactile "printed page" texture over the cream.
   The single most editorial-premium, cheapest upgrade. */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 9990;
  pointer-events: none; opacity: .04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: reduce){ body::after{ opacity:.03; } }

/* 2 · Sticky masthead with soft paper-glass on scroll (modern polish) */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

/* 3 · Whisper-faint warm depth behind the hero (on-palette, content stays above) */
.hero {
  background-image:
    radial-gradient(72% 90% at 90% -8%, rgba(26,94,94,.08), transparent 55%),
    radial-gradient(55% 70% at 0% 8%, rgba(187,139,58,.06), transparent 55%);
}

/* 4 · Refined motion — momentum easing + tasteful lift on the article cards */
.rank-item, .summary-card, .reason, .deepdive-cta {
  transition: transform .35s cubic-bezier(.22,1,.36,1),
              box-shadow .35s cubic-bezier(.22,1,.36,1), border-color .35s;
}
.rank-item:hover { transform: translateY(-3px); box-shadow: 0 18px 42px -24px rgba(20,32,46,.4); }
.summary-card:hover { transform: translateY(-2px); }

/* 5 · Animated link underline — editorial finesse on body links */
.intro-body a, .faq-item p a, .disclosure-box a {
  background-image: linear-gradient(var(--teal), var(--teal));
  background-size: 0% 1.5px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .3s cubic-bezier(.22,1,.36,1);
  text-decoration: none;
}
.intro-body a:hover, .faq-item p a:hover, .disclosure-box a:hover {
  background-size: 100% 1.5px; text-decoration: none;
}
