/* Reading foundation: opt-in home and two source-backed library pilots. */
.reading-foundation-home {
  --foundation-paper: #f7f4ed;
  --foundation-surface: #fffdf8;
  --foundation-ink: #30271f;
  --foundation-muted: #655b50;
  --foundation-line: #d9d0c2;
  --foundation-accent: #75522e;
  background: var(--foundation-paper);
  color: var(--foundation-ink);
}

.reading-foundation-home .foundation-home-shell {
  display: block;
  max-width: 1240px;
  padding: 0 28px;
  margin: 0 auto;
}

.reading-foundation-home .foundation-home {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 22px 0 48px;
}

.foundation-home .editorial-frontpage-v2 { display: grid; gap: 48px; }
.reading-foundation-home .site-header { max-width: 1240px; margin: 0 auto; }
.reading-foundation-home .site-header.premium-site-header { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 26px 28px; box-shadow: none; }
.reading-foundation-home .site-header .primary-channel-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: none; width: 100%; justify-self: stretch; }
.reading-foundation-home .site-header .primary-channel-nav a { min-width: 0; padding: 10px 12px; box-shadow: none; border-radius: 6px; }
.reading-foundation-home .site-header .knowledge-mega-nav { position: absolute; right: 28px; top: 30px; width: 170px; }
.reading-foundation-home .site-header .knowledge-mega-nav summary { min-height: 44px; padding: 12px; border-radius: 6px; box-shadow: none; }
.reading-foundation-home .site-header .header-brand-block { padding-right: 185px; }
.reading-foundation-home .site-header .site-page-title,
.reading-foundation-home .site-header .site-current-section { display: none; }
.reading-foundation-home .site-nav strong { font-size: 14px; }
.reading-foundation-home .site-nav span { display: none; }
.reading-foundation-home .knowledge-mega-nav { margin-top: 0; }

