/* ============================================================
   Thewhat v4 — Swiss / Neue Grafik
   Faculty Department palette · bilingual EN/AR
   ============================================================ */
:root {
  --bg: #f2efe3;
  --bg-card: #ffffff;
  --bg-header: #fcf9ee;
  --bg-footer: #e9e6d8;
  --fg: #000000;
  --fg-2: #222222;
  --muted: #6a6a6a;
  --rule: #000000;
  --rule-soft: #c8c5b3;
  --accent: #abb8c3;

  --shell-max: 1680px;
  --shell-pad: clamp(20px, 3vw, 56px);

  --serif-text: "Source Serif 4", "Tiempos Text", "Iowan Old Style", Georgia, serif;
  --serif-head: "Playfair Display", "Tiempos Headline", "Iowan Old Style", Georgia, serif;
  --arabic: "IBM Plex Sans Arabic", "Noto Naskh Arabic", "Amiri", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif-text);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-ar {
  font-family: var(--arabic);
  font-size: 16px;
  line-height: 1.85;
}

a { color: inherit; text-decoration: none; cursor: pointer; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { max-width: 100%; display: block; }

::selection { background: var(--fg); color: var(--bg); }

.tw-shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding-left: var(--shell-pad);
  padding-right: var(--shell-pad);
}
.tw-tab { font-variant-numeric: tabular-nums; }

.tw-eyebrow {
  font-family: var(--serif-text);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg);
  font-weight: 400;
}
body.is-ar .tw-eyebrow { font-family: var(--arabic); font-size: 12px; letter-spacing: 0; }

/* ============================================================
   Header — proper padding, sleek
   ============================================================ */
.tw-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  padding: 16px 0 0;
}
.tw-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  height: 56px;
  padding-bottom: 12px;
}
.tw-logo img {
  height: 13px;
  width: auto;
  display: block;
}
.tw-logo-en { display: block; }
.tw-logo-ar {
  display: none;
  font-family: var(--arabic);
  font-size: 26px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
  letter-spacing: 0;
}
body.is-ar .tw-logo-en { display: none; }
body.is-ar .tw-logo-ar { display: block; }
.tw-nav {
  display: flex;
  gap: 32px;
  justify-content: flex-end;
  font-family: var(--serif-text);
  font-size: 13px;
  letter-spacing: 0.02em;
}
body.is-ar .tw-nav { font-family: var(--arabic); font-size: 14px; gap: 28px; }
.tw-nav-link {
  color: var(--fg);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color .15s, opacity .15s;
  opacity: 0.55;
}
.tw-nav-link:hover { opacity: 1; }
.tw-nav-link.is-active { opacity: 1; border-bottom-color: var(--fg); }

.tw-meta-corner {
  display: flex;
  gap: 10px;
  align-items: center;
}
.tw-lang-switch {
  font-family: var(--serif-text);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
  border: 1px solid var(--rule);
  padding: 6px 10px;
  transition: background .15s;
}
body.is-ar .tw-lang-switch { font-family: var(--serif-text); }
.tw-lang-switch:hover { background: var(--fg); color: var(--bg); }

@media (max-width: 720px) {
  /* Two-row header: [logo · lang] on top, nav scrolling strip below. */
  .tw-header { padding: 12px 0 0; }
  .tw-header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "logo . lang"
      "nav  nav nav";
    height: auto;
    gap: 8px 12px;
    padding-bottom: 8px;
  }
  .tw-logo { grid-area: logo; }
  .tw-meta-corner { grid-area: lang; justify-self: end; }
  .tw-nav {
    grid-area: nav;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 18px;
    font-size: 12px;
    padding: 6px 0 2px;
    white-space: nowrap;
    border-top: 1px solid var(--rule-soft);
    border-bottom: 1px solid var(--rule-soft);
  }
  .tw-nav::-webkit-scrollbar { display: none; }
  .tw-nav-link { flex-shrink: 0; }
  body.is-ar .tw-nav { gap: 16px; font-size: 13px; }
  /* Tighter logo for phone */
  .tw-logo img { height: 11px; }
  .tw-logo-ar { font-size: 22px; }
  /* Smaller lang switch on phone */
  .tw-lang-switch { font-size: 10px; padding: 4px 8px; }
}

