@import url('./tokens.css');
@import url('./base.css');

.home-page { min-height: 100svh; display: flex; flex-direction: column; }
.top-nav { justify-self: end; font-size: 1rem; }
.top-nav a { display: inline-flex; align-items: center; min-height: 48px; padding-inline: 8px; text-decoration: none; }
.site-banner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; width: 100%; max-width: 1120px; margin-inline: auto; padding: 20px 24px 24px; border-bottom: 1px solid var(--color-rule-strong); }
.home-wordmark { font-size: 1.728rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.site-banner p { grid-column: 1 / -1; color: var(--color-muted); font-size: .875rem; margin-top: 4px; }
.home-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 0 24px; width: 100%; max-width: 1120px; margin-inline: auto; padding: 0 24px 40px; }
.top-nav a:hover { text-decoration: underline; }
.home-content { min-width: 0; padding-block: 24px 0; container-type: inline-size; }
.home-about h1 { max-width: none; font-size: 1.2rem; line-height: 1.3; margin-bottom: 12px; }
.home-about p + p { margin-top: 12px; }
.home-play { margin-block: 24px 28px; text-align: center; }
.play-link { display: flex; align-items: center; justify-content: center; max-width: 320px; min-height: 60px; margin-inline: auto; padding: 14px 24px; border-radius: 6px; background: var(--color-ink); color: var(--color-paper); font-size: 1.125rem; font-weight: 600; text-decoration: none; }
.play-link:hover { background: var(--color-accent-deep); }
.home-play p { margin: 12px auto 0; max-width: 36ch; font-size: .875rem; color: var(--color-muted); }
.home-section { border-top: 1px solid var(--color-rule); padding-top: 20px; margin-top: 24px; }
.home-section h2 { font-size: 1.2rem; line-height: 1.3; margin-bottom: 12px; }
.home-section ol { padding-left: 20px; margin: 0; }
.home-section li + li { margin-top: 8px; }
.home-note { margin-top: 12px; color: var(--color-muted); font-size: .875rem; }
.reading-topic { margin-top: 28px; }
.reading-tips h3 { font-size: 1.125rem; font-weight: 500; letter-spacing: 0; line-height: 1.4; }
.reading-topic > p { margin-top: 12px; font-size: 1rem; line-height: 1.65; }
.home-score-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-block: 20px; }
.home-score-pair figure { min-width: 0; margin: 0; }
.figure-label { font-size: .875rem; color: var(--color-muted); }
.home-score { width: 100%; min-height: 190px; }
.home-score svg { width: 100%; height: auto; }
.home-score .note-label { font-family: var(--font-body); font-size: 12px; }
.home-score-pair figcaption { font-size: 1rem; line-height: 1.6; }
.home-exercise { border-left: 2px solid var(--color-rule-strong); padding-left: 12px; }
.guide-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font-size: 1rem; }
@container (min-width: 600px) {
  .home-score-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.home-rail { min-width: 0; padding-top: 24px; }
.home-rail > * + * { margin-top: 32px; }
.quick-reference { border-block: 1px solid var(--color-rule); padding-block: 16px; }
.quick-reference h2 { font-size: 1rem; line-height: 1.4; }
.quick-reference table { width: 100%; border-collapse: collapse; font-size: .9375rem; margin-block: 12px; }
.quick-reference caption { text-align: left; color: var(--color-muted); padding-bottom: 12px; }
.quick-reference th, .quick-reference td { text-align: left; padding: 6px 0; white-space: nowrap; }
.quick-reference th { font-weight: 500; }
.quick-reference a { font-size: .875rem; display: inline-flex; align-items: center; min-height: 44px; }
/* Optional additions need actual content: no placeholder elements or reserved height.
   Keep inserts between whole sections, and size future embeds to their container. */
.home-insert, .home-bottom { min-width: 0; width: 100%; }
.home-insert > *, .home-bottom > * { max-width: 100%; }
.home-content > .home-insert { margin-block: 32px; }
.home-bottom { grid-column: 1 / -1; justify-self: center; margin-top: 32px; }
.home-footer { display: flex; justify-content: center; gap: 24px; background: var(--color-paper-2); border-top: 1px solid var(--color-rule); padding: 20px 24px; color: var(--color-muted); font-size: .875rem; }
.home-footer a, .home-footer span { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 1023px) {
  .site-banner, .home-layout { max-width: 796px; }
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .home-rail { width: 100%; margin-top: 24px; }
  .quick-reference { max-width: 320px; }
}
@media (max-width: 760px) {
  .site-banner { padding: 16px; }
  .home-layout { padding: 0 16px 32px; }
  .home-play { margin-top: 20px; }
}
