/* RoundRobinGenerator.com — design system.
   System type, grouped surfaces, translucent chrome, critically damped motion. */

:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --elevated: #ffffff;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.08);
  --fill-3: rgba(118, 118, 128, 0.2);
  --label: #1d1d1f;
  --label-2: #6e6e73;
  --label-3: #8e8e93;
  --sep: rgba(60, 60, 67, 0.16);
  --sep-strong: rgba(60, 60, 67, 0.28);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --on-accent: #ffffff;
  --green: #248a3d;
  --green-soft: rgba(52, 199, 89, 0.14);
  --red: #d70015;
  --red-soft: rgba(255, 59, 48, 0.1);
  --orange: #c93400;
  --orange-soft: rgba(255, 149, 0, 0.14);
  --gold: #b8860b;
  --chrome: rgba(251, 251, 253, 0.72);
  --chrome-border: rgba(0, 0, 0, 0.08);
  --scrim: rgba(0, 0, 0, 0.32);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.14), 0 6px 16px rgba(0, 0, 0, 0.06);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --page: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #161618;
    --elevated: #2c2c2e;
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.16);
    --fill-3: rgba(118, 118, 128, 0.32);
    --label: #f5f5f7;
    --label-2: #a1a1a6;
    --label-3: #8d8d93;
    --sep: rgba(84, 84, 88, 0.5);
    --sep-strong: rgba(84, 84, 88, 0.8);
    --accent: #2997ff;
    --accent-hover: #47a6ff;
    --accent-soft: rgba(41, 151, 255, 0.16);
    --green: #30d158;
    --green-soft: rgba(48, 209, 88, 0.16);
    --red: #ff453a;
    --red-soft: rgba(255, 69, 58, 0.16);
    --orange: #ff9f0a;
    --orange-soft: rgba(255, 159, 10, 0.16);
    --gold: #ffd60a;
    --chrome: rgba(22, 22, 24, 0.72);
    --chrome-border: rgba(255, 255, 255, 0.08);
    --scrim: rgba(0, 0, 0, 0.56);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #161618;
  --elevated: #2c2c2e;
  --fill: rgba(118, 118, 128, 0.24);
  --fill-2: rgba(118, 118, 128, 0.16);
  --fill-3: rgba(118, 118, 128, 0.32);
  --label: #f5f5f7;
  --label-2: #a1a1a6;
  --label-3: #8d8d93;
  --sep: rgba(84, 84, 88, 0.5);
  --sep-strong: rgba(84, 84, 88, 0.8);
  --accent: #2997ff;
  --accent-hover: #47a6ff;
  --accent-soft: rgba(41, 151, 255, 0.16);
  --green: #30d158;
  --green-soft: rgba(48, 209, 88, 0.16);
  --red: #ff453a;
  --red-soft: rgba(255, 69, 58, 0.16);
  --orange: #ff9f0a;
  --orange-soft: rgba(255, 159, 10, 0.16);
  --gold: #ffd60a;
  --chrome: rgba(22, 22, 24, 0.72);
  --chrome-border: rgba(255, 255, 255, 0.08);
  --scrim: rgba(0, 0, 0, 0.56);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 72px;
}
body {
  margin: 0;
  font: 400 1.0625rem/1.47 var(--font);
  letter-spacing: -0.012em;
  color: var(--label);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
  border-radius: 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 10px;
}
.skip-link:focus {
  top: 12px;
}
[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------- Type */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  margin: 0 0 0.4em;
  font-weight: 700;
}
.display {
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.title-1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.028em;
}
.title-2 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.title-3 {
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.016em;
  font-weight: 650;
}
.headline {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}
.lede {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.4;
  letter-spacing: -0.016em;
  color: var(--label-2);
  font-weight: 450;
}
.subhead {
  font-size: 0.9375rem;
  color: var(--label-2);
}
.footnote {
  font-size: 0.8125rem;
  line-height: 1.38;
  color: var(--label-2);
  letter-spacing: -0.003em;
}
.caption {
  font-size: 0.75rem;
  color: var(--label-3);
  letter-spacing: 0.005em;
}
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--label-2);
}
.num {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--label-2);
}
.accent {
  color: var(--accent);
}

/* ---------------------------------------------------------------- Layout */
.page {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.stack > * + * {
  margin-top: var(--gap, 16px);
}
.row {
  display: flex;
  align-items: center;
  gap: var(--gap, 12px);
}
.row.wrap {
  flex-wrap: wrap;
}
.spacer {
  flex: 1;
}
.grid {
  display: grid;
  gap: var(--gap, 16px);
}
.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.section {
  padding: clamp(56px, 9vw, 112px) 0;
}
.section-tight {
  padding: 40px 0;
}
.center {
  text-align: center;
}
.measure {
  max-width: 680px;
}
.center.measure,
.measure.center {
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------------------------------------- Navigation chrome */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--chrome);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--chrome-border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--label);
  font-size: 1.0625rem;
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}
.nav-links {
  display: flex;
  gap: 2px;
  margin-left: 18px;
}
.nav-links a,
.nav-links button {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--label);
  font-size: 0.875rem;
  background: none;
  border: 0;
  opacity: 0.86;
}
.nav-links a:hover,
.nav-links button:hover {
  background: var(--fill-2);
  text-decoration: none;
  opacity: 1;
}
.nav-links a[aria-current='page'] {
  opacity: 1;
  font-weight: 600;
}
.nav-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-menu-btn,
.nav-links .mobile-only {
  display: none;
}
.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 520px) {
  .nav-actions .btn-tinted {
    display: none;
  }
  .nav-links.open .mobile-only {
    display: block;
  }
  .brand {
    min-width: 0;
    font-size: 1rem;
  }
}
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .nav-menu-btn {
    display: inline-flex;
  }
  .nav-links.open {
    display: flex;
    position: absolute;
    flex-direction: column;
    top: 56px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--chrome);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--chrome-border);
  }
  .nav-links.open a {
    padding: 12px 8px;
    font-size: 1.0625rem;
  }
}