@media (max-width: 420px) {
  .tw-header-inner { gap: 6px 8px; padding-bottom: 6px; }
  .tw-nav { gap: 14px; font-size: 11.5px; }
  body.is-ar .tw-nav { gap: 14px; font-size: 12.5px; }
}

/* ============================================================
   MASTHEAD — Swiss Neue Grafik layout
   ============================================================ */
.tw-masthead {
  position: relative;
  padding-top: clamp(40px, 5vw, 80px);
  padding-bottom: clamp(40px, 5vw, 72px);
}

.tw-masthead-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.tw-masthead-label {
  font-family: var(--serif-text);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
body.is-ar .tw-masthead-label { font-family: var(--arabic); font-size: 12px; letter-spacing: 0; }

/* The big stacked headline */
.tw-mast-h {
  font-family: var(--serif-head);
  font-weight: 400;
  font-size: clamp(48px, 11vw, 168px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0 0 clamp(40px, 6vw, 80px);
  text-wrap: balance;
}
body.is-ar .tw-mast-h {
  font-family: var(--arabic);
  font-size: clamp(40px, 9.5vw, 144px);
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 500;
}
.tw-mast-line { display: block; }
.tw-mast-line-2 { font-style: italic; }
body.is-ar .tw-mast-line-2 { font-style: normal; }

.tw-mast-h-sm {
  font-size: clamp(40px, 8vw, 120px);
}
body.is-ar .tw-mast-h-sm { font-size: clamp(36px, 7vw, 108px); }

/* Caption columns + sidebar grid */
.tw-mast-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding-top: 24px;
}
.tw-mast-captions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 32px);
}
.tw-mast-caption { display: flex; flex-direction: column; gap: 8px; }
.tw-mast-caption-label {
  font-family: var(--serif-text);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding-bottom: 8px;
}
body.is-ar .tw-mast-caption-label { font-family: var(--arabic); font-size: 12px; letter-spacing: 0; }
.tw-mast-caption-body {
  margin: 0;
  font-family: var(--serif-text);
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg);
}
body.is-ar .tw-mast-caption-body { font-family: var(--arabic); font-size: 14px; line-height: 1.85; }

.tw-mast-side {
  display: flex;
  flex-direction: column;
  margin-top: -8px;
}
.tw-mast-side-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 8px 0;
  font-family: var(--serif-text);
  font-size: 12px;
}
body.is-ar .tw-mast-side-row { font-family: var(--arabic); font-size: 13px; }
.tw-mast-side-label { color: var(--muted); letter-spacing: 0.04em; }
body.is-ar .tw-mast-side-label { letter-spacing: 0; }
.tw-mast-side-value { color: var(--fg); }

.tw-mast-numeral {
  position: absolute;
  bottom: clamp(20px, 3vw, 40px);
  left: var(--shell-pad);
  font-family: var(--serif-head);
  font-size: clamp(80px, 14vw, 200px);
  line-height: 0.85;
  font-weight: 400;
  color: var(--fg);
  pointer-events: none;
  display: none; /* Reserved — keep clean for now */
}

