/* Keep iOS Safari from enlarging text inside narrow cards. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Shared Japanese typesetting: let body copy use the full line width naturally. */
html:lang(ja) body {
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
}

html:lang(ja) :where(p, li, dt, dd, address, figcaption, summary) {
  word-break: normal;
  overflow-wrap: break-word;
  text-wrap: wrap;
}

html:lang(ja) :where(h1, h2, h3, h4) {
  text-wrap: balance;
}

@supports (word-break: auto-phrase) {
  html:lang(ja) :where(h1, h2, h3, h4) { word-break: auto-phrase; }
}

/*
 * Shared readable type scale
 * Reference sites use roughly 15–16px body copy on mobile. Keep decorative
 * English labels delicate, while making every piece of Japanese copy readable.
 */
:root {
  --type-caption: .75rem;
  --type-small: .82rem;
  --type-body: .94rem;
  --type-body-large: 1rem;
  --type-card-title: 1.06rem;
  --type-section-title: clamp(1.42rem, 6vw, 1.62rem);
}

body { font-size: 16px; }
.site-header .global-nav a { font-size: 1rem; line-height: 1.7; }

/* Top page */
#main .section-heading h2 { font-size: var(--type-section-title); }
#main .section-heading > p { font-size: var(--type-body); }
#main .hero p { font-size: var(--type-body-large); }
#main .letter-card .lead { font-size: .95rem; }
#main .letter-copy { font-size: .72rem; }
#main .feature-list span { font-size: .88rem; }
#main .lesson-card .lessons li { font-size: .94rem; }
#main .course-card > ul { font-size: var(--type-small); }
#main .credentials li { font-size: .78rem; }
#main .bio { font-size: .88rem; line-height: 1.95; }
#main .detail-button { font-size: .94rem; }
#main .certifications { font-size: var(--type-small); }
#main .flow .section-heading h2,
#main .contact .section-heading h2 { font-size: 1.28rem; }
#main .flow h3 { font-size: var(--type-body-large); }
#main .flow p { font-size: .78rem; line-height: 1.75; }
#main .accordion summary { font-size: var(--type-body); }
#main .accordion details p { font-size: .86rem; }
#main .news-meta { font-size: var(--type-small); }
#main .news-item h3 { font-size: .9rem; }
#main .news-button { font-size: .92rem; }
#main .contact .section-heading p { font-size: .88rem; }
#main .contact-line span { font-size: var(--type-body-large); }

/* School details */
#about-main .about-hero-copy > p:last-child { font-size: .88rem; }
#about-main .section-heading h2 { font-size: clamp(1.3rem, 5.5vw, 1.52rem); }
#about-main .story-copy,
#about-main .logo-story { font-size: var(--type-body); line-height: 2; }
#about-main .logo-story h3 { font-size: var(--type-card-title); }
#about-main .commitment-grid h3 { font-size: var(--type-card-title); }
#about-main .commitment-grid p { font-size: var(--type-body); line-height: 1.9; }
#about-main .access-list dt { font-size: .86rem; }
#about-main .access-list dd { font-size: var(--type-body); }
#about-main .access-list dd a { font-size: var(--type-small); }
#about-main .gallery-lead,
#about-main .slicer-slide figcaption,
#about-main .slicer-caption-layer { font-size: var(--type-body); }
#about-main .about-contact .about-contact-heading h2 { font-size: 1.28rem; }
#about-main .about-contact .about-contact-heading p { font-size: var(--type-body); }
#about-main .about-contact .about-contact-line { font-size: var(--type-body-large); }

/* Instructor profile */
#instructor-main .profile-lead { font-size: var(--type-body); }
#instructor-main .profile-lead h3 { font-size: 1.18rem; }
#instructor-main .profile-points li > span:last-child { font-size: .84rem; }
#instructor-main .message-copy { font-size: .95rem; }
#instructor-main .qualification-list li { font-size: .8rem; }
#instructor-main .career-list time { font-size: .84rem; }
#instructor-main .career-list p { font-size: .86rem; line-height: 1.85; }
#instructor-main .closing-message { font-size: var(--type-body); }

/* News */
#news-main .news-hero h1 { font-size: 1.5rem; }
#news-main .news-hero-copy > p:last-child { font-size: var(--type-body); }
#news-main .archive-heading h2 { font-size: 1.35rem; }
#news-main .archive-meta time,
#news-main .archive-meta span { font-size: var(--type-small); }
#news-main .archive-card h3 { font-size: 1.06rem; }
#news-main .archive-card p { font-size: var(--type-body); }
#news-main .instagram-strip p { font-size: var(--type-body); }

/* Privacy policy */
#policy .policy-intro > p:last-child { font-size: var(--type-body); }
#policy .policy-card h2 { font-size: var(--type-card-title); }
#policy .policy-card p,
#policy .policy-card ul { font-size: var(--type-body); }
#policy .contact-section p,
#policy .contact-section a,
#policy .home-button { font-size: var(--type-body); }
#policy .established { font-size: var(--type-small) !important; }

/* Shared utility text */
#main ~ footer,
#about-main ~ footer,
#instructor-main ~ footer,
#news-main ~ footer,
#policy ~ footer { font-size: var(--type-caption); }

#main ~ footer > small,
#about-main ~ footer > small,
#instructor-main ~ footer > small,
#news-main ~ footer > small,
#policy ~ footer > small { font-size: .7rem; }

.floating-line b,
.floating-line span { font-size: var(--type-caption); }