/* ---------------------------------------------------------------- Buttons */
.btn {
  --btn-bg: var(--fill);
  --btn-fg: var(--label);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 560;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 120ms var(--ease-out), background-color 160ms var(--ease), opacity 160ms;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover {
  text-decoration: none;
  filter: brightness(1.04);
}
.btn:active {
  transform: scale(0.97);
  transition-duration: 60ms;
}
.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.4;
  pointer-events: none;
}
.btn-primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--on-accent);
}
.btn-primary:hover {
  --btn-bg: var(--accent-hover);
}
.btn-tinted {
  --btn-bg: var(--accent-soft);
  --btn-fg: var(--accent);
}
.btn-danger {
  --btn-bg: var(--red-soft);
  --btn-fg: var(--red);
}
.btn-plain {
  --btn-bg: transparent;
  --btn-fg: var(--accent);
  padding-left: 10px;
  padding-right: 10px;
}
.btn-plain:hover {
  --btn-bg: var(--fill-2);
}
.btn-lg {
  min-height: 52px;
  padding: 14px 26px;
  font-size: 1.0625rem;
}
.btn-sm {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 0.8125rem;
}
.btn-icon {
  width: 40px;
  min-height: 40px;
  padding: 0;
}
.btn-icon.btn-sm {
  width: 32px;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn-block {
  width: 100%;
}

/* ---------------------------------------------------------------- Surfaces */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(18px, 3vw, 28px);
}
.card-flat {
  background: var(--surface);
  border-radius: var(--radius-lg);
}
.inset {
  background: var(--fill-2);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.9375rem;
  background: var(--fill-2);
}
.callout svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 1px;
}
.callout.warn {
  background: var(--orange-soft);
}
.callout.warn svg {
  color: var(--orange);
}
.callout.error {
  background: var(--red-soft);
}
.callout.error svg {
  color: var(--red);
}
.callout.ok {
  background: var(--green-soft);
}
.callout.ok svg {
  color: var(--green);
}
.callout.info svg {
  color: var(--accent);
}
.callout ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

/* Grouped list (iOS Settings style) */
.group {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.group-title {
  margin: 22px 16px 7px;
  font-size: 0.8125rem;
  color: var(--label-2);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.group-foot {
  margin: 7px 16px 0;
}
.cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 16px;
  position: relative;
}
.cell + .cell::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 0;
  height: 1px;
  background: var(--sep);
}
.cell-label {
  flex: 1;
  min-width: 0;
}
.cell-label small {
  display: block;
  color: var(--label-2);
  font-size: 0.8125rem;
}
.cell-value {
  color: var(--label-2);
}
.cell.tap {
  cursor: pointer;
}
a.cell {
  color: var(--label);
  text-decoration: none;
}
a.cell > svg:first-child {
  color: var(--accent);
}
a.cell > svg:last-child {
  color: var(--label-3);
  width: 16px;
}
body.tv-mode .nav,
body.tv-mode .footer,
body.tv-mode .skip-link {
  display: none;
}
.cell.tap:hover {
  background: var(--fill-2);
}

/* ---------------------------------------------------------------- Forms */
.field {
  display: grid;
  gap: 6px;
}
.field > label,
.label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--label-2);
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--fill-2);
  outline: none;
  transition: border-color 150ms, background-color 150ms, box-shadow 150ms;
}
.input:hover,
.select:hover,
.textarea:hover {
  background: var(--fill);
}
.input:focus,
.select:focus,
.textarea:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.input.invalid {
  border-color: var(--red);
}
.textarea {
  resize: vertical;
  min-height: 180px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.input-sm {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 9px;
}
.cell .input,
.cell .select {
  width: auto;
  min-width: 0;
  max-width: 55%;
  text-align: right;
  background-color: transparent;
}
.cell .select {
  text-align: left;
}
.cell .input:focus {
  background: var(--fill-2);
}
.input-num {
  width: 84px !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums;
}

/* Switch */
.switch {
  position: relative;
  width: 51px;
  height: 31px;
  flex: none;
}
.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--fill-3);
  transition: background-color 200ms var(--ease);
}
.switch span::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16);
  transition: transform 280ms cubic-bezier(0.3, 1.3, 0.5, 1);
}
.switch input:checked + span {
  background: var(--green);
}
.switch input:checked + span::after {
  transform: translateX(20px);
}
.switch input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}

/* Segmented control */
.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 2px;
  border-radius: 10px;
  background: var(--fill);
  position: relative;
  isolation: isolate;
}
.segmented button {
  position: relative;
  border: 0;
  background: transparent;
  padding: 6px 14px;
  min-height: 32px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--label);
  transition: color 150ms;
}
.segmented button[aria-pressed='true'] {
  background: var(--elevated);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
  font-weight: 600;
}
.segmented.full {
  display: grid;
  width: 100%;
}

/* Stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--fill);
  border-radius: 10px;
  overflow: hidden;
}
.stepper button {
  width: 44px;
  height: 34px;
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--label);
}
.stepper button:active {
  background: var(--fill-3);
}
.stepper output,
.stepper input {
  min-width: 38px;
  width: 52px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 0;
  background: transparent;
  height: 34px;
  border-left: 1px solid var(--sep);
  border-right: 1px solid var(--sep);
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--sep);
  background: var(--surface);
  font-size: 0.875rem;
  color: var(--label);
  white-space: nowrap;
  transition: background-color 150ms, border-color 150ms, transform 100ms;
}
.chip:active {
  transform: scale(0.97);
}
.chip[aria-pressed='true'] {
  background: var(--label);
  color: var(--bg);
  border-color: var(--label);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips.scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.chips.scroll::-webkit-scrollbar {
  display: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--fill);
  color: var(--label-2);
  white-space: nowrap;
}
.badge.live {
  background: var(--green-soft);
  color: var(--green);
}
.badge.warn {
  background: var(--orange-soft);
  color: var(--orange);
}
.badge.bad {
  background: var(--red-soft);
  color: var(--red);
}
.badge.accent {
  background: var(--accent-soft);
  color: var(--accent);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------------------------------------------------------------- Hero & marketing */