@media (max-width: 900px) {
  .tw-mast-grid { grid-template-columns: 1fr; }
  .tw-mast-captions { grid-template-columns: 1fr; gap: 24px; }
  .tw-mast-side { margin-top: 0; }
  .tw-masthead-labels { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Section blocks
   ============================================================ */
.tw-section-block {
  padding-top: clamp(28px, 3.5vw, 56px);
  padding-bottom: clamp(28px, 3.5vw, 56px);
}
.tw-section-block + .tw-section-block { padding-top: 0; }

.tw-block-head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding-bottom: 16px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.tw-block-eyebrow {
  font-family: var(--serif-text);
  font-size: 11px;
  color: var(--fg);
  letter-spacing: 0.04em;
}
body.is-ar .tw-block-eyebrow { font-family: var(--arabic); font-size: 13px; letter-spacing: 0; }

.tw-block-meta {
  font-family: var(--serif-text);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
body.is-ar .tw-block-meta { font-family: var(--arabic); font-size: 12px; }

.tw-block-more {
  margin-left: auto;
  font-family: var(--serif-text);
  font-size: 11px;
  color: var(--fg);
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color .15s;
}
body.is-ar .tw-block-more { font-family: var(--arabic); font-size: 13px; }
body.is-ar .tw-block-more { margin-left: 0; margin-right: auto; }
.tw-block-more:hover { border-bottom-color: var(--fg); }

/* ============================================================
   Featured — image with overlapping title (v3 freedom)
   ============================================================ */
.tw-feat-link { display: block; position: relative; }
.tw-feat-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
}
.tw-feat-img {
  position: relative;
  width: 88%;
  margin-left: auto;
  margin-right: 0;
}
html[dir="rtl"] .tw-feat-img { margin-left: 0; margin-right: auto; }
.tw-feat-img img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.6) contrast(0.96);
  transition: filter .4s;
  display: block;
}
.tw-feat-link:hover .tw-feat-img img { filter: saturate(0.85) contrast(1); }
.tw-feat-title-over {
  position: absolute;
  left: 0;
  bottom: 8%;
  z-index: 2;
  max-width: 70%;
  margin: 0;
  font-family: var(--serif-head);
  font-style: italic;
  font-size: clamp(40px, 7.2vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-weight: 400;
  color: var(--fg);
  text-wrap: balance;
  pointer-events: none;
}
html[dir="rtl"] .tw-feat-title-over { left: auto; right: 0; font-style: normal; font-family: var(--arabic); font-weight: 500; font-size: clamp(36px, 6.4vw, 100px); line-height: 1.2; }
.tw-feat-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  margin-top: clamp(32px, 4vw, 56px);
  padding-left: 6%;
}
html[dir="rtl"] .tw-feat-body { padding-left: 0; padding-right: 6%; }
.tw-feat-title {
  font-family: var(--serif-head);
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 400;
  margin: 0;
  text-wrap: pretty;
  color: var(--muted);
}
body.is-ar .tw-feat-title {
  font-family: var(--arabic);
  font-size: clamp(26px, 3.2vw, 48px);
  line-height: 1.3;
  letter-spacing: 0;
  font-weight: 500;
}
.tw-feat-link:hover .tw-feat-title { text-decoration: underline; text-underline-offset: 0.12em; text-decoration-thickness: 1px; }
.tw-feat-dek {
  margin: 0;
  font-family: var(--serif-text);
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg);
  max-width: 48ch;
}
body.is-ar .tw-feat-dek { font-family: var(--arabic); font-size: 17px; line-height: 1.85; }
.tw-feat-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--serif-text);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 16px;
}
body.is-ar .tw-feat-meta { font-family: var(--arabic); font-size: 12px; }

@media (max-width: 820px) {
  .tw-feat-img { width: 100%; }
  .tw-feat-title-over { font-size: clamp(36px, 9vw, 64px); max-width: 90%; }
  .tw-feat-body { grid-template-columns: 1fr; padding-left: 0; }
  html[dir="rtl"] .tw-feat-body { padding-right: 0; }
}

/* ============================================================
   List rows — Swiss editorial list
   ============================================================ */
.tw-rows {
  display: flex;
  flex-direction: column;
}
.tw-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 240px;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-soft);
  transition: background .15s;
}
.tw-row:hover { background: rgba(0,0,0,0.02); }
.tw-row:hover .tw-row-arrow { opacity: 1; }
.tw-row:hover .tw-row-title-text { text-decoration: underline; text-underline-offset: 0.14em; text-decoration-thickness: 1px; }

