:root {
  color-scheme: light;
  --page: #f6f9fd;
  --white: #fff;
  --text: #13263c;
  --muted: #465e73;
  --border: #d3e1ee;
  --blue: #155ce3;
  --blue-strong: #0c48bd;
  --night: #112439;
  --joint: #79b4ff;
  --linear: #52e0ca;
  --gutter: clamp(1.05rem, 3.2vw, 3.5rem);
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 100%;
  line-height: 1.55;
  color: var(--text);
  background: var(--page);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid #1d69ee; outline-offset: 4px; }

.container { width: min(100% - var(--gutter) * 2, 77.5rem); margin-inline: auto; }
section[id] { scroll-margin-block-start: 1rem; }

.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  inset-block-start: .65rem;
  inset-inline-start: .65rem;
  z-index: 1;
  transform: translateY(calc(-100% - 1rem));
  padding: .6rem 1rem;
  background: var(--white);
  color: var(--blue-strong);
  font-weight: 700;
}
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--border); background: var(--white); }
.header-inner { min-height: 4.65rem; display: flex; align-items: center; justify-content: space-between; gap: .9rem 2rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; flex-shrink: 0; text-decoration: none; color: var(--text); font-weight: 750; }
.brand img { display: block; width: 6rem; height: auto; }
.brand span { padding-inline-start: .8rem; border-inline-start: 1px solid var(--border); }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem clamp(.8rem, 3vw, 2.5rem); }
.site-header nav a { min-height: 2.5rem; display: inline-flex; align-items: center; text-decoration: none; font-weight: 650; color: var(--muted); }
.site-header nav a:hover, .footer-inner a:hover { color: var(--blue-strong); text-decoration: underline; text-underline-offset: .22em; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3.1rem;
  padding: .57rem 1.26rem;
  border: 1px solid transparent;
  border-radius: .6rem;
  text-decoration: none;
  text-align: center;
  background: var(--blue);
  color: var(--white);
  font-weight: 720;
  line-height: 1.27;
}
.button:hover { background: var(--blue-strong); }
.button-small { min-height: 2.55rem; padding: .45rem .9rem; font-size: .88rem; }
.button-quiet { background: transparent; color: var(--text); border-color: var(--border); }
.button-quiet:hover { background: #e7effb; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.24fr);
  gap: clamp(1.9rem, 5vw, 5.2rem);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 6.35rem) clamp(3.2rem, 7vw, 6.2rem);
}
.hero-copy { padding-block: .35rem 1.6rem; }
.section-label { margin: 0 0 .9rem; color: var(--blue-strong); font-size: .88rem; font-weight: 760; }
.hero .section-label { display: flex; gap: .63rem; align-items: center; margin-bottom: 1.28rem; }
.hero .section-label::before { content: ""; width: 1.55rem; height: 2px; background: #4a86ef; }
h1, h2, h3 { margin: 0; line-height: 1.11; }
h1 { font-size: clamp(2.65rem, 5.15vw, 5.35rem); font-weight: 800; letter-spacing: -.075em; line-height: 1.01; max-width: 13ch; }
h1 em { font-style: normal; color: var(--blue); }
.hero-intro { max-width: 39ch; font-size: clamp(1.02rem, 1.5vw, 1.23rem); color: var(--muted); margin: 1.55rem 0 1.55rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .64rem; }
.hero-audience { margin: 1.34rem 0 0; color: var(--muted); font-size: .9rem; }

.simulator {
  min-width: 0;
  border: 1px solid #274565;
  border-radius: 1.3rem;
  background: var(--night);
  color: #f0f7ff;
  box-shadow: 0 18px 54px #102f5325;
  overflow: hidden;
}
.simulator :focus-visible { outline-color: #9ac9ff; }
.sim-header { display: flex; gap: .75rem; align-items: flex-start; justify-content: space-between; padding: 1.18rem 1.3rem .85rem; }
.sim-header h2 { font-size: clamp(1rem, 1.7vw, 1.28rem); letter-spacing: -.018em; }
.sim-header p { margin: .2rem 0 0; color: #b6cee6; font-size: .87rem; }
.sim-tag { flex-shrink: 0; font-size: .78rem; font-weight: 700; border: 1px solid #446582; color: #d0e7fd; padding: .18rem .58rem; border-radius: 2rem; }
.stage { background: #0b1c2e; border-block: 1px solid #29425c; }
.stage canvas { display: block; width: 100%; height: auto; }
.sim-controls { padding: .78rem 1.3rem .45rem; }
.mode-switch { display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: 0 0 .78rem; border: 0; min-width: 0; }
.mode-switch label { position: relative; cursor: pointer; }
.mode-switch label input { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; margin: 0; }
.mode-switch label span { min-height: 2.35rem; padding: .35rem .7rem; display: flex; align-items: center; gap: .4rem; font-size: .87rem; font-weight: 650; line-height: 1.15; border: 1px solid transparent; border-radius: .42rem; color: #d2e3f3; }
.mode-switch label:hover span { background: #203d59; }
.mode-switch input:checked + span { background: #274c70; border-color: #6899c1; color: #fff; }
.mode-switch input:focus-visible + span { outline: 3px solid #9ac9ff; outline-offset: 3px; }
.swatch { width: .65rem; height: 3px; border-radius: 2px; background: currentColor; }
.swatch.joint { color: var(--joint); }
.swatch.linear { color: var(--linear); }
.play-controls { display: grid; grid-template-columns: max-content max-content minmax(3rem, 1fr) 3rem; gap: .52rem; align-items: center; }
.play-controls button { min-height: 2.48rem; border: 1px solid transparent; border-radius: .44rem; padding: .4rem .7rem; cursor: pointer; font-size: .86rem; font-weight: 720; }
.play-button { min-width: 6.3rem; background: #cfebff; color: #142a40; }
.play-button:hover { background: #eef9ff; }
.reset-button { background: transparent; color: #e0edf9; border-color: #4e6f8c !important; }
.reset-button:hover { background: #294762; }
.progress { width: 100%; margin: 0; accent-color: #9ac9ff; cursor: pointer; min-height: 1.75rem; }
.percentage { color: #cde2f6; font-size: .86rem; text-align: end; font-variant-numeric: tabular-nums; }
.sim-help { color: #c2d7eb; margin: .32rem 1.32rem 1rem; font-size: .87rem; }

.learning { border-block: 1px solid var(--border); background: var(--white); padding-block: clamp(3.1rem, 6vw, 5.3rem); }
.section-intro { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 1.1rem clamp(1.5rem, 6vw, 6.6rem); align-items: end; margin-bottom: 2.5rem; }
.section-intro h2, .contact h2 { font-size: clamp(2rem, 3.8vw, 3.65rem); letter-spacing: -.062em; text-wrap: balance; }
.section-intro > p { margin: 0; max-width: 60ch; color: var(--muted); font-size: 1.08rem; }
.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5rem clamp(1.35rem, 4vw, 3.95rem); }
.topics li { border-top: 2px solid #a9c5e8; padding-top: 1.15rem; }
.topics h3, .audience-grid h3 { font-size: 1.28rem; letter-spacing: -.03em; }
.topics p, .audience-grid p { margin: .66rem 0 0; color: var(--muted); max-width: 45ch; }
.audience-grid { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.15rem; }
.audience-grid article { background: #edf5fd; border: 1px solid #d5e6f7; border-radius: .9rem; padding: clamp(1.2rem, 3vw, 2.0rem); }
.audience-grid h3 { color: #163f78; }

.materials { padding-block: clamp(3.1rem, 6vw, 5.3rem); }
.material-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.15rem; }
.material-file { border: 1px solid var(--border); border-radius: .8rem; background: var(--white); }
.material-file:hover { border-color: #7aa4e4; }
.file-main { display: flex; min-height: 5.55rem; align-items: center; gap: .85rem; padding: .95rem 1rem; border-radius: .8rem; text-decoration: none; }
.file-main:hover { background: #f2f7ff; }
.file-extra { display: inline-block; margin: -.25rem 1rem 1rem 3.85rem; color: var(--blue-strong); font-size: .85rem; font-weight: 650; text-underline-offset: .2em; }
.pdf-mark { flex-shrink: 0; border: 1px solid #d7e8fb; background: #eaf3ff; border-radius: .5rem; color: var(--blue-strong); font-size: .78rem; font-weight: 790; padding: .52rem .42rem; }
.file-name { color: var(--text); font-weight: 760; line-height: 1.25; }
.file-description { display: block; margin-top: .18rem; color: var(--muted); font-weight: 400; font-size: .88rem; }
.download-text { margin-inline-start: auto; color: var(--blue-strong); font-size: .86rem; font-weight: 700; text-align: end; flex-shrink: 0; }
.audio-card { margin-top: 1.15rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 1.05rem 2rem; background: var(--white); border: 1px solid var(--border); border-radius: .85rem; padding: clamp(1.05rem, 3vw, 1.7rem); }
.audio-card h3 { font-size: 1.22rem; letter-spacing: -.025em; }
.audio-card p { color: var(--muted); margin: .45rem 0 0; }
.audio-actions { min-width: 0; }
.audio-actions audio { display: block; width: 100%; }
.audio-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .5rem; }
.audio-links a { color: var(--blue-strong); font-weight: 680; text-underline-offset: .2em; }

.contact { color: #f7fbff; background: #122a46; padding-block: clamp(3.1rem, 6vw, 5.3rem); }
.contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem clamp(2.5rem, 8vw, 8rem); }
.contact .section-label { color: #accef6; }
.contact .contact-inner > div:first-child > p:last-child { color: #d4e5f7; max-width: 55ch; margin: 1rem 0 0; font-size: 1.08rem; }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .62rem; }
.contact-actions .button { background: #e4f2ff; color: #113052; }
.contact-actions .button:hover { background: #bcdcff; }
.contact-phone { color: #f0f7ff; text-underline-offset: .17em; font-weight: 720; }
.contact-actions span { color: #bacfe5; font-size: .85rem; }
.contact :focus-visible { outline-color: #9bcaff; }
.site-footer { background: #0d2036; color: #cadbed; font-size: .88rem; }
.footer-inner { min-height: 3.8rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .42rem 1rem; padding-block: .8rem; }
.footer-inner a:hover { color: #fff; }

@media (max-width: 57rem) {
  .hero { grid-template-columns: 1fr; gap: 1.8rem; }
  .hero-copy { padding: 0; }
  h1 { max-width: 16ch; }
  .hero-intro { max-width: 53ch; }
  .hero-audience { margin-top: 1rem; }
  .simulator { width: min(100%, 42rem); }
  .section-intro { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 41rem) {
  .header-inner { min-height: auto; padding-block: .6rem; flex-wrap: wrap; gap: .32rem .62rem; }
  .site-header nav { width: 100%; order: 2; justify-content: flex-start; column-gap: 1.35rem; border-top: 1px solid var(--border); margin-top: .28rem; }
  .site-header nav a { font-size: .88rem; }
  .brand { gap: .55rem; font-size: .94rem; }
  .brand span { padding-inline-start: .55rem; }
  .brand img { width: 5.2rem; }
  .hero { padding-block-start: 2.4rem; }
  h1 { font-size: clamp(2.5rem, 10.4vw, 4.15rem); }
  .sim-header, .sim-controls { padding-inline: .85rem; }
  .sim-help { margin-inline: .85rem; }
  .topics, .audience-grid, .contact-inner, .material-list, .audio-card { grid-template-columns: 1fr; }
}

@media (max-width: 25rem) {
  .button-small { padding-inline: .55rem; font-size: .79rem; }
  .hero-actions .button { min-height: 2.82rem; padding-inline: .75rem; }
  .play-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 2.7rem; }
  .play-controls button { min-width: 0; }
  .play-controls .progress { grid-row: 2; grid-column: 1 / 3; }
  .play-controls .percentage { grid-row: 2; grid-column: 3; }
  .sim-tag { display: none; }
  .simulator { border-radius: .9rem; }
}

@media (max-width: 23rem) {
  .file-main { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem .7rem; }
  .file-main .pdf-mark { grid-row: span 2; }
  .download-text { grid-column: 2; margin-inline-start: 0; text-align: start; }
}

.sim-next { margin: 0; border-top: 1px solid #2d4d69; }
.sim-next a { display: block; min-height: 2.75rem; padding: .69rem 1.32rem; color: #d1e8ff; font-size: .91rem; font-weight: 700; text-underline-offset: .2em; }
.sim-next a:hover { background: #1a3855; }
.sim-next a:focus-visible { outline-offset: -4px; }
@media (max-width: 41rem) {
  .sim-next a { padding-inline: .85rem; }
}