.foundation-home .foundation-hero {
  display: block;
  min-height: 0;
  padding: clamp(28px, 5vw, 64px);
  border-radius: 16px;
  border: 1px solid #5d4935;
  background: #382b20;
  color: #fffaf0;
  box-shadow: none;
}
.foundation-home .foundation-hero::before,
.foundation-home .foundation-hero::after { display: none; }
.foundation-home .frontpage-hero-copy { display: block; }
.foundation-home .foundation-hero .section-kicker { color: #e1c89f; letter-spacing: .15em; }
.foundation-home .foundation-hero h1 {
  max-width: 21ch;
  margin: 16px 0 24px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .025em;
  color: #fffaf0;
  overflow-wrap: anywhere;
}
.foundation-home .foundation-hero .lead {
  max-width: 64ch;
  color: #e4dacb;
  font-size: 16px;
  line-height: 1.95;
}
.foundation-home .foundation-hero .hero-actions { margin-top: 28px; }
.foundation-hero-note { margin: 26px 0 0; padding-top: 22px; border-top: 1px solid #796550; color: #e4dacb; font-size: 13px; line-height: 1.8; }

.foundation-home .foundation-search {
  margin: 0;
  padding: 26px 30px;
  border: 1px solid var(--foundation-line);
  border-radius: 12px;
  background: var(--foundation-surface);
}
.foundation-search label { display: block; margin-bottom: 12px; font-size: 18px; font-weight: 700; }
.foundation-search-controls { display: flex; gap: 12px; }
.foundation-search input { flex: 1; min-width: 0; min-height: 50px; padding: 12px 16px; border: 1px solid #988771; border-radius: 6px; background: #fff; color: #30271f; font: inherit; }
.foundation-search input::placeholder { color: #6f675d; }
.foundation-search button { min-height: 50px; padding: 12px 28px; border: 1px solid #513922; border-radius: 6px; background: #513922; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.foundation-search-help { margin: 12px 0 0; color: var(--foundation-muted); font-size: 13px; line-height: 1.8; }
.foundation-search-help a { margin-left: 12px; color: #654321; text-decoration: underline; text-underline-offset: 4px; }

.foundation-section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 24px; }
.foundation-section-heading h2 { margin: 8px 0 0; font-size: clamp(23px, 3vw, 30px); line-height: 1.6; color: var(--foundation-ink); }
.foundation-section-heading p { margin: 0; }
.foundation-section-heading > a { flex-shrink: 0; color: #654321; text-decoration: underline; text-underline-offset: 5px; }
.foundation-home .section-kicker { color: var(--foundation-accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.foundation-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.foundation-card { display: flex; flex-direction: column; align-items: start; padding: 28px; border: 1px solid var(--foundation-line); border-radius: 12px; background: var(--foundation-surface); }
.foundation-card .foundation-card-type { color: var(--foundation-muted); font-size: 12px; letter-spacing: .07em; }
.foundation-card h3 { margin: 20px 0 14px; color: var(--foundation-ink); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 26px; line-height: 1.6; }
.foundation-card p { margin: 0 0 24px; color: var(--foundation-muted); font-size: 15px; line-height: 1.95; }
.foundation-card > a { margin-top: auto; color: #654321; font-weight: 700; text-decoration: underline; text-underline-offset: 5px; padding: 8px 0; }

.foundation-comparison { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 30px; padding: 36px; border: 1px solid #cdbb9e; border-radius: 12px; background: #ede5d7; }
.foundation-comparison h2 { margin: 12px 0 18px; font-size: clamp(25px, 3vw, 34px); line-height: 1.65; }
.foundation-comparison p { color: var(--foundation-muted); line-height: 1.95; }
.foundation-comparison a { display: inline-flex; min-height: 46px; align-items: center; color: #533619; text-decoration: underline; text-underline-offset: 5px; font-weight: 700; }
.foundation-compare-steps { margin: 0; padding: 0; list-style: none; }
.foundation-compare-steps li { padding: 18px 0; border-bottom: 1px solid #cdbb9e; }
.foundation-compare-steps li:first-child { padding-top: 0; }
.foundation-compare-steps li:last-child { border-bottom: 0; }
.foundation-compare-steps strong { display: block; margin-bottom: 8px; color: var(--foundation-ink); }
.foundation-compare-steps span { color: var(--foundation-muted); font-size: 14px; line-height: 1.85; }
.foundation-secondary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.foundation-link-list { list-style: none; margin: 0; padding: 0; }
.foundation-link-list li { border-top: 1px solid var(--foundation-line); }
.foundation-link-list a { display: block; padding: 20px 0; color: #493522; font-weight: 600; text-decoration: none; line-height: 1.8; }
.foundation-link-list small { display: block; margin-top: 6px; color: var(--foundation-muted); font-size: 13px; font-weight: 400; }
.foundation-link-list a:hover { text-decoration: underline; text-underline-offset: 5px; }
.foundation-home .homepage-issue-entry { margin: 0; padding: 24px; border: 1px solid var(--foundation-line); border-radius: 12px; background: var(--foundation-surface); }
.foundation-home .homepage-issue-entry h2 { font-size: 21px; }
.foundation-home .homepage-issue-entry p { font-size: 14px; line-height: 1.8; color: var(--foundation-muted); }
.foundation-home .foundation-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0; padding: 28px 0; border-top: 1px solid var(--foundation-line); border-bottom: 1px solid var(--foundation-line); }
.foundation-trust strong { display: block; font-size: 14px; margin-bottom: 8px; }
.foundation-trust span { display: block; font-size: 13px; line-height: 1.8; color: var(--foundation-muted); }
.foundation-home a:focus-visible,
.foundation-home button:focus-visible,
.foundation-home input:focus-visible { outline: 3px solid #866026; outline-offset: 4px; }
.foundation-home .foundation-hero a:focus-visible { outline-color: #ffe1a8; }

@media (min-width: 721px) and (max-width: 1100px) {
  .reading-foundation-home .site-header .primary-channel-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .reading-foundation-home .foundation-home-shell { padding: 0 16px; }
  .foundation-home .editorial-frontpage-v2 { gap: 32px; }
  .foundation-home .foundation-hero { padding: 28px 22px; }
  .foundation-home .foundation-hero h1 { font-size: clamp(20px, 6.3vw, 32px); line-height: 1.65; margin: 14px 0 22px; }
  .reading-foundation-home .site-header.premium-site-header { padding: 20px 18px; }
  .reading-foundation-home .site-header .header-brand-block { padding-right: 0; }
  .reading-foundation-home .site-header .knowledge-mega-nav { position: static; width: auto; }
  .reading-foundation-home .site-header .primary-channel-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foundation-card-grid, .foundation-comparison, .foundation-secondary-grid, .foundation-home .foundation-trust { grid-template-columns: minmax(0, 1fr); }
  .foundation-card-grid { gap: 14px; }
  .foundation-card { padding: 24px; }
  .foundation-card h3 { margin-top: 10px; font-size: 24px; }
  .foundation-card p { margin-bottom: 12px; }
  .foundation-comparison { padding: 26px 22px; gap: 24px; }
  .foundation-section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .foundation-home .foundation-search { padding: 22px; }
  .foundation-search-controls { flex-direction: column; }
  .foundation-search-help a { display: inline-block; margin-left: 0; margin-right: 14px; padding: 6px 0; }
}

/* The two source-reviewed pilots share a product scope, not a sales card. */
/* This opt-in asset is loaded only by home and the two pilots. */
.editorial-shell:not(.reading-foundation-home) .site-header .primary-channel-nav a { flex-direction: column; gap: 4px; }
.editorial-shell:not(.reading-foundation-home) .site-header .primary-channel-nav a strong { max-width: 100%; min-width: 0; white-space: normal; word-break: normal; overflow-wrap: anywhere; }
.library-reading-pilot .library-reading-frame {
  margin: 28px 0;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid #d9d0c2;
  border-top: 3px solid #866026;
  border-radius: 12px;
  background: #fffdf8;
  color: #30271f;
  overflow-wrap: anywhere;
}
.library-reading-frame .section-kicker { margin: 0 0 12px; color: #75522e; font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.library-reading-frame h2 { margin: 0 0 16px; font-size: clamp(23px, 2.2vw, 30px); line-height: 1.65; }
.library-reading-frame .library-reading-scope { font-size: 15px; line-height: 1.95; }
.library-reading-frame .library-reading-specs { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0; margin: 24px 0; border-top: 1px solid #d9d0c2; border-bottom: 1px solid #d9d0c2; }
.library-reading-specs > div { min-width: 0; padding: 18px 16px; border-right: 1px solid #d9d0c2; }
.library-reading-specs > div:first-child { padding-left: 0; }
.library-reading-specs > div:last-child { border-right: 0; }
.library-reading-specs dt { margin-bottom: 8px; color: #655b50; font-size: 12px; font-weight: 500; }
.library-reading-specs dd { margin: 0; color: #30271f; font-size: 15px; font-weight: 700; line-height: 1.8; }
.library-reading-frame .library-reading-basis { padding-left: 14px; border-left: 2px solid #b79c72; color: #655b50; font-size: 14px; line-height: 1.9; }
.library-reading-frame .library-reading-source { font-size: 12px; color: #655b50; line-height: 1.9; }
.library-reading-frame .library-reading-steps { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 22px 0 0; padding: 18px 0 0 22px; border-top: 1px solid #d9d0c2; }
.library-reading-steps li { padding-left: 2px; font-size: 13px; }
.library-reading-frame a { color: #68451f; text-underline-offset: 4px; }
.library-reading-frame a:focus-visible { outline: 3px solid #866026; outline-offset: 4px; }
.library-reading-pilot .library-table-hint { margin: 12px 0 6px; color: #655b50; font-size: 12px; }
.library-reading-pilot .policy-table-wrap:focus-visible { outline: 3px solid #866026; outline-offset: 3px; }
.library-reading-pilot .library-brand-background { margin: 24px 0; padding: 20px 24px; border: 1px solid #d9d0c2; border-radius: 10px; background: #fffdf8; }
.library-brand-background > summary { cursor: pointer; color: #493522; font-weight: 700; }
.library-brand-background > p { color: #655b50; font-size: 14px; line-height: 1.9; }
.library-brand-background > summary:focus-visible { outline: 3px solid #866026; outline-offset: 4px; }
@media (max-width: 760px) {
  .library-reading-frame .library-reading-specs { grid-template-columns: minmax(0, 1fr); }
  .library-reading-specs > div, .library-reading-specs > div:first-child { padding: 14px 0; border-right: 0; border-bottom: 1px solid #e6ded2; }
  .library-reading-specs > div:last-child { border-bottom: 0; }
  .library-reading-frame .library-reading-steps { display: grid; gap: 14px; }
}