.tw-row-date {
  font-family: var(--serif-text);
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
body.is-ar .tw-row-date { font-family: var(--arabic); font-size: 13px; }

.tw-row-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.tw-row-title-text {
  font-family: var(--serif-head);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.012em;
  font-weight: 400;
  color: var(--fg);
  text-wrap: balance;
}
body.is-ar .tw-row-title-text {
  font-family: var(--arabic);
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.4;
  letter-spacing: 0;
  font-weight: 500;
}
.tw-row-arrow {
  font-family: var(--serif-text);
  color: var(--fg);
  font-size: 13px;
  opacity: 0.4;
  transition: opacity .15s;
  flex-shrink: 0;
}
.tw-row-meta {
  font-family: var(--serif-text);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}
body.is-ar .tw-row-meta { font-family: var(--arabic); font-size: 12px; justify-content: flex-end; }
.tw-row-meta-dot { opacity: .5; }

.tw-rows .tw-row:has(.tw-row-thumb) {
  grid-template-columns: 90px 100px minmax(0, 1fr) 200px;
}
.tw-row-thumb {
  background: transparent;
  padding: 0;
  border: 0;
  align-self: center;
}
.tw-row-thumb img {
  width: 100%;
  height: 56px;
  object-fit: cover;
  filter: saturate(0.55) contrast(0.96);
}

@media (max-width: 820px) {
  .tw-row { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; }
  .tw-rows .tw-row:has(.tw-row-thumb) { grid-template-columns: 60px minmax(0, 1fr); }
  .tw-row-thumb { display: none; }
  .tw-row-meta { grid-column: 2; justify-content: flex-start; }
  .tw-row-title { flex-direction: column; align-items: flex-start; gap: 4px; }
  .tw-row-arrow { display: none; }
}

/* ============================================================
   Filter row
   ============================================================ */
.tw-filter-row { display: flex; flex-wrap: wrap; gap: 12px 18px; padding-top: 4px; }
.tw-filter {
  font-family: var(--serif-text);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding: 0 0 2px;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
body.is-ar .tw-filter { font-family: var(--arabic); font-size: 13px; }
.tw-filter:hover { color: var(--fg); }
.tw-filter.is-active { color: var(--fg); border-bottom-color: var(--fg); }

/* ============================================================
   Experiments grid
   ============================================================ */
.tw-exp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.tw-exp-grid-wide { grid-template-columns: repeat(4, 1fr); }
.tw-exp-card {
  background: var(--bg-card);
  padding: 20px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 240px;
  transition: background .15s;
}
.tw-exp-card:hover { background: var(--bg-header); }
.tw-exp-card-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--serif-text);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-soft);
}
body.is-ar .tw-exp-card-top { font-family: var(--arabic); font-size: 12px; }
.tw-exp-title {
  margin: 0;
  font-family: var(--serif-head);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -0.01em;
}
body.is-ar .tw-exp-title { font-family: var(--arabic); font-size: 22px; line-height: 1.4; letter-spacing: 0; font-weight: 500; }
.tw-exp-note {
  margin: 0;
  font-family: var(--serif-text);
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg);
}
body.is-ar .tw-exp-note { font-family: var(--arabic); font-size: 14px; line-height: 1.85; }
.tw-exp-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--serif-text);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
body.is-ar .tw-exp-foot { font-family: var(--arabic); font-size: 12px; }

