/* Reset, layout primitives, and the shared component library. */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ct-background);
  color: var(--ct-text-primary);
  font-family: var(--ct-font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--ct-blue); text-decoration: none; }
a:hover { color: var(--ct-blue-hover); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ct-blue);
  outline-offset: 2px;
  border-radius: var(--ct-radius-sm);
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding-left: 24px; }

.ct-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout ---------- */

.ct-container {
  width: 100%;
  max-width: var(--ct-container);
  margin: 0 auto;
  padding: 0 var(--ct-gutter);
}

.ct-section { padding-top: var(--ct-space-80); }
.ct-section--tight { padding-top: var(--ct-space-48); }

.ct-band {
  margin-top: var(--ct-space-80);
  background: var(--ct-surface-alt);
  border-top: 1px solid var(--ct-divider);
  border-bottom: 1px solid var(--ct-divider);
  padding: var(--ct-space-48) 0;
}

.ct-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ct-sidebar);
  gap: var(--ct-space-32);
  align-items: start;
}

.ct-layout__main { min-width: 0; }

.ct-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--ct-space-24);
  min-width: 0;
  position: sticky;
  top: var(--ct-space-24);
}

.ct-panel {
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-lg);
  background: var(--ct-surface);
}

/* ---------- Section headers ---------- */

.ct-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--ct-space-24);
  padding-bottom: var(--ct-space-16);
  border-bottom: 1px solid var(--ct-divider);
}

.ct-section-head__title {
  font-family: var(--ct-font-head);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.026em;
  color: var(--ct-text-primary);
}

.ct-section-head__link {
  font-family: var(--ct-font-head);
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
}

/* ---------- Type utilities ---------- */

.ct-display {
  font-family: var(--ct-font-head);
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.03;
  letter-spacing: -0.036em;
  color: var(--ct-text-primary);
  text-wrap: balance;
}

.ct-h1 {
  font-family: var(--ct-font-head);
  font-weight: 800;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.07;
  letter-spacing: -0.034em;
  color: var(--ct-text-primary);
  text-wrap: balance;
}

.ct-h2 {
  font-family: var(--ct-font-head);
  font-weight: 800;
  font-size: clamp(21px, 2.4vw, 30px);
  line-height: 1.16;
  letter-spacing: -0.026em;
  color: var(--ct-text-primary);
}

.ct-h3 {
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.25;
  letter-spacing: -0.022em;
  color: var(--ct-text-primary);
}

.ct-h4 {
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.018em;
  color: var(--ct-text-primary);
}

.ct-deck {
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.6;
  color: var(--ct-text-deck);
  text-wrap: pretty;
}

.ct-lede {
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.65;
  color: var(--ct-text-secondary);
  text-wrap: pretty;
}

.ct-body { font-size: 16px; line-height: 1.6; color: var(--ct-text-secondary); text-wrap: pretty; }
.ct-small { font-size: 14px; line-height: 1.55; color: var(--ct-text-secondary); }
.ct-meta { font-size: 13px; color: var(--ct-text-muted); }
.ct-meta--dotted { display: flex; align-items: center; gap: var(--ct-space-12); flex-wrap: wrap; }

.ct-label {
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ct-blue);
}

.ct-label--muted { color: var(--ct-text-muted); }

.ct-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--ct-space-8);
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ct-blue);
}

.ct-eyebrow__dot { color: var(--ct-blue-dot); }

/* Marks dynamic-content notes in the prototype only — remove in the theme. */
.ct-dynamic-note {
  font-family: var(--ct-font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ct-text-muted);
}

/* ---------- Buttons and links ---------- */

