/* THE WORLD READY — History article theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink:    #0f0e0c;
  --ink2:   #4a4845;
  --ink3:   #898781;
  --bg:     #faf9f6;
  --bg2:    #f2f0eb;
  --line:   #e4e1d8;
  --teal:   #0f6e56;
  --teal-light: #e1f5ee;
  --gold:   #b8860b;
  --navy:   #111a24;
  --radius: 4px;
}
html { scroll-behavior: smooth; }
body.history-page {
  font-family: 'Sarabun', sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  --history-header-offset: 56px;
}

@media (min-width: 768px) {
  body.history-page {
    --history-header-offset: 60px;
  }
}

#history-progress-bar {
  position: fixed;
  top: var(--history-header-offset);
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--teal);
  z-index: 99;
  transition: width .1s;
}

.history-breadcrumb {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 8px 24px;
  font-size: 11px;
  color: var(--ink3);
}
.history-breadcrumb a { color: var(--ink3); text-decoration: none; }
.history-breadcrumb a:hover { color: var(--teal); }
.history-breadcrumb span { color: var(--ink2); }

.history-hero {
  background: var(--navy);
  padding: 40px 24px 32px;
}
.history-hero--has-media {
  padding-bottom: 28px;
}
.history-hero-inner { max-width: 900px; margin: 0 auto; }
.history-hero-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.history-hero-cat {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal); background: rgba(15,110,86,.15);
  padding: 3px 10px; border-radius: 2px; font-weight: 500;
}
.history-hero-series { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.3); }
.history-hero h1 {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 400;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -.01em;
}
.history-hero h1 em { font-style: italic; color: rgba(255,255,255,.7); }
.history-byline { font-size: 11px; color: rgba(255,255,255,.4); margin: -6px 0 14px; }
.history-hero-deck { font-size: 15px; color: rgba(255,255,255,.5); line-height: 1.65; max-width: 600px; margin-bottom: 22px; }
.history-hero-meta {
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 14px;
  font-size: 11px;
  flex-wrap: wrap;
  gap: 8px;
}
.history-hero-meta .author { color: rgba(255,255,255,.45); }
.history-hero-meta .author strong { color: rgba(255,255,255,.75); font-weight: 500; }
.history-hero-meta .divider { width: 1px; height: 14px; background: rgba(255,255,255,.15); margin: 0 10px; }
.history-hero-meta .date { color: rgba(255,255,255,.3); }
.history-hero-meta .reading { margin-left: auto; font-size: 10px; color: rgba(255,255,255,.3); letter-spacing: .06em; text-transform: uppercase; }

/* Featured cover — below hero, no overlap with meta */
.history-featured-media {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: 24px 24px 0;
  max-width: 900px;
  background: var(--bg);
}
.history-featured-media__inner {
  margin: 0 auto;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
}
.history-featured-media__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--bg);
  line-height: 0;
}
.history-featured-media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(58vh, 600px);
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
}
.history-featured-media__placeholder {
  min-height: 220px;
  aspect-ratio: 3 / 2;
  max-height: min(50vh, 480px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink3);
  font-size: 13px;
  line-height: 1.4;
  background: linear-gradient(135deg, var(--bg2), #e8e4db);
}
.history-featured-media__caption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink3);
  background: #fff;
  border-top: 1px solid var(--line);
}
.history-featured-media__caption-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.history-featured-media__credit {
  font-size: 10px;
  color: var(--ink3);
  opacity: .9;
}
.history-featured-media__caption a {
  color: var(--teal);
  text-decoration: none;
  white-space: nowrap;
}
.history-featured-media__caption a:hover { text-decoration: underline; }

.history-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 24px 28px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 680px) {
  .history-featured-media { padding: 16px 16px 0; }
  .history-featured-media img { max-height: min(46vh, 400px); }
  .history-layout { grid-template-columns: 1fr; gap: 24px; padding: 20px 16px; }
  .history-sidebar { order: -1; }
}

.history-article { min-width: 0; }

.history-article .drop-cap::first-letter {
  float: left;
  font-size: 58px;
  line-height: .8;
  font-weight: 500;
  color: var(--ink);
  margin: 5px 8px 0 0;
}
.history-article p { font-size: 15px; line-height: 1.85; color: var(--ink2); margin-bottom: 16px; }
.history-article p strong { color: var(--ink); font-weight: 500; }

.history-section-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 18px;
}
.history-section-rule::before,
.history-section-rule::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.history-section-rule span {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink3);
  white-space: nowrap;
}

.section-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 18px;
}
.section-rule::before,
.section-rule::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.section-rule span {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink3);
  white-space: nowrap;
}

.pull-quote {
  border-left: 2px solid var(--teal);
  padding: 6px 0 6px 18px;
  margin: 24px 0;
}
.pull-quote p {
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  font-style: italic;
  margin-bottom: 6px;
}
.pull-quote cite {
  font-size: 10px;
  color: var(--ink3);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-style: normal;
}