.hero {
  padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 48px);
  text-align: center;
}
.hero .lede {
  max-width: 720px;
  margin: 18px auto 0;
}
.hero-points {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 22px;
  color: var(--label-2);
  font-size: 0.9375rem;
}
.hero-points span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-points svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}
.feature {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.feature .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}
.feature .icon svg {
  width: 22px;
  height: 22px;
}
.feature p {
  margin: 0;
  color: var(--label-2);
  font-size: 0.9375rem;
}
.feature .quote {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--label-3);
  font-style: italic;
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.compare th,
.compare td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--sep);
}
.compare th {
  font-size: 0.8125rem;
  color: var(--label-2);
  font-weight: 600;
}
.compare td:not(:first-child),
.compare th:not(:first-child) {
  text-align: center;
}
.compare .yes {
  color: var(--green);
  font-weight: 700;
}
.compare .no {
  color: var(--label-3);
}
.compare .ours {
  background: var(--accent-soft);
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.prose {
  max-width: 720px;
}
.prose p,
.prose li {
  color: var(--label);
}
.prose h2 {
  margin-top: 2em;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}
.prose h3 {
  margin-top: 1.6em;
  font-size: 1.2rem;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
  margin: 1em 0;
}
.prose th,
.prose td {
  border-bottom: 1px solid var(--sep);
  padding: 9px 10px;
  text-align: left;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--fill-2);
  padding: 1px 6px;
  border-radius: 6px;
}
.faq details {
  border-bottom: 1px solid var(--sep);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--label-2);
  transition: transform 250ms var(--ease-out);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  margin: 0 0 16px;
  color: var(--label-2);
}
.crumbs {
  font-size: 0.8125rem;
  color: var(--label-2);
  padding-top: 18px;
}
.crumbs a {
  color: var(--label-2);
}
.link-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}
.link-card {
  display: block;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--label);
  transition: transform 160ms var(--ease-out), box-shadow 160ms;
}
.link-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.link-card strong {
  display: block;
  margin-bottom: 4px;
}
.link-card span {
  font-size: 0.875rem;
  color: var(--label-2);
}
.footer {
  padding: 48px 0 64px;
  border-top: 1px solid var(--sep);
  color: var(--label-2);
  font-size: 0.8125rem;
}
.footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 28px;
}
.footer h4 {
  font-size: 0.8125rem;
  color: var(--label);
  margin-bottom: 10px;
}
.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.footer a {
  color: var(--label-2);
}

/* ---------------------------------------------------------------- Generator (setup flow) */
.generator .group,
.generator .match:not(.bye) {
  background: var(--fill-2);
}
.generator {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  text-align: left;
  max-width: 980px;
  margin: 0 auto;
}
.gen-steps {
  display: flex;
  gap: 4px;
  padding: 12px;
  border-bottom: 1px solid var(--sep);
  overflow-x: auto;
  scrollbar-width: none;
}
.gen-steps::-webkit-scrollbar {
  display: none;
}
.gen-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  border: 0;
  background: none;
  font-size: 0.875rem;
  color: var(--label-2);
  white-space: nowrap;
  font-weight: 500;
}
.gen-step .n {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--fill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--label-2);
}
.gen-step[aria-current='step'] {
  background: var(--accent-soft);
  color: var(--accent);
}
.gen-step[aria-current='step'] .n {
  background: var(--accent);
  color: var(--on-accent);
}
.gen-step.done .n {
  background: var(--green);
  color: #fff;
}
.gen-body {
  padding: clamp(18px, 3vw, 32px);
  min-height: 360px;
}
.gen-panel {
  animation: panel-in 380ms var(--ease-out);
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateX(var(--from, 16px));
  }
}
.gen-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px clamp(18px, 3vw, 32px);
  border-top: 1px solid var(--sep);
  background: var(--surface-2);
  flex-wrap: wrap;
}
.gen-summary {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--label-2);
}
.gen-summary b {
  color: var(--label);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.format-tiles {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
}
.tile {
  text-align: left;
  border: 1.5px solid var(--sep);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 8px;
  transition: border-color 150ms, background-color 150ms, transform 120ms var(--ease-out);
}
.tile:active {
  transform: scale(0.98);
}
.tile[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.tile svg {
  width: 100%;
  height: 46px;
  color: var(--label-2);
}
.tile[aria-pressed='true'] svg {
  color: var(--accent);
}
.tile strong {
  font-size: 0.9375rem;
}
.tile span {
  font-size: 0.8125rem;
  color: var(--label-2);
  line-height: 1.35;
}
.two-col {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
@media (max-width: 760px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}
.name-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.count-pill {
  font-variant-numeric: tabular-nums;
}
.tb-list {
  display: grid;
  gap: 6px;
}
.tb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  background: var(--fill-2);
  border-radius: 10px;
  font-size: 0.9375rem;
}
.tb-item .n {
  color: var(--label-3);
  width: 18px;
  font-variant-numeric: tabular-nums;
}
.tb-item .grow {
  flex: 1;
}
.preview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.stat {
  background: var(--fill-2);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat .v {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat .k {
  font-size: 0.8125rem;
  color: var(--label-2);
}

/* ---------------------------------------------------------------- Workspace */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.ws-head {
  padding: 22px 0 6px;
}
.ws-title {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.ws-title h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ws-meta {
  margin-top: 6px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--label-2);
  font-size: 0.875rem;
}
.ws-tabs {
  position: sticky;
  top: 56px;
  z-index: 30;
  background: var(--chrome);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--chrome-border);
  margin-top: 14px;
}
.ws-tabs nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 0;
}
.ws-tabs nav::-webkit-scrollbar {
  display: none;
}
.ws-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--label);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0.8;
}
.ws-tab:hover {
  background: var(--fill-2);
  text-decoration: none;
  opacity: 1;
}
.ws-tab[aria-current='page'] {
  background: var(--label);
  color: var(--bg);
  opacity: 1;
}
.ws-tab svg {
  width: 17px;
  height: 17px;
}
.ws-body {
  padding-top: 22px;
  padding-bottom: 120px;
  flex: 1;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar .select {
  width: auto;
  min-width: 180px;
}
.progress-ring {
  width: 34px;
  height: 34px;
  flex: none;
}
.progress-ring circle {
  fill: none;
  stroke-width: 4;
}
.progress-ring .track {
  stroke: var(--fill);
}
.progress-ring .bar {
  stroke: var(--green);
  stroke-linecap: round;
  transition: stroke-dashoffset 600ms var(--ease-out);
}
.bar-progress {
  height: 6px;
  background: var(--fill);
  border-radius: 99px;
  overflow: hidden;
}
.bar-progress i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 99px;
  transition: width 600ms var(--ease-out);
}

