@import url("bright-tokens.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
}

body.cq-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--color-ink);
  background: var(--color-paper);
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

/* ---------- mast & hero ---------- */

.cq-mast {
  padding-bottom: 7rem;
}

.cq {
  max-width: var(--shell);
  margin-inline: auto;
  padding: var(--space-md) var(--gutter) var(--space-lg);
}

.cq-bar {
  max-width: var(--shell);
  margin-inline: auto;
  padding: max(var(--space-sm), env(safe-area-inset-top)) var(--gutter) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.cq-bar__mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.cq-bar__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 0;
  background: var(--color-gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.cq-bar__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.cq-head {
  position: relative;
  padding-top: var(--space-xs);
}

.cq-head__kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  margin: 0 0 var(--space-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(84% 0.04 85);
}

.cq-head__kicker-mark {
  width: 0.35rem;
  height: 0.35rem;
  background: var(--color-gold);
  transform: rotate(45deg);
}

.cq-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 9vw, 3.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.cq-head__title::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 2px;
  margin-top: var(--space-sm);
  background: linear-gradient(to right, var(--color-gold), oklch(70% 0.095 80 / 0.25));
}

.cq-head__seminar {
  margin: var(--space-sm) 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.5vw, 1.35rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-ivory-on-dark);
}

.cq-head__when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: var(--space-2xs) 0 0;
  font-size: var(--text-sm);
  font-weight: 500;
}

.cq-head__sep {
  opacity: 0.55;
}

.cq-head__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
}

.cq-head__stat {
  display: grid;
  gap: 0.1rem;
  min-width: 5.5rem;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-row);
  background: oklch(22% 0.03 165 / 0.35);
  box-shadow:
    inset 0 0 0 1px oklch(70% 0.095 80 / 0.35),
    0 12px 28px -20px oklch(0% 0 0 / 0.45);
  text-align: center;
}

.cq-head__stat-num {
  font-family: var(--font-num);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 600;
  line-height: 1;
  color: var(--color-gold);
  font-variant-numeric: tabular-nums lining-nums;
}

.cq-head__stat-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-ivory-muted);
}

.cq-head__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin-top: var(--space-md);
}

.cq-head__nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0 var(--space-md);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition:
    background-color var(--dur-short) var(--ease-out),
    border-color var(--dur-short) var(--ease-out);
}

.cq-main {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0 var(--gutter) var(--space-xl);
}

.cq-bar__link:focus-visible,
.cq-bar__mark:focus-visible,
.cq-head__nav-link:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

.cq-head {
  padding-bottom: var(--space-md);
}

.cq-empty {
  margin: 0;
  padding: var(--space-xl);
  text-align: center;
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-rule);
  color: var(--color-ink-2);
}

.cq-day {
  --tone: var(--color-pear);
  --tone-deep: var(--color-pear-deep);
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-rule);
}

.cq-day--sky {
  --tone: var(--color-sky);
  --tone-deep: var(--color-sky-deep);
}

.cq-day--mint {
  --tone: var(--color-mint);
  --tone-deep: var(--color-mint-deep);
}

.cq-day--lav {
  --tone: var(--color-lav);
  --tone-deep: var(--color-lav-deep);
}

.cq-day__title {
  margin: 0 0 var(--space-sm);
  padding-left: var(--space-sm);
  border-left: 4px solid var(--tone-deep);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}

.cq-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-row);
  box-shadow: inset 0 0 0 1px var(--color-rule);
  background: var(--color-paper);
}

.cq-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.cq-table th,
.cq-table td {
  padding: var(--space-xs) var(--space-sm);
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--color-rule);
}

.cq-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in oklab, var(--tone) 28%, var(--color-paper));
  font-weight: 800;
  white-space: nowrap;
}

.cq-table tbody tr:last-child td,
.cq-table tbody tr:last-child th {
  border-bottom: 0;
}

.cq-table tbody tr:hover {
  background: color-mix(in oklab, var(--tone) 12%, var(--color-paper));
}

.cq-table tbody tr.is-now {
  background: color-mix(in oklab, var(--tone-deep) 22%, var(--color-paper));
  box-shadow: inset 4px 0 0 var(--tone-deep);
}

.cq-table tbody tr.is-now:hover {
  background: color-mix(in oklab, var(--tone-deep) 28%, var(--color-paper));
}

@keyframes cq-time-now {
  0%,
  100% {
    color: var(--tone-deep);
    text-shadow: none;
  }
  50% {
    color: oklch(78% 0.14 82);
    text-shadow: 0 0 0.65rem color-mix(in oklab, var(--color-gold) 55%, transparent);
  }
}

.cq-table tbody tr.is-now .cq-table__time {
  font-weight: 800;
  animation: cq-time-now 2.6s ease-in-out infinite;
}

.cq-table__time {
  font-family: var(--font-body);
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--color-ink-2);
}

.cq-table__item {
  min-width: 8rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
}

.cq-table__detail,
.cq-table__notes {
  min-width: 10rem;
  max-width: 22rem;
  line-height: 1.5;
  color: var(--color-ink-2);
}

.cq-foot {
  margin-top: var(--space-xl);
}

@media (min-width: 720px) {
  .cq-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto auto;
    column-gap: var(--space-lg);
    align-items: start;
  }

  .cq-head__kicker,
  .cq-head__title,
  .cq-head__seminar,
  .cq-head__when {
    grid-column: 1;
  }

  .cq-head__stats {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    margin-top: 0;
    flex-direction: column;
  }

  .cq-head__nav {
    grid-column: 1 / -1;
    margin-top: var(--space-sm);
  }
}

@media (max-width: 640px) {
  .cq-mast {
    padding-bottom: 6.25rem;
  }

  .cq-head__stats {
    width: 100%;
  }

  .cq-head__stat {
    flex: 1;
    min-width: 0;
  }

  .cq-head__nav {
    width: 100%;
  }

  .cq-head__nav-link {
    flex: 1;
    justify-content: center;
  }

  .cq-day {
    padding: var(--space-sm);
  }

  .cq-table {
    min-width: 36rem;
    font-size: var(--text-xs);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cq-table tbody tr {
    transition: none;
  }

  .cq-table tbody tr.is-now .cq-table__time {
    animation: none;
    color: oklch(78% 0.14 82);
  }
}
