/* ============================================================================
   El Brief de MedicareManny — monthly editorial page.
   Dark gallery register (the one place the site goes full Saturday-Brief):
   near-black ground, yellow DM Serif display, italic serif intro, mono
   credit lines, checkmark blocks. Loaded ONLY by brief.html.
   ========================================================================== */

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

:root {
  --ink-bg:    #101010;
  --panel:     #1C1C1A;
  --line:      #33332E;
  --yellow:    #E8C43A;
  --paper:     #EDEDE8;
  --quiet:     #C9CDC4;
  --faded:     #9CA3AF;
  --green:     #4CAF50;

  --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans:  'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 19px;             /* senior floor */
  line-height: 1.7;
  color: var(--paper);
  background: var(--ink-bg);
}

a { color: var(--yellow); }
a:hover { color: #F2D66A; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--yellow); color: var(--ink-bg);
  padding: 10px 18px; border-radius: 8px; font-weight: 700; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.mono-line {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faded);
}

/* ---- header ---------------------------------------------------------------- */

.brief-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}
.brief-brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-size: 21px;
  color: var(--paper); text-decoration: none;
}
.brief-brand-mark {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: #FFFFFF;
  font-size: 15px; letter-spacing: 0;
}
.language-toggle {
  display: inline-flex; align-items: center;
  padding: 4px; border: 2px solid var(--yellow); border-radius: 999px;
}
.language-option {
  min-height: 44px; padding: 0 16px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--yellow);
  font-family: var(--sans); font-size: 15px; font-weight: 700;
  cursor: pointer;
}
.language-option.is-active { background: var(--yellow); color: var(--ink-bg); }

/* ---- rotated margins (the Dia signature) ----------------------------------- */

main { position: relative; max-width: 880px; margin: 0 auto; padding: 56px 24px 40px; }

.brief-margin {
  position: absolute; top: 320px;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(16px, 2vw, 22px);
  letter-spacing: 0.04em;
  color: var(--paper);
  white-space: nowrap;
}
.brief-margin-left  { left: -40px;  transform: rotate(-90deg); }
.brief-margin-right { right: -46px; transform: rotate(90deg); }
@media (max-width: 1080px) { .brief-margin { display: none; } }

/* ---- masthead --------------------------------------------------------------- */

.brief-masthead { text-align: center; }
.brief-over {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(24px, 3.4vw, 34px);
  color: var(--yellow);
}
.brief-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(52px, 9vw, 96px);
  line-height: 1.02;
  color: var(--yellow);
  margin-top: -4px;
}
.brief-title span { font-size: 0.42em; display: block; letter-spacing: 0.01em; }

.brief-art { margin: 34px auto 0; max-width: 780px; }
.brief-art img { width: 100%; height: auto; display: block; border-radius: 4px; }
.brief-art figcaption { margin-top: 10px; text-align: right; }

.brief-intro {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(21px, 2.8vw, 26px);
  line-height: 1.5;
  color: var(--quiet);
  max-width: 34ch;
  margin: 40px auto 0;
}

/* ---- content blocks --------------------------------------------------------- */

.brief-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(26px, 4vw, 40px);
  margin-top: 44px;
}
.brief-kicker {
  font-family: var(--mono);
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--faded);
  margin-bottom: 12px;
}
.brief-block h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1.15;
  color: var(--yellow);
}
.brief-word { font-size: clamp(40px, 6vw, 58px) !important; }
.brief-body {
  margin-top: 16px;
  font-size: 19px; font-weight: 500; line-height: 1.7;
  color: var(--paper);
  max-width: 62ch;
}
.brief-body em { font-style: italic; color: var(--yellow); }

.brief-checks { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.brief-check { display: flex; gap: 14px; align-items: flex-start; }
.brief-check svg {
  width: 24px; height: 24px; flex-shrink: 0; margin-top: 4px;
  fill: none; stroke: var(--yellow); stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
}
.brief-check p { font-size: 18px; font-weight: 500; line-height: 1.6; color: var(--paper); }
.brief-check strong { color: var(--yellow); font-weight: 700; }

/* ---- CTA -------------------------------------------------------------------- */

.brief-cta {
  position: relative;
  text-align: center;
  margin-top: 56px;
  padding: 40px clamp(20px, 5vw, 48px) 8px;
}
.brief-star {
  position: absolute; top: -8px; right: clamp(0px, 4vw, 40px);
  width: 104px; height: 104px;
  transform: rotate(9deg);
  pointer-events: none;
}
.brief-star svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
.brief-star span {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic;
  font-size: 18px; color: var(--ink-bg);
}
.brief-cta h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  color: var(--paper);
  max-width: 22ch; margin: 0 auto;
}
.brief-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 66px; padding: 0 34px;
  margin-top: 26px;
  background: var(--green); color: #FFFFFF;
  border-radius: 16px;
  font-size: 19px; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(76, 175, 80, 0.35);
}
.brief-btn:hover { background: #388E3C; color: #FFFFFF; }
.brief-cta-sub { margin-top: 16px; font-size: 15.5px; color: var(--quiet); }

/* ---- footer ------------------------------------------------------------------ */

.brief-footer {
  max-width: 880px;
  margin: 48px auto 0;
  padding: 26px 24px 40px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
  font-size: 13.5px; line-height: 1.6;
  color: var(--faded);
}

@media (max-width: 640px) {
  .brief-header { flex-wrap: wrap; }
  .language-toggle { flex-basis: 100%; justify-content: center; }
  .language-option { flex-grow: 1; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---- "bigger letters" control ------------------------------------------- */
html[data-textsize='lg'] body { zoom: 1.12; }
html[data-textsize='xl'] body { zoom: 1.25; }
/* Phones already run large type; gentler steps keep the layout from
   overflowing sideways. */
@media (max-width: 760px) {
  html[data-textsize='lg'] body { zoom: 1.06; }
  html[data-textsize='xl'] body { zoom: 1.13; }
}

.textsize-btn {
  min-height: 44px; min-width: 50px;
  padding: 0 12px;
  border: 2px solid var(--yellow);
  border-radius: 999px;
  background: transparent;
  color: var(--yellow);
  font-family: var(--sans);
  font-size: 16px; font-weight: 800;
  cursor: pointer;
}
.textsize-btn:hover { background: rgba(232, 196, 58, 0.14); }