/* Bottom tab bar on phones */
@media (max-width: 700px) {
  .ws-tabs {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    border-bottom: 0;
    border-top: 1px solid var(--chrome-border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .ws-tabs .page {
    padding: 0 4px;
  }
  .ws-tabs nav {
    justify-content: space-around;
    padding: 6px 0 4px;
    gap: 0;
  }
  .ws-tab {
    flex-direction: column;
    gap: 2px;
    font-size: 0.625rem;
    padding: 4px 6px;
    border-radius: 10px;
    min-width: 58px;
  }
  .ws-tab svg {
    width: 24px;
    height: 24px;
  }
  .ws-tab[aria-current='page'] {
    background: none;
    color: var(--accent);
  }
}

/* Match list */
.round-block + .round-block {
  margin-top: 26px;
}
.round-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 4px 10px;
}
.round-head h3 {
  margin: 0;
  font-size: 1.125rem;
}
.matches {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}
.match {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid transparent;
  text-align: left;
  width: 100%;
  transition: transform 140ms var(--ease-out), box-shadow 160ms, border-color 160ms;
  -webkit-tap-highlight-color: transparent;
}
button.match:hover {
  box-shadow: var(--shadow-md);
}
button.match:active {
  transform: scale(0.985);
}
.match .meta svg {
  width: 13px;
  height: 13px;
  flex: none;
}
.badge svg {
  width: 12px;
  height: 12px;
}
.match .meta {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.75rem;
  color: var(--label-2);
  min-height: 18px;
}
.match .side {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 500;
}
.match .side .nm {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match .side.win {
  font-weight: 700;
}
.match .side.lose {
  color: var(--label-2);
}
.match .side.tbd .nm {
  color: var(--label-3);
  font-style: italic;
  font-weight: 400;
}
.match .score {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 2ch;
  text-align: right;
  font-size: 1.0625rem;
}
.match .score.lose {
  color: var(--label-3);
  font-weight: 500;
}
.match .seed {
  font-size: 0.6875rem;
  color: var(--label-3);
  min-width: 14px;
  font-variant-numeric: tabular-nums;
}
.match.ready {
  border-color: var(--accent-soft);
}
.match.bye {
  background: transparent;
  border: 1px dashed var(--sep-strong);
  color: var(--label-2);
  font-size: 0.9375rem;
}
.match.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.match.conflict {
  border-color: var(--orange);
}
.match .follow {
  color: var(--accent);
}
.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--label-2);
}
.empty svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  color: var(--label-3);
}

