/* Your Edition — landing page. Editorial-print feel deliberately echoes
   the daily issue's masthead: warm cream background, white card,
   double-ruled charcoal frame, deep editorial red accent, Bookman display
   serif on the wordmark.

   Palette:
     #f6f1e6  warm cream page background
     #ffffff  card body
     #1c1e21  charcoal ink (primary text + frame)
     #3a3f48  body copy secondary
     #5a5f68  muted text
     #a01e23  editorial red accent
     #ece5d4  section divider warm gray
     #f9f5e9  section tint (alternating bands inside the card) */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #f6f1e6;
  color: #1c1e21;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
}

a { color: #a01e23; text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #82171b; }

.page {
  display: flex;
  justify-content: center;
  padding: 32px 14px 48px 14px;
}

.card {
  background: #ffffff;
  border: 1px solid #e3dccd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(40, 30, 20, 0.08);
  width: 100%;
  max-width: 720px;
}

.accent-stripe {
  height: 6px;
  background: #a01e23;
}

/* ====================================================================
   Masthead
   ==================================================================== */

.masthead {
  padding: 28px 40px 26px 40px;
}

.dateline {
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #5a5f68;
  margin-bottom: 18px;
  font-weight: 600;
}
.dateline-dot { padding: 0 6px; color: #a01e23; }

.frame-outer {
  border: 2.5px solid #1c1e21;
  padding: 5px;
  background: #ffffff;
}

.frame-inner {
  border: 1px solid #1c1e21;
  padding: 30px 24px 24px 24px;
  text-align: center;
}

.wordmark {
  margin: 0;
  font-family: "Bookman Old Style", "Book Antiqua", Georgia,
               "Times New Roman", serif;
  font-size: 48px;
  font-weight: 900;
  color: #1c1e21;
  letter-spacing: 5px;
  line-height: 1;
  text-transform: uppercase;
}

.rule {
  margin: 16px 0 14px 0;
  line-height: 0;
}
.rule-line {
  display: inline-block;
  vertical-align: middle;
  width: 58px;
  height: 1px;
  background: #1c1e21;
}
.rule-diamond {
  display: inline-block;
  vertical-align: middle;
  padding: 0 10px;
  color: #a01e23;
  font-size: 11px;
  line-height: 1;
}

.tagline-latin {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  color: #1c1e21;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
}

/* ====================================================================
   Hero
   ==================================================================== */

.hero {
  padding: 30px 56px 28px 56px;
  text-align: center;
}

.hero-lede {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.32;
  color: #1c1e21;
  margin: 0 0 14px 0;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.hero-sub {
  font-size: 16.5px;
  line-height: 1.65;
  color: #3a3f48;
  margin: 0 auto 24px auto;
  max-width: 540px;
}

/* ====================================================================
   Form (hero + cta variants share base)
   ==================================================================== */

.form { margin: 0 auto; max-width: 520px; }

.row {
  display: flex;
  gap: 10px;
  border: 1.5px solid #1c1e21;
  border-radius: 4px;
  background: #ffffff;
  padding: 4px;
}

input[type="email"] {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 13px 14px;
  font-size: 16px;
  font-family: inherit;
  color: #1c1e21;
  min-width: 0;
}
input[type="email"]::placeholder { color: #8c8a83; }
input[type="email"]:focus { outline: 0; }

button[type="submit"] {
  border: 0;
  background: #a01e23;
  color: #ffffff;
  padding: 13px 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}
button[type="submit"]:hover { background: #82171b; }
button[type="submit"]:disabled {
  background: #7a7a7a;
  cursor: not-allowed;
}

.form-note {
  text-align: center;
  font-size: 13px;
  color: #5a5a5a;
  margin: 12px 0 0 0;
  min-height: 1.2em;
}
.form-note.success { color: #1a6b3a; font-weight: 600; }
.form-note.error   { color: #a01e23; font-weight: 600; }

/* ====================================================================
   Customize-my-edition (optional questionnaire under the hero form)
   ==================================================================== */

.customize-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px auto 0 auto;
  padding: 6px 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #d9d3c2;
  border-radius: 0;
  text-transform: none;
  letter-spacing: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  color: #1c1e21;
  cursor: pointer;
  width: auto;
}
.customize-toggle:hover {
  background: transparent;
  color: #a01e23;
  border-bottom-color: #a01e23;
}
.customize-toggle-meta {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 400;
  color: #5a5f68;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
}
.customize-toggle-arrow {
  font-size: 11px;
  color: #a01e23;
  transition: transform 0.18s ease;
  display: inline-block;
}
.customize-toggle[aria-expanded="true"] .customize-toggle-arrow {
  transform: rotate(180deg);
}

.customize-panel {
  border: 1px solid #d9d3c2;
  border-radius: 4px;
  background: #fbf8ef;
  padding: 8px 20px 14px 20px;
  margin: 14px auto 0 auto;
  max-width: 520px;
  text-align: left;
}
.customize-panel[hidden] { display: none; }

.customize-group {
  border: 0;
  padding: 14px 0 12px 0;
  margin: 0;
  border-top: 1px solid #ece5d4;
}
.customize-group:first-of-type { border-top: 0; }

.customize-legend {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #1c1e21;
  font-weight: 700;
  padding: 0;
  margin: 0;
}

.customize-help {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  color: #5a5f68;
  font-style: italic;
  margin: 4px 0 12px 0;
  line-height: 1.5;
}

.interest-input {
  width: 100%;
  border: 1px solid #d9d3c2;
  border-radius: 4px;
  background: #ffffff;
  padding: 10px 12px;
  font-size: 14.5px;
  font-family: Georgia, "Times New Roman", serif;
  color: #1c1e21;
  outline: 0;
}
.interest-input:focus {
  border-color: #1c1e21;
}
.interest-input::placeholder {
  color: #8c8a83;
  font-style: italic;
}

.topic-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.topic-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14.5px;
  color: #1c1e21;
  cursor: pointer;
  padding: 4px 0;
  line-height: 1.3;
}
.topic-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #a01e23;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}
.topic-check span { user-select: none; }

/* ====================================================================
   Stats row
   ==================================================================== */

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding: 22px 40px 26px 40px;
  border-top: 1px solid #ece5d4;
}
.stat { text-align: center; padding: 4px 8px; }
.stat-num {
  font-family: "Bookman Old Style", "Book Antiqua", Georgia, serif;
  font-size: 30px;
  font-weight: 900;
  color: #a01e23;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #3a3f48;
  font-weight: 600;
}

/* ====================================================================
   Generic section (used for Topics, Sources, How it's made,
   Adaptive loop, FAQ)
   ==================================================================== */

.section {
  padding: 30px 48px 30px 48px;
}
.section--bordered { border-top: 1px solid #ece5d4; }
.section--tint { background: #f9f5e9; }
.section--feature { background: #fbf8ef; }

.section-eyebrow {
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #a01e23;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-h {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  color: #1c1e21;
  text-align: center;
  letter-spacing: -0.1px;
  margin: 0 0 14px 0;
  line-height: 1.3;
}

.section-body {
  font-size: 15.5px;
  line-height: 1.7;
  color: #3a3f48;
  margin: 0 auto 18px auto;
  max-width: 560px;
  text-align: center;
}
.section-body--quiet {
  color: #5a5f68;
  font-style: italic;
  font-size: 14.5px;
  margin-top: 0;
}
.section-body--tight {
  margin: 14px auto 0 auto;
  font-size: 14px;
  color: #5a5f68;
  font-style: italic;
}

/* ====================================================================
   Controls list (customization section — three explicit user controls
   in Roman numerals, editorial table-of-contents style)
   ==================================================================== */

.controls {
  list-style: none;
  padding: 0;
  margin: 16px auto 22px auto;
  max-width: 420px;
}
.control {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 10px 4px;
  border-bottom: 1px solid #ece5d4;
  font-family: Georgia, "Times New Roman", serif;
}
.control:last-child { border-bottom: 0; }
.ctrl-num {
  font-family: "Bookman Old Style", "Book Antiqua", Georgia, serif;
  font-size: 18px;
  font-weight: 900;
  color: #a01e23;
  letter-spacing: 0.5px;
  flex: 0 0 32px;
  text-align: right;
}
.ctrl-text {
  font-size: 17px;
  color: #1c1e21;
  line-height: 1.4;
  font-weight: 600;
}

/* ====================================================================
   Edition-compare (customization wedge — two stacked mini-mastheads
   that show topic mix shifting from default to personalized)
   ==================================================================== */

.edition-compare {
  margin: 22px auto 24px auto;
  max-width: 560px;
  text-align: center;
}
.edition-snippet {
  padding: 4px 8px;
}
.edition-snippet-label {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #8a8270;
  font-weight: 700;
  margin-bottom: 8px;
}
.edition-snippet-body {
  font-family: "Bookman Old Style", "Book Antiqua", Georgia,
               "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1c1e21;
  letter-spacing: 0.2px;
}
.edition-snippet--you .edition-snippet-label {
  color: #a01e23;
}
.edition-snippet--you .edition-snippet-body {
  font-style: italic;
}
.edition-snippet-divider {
  color: #a01e23;
  font-size: 10px;
  line-height: 1;
  margin: 14px 0;
}

/* ====================================================================
   Topic chips
   ==================================================================== */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 4px;
}
.chip {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid #1c1e21;
  border-radius: 999px;
  background: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #1c1e21;
  font-weight: 700;
}

/* ====================================================================
   Sample issue preview
   ==================================================================== */

.issue-preview {
  margin-top: 14px;
  background: #ffffff;
  border: 1px solid #d9d3c2;
  border-radius: 4px;
  overflow: hidden;
}
.issue-preview-meta {
  padding: 12px 18px;
  background: #f1ecdc;
  border-bottom: 1px solid #d9d3c2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12.5px;
  color: #3a3f48;
  line-height: 1.55;
}
.ipm-from, .ipm-subject { display: block; }
.ipm-from { margin-bottom: 2px; }
.ipm-label {
  display: inline-block;
  min-width: 56px;
  color: #8a8a8a;
  font-style: italic;
}

.story-card {
  padding: 18px 22px 18px 22px;
  border-bottom: 1px solid #ece5d4;
}
.story-card:last-of-type { border-bottom: 0; }

.story-tag {
  display: inline-block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #a01e23;
  font-weight: 700;
  margin-bottom: 6px;
}
.story-headline {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 700;
  color: #1c1e21;
  line-height: 1.35;
  margin: 0 0 8px 0;
}
.story-summary {
  font-size: 14.5px;
  line-height: 1.65;
  color: #3a3f48;
  margin: 0 0 8px 0;
}
.story-why {
  font-size: 14.5px;
  line-height: 1.65;
  color: #3a3f48;
  margin: 0 0 8px 0;
}
.story-why strong { color: #1c1e21; }
.story-link {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #a01e23;
  text-decoration: none;
  font-weight: 700;
  pointer-events: none;
  cursor: default;
}

.issue-preview-more {
  padding: 14px 22px;
  background: #faf5e6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  color: #5a5f68;
  font-style: italic;
  text-align: center;
}

/* ====================================================================
   Sources grid
   ==================================================================== */

.source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-top: 12px;
  margin-bottom: 16px;
}
.source-col-h {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #1c1e21;
  font-weight: 700;
  border-bottom: 1px solid #ece5d4;
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.source-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.source-list li {
  font-size: 14px;
  line-height: 1.85;
  color: #3a3f48;
}
.source-caption {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  color: #5a5f68;
  font-style: italic;
  text-align: center;
  margin: 12px auto 0 auto;
  max-width: 520px;
  line-height: 1.6;
}

/* ====================================================================
   How it's made — steps
   ==================================================================== */

.steps {
  list-style: none;
  padding: 0;
  margin: 14px 0 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
}
.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.step-num {
  font-family: "Bookman Old Style", "Book Antiqua", Georgia, serif;
  font-size: 28px;
  font-weight: 900;
  color: #a01e23;
  line-height: 1;
  letter-spacing: 1px;
  flex-shrink: 0;
  width: 44px;
}
.step-h {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
  color: #1c1e21;
  margin-bottom: 4px;
}
.step-body p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #3a3f48;
}

/* ====================================================================
   Second CTA
   ==================================================================== */

.cta {
  padding: 32px 48px 36px 48px;
  text-align: center;
  border-top: 1px solid #ece5d4;
  background: #ffffff;
}
.cta-eyebrow {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #a01e23;
  font-weight: 700;
  margin-bottom: 8px;
}
.cta-h {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 700;
  color: #1c1e21;
  margin: 0 0 12px 0;
  line-height: 1.3;
}
.cta-body {
  font-size: 15.5px;
  line-height: 1.65;
  color: #3a3f48;
  margin: 0 auto 22px auto;
  max-width: 480px;
}

/* ====================================================================
   FAQ accordion
   ==================================================================== */

.faq {
  margin-top: 12px;
  border-top: 1px solid #ece5d4;
}
.faq-item {
  border-bottom: 1px solid #ece5d4;
}
.faq-q {
  list-style: none;
  cursor: pointer;
  padding: 16px 4px 16px 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15.5px;
  font-weight: 700;
  color: #1c1e21;
  position: relative;
  padding-right: 32px;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  color: #a01e23;
  font-weight: 700;
  line-height: 1;
}
.faq-item[open] .faq-q::after { content: "–"; }
.faq-q:hover { color: #a01e23; }
.faq-a {
  padding: 0 4px 18px 4px;
}
.faq-a p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: #3a3f48;
}

/* ====================================================================
   Footer
   ==================================================================== */

.footer {
  padding: 22px 40px 28px 40px;
  text-align: center;
  border-top: 1px solid #ece5d4;
}
.footer-rule {
  margin-bottom: 12px;
  line-height: 0;
}
.footer-line {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  color: #5a4419;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.footer-links {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  color: #5a5f68;
}
.footer-links a {
  color: #3a3f48;
  text-decoration: none;
  border-bottom: 1px solid #d9d3c2;
}
.footer-links a:hover { color: #a01e23; border-color: #a01e23; }
.footer-dot { padding: 0 8px; color: #a01e23; }

/* ====================================================================
   Action row (unsubscribe / resubscribe pages) — CSP forbids inline
   styles, so the unsubscribe Edge function lays out its single-button
   forms with this class instead of style="..." attrs.
   ==================================================================== */

.action-row {
  margin: 22px 0 6px 0;
  text-align: center;
}
.action-row button[type="submit"] {
  padding: 14px 32px;
}

/* ====================================================================
   Utilities
   ==================================================================== */

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

/* ====================================================================
   Mobile
   ==================================================================== */

@media (max-width: 640px) {
  .page { padding: 16px 8px 28px 8px; }

  .masthead { padding: 22px 18px 18px 18px; }
  .dateline { font-size: 10px; letter-spacing: 1.5px; margin-bottom: 14px; }
  .wordmark { font-size: 32px; letter-spacing: 3px; }
  .frame-inner { padding: 24px 14px 18px 14px; }

  .hero { padding: 26px 20px 22px 20px; }
  .hero-lede { font-size: 23px; }
  .hero-sub { font-size: 15.5px; }

  .row { flex-direction: column; padding: 6px; gap: 6px; }
  input[type="email"] { text-align: center; }
  button[type="submit"] { width: 100%; }

  .stats {
    padding: 18px 18px 20px 18px;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .stat { display: flex; align-items: baseline; justify-content: center; gap: 12px; }
  .stat-num { font-size: 26px; margin-bottom: 0; }

  .section { padding: 26px 20px 26px 20px; }
  .section-h { font-size: 19px; }
  .section-body { font-size: 15px; }

  .chip-row { gap: 6px; }
  .chip { font-size: 11px; padding: 5px 10px; letter-spacing: 1.2px; }

  .issue-preview-meta { padding: 10px 14px; font-size: 12px; }
  .ipm-label { min-width: 44px; }
  .story-card { padding: 14px 16px; }
  .story-headline { font-size: 15.5px; }
  .story-summary, .story-why { font-size: 14px; }

  .source-grid { grid-template-columns: 1fr; gap: 18px; }

  .edition-snippet-body { font-size: 15px; line-height: 1.65; }
  .edition-snippet-label { letter-spacing: 2px; }

  .steps { grid-template-columns: 1fr; gap: 14px; }

  .cta { padding: 26px 20px 28px 20px; }
  .cta-h { font-size: 21px; }
  .cta-body { font-size: 15px; }

  .faq-q { font-size: 15px; padding-right: 28px; }

  .footer { padding: 18px 18px 22px 18px; }

  .customize-panel { padding: 14px 14px 12px 14px; max-width: none; }
  .topic-checks { grid-template-columns: 1fr; gap: 4px 0; }
  .topic-check { font-size: 14px; padding: 6px 0; }
}