.ct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--ct-radius-md);
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.ct-btn--primary { background: var(--ct-blue); color: #FFFFFF; }
.ct-btn--primary:hover,
.ct-btn--primary:focus-visible { background: var(--ct-blue-hover); color: #FFFFFF; }

.ct-btn--secondary {
  background: var(--ct-surface);
  border-color: var(--ct-border);
  color: var(--ct-text-primary);
}
.ct-btn--secondary:hover,
.ct-btn--secondary:focus-visible { border-color: var(--ct-blue); color: var(--ct-blue); }

.ct-btn--more {
  border-radius: var(--ct-radius-pill);
  border-color: var(--ct-blue-border);
  background: var(--ct-surface);
  color: var(--ct-blue);
  padding: 13px 30px;
}
.ct-btn--more:hover,
.ct-btn--more:focus-visible { background: var(--ct-blue-soft); border-color: var(--ct-blue); }

.ct-btn--block { width: 100%; }
.ct-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.ct-textlink {
  font-family: var(--ct-font-head);
  font-weight: 600;
  font-size: 14.5px;
}

/* ---------- Chips ---------- */

.ct-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ct-space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ct-chips li { list-style: none; }

.ct-chip {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-pill);
  background: var(--ct-surface);
  color: var(--ct-text-primary);
  font-family: var(--ct-font-head);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.ct-chip:hover,
.ct-chip:focus-visible {
  background: var(--ct-blue-soft);
  border-color: var(--ct-blue-line);
  color: var(--ct-blue);
}

.ct-chip.is-active,
.ct-chip.is-active:hover {
  background: var(--ct-blue);
  border-color: var(--ct-blue);
  color: #FFFFFF;
}

/* ---------- Media ---------- */

.ct-media {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--ct-radius-lg);
  background: var(--ct-surface-alt);
}

.ct-media img { width: 100%; height: 100%; object-fit: cover; }

.ct-media--16x9 { aspect-ratio: 16 / 9; }
.ct-media--16x10 { aspect-ratio: 16 / 10; }
.ct-media--4x3 { aspect-ratio: 4 / 3; }
.ct-media--fill { height: 100%; min-height: 340px; }

/* Neutral placeholder — replaced by the WordPress featured image. */
.ct-media__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(135deg, var(--ct-placeholder-a) 0 9px, var(--ct-placeholder-b) 9px 18px);
  font-family: var(--ct-font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ct-text-muted);
  text-align: center;
  padding: var(--ct-space-8);
}

/* ---------- Article cards ---------- */

.ct-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ct-space-24);
}

.ct-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.ct-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-lg);
  background: var(--ct-surface);
  overflow: hidden;
  transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.ct-card:hover {
  border-color: #D5DBE4;
  box-shadow: var(--ct-shadow-hover);
  transform: translateY(-2px);
}

.ct-card__media { border-radius: 0; }
.ct-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  padding: 18px 20px 20px;
}

.ct-card__title {
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 17.5px;
  line-height: 1.32;
  letter-spacing: -0.018em;
  text-wrap: pretty;
}

.ct-card__title a { color: var(--ct-text-primary); }
.ct-card__title a:hover,
.ct-card__title a:focus-visible { color: var(--ct-blue); }

.ct-card__excerpt { font-size: 14.5px; line-height: 1.55; color: var(--ct-text-secondary); text-wrap: pretty; }
.ct-card__meta { margin-top: auto; padding-top: 14px; font-size: 13px; color: var(--ct-text-muted); }

/* Large editorial card — featured story */
.ct-feature {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-lg);
  background: var(--ct-surface);
  overflow: hidden;
}

.ct-feature__media { border-radius: 0; height: 100%; min-height: 340px; }

.ct-feature__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--ct-space-16);
  padding: var(--ct-space-32) var(--ct-space-32);
}

.ct-feature__title {
  font-family: var(--ct-font-head);
  font-weight: 800;
  font-size: clamp(23px, 2.4vw, 33px);
  line-height: 1.16;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.ct-feature__title a { color: var(--ct-text-primary); }
.ct-feature__title a:hover { color: var(--ct-blue); }
.ct-feature__excerpt { max-width: 48ch; font-size: 16px; line-height: 1.6; color: var(--ct-text-secondary); text-wrap: pretty; }

/* Compact list rows */
.ct-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ct-list > li { list-style: none; }

.ct-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ct-divider);
  color: inherit;
}

.ct-row:hover .ct-row__title { color: var(--ct-blue); }

.ct-row__media { flex: none; width: 104px; border-radius: var(--ct-radius-md); }
.ct-row__body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }

.ct-row__title {
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ct-text-primary);
  text-wrap: pretty;
}

.ct-row__meta { font-size: 12.5px; color: var(--ct-text-muted); }
.ct-row__chevron { flex: none; color: var(--ct-text-muted); line-height: 0; }