/* Standings */
.table-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  overflow-x: auto;
}
.standings {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
.standings th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--label-2);
  text-align: center;
  padding: 10px 8px;
  border-bottom: 1px solid var(--sep);
  white-space: nowrap;
}
.standings td {
  padding: 11px 8px;
  text-align: center;
  border-bottom: 1px solid var(--sep);
  white-space: nowrap;
}
.standings tr:last-child td {
  border-bottom: 0;
}
.standings .name {
  text-align: left;
  font-weight: 600;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.standings .rank {
  width: 40px;
  color: var(--label-2);
  font-weight: 600;
}
.standings .pts {
  font-weight: 750;
}
.standings tr.qualify td:first-child {
  box-shadow: inset 3px 0 0 var(--green);
}
.standings tr.out td {
  color: var(--label-3);
}
.standings tr.followed {
  background: var(--accent-soft);
}
.standings .why {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--label-3);
}
.form {
  display: inline-flex;
  gap: 3px;
}
.form i {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 0.625rem;
  font-style: normal;
  font-weight: 700;
  display: grid;
  place-items: center;
  color: #fff;
}
.form .W {
  background: var(--green);
}
.form .D {
  background: var(--label-3);
}
.form .L {
  background: var(--red);
}
.tb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--label-2);
  margin: 10px 4px 0;
}
.tb-legend svg {
  width: 16px;
  height: 16px;
}
.tb-legend .arrow {
  color: var(--label-3);
}
.champion {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 22%, var(--surface)), var(--surface));
  margin-bottom: 18px;
}
.champion .trophy {
  font-size: 2.2rem;
}
.champion .who {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Bracket */
.bracket-scroll {
  overflow-x: auto;
  padding: 4px 4px 18px;
  -webkit-overflow-scrolling: touch;
}
.bracket {
  display: flex;
  gap: 34px;
  align-items: stretch;
  min-width: min-content;
}
.b-col {
  display: flex;
  flex-direction: column;
  min-width: 210px;
  width: 210px;
}
.b-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--label-2);
  margin: 0 0 10px;
  font-family: var(--font);
}
.b-col .b-cells {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 12px;
}
.b-match {
  position: relative;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--sep);
  overflow: visible;
  text-align: left;
  padding: 0;
  width: 100%;
  font-size: 0.875rem;
}
.b-match:not(.static):hover {
  border-color: var(--accent);
}
.b-match .b-side {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  min-height: 34px;
}
.b-match .b-side + .b-side {
  border-top: 1px solid var(--sep);
}
.b-match .b-side .nm {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.b-match .b-side.win {
  font-weight: 700;
}
.b-match .b-side.lose .nm {
  color: var(--label-3);
}
.b-match .b-side.tbd .nm {
  color: var(--label-3);
  font-style: italic;
}
.b-match .b-score {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.b-match .b-tag {
  position: absolute;
  top: -8px;
  right: 8px;
  font-size: 0.625rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--fill);
  color: var(--label-2);
}
.b-col:not(:last-child) .b-match::after {
  content: '';
  position: absolute;
  right: -18px;
  top: 50%;
  width: 18px;
  height: 1px;
  background: var(--sep-strong);
}
.b-col:not(:first-child) .b-match::before {
  content: '';
  position: absolute;
  left: -17px;
  top: 50%;
  width: 17px;
  height: 1px;
  background: var(--sep-strong);
}
.b-match.bye-cell {
  opacity: 0.55;
  box-shadow: none;
  border-style: dashed;
}
.bracket-section + .bracket-section {
  margin-top: 28px;
}

/* ---------------------------------------------------------------- Sheet / dialog */
.sheet-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  opacity: 0;
}
.sheet {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: min(92vh, 900px);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--elevated);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-lg);
  padding: 8px 22px calc(22px + env(safe-area-inset-bottom));
  will-change: transform;
  touch-action: pan-y;
}
.sheet-grabber {
  width: 36px;
  height: 5px;
  border-radius: 99px;
  background: var(--fill-3);
  margin: 4px auto 12px;
  cursor: grab;
}
.sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.sheet-head h2 {
  margin: 0;
  font-size: 1.25rem;
  flex: 1;
}
@media (min-width: 701px) {
  .sheet-root {
    align-items: center;
  }
  .sheet {
    border-radius: var(--radius-xl);
    padding-bottom: 24px;
  }
  .sheet-grabber {
    display: none;
  }
}
.score-entry {
  display: grid;
  gap: 10px;
}
.score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--fill-2);
}
.score-row .who {
  font-weight: 650;
  font-size: 1.0625rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.big-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.big-stepper button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  color: var(--label);
}
.big-stepper button:active {
  transform: scale(0.92);
  background: var(--fill);
}
.big-stepper input {
  width: 64px;
  height: 52px;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 0;
  border-radius: 12px;
  background: transparent;
}
.big-stepper input::-webkit-outer-spin-button,
.big-stepper input::-webkit-inner-spin-button,
.input-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.big-stepper input {
  -moz-appearance: textfield;
}
.big-stepper input:focus {
  background: var(--surface);
  outline: 2px solid var(--accent);
}
.sets-grid {
  display: grid;
  gap: 8px;
}
.set-row {
  display: grid;
  grid-template-columns: 60px 1fr 1fr 32px;
  gap: 8px;
  align-items: center;
}
.set-row .input {
  text-align: center;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.dialog-actions .btn {
  flex: 1;
}
.err {
  color: var(--red);
  font-size: 0.875rem;
  min-height: 1.2em;
}

/* Toasts */
.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  display: grid;
  gap: 8px;
  justify-items: center;
  pointer-events: none;
  width: min(92vw, 460px);
}
@media (max-width: 700px) {
  .toasts {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px 11px 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--label) 92%, transparent);
  color: var(--bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  font-size: 0.9375rem;
  font-weight: 500;
  animation: toast-in 420ms var(--ease-out);
}
.toast button {
  border: 0;
  background: color-mix(in srgb, var(--bg) 18%, transparent);
  color: var(--bg);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 650;
  font-size: 0.875rem;
}
.toast.leaving {
  animation: toast-out 220ms var(--ease) forwards;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

/* Library */
.lib-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.lib-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--label);
  transition: transform 160ms var(--ease-out), box-shadow 160ms;
}
.lib-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.lib-card .caption {
  white-space: nowrap;
}
.lib-card h3 {
  margin: 0;
  font-size: 1.125rem;
  overflow-wrap: anywhere;
}

/* Extension card */
.ext-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface);
}
.ext-card .ext-icon {
  width: 46px;
  height: 46px;
  flex: none;
}

/* ---------------------------------------------------------------- TV display */
.tv {
  min-height: 100vh;
  background: #000;
  color: #f5f5f7;
  padding: 3vh 3vw;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 2.5vh;
  --surface: #1c1c1e;
  --label: #f5f5f7;
  --label-2: #a1a1a6;
  --label-3: #8d8d93;
  --sep: rgba(84, 84, 88, 0.6);
  --fill: rgba(118, 118, 128, 0.24);
  --green: #30d158;
  --red: #ff453a;
  --accent: #2997ff;
}
.tv-head {
  display: flex;
  align-items: center;
  gap: 2vw;
}
.tv-head h1 {
  font-size: clamp(1.6rem, 3.4vw, 3.4rem);
  margin: 0;
  letter-spacing: -0.03em;
}
.tv-clock {
  margin-left: auto;
  font-size: clamp(1.4rem, 2.6vw, 2.6rem);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #a1a1a6;
}
.tv-logo {
  height: clamp(36px, 5vw, 64px);
  width: auto;
}
.tv-panel {
  animation: tv-in 700ms var(--ease-out);
  min-height: 0;
}
@keyframes tv-in {
  from {
    opacity: 0;
    transform: translateY(1.5vh);
  }
}
.tv h2 {
  font-size: clamp(1.1rem, 2vw, 2rem);
  color: #a1a1a6;
  font-weight: 600;
  margin-bottom: 2vh;
}
.tv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 28vw), 1fr));
  gap: 1.6vh 1.4vw;
}
.tv-match {
  background: #1c1c1e;
  border-radius: 1.4vw;
  padding: 1.6vh 1.4vw;
  font-size: clamp(1rem, 1.7vw, 1.9rem);
}
.tv-match .court {
  font-size: 0.6em;
  color: #a1a1a6;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.tv-match .vs {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3em 1em;
  margin-top: 0.4em;
  font-weight: 650;
}
.tv .standings {
  font-size: clamp(1rem, 1.7vw, 1.9rem);
}
.tv .table-wrap {
  background: #1c1c1e;
}
.tv-foot {
  display: flex;
  gap: 1vw;
  align-items: center;
  color: #8d8d93;
  font-size: clamp(0.8rem, 1.2vw, 1.2rem);
}
.tv-dots {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.tv-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a3a3c;
}
.tv-dots i.on {
  background: #f5f5f7;
}
.tv-exit {
  position: fixed;
  top: 12px;
  right: 12px;
  opacity: 0;
  transition: opacity 200ms;
}
.tv:hover .tv-exit {
  opacity: 1;
}

