/* The Daily Ward — shared site chrome (Nov 25, 2026, r3)
   Clean header. Desktop: a slim full-height right column with a long
   vertical search, quick links, and one current advertiser. Mobile: the
   column is hidden. */

:root {
  --tdw-navy: #002E6D;
  --tdw-gold: #E8A317;
  --tdw-gold-light: #F2B84B;
  --tdw-cream: #FBF6EA;
  --tdw-mint: #bfe3c9;
  --tdw-green: #00A651;
  --tdw-serif: "Noto Serif Display", "Noto Serif", "DejaVu Serif", Georgia, serif;
  --tdw-sans: "DejaVu Sans", Arial, sans-serif;
  --tdw-rail: 228px;
}

.tdw-chrome {
  background: var(--tdw-navy);
  color: #fff;
  border-bottom: 2px solid var(--tdw-gold);
  font-family: var(--tdw-sans);
  position: relative;
  z-index: 20;
}

.tdw-chrome *,
.tdw-chrome *::before,
.tdw-chrome *::after,
.tdw-rail *,
.tdw-rail *::before,
.tdw-rail *::after,
.tdw-frame { box-sizing: border-box; }

.tdw-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--tdw-gold);
  color: var(--tdw-navy);
  font-weight: 800;
  padding: 8px 14px;
  z-index: 10001;
}
.tdw-skip:focus { left: 12px; top: 12px; }

.tdw-chrome-inner {
  max-width: none;
  margin: 0;
  padding: 12px 20px 10px;
}

.tdw-chrome-row {
  display: flex;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
}

.tdw-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}
.tdw-brand:hover { color: #fff; }
.tdw-brand img {
  width: 64px;
  height: 64px;
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
}
.tdw-brand-text { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.tdw-brand-name {
  display: block;
  font-family: var(--tdw-serif);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin: 0;
}
.tdw-brand-tag {
  display: block;
  margin: 3px 0 0;
  color: var(--tdw-mint);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.tdw-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 2px;
  flex: 1 1 auto;
  justify-content: flex-end;
}
.tdw-nav a,
.tdw-nav a:link,
.tdw-nav a:visited {
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 5px 10px;
  border: 0;
  background: transparent;
  border-radius: 0;
  line-height: 1.3;
}
.tdw-nav a:hover,
.tdw-nav a:focus,
.tdw-nav a[aria-current="page"] {
  color: var(--tdw-gold);
  background: transparent;
  border: 0;
}

header.tdw-chrome #tdw-current-issue-pin,
header.tdw-chrome #tdw-current-issue-pin:link,
header.tdw-chrome #tdw-current-issue-pin:visited {
  all: unset;
  display: inline;
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
  font-family: var(--tdw-sans);
  letter-spacing: 0.01em;
  padding: 5px 10px;
  cursor: pointer;
  box-sizing: border-box;
}
header.tdw-chrome #tdw-current-issue-pin:hover,
header.tdw-chrome #tdw-current-issue-pin:focus,
header.tdw-chrome #tdw-current-issue-pin[aria-current="page"] {
  color: var(--tdw-gold);
}

.tdw-nav-spacer { flex: 1 1 8px; min-width: 4px; }