/* ---------- Popular Reads ---------- */

.ct-popular { padding: var(--ct-space-24) 20px; }
.ct-popular__title {
  font-family: var(--ct-font-head);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  margin-bottom: var(--ct-space-4);
}

.ct-popular__list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ct-popular__item { list-style: none; border-top: 1px solid var(--ct-divider); }

.ct-popular__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  color: inherit;
}

.ct-popular__media {
  position: relative;
  flex: none;
  width: 66px;
  height: 54px;
  border-radius: 5px;
  overflow: visible;
}

.ct-popular__media img,
.ct-popular__media .ct-media__placeholder {
  width: 66px;
  height: 54px;
  border-radius: 5px;
  inset: auto;
  position: static;
}

.ct-popular__rank {
  position: absolute;
  top: -7px;
  left: -7px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid #FFFFFF;
  border-radius: var(--ct-radius-pill);
  background: var(--ct-blue);
  color: #FFFFFF;
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 11.5px;
  line-height: 1;
}

.ct-popular__body { min-width: 0; }

.ct-popular__headline {
  display: block;
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ct-text-primary);
  text-wrap: pretty;
}

.ct-popular__link:hover .ct-popular__headline { color: var(--ct-blue); }
.ct-popular__date { display: block; margin-top: 5px; font-size: 12.5px; color: var(--ct-text-muted); }

/* Horizontal scroller used on tablet/mobile and for topic cards */
.ct-scroller {
  display: flex;
  gap: var(--ct-space-12);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--ct-space-4);
}

.ct-scroller::-webkit-scrollbar { display: none; }
.ct-scroller > * { flex: none; }

/* ---------- Newsletter ---------- */

.ct-newsletter {
  border: 1px solid var(--ct-blue-line);
  border-radius: var(--ct-radius-lg);
  background: var(--ct-blue-tint);
  padding: 26px 22px;
  text-align: center;
}

.ct-newsletter__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto var(--ct-space-12);
  border: 1px solid var(--ct-blue-line);
  border-radius: var(--ct-radius-pill);
  background: var(--ct-surface);
  color: var(--ct-blue);
}

.ct-newsletter__title {
  font-family: var(--ct-font-head);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.022em;
}

.ct-newsletter__desc { margin-top: 10px; font-size: 14.5px; line-height: 1.55; color: var(--ct-text-secondary); text-wrap: pretty; }
.ct-newsletter__form { margin-top: var(--ct-space-16); }
.ct-newsletter__note { margin-top: var(--ct-space-12); font-size: 12px; color: var(--ct-text-muted); }

/* ---------- Forms ---------- */

.ct-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ct-border-strong);
  border-radius: var(--ct-radius-md);
  background: var(--ct-surface);
  font-family: var(--ct-font-body);
  font-size: 15px;
  color: var(--ct-text-primary);
  outline: none;
}

.ct-input:focus { border-color: var(--ct-blue); box-shadow: 0 0 0 3px rgba(11, 84, 252, 0.12); }
.ct-input + .ct-btn { margin-top: 10px; }

.ct-searchbar {
  display: flex;
  align-items: center;
  gap: var(--ct-space-12);
  padding: 4px 4px 4px 18px;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-lg);
  background: var(--ct-surface);
  max-width: 720px;
}

.ct-searchbar__icon { color: var(--ct-text-muted); display: grid; place-items: center; }

.ct-searchbar__input {
  flex: 1;
  min-width: 0;
  padding: 14px 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--ct-font-body);
  font-size: 17px;
  color: var(--ct-text-primary);
}

/* ---------- Tables ---------- */

.ct-table-wrap {
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-lg);
  overflow: hidden;
}

.ct-table { width: 100%; border-collapse: collapse; }

.ct-table th,
.ct-table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--ct-divider-light);
}

.ct-table thead th {
  background: var(--ct-surface-alt);
  border-bottom: 1px solid var(--ct-divider);
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ct-text-primary);
}

.ct-table thead th:first-child {
  font-family: var(--ct-font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ct-text-muted);
}

.ct-table th + th,
.ct-table td + td { border-left: 1px solid var(--ct-divider-light); }
.ct-table thead th + th { border-left-color: var(--ct-divider); }