/* ---------------------------------------------------------------- Print */
.print-only {
  display: none;
}
@media print {
  @page {
    margin: 14mm;
  }
  :root {
    --bg: #fff;
    --surface: #fff;
    --label: #000;
    --label-2: #444;
    --label-3: #666;
    --sep: #ccc;
  }
  body {
    background: #fff;
    font-size: 11pt;
  }
  .no-print,
  .nav,
  .ws-tabs,
  .toasts,
  .footer,
  .sheet-root {
    display: none !important;
  }
  .print-only {
    display: block;
  }
  .match,
  .b-match,
  .table-wrap,
  .card,
  .score-card {
    box-shadow: none !important;
    border: 1px solid #bbb !important;
    break-inside: avoid;
  }
  .round-block {
    break-inside: avoid-page;
  }
  .ws-body {
    padding: 0;
  }
  a {
    color: inherit;
  }
}
.print-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.print-head img {
  height: 44px;
  width: auto;
}
.score-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.score-card {
  border: 1px solid var(--sep-strong);
  border-radius: 10px;
  padding: 12px;
  font-size: 10pt;
  break-inside: avoid;
}
.score-card .sc-row {
  display: grid;
  grid-template-columns: 1fr repeat(3, 34px);
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.score-card .box {
  height: 26px;
  border: 1px solid #999;
  border-radius: 4px;
}
.score-card .sign {
  margin-top: 12px;
  display: flex;
  gap: 16px;
  color: #666;
  font-size: 8.5pt;
}
.score-card .sign span {
  flex: 1;
  border-top: 1px solid #999;
  padding-top: 3px;
}

/* ---------------------------------------------------------------- Accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .nav,
  .ws-tabs,
  .toast,
  .nav-links.open {
    background: var(--surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-contrast: more) {
  :root {
    --sep: rgba(0, 0, 0, 0.5);
    --label-2: #3a3a3c;
  }
  .match,
  .card,
  .group,
  .b-match,
  .table-wrap {
    border: 1px solid var(--label) !important;
  }
}

/* ================================================================= Color & visual layer
   Apple system colors, used sparingly: one tone per format/feature, gradient icon
   tiles, soft hero glow. Motion is one-time and short. */
:root {
  --blue: #007aff;
  --indigo: #5856d6;
  --purple: #af52de;
  --pink: #ff2d55;
  --orange: #ff9500;
  --teal: #30b0c7;
  --green-sys: #34c759;
  --tone: var(--blue);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --blue: #0a84ff;
    --indigo: #5e5ce6;
    --purple: #bf5af2;
    --pink: #ff375f;
    --orange: #ff9f0a;
    --teal: #40c8e0;
    --green-sys: #30d158;
  }
}
:root[data-theme='dark'] {
  --blue: #0a84ff;
  --indigo: #5e5ce6;
  --purple: #bf5af2;
  --pink: #ff375f;
  --orange: #ff9f0a;
  --teal: #40c8e0;
  --green-sys: #30d158;
}
.tone-blue { --tone: var(--blue); }
.tone-indigo { --tone: var(--indigo); }
.tone-purple { --tone: var(--purple); }
.tone-pink { --tone: var(--pink); }
.tone-orange { --tone: var(--orange); }
.tone-teal { --tone: var(--teal); }
.tone-green { --tone: var(--green-sys); }
.tone-text { color: var(--tone); }