@media (max-width: 1100px) { .tw-exp-grid, .tw-exp-grid-wide { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tw-exp-grid, .tw-exp-grid-wide { grid-template-columns: 1fr; } }

/* ============================================================
   Detail
   ============================================================ */
.tw-detail-hero {
  width: 100%;
  height: clamp(320px, 56vh, 600px);
  overflow: hidden;
  background: var(--bg-card);
}
.tw-detail-hero img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.6) contrast(0.95); }
.tw-detail-article {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) var(--shell-pad) clamp(60px, 10vw, 140px);
}
.tw-detail-head { margin-bottom: clamp(40px, 6vw, 64px); }
.tw-detail-eyebrow {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--serif-text);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-soft);
}
body.is-ar .tw-detail-eyebrow { font-family: var(--arabic); font-size: 12px; }
.tw-detail-eyebrow > span:first-child { color: var(--fg); }

.tw-detail-title {
  font-family: var(--serif-head);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: pretty;
  color: var(--fg);
}
.tw-detail-title-ar {
  font-family: var(--arabic);
  font-size: clamp(30px, 4.5vw, 56px);
  line-height: 1.3;
  letter-spacing: 0;
  text-align: right;
  direction: rtl;
  font-weight: 500;
}

.tw-lang-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 24px;
  font-family: var(--serif-text);
  font-size: 12px;
  letter-spacing: 0.04em;
  border: 1px solid var(--rule);
  padding: 6px 12px;
}
.tw-lang { color: var(--muted); padding: 0 4px; transition: color .15s; }
.tw-lang.is-active { color: var(--fg); }
.tw-lang:hover { color: var(--fg); }
.tw-lang-sep { color: var(--muted); opacity: .5; }
.tw-lang-ar { font-family: var(--arabic); font-size: 14px; }

.tw-detail-body {
  font-family: var(--serif-text);
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg);
}
.tw-detail-body p { margin: 0 0 1.4em; }
.tw-detail-body p:last-child { margin-bottom: 0; }
.tw-detail-lede { font-size: 19px; line-height: 1.5; }
.tw-detail-body-ar {
  font-family: var(--arabic);
  font-size: 18px;
  line-height: 1.85;
  text-align: right;
  font-weight: 400;
}
.tw-detail-body-ar .tw-detail-lede { font-size: 19px; }

.tw-detail-foot {
  margin-top: clamp(48px, 7vw, 80px);
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 32px;
}
.tw-detail-foot-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  font-family: var(--serif-text);
  font-size: 12px;
  color: var(--fg);
}
body.is-ar .tw-detail-foot-row { font-family: var(--arabic); font-size: 13px; }
.tw-detail-foot-row > span:last-child { font-size: 13px; }
.tw-detail-foot-note {
  grid-column: 1 / -1;
  font-family: var(--serif-text);
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  border-top: 1px solid var(--rule-soft);
  padding-top: 14px;
  margin-top: 4px;
}
body.is-ar .tw-detail-foot-note { font-family: var(--arabic); font-style: normal; font-size: 12px; }

.tw-detail-nav {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  font-family: var(--serif-text);
  font-size: 12px;
}
body.is-ar .tw-detail-nav { font-family: var(--arabic); font-size: 13px; }
.tw-link-back {
  color: var(--fg);
  border-bottom: 1px solid var(--fg);
  padding-bottom: 1px;
  letter-spacing: 0.04em;
}
.tw-link-back:hover { color: var(--muted); border-bottom-color: var(--muted); }

@media (max-width: 720px) {
  .tw-detail-foot { grid-template-columns: 1fr; }
  .tw-detail-foot-row { grid-template-columns: 80px 1fr; }
}

/* ============================================================
   About — pull and tracks
   ============================================================ */
.tw-about-pull-section {
  padding-top: clamp(60px, 8vw, 100px);
  padding-bottom: clamp(60px, 8vw, 100px);
}
.tw-about-pull-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 8fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: baseline;
}
.tw-about-pull-q {
  margin: 0;
  font-family: var(--serif-head);
  font-size: clamp(28px, 4.6vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--fg);
  text-wrap: balance;
}
body.is-ar .tw-about-pull-q {
  font-family: var(--arabic);
  font-size: clamp(28px, 4.4vw, 64px);
  line-height: 1.3;
  letter-spacing: 0;
  font-weight: 500;
  text-align: right;
}
.tw-hero-em {
  font-style: italic;
  font-feature-settings: "ss01" 1;
  position: relative;
  display: inline-block;
}
.tw-hero-em::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 0.16em;
  height: 1px;
  background: var(--fg);
}

