/* Time Trade UK — NYT-inspired finance broadsheet */
*, *::before, *::after { box-sizing: border-box; }

body.theme-nyt {
  margin: 0;
  font-family: "Libre Franklin", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #121212;
  background: #fff;
}

.theme-nyt a { color: inherit; text-decoration: none; }
.theme-nyt a:hover { text-decoration: underline; }

.nyt-wrap {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

/* —— Masthead —— */
.nyt-masthead {
  border-bottom: 1px solid #121212;
}
.nyt-masthead-inner {
  text-align: center;
  padding: 16px 0 12px;
  position: relative;
}
.nyt-edition {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  margin: 0;
}
.nyt-date {
  font-size: 12px;
  color: #666;
  margin: 0 0 8px;
}
.nyt-logo {
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1;
}
.nyt-tagline {
  font-size: 13px;
  color: #555;
  margin: 8px 0 0;
  font-style: italic;
}

/* —— Section nav —— */
.nyt-section-nav {
  border-bottom: 1px solid #e2e2e2;
  overflow-x: auto;
}
.nyt-section-nav ul {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 20px;
  font-size: 13px;
  font-weight: 700;
}
.nyt-section-nav li { display: inline-block; }
.nyt-section-nav a { white-space: nowrap; }

/* —— Ads —— */
.nyt-ad-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 6px;
}
.nyt-leader-ad {
  background: #f7f7f7;
  border-bottom: 1px solid #e2e2e2;
  padding: 12px 0;
  font-size: 14px;
}
.nyt-leader-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  text-align: center;
  line-height: 1.45;
}
.nyt-leader-inner .nyt-ad-label { width: 100%; flex: 0 0 100%; }
.nyt-leader-inner strong { color: #121212; }
.nyt-leader-inner .nyt-btn { margin-top: 0; flex: 0 0 auto; }
.nyt-rail-ad, .nyt-inline-ad, .nyt-banner-ad, .nyt-mid-ad {
  border: 1px solid #e2e2e2;
  padding: 16px;
  margin: 20px 0;
  background: #fafafa;
}
.nyt-rail-ad-name { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.nyt-inline-ad { font-size: 14px; }
.nyt-banner-ad { text-align: center; margin: 24px 0; }
.nyt-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  border: 1px solid #121212;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  color: #121212;
}
.nyt-btn:hover { background: #121212; color: #fff !important; }
.nyt-btn--dark { background: #121212; color: #fff !important; border-color: #121212; }
.nyt-btn--dark:hover { background: #333; color: #fff !important; }
.theme-nyt a.nyt-btn { color: #121212; }
.theme-nyt a.nyt-btn--dark,
.theme-nyt a.nyt-btn--dark:hover { color: #fff !important; }
.theme-nyt a.nyt-btn:hover { color: #fff !important; }

/* —— Hero —— */
.nyt-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid #e2e2e2;
  align-items: start;
}
.nyt-hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
}
.nyt-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c00;
  margin-bottom: 8px;
}
.nyt-hero h1 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 12px;
  font-weight: 700;
}
.nyt-hero-deck {
  font-size: 17px;
  color: #333;
  margin: 0 0 12px;
  line-height: 1.45;
}
.nyt-meta { font-size: 12px; color: #666; }

/* —— Home grid —— */
.nyt-home-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  padding: 24px 0;
}
.nyt-spotlight {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid #e2e2e2;
}
.nyt-card { display: flex; flex-direction: column; }
.nyt-card-img {
  display: block;
  margin-bottom: 10px;
  overflow: hidden;
}
.nyt-card-img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.nyt-card:hover .nyt-card-img img { transform: scale(1.02); }
.nyt-card h3 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 17px;
  line-height: 1.25;
  margin: 0 0 6px;
  font-weight: 700;
}
.nyt-card p {
  font-size: 14px;
  color: #444;
  margin: 0;
  line-height: 1.4;
}
.nyt-story-list { border-top: 1px solid #121212; }
.nyt-story {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #e2e2e2;
  align-items: start;
}
.nyt-story--text { grid-template-columns: 1fr; }
.nyt-text-list { border-top: 1px solid #e2e2e2; margin-top: 8px; }
.nyt-text-item {
  padding: 16px 0;
  border-bottom: 1px solid #e2e2e2;
}
.nyt-text-item h2 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 18px;
  margin: 0 0 6px;
  line-height: 1.25;
}
.nyt-story-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.nyt-story h2 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 20px;
  margin: 0 0 6px;
  line-height: 1.2;
}
.nyt-section-h {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 22px;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #121212;
}

/* —— Rail —— */
.nyt-rail h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #e2e2e2;
  padding-bottom: 8px;
  margin: 0 0 12px;
}
.nyt-rail-item {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 15px;
  line-height: 1.3;
}

/* —— Article —— */
.nyt-article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  padding: 24px 0;
}
.nyt-article-header { max-width: 720px; margin-bottom: 20px; }
.nyt-article-header h1 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 8px 0 12px;
}
.nyt-article-hero img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  margin-bottom: 24px;
}
.nyt-article-body {
  max-width: 720px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.65;
}
.nyt-article-body p { margin: 0 0 1.2em; }
.nyt-source {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e2e2e2;
  font-size: 13px;
  color: #666;
}
.nyt-source a { text-decoration: underline; }

/* —— Category / misc —— */
.nyt-page-h {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 28px;
  margin: 16px 0 8px;
}
.nyt-breadcrumb { font-size: 13px; color: #666; margin: 12px 0; }
.nyt-pagination {
  display: flex;
  gap: 16px;
  padding: 24px 0;
  font-size: 14px;
  font-weight: 600;
}
.nyt-footer {
  border-top: 2px solid #121212;
  margin-top: 40px;
  padding: 24px 0 32px;
  font-size: 12px;
  color: #666;
}
.nyt-footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 16px;
}
.nyt-footer a { margin-right: 12px; color: #444; }

@media (max-width: 900px) {
  .nyt-edition { position: static; margin-bottom: 8px; }
  .nyt-hero { grid-template-columns: 1fr; }
  .nyt-home-layout, .nyt-article-layout { grid-template-columns: 1fr; }
  .nyt-spotlight { grid-template-columns: 1fr; }
  .nyt-story { grid-template-columns: 100px 1fr; }
}