.grad {
  background: linear-gradient(100deg, var(--blue), var(--indigo) 50%, var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.icon-tile {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 72%, #fff), var(--tone) 65%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 14px color-mix(in srgb, var(--tone) 28%, transparent);
}
.icon-tile svg { width: 22px; height: 22px; }
.icon-tile.sm { width: 36px; height: 36px; border-radius: 10px; }
.icon-tile.sm svg { width: 18px; height: 18px; }
.badge.tone {
  background: color-mix(in srgb, var(--tone) 14%, transparent);
  color: var(--tone);
}

/* Hero glow + faint grid */
.hero-glow-wrap {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.hero-glow-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(var(--sep) 1px, transparent 1px), linear-gradient(90deg, var(--sep) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 10%, transparent 75%);
  opacity: 0.45;
}
.hero-glow {
  position: absolute;
  inset: -10% -5% auto;
  height: 620px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 48% at 22% 28%, color-mix(in srgb, var(--tone) 22%, transparent), transparent 70%),
    radial-gradient(32% 42% at 78% 18%, color-mix(in srgb, var(--indigo) 16%, transparent), transparent 70%),
    radial-gradient(30% 40% at 62% 72%, color-mix(in srgb, var(--teal) 12%, transparent), transparent 70%);
}
.hero .eyebrow.tone-text { color: var(--tone); }

/* Home hero: copy + product visual */
.hero-home { text-align: left; padding-bottom: clamp(28px, 4vw, 48px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero-home .lede { margin: 18px 0 0; max-width: 540px; }
.hero-home .hero-points { justify-content: flex-start; }
.hero-cta { display: flex; gap: 8px; flex-wrap: wrap; margin: 28px 0 0; }
.hero-art { position: relative; height: 460px; }
.art-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: 20px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.22), 0 8px 20px -8px rgba(0, 0, 0, 0.1);
  font-size: 0.8125rem;
  animation: art-in 700ms var(--ease-out) both;
}
@keyframes art-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
}
.art-window { left: 0; top: 0; width: 76%; animation-delay: 80ms; overflow: hidden; }
.art-table { right: 0; top: 150px; width: 58%; padding: 14px; animation-delay: 220ms; z-index: 1; }
.art-phone {
  left: 3%;
  bottom: 0;
  width: 44%;
  z-index: 2;
  padding: 8px 14px 14px;
  border-radius: 26px;
  animation-delay: 360ms;
}
.art-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sep);
  background: var(--surface-2);
}
.art-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.art-bar i:nth-child(2) { background: #febc2e; }
.art-bar i:nth-child(3) { background: #28c840; }
.art-bar span { margin-left: 8px; font-weight: 600; color: var(--label-2); }
.art-body { padding: 12px 14px 14px; display: grid; gap: 8px; }
.art-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.art-match { background: var(--fill-2); border-radius: 12px; padding: 8px 10px; border: 1px solid transparent; }
.art-match.next { border-color: color-mix(in srgb, var(--blue) 40%, transparent); background: color-mix(in srgb, var(--blue) 6%, var(--surface)); }
.art-meta { display: flex; justify-content: space-between; align-items: center; color: var(--label-2); font-size: 0.6875rem; margin-bottom: 4px; }
.art-meta .badge { font-size: 0.625rem; padding: 1px 7px; }
.art-line { display: flex; justify-content: space-between; padding: 1px 0; }
.art-line.win { font-weight: 700; }
.art-line.lose { color: var(--label-3); }
.art-row {
  display: grid;
  grid-template-columns: 16px 1fr auto 18px;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid var(--sep);
}
.art-row > span:first-child { color: var(--label-3); }
.art-row em { display: block; font-style: normal; font-size: 0.625rem; color: var(--purple); }
.art-row b { text-align: right; }
.art-row .form i { width: 14px; height: 14px; font-size: 0.5rem; border-radius: 4px; }
.art-grab { width: 32px; height: 4px; border-radius: 4px; background: var(--fill-3); margin: 0 auto 10px; }
.art-score { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; background: var(--fill-2); border-radius: 12px; margin-bottom: 6px; font-weight: 600; }
.art-step { display: inline-flex; align-items: center; gap: 6px; }
.art-step i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-sm); font-style: normal; }
.art-step b { min-width: 18px; text-align: center; font-size: 1rem; }
.art-save { margin-top: 4px; text-align: center; padding: 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-home { text-align: center; }
  .hero-home .lede { margin-left: auto; margin-right: auto; }
  .hero-home .hero-points, .hero-cta { justify-content: center; }
  .hero-art { height: 420px; max-width: 520px; width: 100%; margin: 0 auto; }
}
@media (max-width: 560px) {
  .hero-art { height: 330px; }
  .art-card { font-size: 0.6875rem; }
  .art-table { top: 110px; width: 64%; }
  .art-phone { width: 52%; left: 4%; }
}
.gen-wrap { padding-bottom: 20px; scroll-margin-top: 72px; }