.fact-strip {
  background: var(--bg2);
  border-top: 2px solid var(--gold);
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  margin: 24px 0;
}
.fact-strip .label {
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
  font-weight: 500;
}
.fact-strip .num {
  font-size: 36px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -.02em;
  line-height: 1;
  margin-bottom: 4px;
}
.fact-strip .sub { font-size: 13px; color: var(--ink2); line-height: 1.55; }

.shock-box {
  background: #fffbf0;
  border: 1px solid #e8d48a;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 24px 0;
}
.shock-box .label {
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 6px;
}
.shock-box p { font-size: 14px; color: var(--ink); margin-bottom: 0; }

.cta-block {
  background: var(--teal-light);
  border-left: 3px solid var(--teal);
  padding: 14px 18px;
  margin: 28px 0 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.cta-block p { font-size: 14px; color: #085041; margin-bottom: 0; }
.cta-block strong { color: var(--teal); }

.history-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.history-share-lbl { font-size: 10px; color: var(--ink3); letter-spacing: .06em; text-transform: uppercase; margin-right: 4px; }
.history-share-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  color: var(--ink3);
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s;
}
.history-share-btn:hover { border-color: var(--teal); color: var(--teal); }
.history-copy-btn {
  margin-left: auto;
  font-size: 10px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink3);
  cursor: pointer;
  letter-spacing: .04em;
  font-family: inherit;
  transition: border-color .15s, color .15s;
}
.history-copy-btn:hover { border-color: var(--teal); color: var(--teal); }

.history-tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.history-tag {
  font-size: 11px;
  color: var(--ink3);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 2px;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.history-tag:hover { border-color: var(--teal); color: var(--teal); }

.history-author-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.history-author-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.history-author-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.history-author-note { font-size: 11px; color: var(--ink3); line-height: 1.4; }
.history-author-badge {
  display: inline-block;
  font-size: 9px;
  padding: 2px 7px;
  background: var(--teal-light);
  color: var(--teal);
  border-radius: 2px;
  margin-top: 4px;
  letter-spacing: .04em;
}

.history-references {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.history-references h3 {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 10px;
}
.history-references ol { padding-left: 18px; }
.history-references li { font-size: 12px; color: var(--ink3); line-height: 1.6; margin-bottom: 4px; }

.history-sidebar { min-width: 0; }

.history-toc-widget { border-top: 2px solid var(--ink); padding-top: 14px; margin-bottom: 28px; }
.history-widget-head {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 12px;
}
.history-toc-item {
  display: flex;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink2);
  text-decoration: none;
  line-height: 1.4;
}
.history-toc-item:last-child { border-bottom: none; }
.history-toc-item:hover { color: var(--teal); }
.history-toc-num { font-size: 10px; color: var(--ink3); flex-shrink: 0; padding-top: 1px; min-width: 16px; }
.history-toc-item.active .history-toc-num,
.history-toc-item.active { color: var(--teal); font-weight: 500; }

.history-ad-widget {
  background: var(--bg2);
  border: 1px dashed var(--line);
  padding: 24px 12px;
  text-align: center;
  margin-bottom: 28px;
  font-size: 11px;
  color: #ccc;
}
.history-ad-widget .ad-lbl {
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 8px;
}

.history-related-widget { border-top: 2px solid var(--ink); padding-top: 14px; }
.history-rel-item {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  display: block;
}
.history-rel-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.history-rel-cat {
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 4px;
}
.history-rel-title { font-size: 12px; color: var(--ink); line-height: 1.45; }
.history-rel-item:hover .history-rel-title { color: var(--teal); }

.history-footer {
  background: var(--navy);
  padding: 28px 24px;
  text-align: center;
  margin-top: 40px;
}
.history-footer p { font-size: 11px; color: rgba(255,255,255,.3); margin-bottom: 0; }
.history-footer a { color: rgba(255,255,255,.4); text-decoration: none; }

/* Hub / listing */
.history-hub-wrap { max-width: 900px; margin: 0 auto; padding: 32px 24px 48px; }
.history-hub-title { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 400; margin-bottom: 8px; }
.history-hub-desc { color: var(--ink3); font-size: 15px; margin-bottom: 28px; max-width: 560px; }
.history-region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 36px; }
.history-region-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s;
}
.history-region-card:hover { border-color: var(--teal); }
.history-region-card h2 { font-size: 16px; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.history-region-card p { font-size: 13px; color: var(--ink3); margin: 0; }

.history-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.history-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s;
}
.history-card:hover { border-color: var(--teal); }
.history-card-img {
  aspect-ratio: 16/9;
  background: linear-gradient(165deg, #ebe4d8, #e2d9c8);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.history-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}
.history-card-body { padding: 14px 16px 16px; }
.history-card-cat { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }
.history-card-title { font-size: 15px; line-height: 1.4; color: var(--ink); margin-bottom: 6px; }
.history-card-deck { font-size: 12px; color: var(--ink3); line-height: 1.5; }

@media print {
  .history-nav, .twro-header, #history-progress-bar, .history-sidebar, .history-share-bar, .history-ad-widget { display: none; }
  .history-layout { grid-template-columns: 1fr; }
}