.tw-about-tracks { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); }
.tw-tracks-list { display: flex; flex-direction: column; }
.tw-track {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid var(--rule-soft);
  align-items: baseline;
}
.tw-track:first-child { border-top: 0; }
.tw-track:last-child { border-bottom: 0; }
.tw-track-num {
  font-family: var(--serif-text);
  font-size: 13px;
  color: var(--muted);
  padding-top: 6px;
  letter-spacing: 0.04em;
}
.tw-track-title {
  font-family: var(--serif-head);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0 0 16px;
  color: var(--fg);
  text-wrap: pretty;
}
body.is-ar .tw-track-title {
  font-family: var(--arabic);
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.35;
  letter-spacing: 0;
  font-weight: 500;
}
.tw-track-tag {
  color: var(--muted);
  font-style: italic;
  font-size: 0.5em;
  display: block;
  margin-top: 8px;
  letter-spacing: 0;
}
body.is-ar .tw-track-tag { font-style: normal; font-size: 0.55em; }
.tw-track-p {
  margin: 0;
  font-family: var(--serif-text);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg);
  max-width: 60ch;
}
body.is-ar .tw-track-p { font-family: var(--arabic); font-size: 16px; line-height: 1.85; }

.tw-about-notes { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(60px, 8vw, 100px); }
.tw-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.tw-note {
  background: var(--bg-card);
  padding: 24px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 160px;
}
.tw-note-num {
  font-family: var(--serif-text);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.tw-note p {
  margin: 0;
  font-family: var(--serif-head);
  font-size: 18px;
  line-height: 1.3;
  color: var(--fg);
}
body.is-ar .tw-note p { font-family: var(--arabic); font-size: 17px; line-height: 1.65; font-weight: 500; }

@media (max-width: 720px) {
  .tw-notes-grid { grid-template-columns: 1fr; }
  .tw-track { grid-template-columns: 1fr; }
  .tw-track-num { padding-top: 0; }
  .tw-about-pull-block { grid-template-columns: 1fr; }
}

/* ============================================================
   Footer
   ============================================================ */
.tw-footer {
  padding-top: clamp(48px, 6vw, 72px);
  padding-bottom: 24px;
  background: var(--bg);
  margin-top: clamp(40px, 6vw, 80px);
}
.tw-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: clamp(24px, 4vw, 48px);
  padding-bottom: 32px;
}
.tw-foot-col { display: flex; flex-direction: column; gap: 12px; }
.tw-foot-p { margin: 0; font-family: var(--serif-text); font-size: 13px; line-height: 1.55; color: var(--fg); max-width: 36ch; }
body.is-ar .tw-foot-p { font-family: var(--arabic); font-size: 14px; line-height: 1.8; }
.tw-foot-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
body.is-ar .tw-foot-list { font-family: var(--arabic); font-size: 14px; }
.tw-foot-list a { border-bottom: 1px solid transparent; padding-bottom: 1px; transition: border-color .15s; }
.tw-foot-list a:hover { border-bottom-color: var(--fg); }
.tw-foot-sub {
  display: grid;
  grid-template-columns: 1fr 24px;
  border-bottom: 1px solid var(--fg);
  align-items: center;
}
.tw-foot-sub input {
  border: 0; background: transparent; padding: 6px 0;
  font-family: var(--serif-text); font-size: 13px; color: var(--fg);
  outline: none;
}
body.is-ar .tw-foot-sub input { font-family: var(--arabic); font-size: 14px; }
.tw-foot-sub input::placeholder { color: var(--muted); }
.tw-foot-sub button {
  font-family: var(--serif-text); font-size: 14px; color: var(--fg);
  text-align: right;
}
.tw-foot-fine { margin: 0; font-family: var(--serif-text); font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
body.is-ar .tw-foot-fine { font-family: var(--arabic); font-size: 12px; }

.tw-foot-base {
  margin-top: 16px;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  font-family: var(--serif-text);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
body.is-ar .tw-foot-base { font-family: var(--arabic); font-size: 12px; }
@media (max-width: 820px) {
  .tw-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .tw-foot-base { flex-direction: column; gap: 6px; align-items: flex-start; }
}
@media (max-width: 480px) {
  .tw-footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RTL adjustments
   ============================================================ */
html[dir="rtl"] .tw-row-meta { justify-content: flex-end; }
html[dir="rtl"] .tw-block-more { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .tw-row-title-text { text-align: right; }
html[dir="rtl"] .tw-mast-h { text-align: right; }
html[dir="rtl"] .tw-track-num { text-align: right; }

.tw-notfound { padding: clamp(80px, 12vw, 160px) 0; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }

/* ============================================================
   Inline EN/AR swap for structural multi-element strings
   (Used where data-i18n textContent swap can't preserve markup.)
   ============================================================ */
.i18n-ar { display: none; }
body.is-ar .i18n-en { display: none; }
body.is-ar .i18n-ar { display: inline; }

/* Unsplash photo credit — small line under the hero image. Required by Unsplash terms. */
.tw-hero-credit {
  font-family: var(--serif-text);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 8px var(--shell-pad) 0;
  max-width: var(--shell-max);
  text-align: right;
}
.tw-hero-credit a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.2);
  text-underline-offset: 0.18em;
}
.tw-hero-credit a:hover { color: var(--fg); text-decoration-color: var(--fg); }

/* ============================================================
   Reach-us page — contact form, editorial register
   ============================================================ */
.tw-reach-form {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 0 64px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.tw-reach-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tw-reach-label {
  font-family: var(--serif-text);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
body.is-ar .tw-reach-label {
  font-family: var(--arabic);
  letter-spacing: 0;
  text-transform: none;
  font-size: 13px;
}
.tw-reach-input {
  font-family: var(--serif-text);
  font-size: 18px;
  line-height: 1.5;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  padding: 8px 0 10px;
  outline: none;
  width: 100%;
  transition: border-color 200ms ease;
}
body.is-ar .tw-reach-input { font-family: var(--arabic); font-size: 17px; }
.tw-reach-input::placeholder { color: rgba(0, 0, 0, 0.3); font-style: italic; }
body.is-ar .tw-reach-input::placeholder { font-style: normal; }
.tw-reach-input:focus { border-bottom-color: var(--fg); }
.tw-reach-textarea {
  resize: vertical;
  min-height: 180px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 16px;
  border-radius: 0;
  line-height: 1.65;
}
.tw-reach-foot {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  margin-top: 8px;
}
body.is-ar .tw-reach-foot { align-items: flex-end; }
.tw-reach-submit {
  font-family: var(--serif-text);
  font-size: 14px;
  letter-spacing: 0.04em;
  background: var(--fg);
  color: var(--bg);
  border: 0;
  padding: 14px 28px;
  cursor: pointer;
  transition: opacity 200ms ease;
}
body.is-ar .tw-reach-submit { font-family: var(--arabic); letter-spacing: 0; font-size: 15px; }
.tw-reach-submit:hover { opacity: 0.85; }
.tw-reach-fine {
  font-family: var(--serif-text);
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}
body.is-ar .tw-reach-fine { font-family: var(--arabic); font-style: normal; font-size: 14px; }
.tw-reach-fallback {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.25);
  text-underline-offset: 0.2em;
}
.tw-reach-fallback:hover { text-decoration-color: var(--fg); }
.tw-reach-fallback-addr {
  margin-inline-start: 8px;
  font-family: var(--serif-text);
  color: var(--fg);
  font-style: normal;
}