.ct-table tbody th {
  font-family: var(--ct-font-head);
  font-weight: 600;
  font-size: 15px;
  color: var(--ct-text-primary);
}

.ct-table tbody td { font-size: 16px; line-height: 1.5; color: var(--ct-text-secondary); }
.ct-table tbody tr:last-child th,
.ct-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- Callouts ---------- */

.ct-callout {
  border-left: 3px solid var(--ct-blue);
  background: var(--ct-blue-tint);
  padding: 20px 24px;
}

.ct-callout--neutral { border-left-color: var(--ct-text-muted); background: var(--ct-surface-alt); }
.ct-callout__label {
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ct-blue);
}

.ct-callout--neutral .ct-callout__label { color: var(--ct-text-secondary); }
.ct-callout__text { margin-top: var(--ct-space-8); font-size: 17px; line-height: 1.7; color: var(--ct-text-body); }

.ct-note {
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-lg);
  background: var(--ct-surface-alt);
  padding: 22px 24px;
}

.ct-note__label {
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ct-text-primary);
}

.ct-note__text { margin-top: var(--ct-space-8); font-size: 15px; line-height: 1.7; color: var(--ct-text-secondary); }

/* ---------- Pros & cons ---------- */

.ct-proscons {
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-lg);
  overflow: hidden;
}

.ct-proscons__head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ct-divider);
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--ct-text-primary);
}

.ct-proscons__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 18px;
}

.ct-proscons__label {
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ct-blue);
}

.ct-proscons__label--con { color: var(--ct-text-muted); }
.ct-proscons ul { margin-top: var(--ct-space-8); font-size: 15px; line-height: 1.65; color: var(--ct-text-secondary); }

/* ---------- Recommendation card ---------- */

.ct-rec {
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-lg);
  overflow: hidden;
  background: var(--ct-surface);
}

.ct-rec__head {
  display: flex;
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid var(--ct-divider);
}

.ct-rec__art { flex: none; width: 132px; height: 84px; border-radius: var(--ct-radius-lg); }
.ct-rec__name {
  font-family: var(--ct-font-head);
  font-weight: 800;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.022em;
  margin-top: var(--ct-space-4);
}

.ct-rec__summary { margin-top: var(--ct-space-8); font-size: 15px; line-height: 1.6; color: var(--ct-text-secondary); }

.ct-rec__facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--ct-divider);
}

.ct-rec__fact { padding: 16px 20px; }
.ct-rec__fact + .ct-rec__fact { border-left: 1px solid var(--ct-divider); }

.ct-rec__fact-label {
  font-family: var(--ct-font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ct-text-muted);
}

.ct-rec__fact-value {
  margin-top: var(--ct-space-4);
  font-family: var(--ct-font-head);
  font-weight: 700;
  font-size: 17px;
  color: var(--ct-text-primary);
}

.ct-rec__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ct-space-16);
  padding: 18px 22px;
  background: var(--ct-surface-alt);
}

.ct-rec__why { font-size: 13px; line-height: 1.5; color: var(--ct-text-secondary); max-width: 46ch; }

/* ---------- Pagination ---------- */

.ct-pagination {
  display: flex;
  justify-content: center;
  gap: var(--ct-space-12);
  padding-top: var(--ct-space-8);
}

.ct-pager { display: flex; align-items: center; gap: var(--ct-space-12); }

.ct-pager__item {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-md);
  font-family: var(--ct-font-head);
  font-weight: 600;
  font-size: 14px;
  color: var(--ct-text-primary);
}

.ct-pager__item.is-active { background: var(--ct-blue); border-color: var(--ct-blue); color: #FFFFFF; }

/* ---------- Empty state ---------- */

.ct-empty {
  padding: var(--ct-space-32);
  border: 1px dashed var(--ct-border);
  border-radius: var(--ct-radius-lg);
  color: var(--ct-text-secondary);
  text-align: center;
}

/* ---------- Breadcrumb ---------- */

.ct-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ct-space-8);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ct-text-muted);
}

.ct-breadcrumb li { list-style: none; }
.ct-breadcrumb a { color: var(--ct-text-secondary); }
.ct-breadcrumb [aria-current="page"] { color: var(--ct-text-primary); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

