/* ---------- wider screens ---------- */

@media (max-width: 599px) {
  .slip-head {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 8px;
  }
}

@media (min-width: 600px) {
  :root {
    --gutter: 24px;
    --margin-x: 20px;
    --indent: 48px;
  }
  .hero h1 {
    font-size: clamp(3.5rem, 9vw, 5rem);
  }
  .branches {
    grid-template-columns: 1fr 1fr;
  }
  .form-card {
    padding: 28px 28px 28px;
  }
  .voices {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  :root {
    --line: 32px;
    --margin-x: max(24px, calc(50vw - 640px));
    --indent: max(64px, calc(50vw - 600px));
  }
  body {
    padding-bottom: 0;
    font-size: 1.125rem;
  }
  .wrap {
    max-width: none;
    padding-left: var(--indent);
    padding-right: max(32px, calc(50vw - 600px));
  }
  .action-bar,
  .nav-small {
    display: none;
  }
  .nav-wide {
    display: block;
  }
  .nav-wide ul {
    display: flex;
    gap: 4px;
  }
  .nav-wide a {
    display: block;
    padding: 10px 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
  }
  .nav-wide a:hover {
    background: var(--leaf);
  }
  .header-demo {
    display: inline-flex;
    min-height: 46px;
    font-size: 1.0625rem;
  }
  .header-row {
    height: 72px;
  }
  .mark {
    width: 40px;
    height: 40px;
  }
  .logo-name {
    font-size: 1.5rem;
  }
  .logo-place {
    display: block;
  }
  [id] {
    scroll-margin-top: 96px;
  }

  h2 {
    font-size: 3rem;
  }
  .hero {
    padding: calc(var(--line) * 1.5) 0 calc(var(--line) * 2.5);
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 31rem);
    grid-template-areas: "classes classes" "title title" "body slip";
    column-gap: 56px;
    align-items: start;
  }
  .hero-classes {
    font-size: 1.0625rem;
  }
  .hero h1 {
    font-size: clamp(4.5rem, 8vw, 8.75rem);
    line-height: 0.98;
    margin-bottom: 28px;
  }
  .hero-lede {
    font-size: 1.3125rem;
    line-height: 1.5;
  }
  .hero-slip {
    margin-top: 0;
    padding: 22px 24px 18px;
    transform: rotate(-1.2deg);
    transform-origin: top left;
  }
  .slip-head .circled {
    font-size: 3.25rem;
  }
  .proof-text {
    font-size: 1.25rem;
  }

  .section {
    padding: 96px 0;
  }
  .section-head {
    margin-bottom: 40px;
  }
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
  .page-head h1 {
    font-size: 4rem;
    line-height: calc(var(--line) * 2);
  }

  .contents {
    display: block;
    columns: 2;
    column-gap: 64px;
  }
  .contents-group {
    break-inside: avoid;
    margin-bottom: 40px;
  }

  /* back to real tables */
  .timetable {
    display: table;
  }
  .timetable thead,
  .sheet thead {
    display: table-header-group;
  }
  .timetable tbody,
  .sheet tbody {
    display: table-row-group;
  }
  .timetable tr,
  .timetable .tt-row,
  .sheet tr {
    display: table-row;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
  }
  .timetable th,
  .timetable td,
  .timetable .tt-row > *,
  .sheet th,
  .sheet td {
    display: table-cell;
    padding: 12px 16px 12px 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
    font-size: 1.0625rem;
    color: var(--graphite);
  }
  .timetable .tt-time {
    color: var(--ink);
  }
  .timetable .tt-seats {
    text-align: right;
    padding-right: 0;
  }
  .timetable tbody + tbody .tt-course th {
    padding-top: 28px;
  }
  .timetable .tt-course th {
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ink);
    font-size: 1.1875rem;
  }
  .sheet td::before {
    content: none;
  }
  .timetable thead th,
  .sheet thead th {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 2px solid var(--ink);
    text-align: left;
  }
  .timetable,
  .sheet {
    background: var(--paper);
  }
  .timetable-wrap {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 8px 24px 16px;
  }
  .timetable .tt-row.is-full > * {
    color: var(--muted);
  }
  .sheet tbody tr:last-child > * {
    border-bottom: 0;
  }
  .sheet td:first-child {
    display: table-cell;
  }
  .sheet .num,
  .sheet thead .num {
    text-align: right;
  }
  .sheet .num {
    font-size: 1.25rem;
  }
  .sheet .pct {
    display: inline;
  }
  .sheet-wrap {
    border: 1px solid var(--rule);
    border-top: 4px solid var(--red);
    border-radius: var(--radius);
    padding: 8px 24px;
    background: var(--paper);
  }

  .toppers {
    grid-template-columns: 1fr 1fr;
    column-gap: 56px;
    border-top: 0;
  }
  .topper {
    align-items: start;
    border-top: 1px solid var(--rule);
    border-bottom: 0;
  }
  .teacher {
    grid-template-columns: 52px minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: start;
  }
  .teacher-facts {
    grid-column: 3;
    grid-row: 1 / span 2;
    flex-direction: column;
    gap: 6px;
    justify-self: end;
    text-align: right;
  }
  .teacher-facts div {
    justify-content: flex-end;
  }

  .demo-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }
  .form-card {
    padding: 32px;
  }
  .voices {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
  .branches {
    grid-template-columns: repeat(2, minmax(0, 22rem));
    gap: 48px;
  }

  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .action-bar,
  .site-header nav,
  .header-demo,
  .hero::before,
  .page-head::before {
    display: none;
  }
}