/* Bento features */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.bento-tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out), opacity 700ms var(--ease-out);
}
.bento-tile::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 160px;
  pointer-events: none;
  background: radial-gradient(70% 100% at 0% 0%, color-mix(in srgb, var(--tone) 11%, transparent), transparent);
}
.bento-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2, .span-3 { grid-column: span 1; }
  .span-4 { grid-column: span 2; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
  .span-2, .span-3, .span-4 { grid-column: auto; }
}
.bento-top { display: flex; align-items: center; gap: 12px; position: relative; }
.bento-top h3 { margin: 0; }
.bento-tile p { margin: 0; color: var(--label-2); font-size: 0.9375rem; position: relative; }
.viz { margin-top: auto; padding-top: 14px; font-size: 0.8125rem; position: relative; }
.tl-row { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; margin-bottom: 7px; color: var(--label-2); font-size: 0.75rem; }
.tl-row > div { position: relative; height: 24px; border-radius: 7px; background: var(--fill-2); }
.tl-row i { position: absolute; top: 3px; bottom: 3px; left: calc(var(--x) * 1%); width: calc(var(--w) * 1%); border-radius: 5px; }
.tl-row i.b1 { background: linear-gradient(90deg, var(--blue), color-mix(in srgb, var(--blue) 70%, #fff)); }
.tl-row i.b2 { background: linear-gradient(90deg, var(--indigo), color-mix(in srgb, var(--indigo) 70%, #fff)); }
.tl-row i.b3 { background: linear-gradient(90deg, var(--teal), color-mix(in srgb, var(--teal) 70%, #fff)); }
.tl-axis { display: flex; justify-content: space-between; padding-left: 74px; color: var(--label-3); font-size: 0.6875rem; }
.tl-note { margin-top: 10px; display: flex; gap: 8px; align-items: center; color: var(--label-2); }
.viz-byes > div { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.viz-byes i { height: 12px; border-radius: 4px; background: color-mix(in srgb, var(--orange) 16%, transparent); font-size: 0; }
.viz-byes i.rest { background: var(--orange); }
.viz-byes .caption { display: block; margin-top: 6px; }
.vp-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: var(--fill-2); border-radius: 12px; margin-bottom: 6px; font-weight: 600; }
.vp-step { display: inline-flex; gap: 6px; align-items: center; }
.vp-step i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-sm); font-style: normal; }
.vp-step b { min-width: 20px; text-align: center; font-size: 1rem; }
.vp-save { text-align: center; padding: 7px; border-radius: 999px; background: var(--pink); color: #fff; font-weight: 600; }
.vt-row { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; padding: 8px 10px; background: var(--fill-2); border-radius: 10px; margin-bottom: 6px; align-items: center; }
.vt-row em { display: block; font-style: normal; font-size: 0.6875rem; color: var(--purple); }
.vf-pill { display: inline-flex; gap: 4px; padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--teal) 14%, transparent); color: var(--teal); margin-bottom: 8px; }
.vf-pill b { color: var(--label); }
.vf-row { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: var(--fill-2); margin-bottom: 6px; border: 1px solid transparent; color: var(--label-2); }
.vf-row b { color: var(--label); }
.vf-row.hi { border-color: color-mix(in srgb, var(--teal) 55%, transparent); background: color-mix(in srgb, var(--teal) 7%, var(--surface)); }
.viz-fix { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.vx-old { color: var(--label-3); text-decoration: line-through; }
.vx-arrow { color: var(--indigo); }
.vx-new { font-weight: 700; }
.vo-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: var(--fill-2); border-radius: 10px; margin-bottom: 6px; }
.viz-off { display: flex; flex-wrap: wrap; gap: 6px; }
.viz-free { display: flex; flex-direction: column; gap: 2px; }
.viz-free .big { font-family: var(--font-display); font-size: 3.4rem; font-weight: 800; letter-spacing: -0.045em; line-height: 1; background: linear-gradient(100deg, var(--green-sys), var(--teal)); -webkit-background-clip: text; background-clip: text; }

/* Bands, cards, tables */
.section-band { background: linear-gradient(180deg, var(--surface-2), var(--bg)); }
.table-wrap.shadowed { box-shadow: var(--shadow-md); }
.link-card .icon-tile { margin-bottom: 14px; }
.link-card { border: 1px solid transparent; }
.link-card:hover { border-color: var(--sep); }
.feature { position: relative; overflow: hidden; }

/* Generator format tiles carry their format's tone */
.tile { --tone: var(--blue); }
.tile[aria-pressed='true'] {
  border-color: var(--tone);
  background: color-mix(in srgb, var(--tone) 9%, var(--surface));
}
.tile[aria-pressed='true'] svg { color: var(--tone); }
.generator { box-shadow: 0 30px 80px -30px rgba(0, 40, 120, 0.25), var(--shadow-md); }

/* Workspace accents */
.lib-card { box-shadow: inset 0 3px 0 var(--tone), var(--shadow-sm); }
.lib-card:hover { box-shadow: inset 0 3px 0 var(--tone), var(--shadow-md); }
.ws-title .icon-tile { width: 40px; height: 40px; }
.round-head h3::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tone, var(--accent));
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-2px);
}

/* One-time reveal on scroll. Hidden only when JS is running; never loops. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js .reveal.in,
.revealed .reveal { opacity: 1; transform: none; }
.js .bento-tile.reveal.in:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .art-card { animation: none; }
}
@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .hero-glow, .hero-art { display: none; }
}

/* Guides: article column with a sticky contents rail on wide screens */
.article-grid { display: grid; grid-template-columns: minmax(0, 720px) 240px; gap: 56px; align-items: start; }
.article-rail { position: sticky; top: 84px; font-size: 0.875rem; }
.article-rail h2 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--label-3); margin: 0 0 10px; }
.article-rail ol { list-style: none; margin: 0 0 24px; padding: 0; border-left: 1px solid var(--sep); }
.article-rail li a { display: block; padding: 5px 0 5px 14px; color: var(--label-2); text-decoration: none; line-height: 1.35; }
.article-rail li a:hover { color: var(--accent); }
.article-meta { color: var(--label-3); font-size: 0.875rem; margin: 6px 0 28px; }
.article-meta a { color: inherit; }
.article .prose h2 { scroll-margin-top: 84px; }
.toc-inline { display: none; margin: 0 0 28px; padding: 12px 16px; background: var(--surface-2); border-radius: var(--radius); }
.toc-inline summary { cursor: pointer; font-weight: 600; }
.toc-inline ol { margin: 10px 0 0; padding-left: 20px; }
.tool-cta { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 36px 0; padding: 20px 22px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.tool-cta p { margin: 0; color: var(--label); }
.prose .worked { margin: 1.2em 0; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0; }
.prose .worked p:first-child { margin-top: 0; }
.prose .worked p:last-child { margin-bottom: 0; }
.prose .table-scroll table { min-width: 460px; }
@media (max-width: 960px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .article-rail { display: none; }
  .toc-inline { display: block; }
}

/* Printable brackets: one column per round, horizontal scroll on phones */
.draw { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 18px; overflow-x: auto; padding: 4px 2px 12px; -webkit-overflow-scrolling: touch; }
.draw-col { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }
.draw-col h4 { margin: 0 0 4px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--label-3); }
.dm { background: var(--surface); border: 1px solid var(--sep); border-radius: 10px; font-size: 0.8125rem; overflow: hidden; }
.dm div { padding: 6px 10px; display: flex; justify-content: space-between; gap: 8px; }
.dm div + div { border-top: 1px solid var(--sep); }
.dm .no { color: var(--label-3); font-variant-numeric: tabular-nums; }
.dm .from { color: var(--label-2); }
.dm.if-needed { border-style: dashed; }
.draw-group + .draw-group { margin-top: 28px; }
.bye-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.bye-list li { padding: 4px 10px; border-radius: 999px; background: var(--fill-2); font-size: 0.8125rem; }
.size-links { display: flex; flex-wrap: wrap; gap: 8px; }
.size-links a { padding: 6px 12px; border-radius: 999px; background: var(--fill-2); color: var(--label); text-decoration: none; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.size-links a:hover, .size-links a[aria-current] { background: var(--accent); color: var(--on-accent); }
.guide-cluster + .guide-cluster { margin-top: 48px; }
@media print {
  .article-rail, .toc-inline, .tool-cta { display: none; }
  .draw { overflow: visible; grid-auto-columns: 1fr; }
}