.tdw-nav a.tdw-pdf,
.tdw-nav a.tdw-pdf:link,
.tdw-nav a.tdw-pdf:visited {
  color: var(--tdw-gold);
  font-weight: 800;
  margin-left: 2px;
}
.tdw-nav a.tdw-pdf:hover,
.tdw-nav a.tdw-pdf:focus { color: #fff; }

.tdw-nav a.tdw-pdf-phone,
.tdw-nav a.tdw-pdf-phone:link,
.tdw-nav a.tdw-pdf-phone:visited {
  color: var(--tdw-mint);
  font-weight: 600;
  font-size: 13px;
}
.tdw-nav a.tdw-pdf-phone:hover,
.tdw-nav a.tdw-pdf-phone:focus { color: #fff; }

/* Desktop: Search lives in the right column. Mobile: a small header link. */
.tdw-nav-search { display: none; }

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

/* —— Desktop page frame: content | slim full-height right column —— */
.tdw-frame {
  min-height: 100vh;
  background: #dfe3ea;
}

@media screen and (min-width: 900px) {
  .tdw-frame {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--tdw-rail);
    align-items: stretch;
  }
  .tdw-frame-main {
    min-width: 0;
    background: var(--tdw-cream);
  }
  /* Header and the page share the same left column, so they line up
     with the right rail from the very top. No leftover offset. */
  .tdw-rail {
    min-width: 0;
    background: #fff;
    border-left: 1px solid rgba(0, 46, 109, 0.12);
    padding: 14px 12px 20px;
    font-family: var(--tdw-sans);
  }
  .tdw-rail-inner {
    position: sticky;
    top: 14px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* Issue 41 scales letter pages to the viewport (fix39.css). Recalculate
     that scale from the left column so the paper lines up with the rail
     instead of sliding under it. Print is unchanged (this is screen-only). */
  html:not(.phonepdf) .tdw-frame-main section.page {
    --i41-scale: calc((100vw - var(--tdw-rail) - 24px) / 8.5in);
    transform: scale(var(--i41-scale)) !important;
    transform-origin: top center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: calc((var(--i41-scale) - 1) * 11in + 16px) !important;
  }
  .tdw-frame { overflow-x: hidden; }
}

.tdw-rail-search h2 {
  font-family: var(--tdw-serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 10px;
  color: var(--tdw-navy);
}
.tdw-rail-search form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.tdw-rail-search input[type="search"] {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(0, 46, 109, 0.18);
  border-radius: 6px;
  background: var(--tdw-cream);
  color: var(--tdw-navy);
  font: 14px/1.2 var(--tdw-sans);
  outline: none;
}
.tdw-rail-search input[type="search"]::placeholder { color: #5a6a7a; }
.tdw-rail-search input[type="search"]:focus {
  border-color: var(--tdw-gold);
  box-shadow: 0 0 0 2px rgba(232, 163, 23, 0.35);
}
.tdw-rail-search button {
  height: 38px;
  width: 100%;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--tdw-gold);
  color: var(--tdw-navy);
  font: 800 14px/1 var(--tdw-sans);
  cursor: pointer;
}
.tdw-rail-search button:hover,
.tdw-rail-search button:focus { background: var(--tdw-gold-light); }

.tdw-rail-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(0, 46, 109, 0.12);
}
.tdw-rail-links a,
.tdw-rail-links a:link,
.tdw-rail-links a:visited {
  color: var(--tdw-navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 0;
  border: 0;
  background: none;
}
.tdw-rail-links a:hover,
.tdw-rail-links a:focus { color: var(--tdw-green); }

.tdw-rail-ad {
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(0, 46, 109, 0.12);
}
.tdw-rail-ad .tdw-rail-ad-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6a7380;
  margin: 0 0 8px;
}
.tdw-rail-ad a { display: block; text-decoration: none; }
.tdw-rail-ad img {
  width: 100%;
  height: auto;
  display: block;
  border: 0;
  border-radius: 4px;
}


/* Footer nav is mobile-only; desktop keeps the header + right column. */
.tdw-footer { display: none; }

@media screen and (max-width: 899px) {
  .tdw-rail { display: none !important; }
  .tdw-frame, .tdw-frame-main { display: block; }
  .tdw-chrome-inner { padding: 12px 14px 10px; }
  .tdw-brand img { width: 52px; height: 52px; }
  .tdw-brand-name { font-size: 22px; }
  .tdw-brand-tag { font-size: 12px; }
  .tdw-chrome-row { align-items: center; flex-wrap: nowrap; }
  /* Header on a phone: masthead only. Nav moves to the footer. */
  .tdw-chrome .tdw-nav { display: none !important; }

  .tdw-footer {
    display: block;
    background: var(--tdw-navy);
    color: #fff;
    border-top: 2px solid var(--tdw-gold);
    font-family: var(--tdw-sans);
    padding: 16px 16px 28px;
    margin: 0;
  }
  .tdw-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 4px;
    justify-content: flex-start;
    max-width: 520px;
    margin: 0 auto;
  }
  .tdw-footer-nav a,
  .tdw-footer-nav a:link,
  .tdw-footer-nav a:visited {
    color: #fff;
    text-decoration: none;
    font-weight: 650;
    font-size: 15px;
    padding: 8px 10px;
    line-height: 1.3;
    border: 0;
    background: transparent;
  }
  .tdw-footer-nav a:hover,
  .tdw-footer-nav a:focus,
  .tdw-footer-nav a[aria-current="page"] {
    color: var(--tdw-gold);
  }
  .tdw-footer-nav a.tdw-pdf,
  .tdw-footer-nav a.tdw-pdf:link,
  .tdw-footer-nav a.tdw-pdf:visited {
    color: var(--tdw-gold);
    font-weight: 800;
  }
  .tdw-footer-nav a.tdw-pdf-phone,
  .tdw-footer-nav a.tdw-pdf-phone:link,
  .tdw-footer-nav a.tdw-pdf-phone:visited {
    color: var(--tdw-mint);
    font-weight: 600;
  }
}

@media print {
  .tdw-chrome,
  header.tdw-chrome,
  #tdw-current-issue-pin,
  .tdw-rail,
  .tdw-footer { display: none !important; }
  .tdw-frame, .tdw-frame-main { display: block !important; }
}
