/* =====================================================================
   OurMVP Storyline — sideline scorebook + game-day workspaces
   ===================================================================== */

@font-face {
    font-family: "Tanker";
    src: url("./assets/fonts/tanker-regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

html[data-experience="storyline"] {
    --story-navy: #173d32;
    --story-navy-2: #28584a;
    --story-orange: #c85a38;
    --story-orange-dark: #963f29;
    --story-paper: #e8f0e7;
    --story-paper-2: #dbe6d9;
    --story-cream: #f5f8f1;
    --story-gold: #d7b75f;
    --story-mint: #78a491;
    --story-mint-dark: #356b58;
    --story-ink: #1b2822;
    --story-muted: #657069;
    --story-footer-muted: #5f6963;
    --story-line: #c9d4c7;
    --story-red: #a74535;
    --story-white: #ffffff;
    --page: var(--story-paper);
    --surface: var(--story-cream);
    --surface-2: var(--story-paper-2);
    --ink: var(--story-ink);
    --muted: var(--story-muted);
    --line: var(--story-line);
    --filled: var(--story-navy);
    --filled-text: var(--story-white);
    --filled-muted: rgba(255, 255, 255, 0.7);
    --brand: var(--story-orange);
    --brand-dark: var(--story-orange-dark);
    --brand-button-text: var(--story-white);
    --coral: var(--story-orange);
    --gold: var(--story-gold);
    --blue: #4c7568;
    --violet: #716678;
    --danger: var(--story-red);
    --danger-bg: #fae9e4;
    --danger-border: #e3b5aa;
    --topbar-bg: rgba(245, 248, 241, 0.94);
    --nav-bg: rgba(245, 248, 241, 0.97);
    --sticky-bg: rgba(232, 240, 231, 0.95);
    --scrim: rgba(16, 35, 29, 0.6);
    --focus-ring: rgba(200, 90, 56, 0.23);
    --history-parent-bg: #e1f0ea;
    --history-parent-text: #315f51;
    --history-ref-bg: #fbe8df;
    --history-ref-text: #9a442b;
    --status-open-bg: #e8f0f7;
    --status-done-bg: #e1f0ea;
    --status-done-text: #315f51;
    --shadow: 0 2px 8px rgba(23, 61, 50, 0.08);
    --nav-shadow: 0 8px 24px rgba(23, 61, 50, 0.14);
    --radius: 6px;
    color-scheme: light;
}

html[data-experience="storyline"][data-theme="dark"] {
    --story-paper: #101914;
    --story-paper-2: #18251e;
    --story-cream: #142019;
    --story-ink: #f0f3e9;
    --story-muted: #b5beb6;
    --story-footer-muted: var(--story-muted);
    --story-line: #31463a;
    --page: var(--story-paper);
    --surface: var(--story-cream);
    --surface-2: var(--story-paper-2);
    --ink: var(--story-ink);
    --muted: var(--story-muted);
    --line: var(--story-line);
    --filled: var(--story-gold);
    --filled-text: var(--story-navy);
    --brand-button-text: #fff;
    --topbar-bg: rgba(16, 25, 20, 0.94);
    --nav-bg: rgba(20, 32, 25, 0.97);
    --sticky-bg: rgba(16, 25, 20, 0.95);
    --danger-bg: #3b2526;
    --danger-border: #6c3a38;
    --history-parent-bg: rgba(135, 185, 167, 0.16);
    --history-parent-text: #9ad0bd;
    --history-ref-bg: rgba(242, 107, 63, 0.16);
    --history-ref-text: #ffa283;
    --status-open-bg: rgba(79, 118, 158, 0.22);
    --status-done-bg: rgba(135, 185, 167, 0.16);
    --status-done-text: #9ad0bd;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 46px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
}

html[data-experience="storyline"] [hidden] {
    display: none !important;
}

html[data-experience="storyline"] .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

html[data-experience="storyline"] *,
html[data-experience="storyline"] *::before,
html[data-experience="storyline"] *::after {
    box-sizing: border-box;
}

html[data-experience="storyline"] {
    scroll-behavior: smooth;
}

html[data-experience="storyline"] body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

html[data-experience="storyline"] h1,
html[data-experience="storyline"] h2,
html[data-experience="storyline"] h3,
html[data-experience="storyline"] .brand-lockup strong {
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-weight: 400;
    letter-spacing: 0.012em;
}

html[data-experience="storyline"] button,
html[data-experience="storyline"] a,
html[data-experience="storyline"] input,
html[data-experience="storyline"] select,
html[data-experience="storyline"] textarea {
    -webkit-tap-highlight-color: transparent;
}

html[data-experience="storyline"] :where(button, a, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--story-orange);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px var(--focus-ring);
}

html[data-experience="storyline"] button,
html[data-experience="storyline"] .primary-button,
html[data-experience="storyline"] .secondary-button,
html[data-experience="storyline"] .soft-button,
html[data-experience="storyline"] .danger-button,
html[data-experience="storyline"] .mini-button,
html[data-experience="storyline"] .icon-command {
    min-height: 44px;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

html[data-experience="storyline"] .app-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    width: 100%;
    min-width: 0;
}

/* Header and workspace switcher */
html[data-experience="storyline"] .topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
    align-items: center;
    gap: 18px;
    min-height: 76px;
    padding: 10px clamp(16px, 3vw, 40px);
    background: var(--topbar-bg);
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    backdrop-filter: blur(20px) saturate(1.18);
}

html[data-experience="storyline"] .brand-lockup {
    gap: 12px;
    padding: 0;
    border-radius: 6px;
}

html[data-experience="storyline"] .brand-badge {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    box-shadow: 0 7px 18px rgba(21, 38, 63, 0.14);
    overflow: hidden;
}

html[data-experience="storyline"] .brand-logo img {
    width: 100%;
    height: 100%;
    display: block;
}

html[data-experience="storyline"] .brand-lockup strong {
    color: var(--story-navy);
    font-size: 21px;
    line-height: 1;
}

html[data-experience="storyline"][data-theme="dark"] .brand-lockup strong {
    color: var(--ink);
}

html[data-experience="storyline"] .brand-lockup small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

html[data-experience="storyline"] .workspace-control {
    position: relative;
    justify-self: center;
}

html[data-experience="storyline"] .workspace-switcher {
    min-width: 238px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 7px 13px 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 4px 16px rgba(21, 38, 63, 0.06);
    text-align: left;
}

html[data-experience="storyline"] .workspace-switcher:hover {
    border-color: color-mix(in srgb, var(--story-orange) 48%, var(--line));
    box-shadow: 0 8px 24px rgba(21, 38, 63, 0.1);
}

html[data-experience="storyline"] .workspace-switcher-icon,
html[data-experience="storyline"] .workspace-option-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--story-orange);
    background: transparent;
}

html[data-experience="storyline"] .workspace-switcher-icon {
    width: 24px;
    height: 34px;
    border-radius: 0;
}

html[data-experience="storyline"] .workspace-switcher-copy {
    min-width: 0;
    display: grid;
}

html[data-experience="storyline"] .workspace-switcher-copy small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.1;
    text-transform: uppercase;
}

html[data-experience="storyline"] .workspace-switcher-copy strong {
    overflow: hidden;
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-experience="storyline"] .workspace-chevron {
    color: var(--muted);
    transition: transform 160ms ease;
}

html[data-experience="storyline"] .workspace-switcher[aria-expanded="true"] .workspace-chevron {
    transform: rotate(180deg);
}

html[data-experience="storyline"] .workspace-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    z-index: 80;
    width: min(370px, calc(100vw - 24px));
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    box-shadow: 0 28px 70px rgba(21, 38, 63, 0.24);
    transform: translateX(-50%);
}

html[data-experience="storyline"] .workspace-menu[hidden] {
    display: none !important;
}

html[data-experience="storyline"] .workspace-menu .role-tab {
    width: 100%;
    min-width: 0;
    min-height: 68px;
    display: grid;
    grid-template-columns: 28px 1fr;
    justify-content: stretch;
    gap: 12px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--ink);
    text-align: left;
}

html[data-experience="storyline"] .workspace-menu .role-tab:hover {
    background: var(--surface-2);
}

html[data-experience="storyline"] .workspace-menu .role-tab.active {
    border-color: color-mix(in srgb, var(--story-orange) 35%, var(--line));
    background: color-mix(in srgb, var(--story-orange) 8%, var(--surface));
    color: var(--ink);
}

html[data-experience="storyline"] .workspace-option-icon {
    width: 28px;
    height: 42px;
    border-radius: 0;
}

html[data-experience="storyline"] .workspace-menu .role-tab > span:last-child {
    display: grid;
    gap: 2px;
}

html[data-experience="storyline"] .workspace-menu .role-tab strong {
    font-size: 14px;
}

html[data-experience="storyline"] .workspace-menu .role-tab small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

html[data-experience="storyline"] .top-actions {
    gap: 8px;
}

html[data-experience="storyline"] .account-button {
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--story-navy);
    border-radius: 6px;
    background: var(--story-navy);
    color: #fff;
    box-shadow: none;
    font-weight: 700;
}

html[data-experience="storyline"] .account-button:hover {
    background: var(--story-navy-2);
    box-shadow: 0 7px 20px rgba(21, 38, 63, 0.18);
}

html[data-experience="storyline"] .icon-button {
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

html[data-experience="storyline"] .sync-pill {
    min-height: 30px;
    border: 0;
    background: var(--surface-2);
    font-size: 11px;
    font-weight: 700;
}

html[data-experience="storyline"] .beta-notice {
    min-height: 34px;
    gap: 9px;
    padding: 5px 16px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--story-gold) 55%, var(--line));
    background: color-mix(in srgb, var(--story-gold) 20%, var(--surface));
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
}

html[data-experience="storyline"] .beta-notice strong {
    min-height: 20px;
    padding: 0 8px;
    border-radius: 4px;
    background: var(--story-navy);
    color: #fff;
    font-size: 9px;
    letter-spacing: 0.08em;
}

/* Shared layout and typography */
html[data-experience="storyline"] .screen-stack {
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: clamp(22px, 4vw, 46px) clamp(16px, 4vw, 42px) 126px;
}

html[data-experience="storyline"] .screen.active {
    opacity: 1;
}

html[data-experience="storyline"] .eyebrow {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
}

html[data-experience="storyline"] .workspace-heading {
    align-items: end;
    margin-bottom: 24px;
    padding-bottom: 19px;
    border-bottom: 1px solid var(--line);
}

html[data-experience="storyline"] .workspace-heading > div:first-child {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 12px;
}

html[data-experience="storyline"] .workspace-heading > div:first-child h1 {
    order: 1;
}

html[data-experience="storyline"] .workspace-heading > div:first-child .eyebrow {
    order: 2;
}

html[data-experience="storyline"] .workspace-heading h1 {
    margin: 0;
    color: var(--story-navy);
    font-size: clamp(32px, 5vw, 54px);
    line-height: 0.96;
}

html[data-experience="storyline"][data-theme="dark"] .workspace-heading h1 {
    color: var(--ink);
}

html[data-experience="storyline"] .section-title-row h2,
html[data-experience="storyline"] .modal-head h2 {
    color: var(--story-navy);
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.05;
}

html[data-experience="storyline"][data-theme="dark"] .section-title-row h2,
html[data-experience="storyline"][data-theme="dark"] .modal-head h2 {
    color: var(--ink);
}

html[data-experience="storyline"] .item-meta {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

html[data-experience="storyline"] .primary-button,
html[data-experience="storyline"] .secondary-button,
html[data-experience="storyline"] .soft-button,
html[data-experience="storyline"] .danger-button,
html[data-experience="storyline"] .mini-button,
html[data-experience="storyline"] .icon-command {
    min-height: 44px;
    border-radius: 6px;
    padding: 0 15px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

html[data-experience="storyline"] .primary-button {
    border: 1px solid var(--story-orange-dark);
    background: var(--story-orange-dark);
    color: #fff;
    box-shadow: 0 6px 0 rgba(152, 59, 33, 0.13);
}

html[data-experience="storyline"] .primary-button:hover {
    background: #933019;
    box-shadow: 0 8px 18px rgba(217, 83, 43, 0.2);
}

html[data-experience="storyline"] .secondary-button {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--story-navy);
}

html[data-experience="storyline"][data-theme="dark"] .secondary-button {
    color: var(--ink);
}

html[data-experience="storyline"] .secondary-button:hover,
html[data-experience="storyline"] .soft-button:hover {
    border-color: color-mix(in srgb, var(--story-orange) 42%, var(--line));
    background: color-mix(in srgb, var(--story-orange) 7%, var(--surface));
}

html[data-experience="storyline"] .secondary-button.active,
html[data-experience="storyline"] .code-mode-option.active {
    border-color: var(--story-navy);
    background: var(--story-navy);
    color: #fff;
}

html[data-experience="storyline"] .soft-button {
    border: 1px solid transparent;
    background: var(--surface-2);
    color: var(--ink);
}

html[data-experience="storyline"] .danger-button {
    border: 1px solid var(--danger-border);
    background: var(--danger-bg);
    color: var(--danger);
}

html[data-experience="storyline"] .panel,
html[data-experience="storyline"] .data-card,
html[data-experience="storyline"] .entity-card,
html[data-experience="storyline"] .history-item,
html[data-experience="storyline"] .schedule-item,
html[data-experience="storyline"] .assignment-item,
html[data-experience="storyline"] .settings-row {
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

html[data-experience="storyline"] .panel {
    padding: clamp(17px, 2.5vw, 24px);
}

html[data-experience="storyline"] .data-card.empty {
    min-height: 116px;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 5px;
    border-style: dashed;
    box-shadow: none;
}

html[data-experience="storyline"] .metric-line {
    min-height: 42px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

html[data-experience="storyline"] .metric-line:last-child {
    border-bottom: 0;
}

html[data-experience="storyline"] .metric-line span {
    color: var(--muted);
    font-size: 12px;
}

html[data-experience="storyline"] .metric-line strong {
    color: var(--story-navy);
    font-size: 17px;
}

html[data-experience="storyline"][data-theme="dark"] .metric-line strong {
    color: var(--ink);
}

html[data-experience="storyline"] .status-pill,
html[data-experience="storyline"] .history-type-pill,
html[data-experience="storyline"] .role-pill {
    border: 0;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

/* Storyline home */
html[data-experience="storyline"] #home-screen {
    position: relative;
}

html[data-experience="storyline"] #home-screen .home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

html[data-experience="storyline"] #home-screen .home-main {
    display: grid;
    gap: 28px;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
}

html[data-experience="storyline"] .storyline-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    min-height: 760px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(12, minmax(0, 1fr));
    border-radius: 6px;
    background: var(--story-navy);
    color: #fff;
    box-shadow: none;
}

html[data-experience="storyline"] .storyline-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(112deg, rgba(16, 39, 32, 0.96) 0%, rgba(16, 39, 32, 0.72) 35%, rgba(16, 39, 32, 0.08) 64%, rgba(16, 39, 32, 0.68) 100%);
}

html[data-experience="storyline"] .storyline-hero-title {
    position: relative;
    z-index: 2;
    grid-column: 1 / 10;
    grid-row: 1 / 6;
    align-self: start;
    padding: clamp(42px, 6vw, 72px) 0 0 clamp(24px, 6vw, 76px);
    text-align: left;
}

html[data-experience="storyline"] .storyline-hero h1 {
    max-width: 980px;
    margin: 0;
    color: #fff;
    font-size: clamp(54px, 6.2vw, 80px);
    line-height: 0.88;
    letter-spacing: 0.008em;
}

html[data-experience="storyline"] .storyline-hero h1 > span {
    display: block;
    white-space: nowrap;
}

html[data-experience="storyline"] .storyline-lede {
    max-width: 330px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.55;
}

html[data-experience="storyline"] .storyline-field-note {
    position: relative;
    z-index: 2;
    grid-column: 10 / 13;
    grid-row: 2 / 7;
    align-self: start;
    padding: clamp(46px, 7vw, 84px) clamp(24px, 3vw, 38px) 0 0;
}

html[data-experience="storyline"] .storyline-hero > .primary-button {
    position: relative;
    z-index: 3;
    grid-column: 1 / 5;
    grid-row: 11 / 13;
    align-self: center;
    justify-self: start;
    margin-left: clamp(24px, 6vw, 76px);
    min-height: 52px;
    padding: 0 19px;
}

html[data-experience="storyline"] .storyline-promise {
    position: relative;
    z-index: 2;
    grid-column: 9 / 13;
    grid-row: 10 / 12;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.64);
    font-size: 11px;
    padding-right: clamp(24px, 3vw, 38px);
}

html[data-experience="storyline"] .storyline-promise > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

html[data-experience="storyline"] .storyline-promise b {
    color: #fff;
}

html[data-experience="storyline"] .storyline-promise svg {
    width: 15px;
    color: var(--story-gold);
}

html[data-experience="storyline"] .storyline-guide-link {
    width: fit-content;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--story-orange-dark);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

html[data-experience="storyline"] .storyline-guide-link:hover {
    background: transparent;
    color: var(--story-navy);
}

html[data-experience="storyline"] .storyline-hero-art {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    opacity: 0.9;
}

html[data-experience="storyline"] .storyline-hero-art > img {
    width: min(1120px, 94%);
    max-width: 100%;
    height: 100%;
    max-height: 690px;
    display: block;
    object-fit: contain;
    object-position: 56% bottom;
}

html[data-experience="storyline"] .storyline-chapters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 0;
    border-radius: 6px 28px 6px 28px;
    background: var(--surface-2);
    box-shadow: none;
}

html[data-experience="storyline"] .storyline-chapters > div {
    position: relative;
    display: grid;
    gap: 3px;
    padding: 19px 20px 19px 56px;
    border: 0;
}

html[data-experience="storyline"] .storyline-chapters > div:nth-child(2) {
    background: color-mix(in srgb, var(--story-mint) 14%, transparent);
}

html[data-experience="storyline"] .storyline-chapters span {
    position: absolute;
    top: 19px;
    left: 18px;
    color: var(--story-orange-dark);
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: 17px;
    font-weight: 700;
}

html[data-experience="storyline"] .storyline-chapters strong {
    color: var(--story-navy);
    font-size: 13px;
}

html[data-experience="storyline"][data-theme="dark"] .storyline-chapters strong {
    color: var(--ink);
}

html[data-experience="storyline"] .storyline-chapters small {
    color: var(--muted);
    font-size: 10px;
}

html[data-experience="storyline"] .storyline-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-top: 8px;
}

html[data-experience="storyline"] .storyline-section-heading h2 {
    margin: 0;
    color: var(--story-navy);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1;
}

html[data-experience="storyline"][data-theme="dark"] .storyline-section-heading h2 {
    color: var(--ink);
}

html[data-experience="storyline"] .home-sports-row {
    justify-content: flex-end;
    max-width: 430px;
    color: var(--muted);
}

html[data-experience="storyline"] .home-sports-row b {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

html[data-experience="storyline"] .home-sports-row b + b::before {
    content: "•";
    margin: 0 8px;
    color: var(--story-orange);
}

html[data-experience="storyline"] .role-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

html[data-experience="storyline"] .role-card {
    position: relative;
    overflow: hidden;
    align-content: start;
    gap: 15px;
    min-height: 270px;
    padding: 20px;
    border: 0;
    border: 0;
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: none;
}

html[data-experience="storyline"] .role-card::after {
    display: none;
}

html[data-experience="storyline"] .role-card.parent-accent { background: color-mix(in srgb, var(--story-mint) 12%, var(--surface)); }
html[data-experience="storyline"] .role-card.org-accent { background: color-mix(in srgb, var(--story-gold) 9%, var(--surface)); }
html[data-experience="storyline"] .role-card.ref-accent { background: color-mix(in srgb, var(--story-orange) 8%, var(--surface)); }

html[data-experience="storyline"] .role-card-head {
    align-items: center;
    gap: 12px;
}

html[data-experience="storyline"] .role-card-icon {
    width: auto;
    height: auto;
    display: flex;
    flex: 0 0 auto;
    border-radius: 0;
    background: transparent;
    color: var(--story-mint-dark);
}

html[data-experience="storyline"] .org-accent .role-card-icon {
    background: transparent;
    color: #8c6718;
}

html[data-experience="storyline"] .ref-accent .role-card-icon {
    background: transparent;
    color: var(--story-orange-dark);
}

html[data-experience="storyline"] .role-card-icon svg {
    width: 27px;
    height: 27px;
}

html[data-experience="storyline"] .role-card-head h2 {
    color: var(--story-navy);
    font-size: 21px;
}

html[data-experience="storyline"][data-theme="dark"] .role-card-head h2 {
    color: var(--ink);
}

html[data-experience="storyline"] .role-card-copy {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

html[data-experience="storyline"] .role-card-metrics {
    margin-top: auto;
    color: var(--muted);
    font-size: 11px;
}

html[data-experience="storyline"] .role-card-metrics strong {
    color: var(--story-navy);
    font-size: 18px;
}

html[data-experience="storyline"][data-theme="dark"] .role-card-metrics strong {
    color: var(--ink);
}

html[data-experience="storyline"] .role-card > button {
    width: 100%;
    justify-content: center;
}

/* Parent record, athletes, and progress */
html[data-experience="storyline"] #parent-screen,
html[data-experience="storyline"] #athletes-screen,
html[data-experience="storyline"] #player-detail-screen {
    max-width: 1120px;
    margin: 0 auto;
}

html[data-experience="storyline"] #parent-screen .dashboard-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr);
    gap: 16px;
}

html[data-experience="storyline"] #parent-screen .dashboard-grid .wide {
    grid-column: 1;
    grid-row: span 2;
    min-height: 430px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--story-mint) 10%, var(--surface)), var(--surface) 45%);
}

html[data-experience="storyline"] #parent-screen .panel:nth-child(2),
html[data-experience="storyline"] #parent-screen .panel:nth-child(3) {
    grid-column: 2;
}

html[data-experience="storyline"] .athlete-strip,
html[data-experience="storyline"] .entity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 13px;
}

html[data-experience="storyline"] #parent-athlete-strip {
    margin-top: 18px;
}

html[data-experience="storyline"] .entity-card {
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: 218px;
    padding: 17px;
    box-shadow: none;
}

html[data-experience="storyline"] .entity-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--story-orange), var(--story-gold));
}

html[data-experience="storyline"] .entity-card:hover {
    border-color: color-mix(in srgb, var(--story-orange) 35%, var(--line));
    background: color-mix(in srgb, var(--story-orange) 4%, var(--surface));
}

html[data-experience="storyline"] .entity-avatar {
    width: 56px;
    height: 56px;
    border: 3px solid var(--surface);
    border-radius: 4px;
    background: var(--story-navy);
    color: var(--story-gold);
    box-shadow: 0 0 0 1px var(--line), 0 6px 16px rgba(21, 38, 63, 0.18);
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: 19px;
}

html[data-experience="storyline"] .entity-card > div > strong,
html[data-experience="storyline"] .entity-card > strong {
    color: var(--story-navy);
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: 20px;
}

html[data-experience="storyline"][data-theme="dark"] .entity-card > div > strong,
html[data-experience="storyline"][data-theme="dark"] .entity-card > strong {
    color: var(--ink);
}

html[data-experience="storyline"] .card-actions {
    gap: 7px;
}

html[data-experience="storyline"] .card-actions .primary-button,
html[data-experience="storyline"] .card-actions .secondary-button {
    min-height: 42px;
    padding: 0 12px;
    font-size: 11px;
}

html[data-experience="storyline"] #last-game-card {
    margin-top: 12px;
    border: 0;
    border-radius: 4px;
    background: var(--surface-2);
    box-shadow: none;
}

html[data-experience="storyline"] .usage-card {
    margin-top: 14px;
    padding: 13px;
    border: 0;
    border-radius: 4px;
    background: color-mix(in srgb, var(--story-gold) 16%, var(--surface));
}

html[data-experience="storyline"] .usage-meter {
    height: 7px;
    border: 0;
    background: color-mix(in srgb, var(--story-gold) 20%, var(--surface-2));
}

html[data-experience="storyline"] .usage-meter i {
    background: linear-gradient(90deg, var(--story-orange), var(--story-gold));
}

html[data-experience="storyline"] #player-detail-screen .player-detail-layout {
    gap: 16px;
}

html[data-experience="storyline"] #player-detail-screen .panel:first-child,
html[data-experience="storyline"] #game-detail-screen .panel:first-child {
    background: linear-gradient(145deg, var(--story-navy), var(--story-navy-2));
    color: #fff;
}

html[data-experience="storyline"] #player-detail-screen .panel:first-child .eyebrow,
html[data-experience="storyline"] #game-detail-screen .panel:first-child .eyebrow,
html[data-experience="storyline"] #player-detail-screen .panel:first-child .item-meta,
html[data-experience="storyline"] #game-detail-screen .panel:first-child .item-meta {
    color: rgba(255, 255, 255, 0.68);
}

html[data-experience="storyline"] #history-screen,
html[data-experience="storyline"] #game-detail-screen {
    max-width: 1000px;
    margin: 0 auto;
}

html[data-experience="storyline"] #history-screen .history-list {
    position: relative;
    display: grid;
    gap: 13px;
    padding-left: 22px;
}

html[data-experience="storyline"] #history-screen .history-list::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 4px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(var(--story-orange), var(--story-gold), var(--story-mint));
}

html[data-experience="storyline"] #history-screen .history-item {
    position: relative;
    padding: 17px 18px;
}

html[data-experience="storyline"] #history-screen .history-item::before {
    content: "";
    position: absolute;
    top: 25px;
    left: -25px;
    width: 9px;
    height: 9px;
    border: 3px solid var(--page);
    border-radius: 50%;
    background: var(--story-orange);
    box-shadow: 0 0 0 1px var(--story-orange);
}

html[data-experience="storyline"] .history-score-card {
    min-width: 92px;
    border: 0;
    border-radius: 4px;
    background: var(--story-navy);
    color: #fff;
}

html[data-experience="storyline"] .history-score-card strong {
    color: var(--story-gold);
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: 26px;
}

html[data-experience="storyline"] #game-detail-screen .summary-grid,
html[data-experience="storyline"] #review-screen .review-layout,
html[data-experience="storyline"] #summary-screen .summary-grid {
    gap: 16px;
}

html[data-experience="storyline"] .compact-stat-grid > div,
html[data-experience="storyline"] .review-stat-row {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-2);
}

/* Parent game-day tracker */
html[data-experience="storyline"] #tracker-screen {
    max-width: 1120px;
    margin: 0 auto;
}

html[data-experience="storyline"] #tracker-screen .tracker-shell {
    position: relative;
    overflow: hidden;
    padding: clamp(16px, 3vw, 30px);
    border: 0;
    border-radius: 0;
    background: var(--story-navy);
    color: #fff;
    box-shadow: none;
}

html[data-experience="storyline"] #tracker-screen .parent-live-top {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-experience="storyline"] #tracker-screen h1 {
    color: #fff;
    font-size: clamp(26px, 4vw, 42px);
}

html[data-experience="storyline"] #tracker-screen .eyebrow,
html[data-experience="storyline"] #tracker-screen .parent-game-fields label > span,
html[data-experience="storyline"] #tracker-screen .parent-score-card > span {
    color: rgba(255, 255, 255, 0.6);
}

html[data-experience="storyline"] #tracker-screen .icon-button {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

html[data-experience="storyline"] #tracker-screen .parent-scoreboard {
    gap: 10px;
    margin: 20px 0;
}

html[data-experience="storyline"] #tracker-screen .parent-score-card {
    min-height: 112px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 4px;
    background: transparent;
}

html[data-experience="storyline"] #tracker-screen .parent-score-card.player-card {
    background: var(--story-orange-dark);
    color: #fff;
}

html[data-experience="storyline"] #tracker-screen .parent-score-card strong,
html[data-experience="storyline"] #tracker-screen .parent-score-card input {
    color: #fff;
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: clamp(31px, 6vw, 52px);
}

html[data-experience="storyline"] #tracker-screen .parent-score-card input {
    border-color: rgba(255, 255, 255, 0.24);
    background: #0d192a;
    color: #fff;
}

html[data-experience="storyline"] #tracker-screen .parent-score-card.player-card,
html[data-experience="storyline"] #tracker-screen .parent-score-card.player-card strong {
    color: #fff;
}

html[data-experience="storyline"] #tracker-screen .parent-score-card.player-card > span {
    color: #fff;
}

html[data-experience="storyline"] #tracker-screen .score-control button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

html[data-experience="storyline"] #tracker-screen .parent-game-fields {
    gap: 9px;
}

html[data-experience="storyline"] #tracker-screen .field-control {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

html[data-experience="storyline"] #tracker-screen .field-control option {
    color: #111;
}

html[data-experience="storyline"] #tracker-screen .parent-timer-panel {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    background: transparent;
}

html[data-experience="storyline"] #tracker-screen .parent-timer-panel strong {
    color: var(--story-gold);
    font-family: "Tanker", "Arial Narrow", sans-serif;
}

html[data-experience="storyline"] #tracker-screen .stat-button-grid {
    gap: 9px;
    margin: 18px 0;
}

html[data-experience="storyline"] #tracker-screen .stat-button {
    min-height: 90px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: transparent;
    color: #fff;
}

html[data-experience="storyline"] #tracker-screen .stat-button:hover {
    border-color: rgba(247, 200, 87, 0.56);
    background: rgba(247, 200, 87, 0.12);
}

html[data-experience="storyline"] #tracker-screen .stat-button.scoring {
    border-color: rgba(242, 107, 63, 0.34);
}

html[data-experience="storyline"] #tracker-screen .stat-button.defense {
    border-color: rgba(135, 185, 167, 0.34);
}

html[data-experience="storyline"] #tracker-screen .stat-button span {
    color: rgba(255, 255, 255, 0.66);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

html[data-experience="storyline"] #tracker-screen .stat-button strong {
    color: #fff;
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: 28px;
}

html[data-experience="storyline"] #tracker-screen .sticky-command-bar {
    bottom: 12px;
    gap: 7px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 4px;
    background: rgba(11, 23, 39, 0.9);
    backdrop-filter: blur(18px);
}

html[data-experience="storyline"] #tracker-screen .icon-command {
    border-color: var(--story-line);
    background: var(--story-cream);
    color: var(--story-navy);
}

html[data-experience="storyline"] #review-screen,
html[data-experience="storyline"] #summary-screen {
    max-width: 1000px;
    margin: 0 auto;
}

html[data-experience="storyline"] #summary-screen .summary-hero,
html[data-experience="storyline"] #review-screen .review-score {
    border-radius: 4px;
    background: var(--story-navy);
    color: #fff;
}

/* Organization workspace */
html[data-experience="storyline"] #organization-screen,
html[data-experience="storyline"] #org-teams-screen,
html[data-experience="storyline"] #org-pilot-screen,
html[data-experience="storyline"] #org-people-screen,
html[data-experience="storyline"] #org-reports-screen,
html[data-experience="storyline"] #org-codes-screen {
    max-width: 1160px;
    margin: 0 auto;
}

html[data-experience="storyline"] body.storyline-role-organization .workspace-switcher-icon,
html[data-experience="storyline"] body.storyline-role-organization .workspace-option-icon {
    color: #8c6718;
    background: transparent;
}

html[data-experience="storyline"] #organization-screen .dashboard-grid {
    grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(200px, 0.55fr));
    gap: 15px;
}

html[data-experience="storyline"] #organization-screen .dashboard-grid .wide {
    grid-column: 1;
    grid-row: span 2;
}

html[data-experience="storyline"] #organization-screen .panel:first-child {
    background: linear-gradient(180deg, color-mix(in srgb, var(--story-gold) 10%, var(--surface)), var(--surface) 45%);
}

html[data-experience="storyline"] .org-access-banner {
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

html[data-experience="storyline"] .schedule-item,
html[data-experience="storyline"] .assignment-item,
html[data-experience="storyline"] .history-item {
    padding: 15px 17px;
}

html[data-experience="storyline"] .schedule-item:hover,
html[data-experience="storyline"] .assignment-item:hover {
    border-color: color-mix(in srgb, var(--story-gold) 52%, var(--line));
}

html[data-experience="storyline"] #org-pilot-screen .pilot-layout {
    gap: 16px;
}

html[data-experience="storyline"] #org-people-screen .member-row,
html[data-experience="storyline"] #org-people-screen .invite-row {
    border-radius: 0;
    background: transparent;
}

html[data-experience="storyline"] #org-people-screen .invite-list {
    gap: 12px;
}

html[data-experience="storyline"] #org-people-screen .invite-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    padding: 14px 16px;
}

html[data-experience="storyline"] #org-people-screen .invite-card-head,
html[data-experience="storyline"] #org-people-screen .invite-card-title,
html[data-experience="storyline"] #org-people-screen .invite-code-line {
    display: flex;
    align-items: center;
    min-width: 0;
}

html[data-experience="storyline"] #org-people-screen .invite-card-head {
    justify-content: space-between;
    gap: 12px;
}

html[data-experience="storyline"] #org-people-screen .invite-card-title {
    flex-wrap: wrap;
    gap: 7px;
}

html[data-experience="storyline"] #org-people-screen .invite-label {
    min-width: 0;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.25;
}

html[data-experience="storyline"] #org-people-screen .invite-card-head .status-pill,
html[data-experience="storyline"] #org-people-screen .invite-card-title .role-pill {
    flex: 0 0 auto;
}

html[data-experience="storyline"] #org-people-screen .invite-code-line {
    flex-wrap: wrap;
    gap: 10px;
}

html[data-experience="storyline"] #org-people-screen .invite-code {
    display: block;
    min-width: 0;
    flex: 0 0 auto;
    max-width: 100%;
    overflow: hidden;
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: clamp(15px, 4.4vw, 20px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.035em;
    white-space: nowrap;
    text-overflow: ellipsis;
}

html[data-experience="storyline"] #org-people-screen .invite-copy-button {
    flex: 0 0 auto;
    min-height: 44px;
    padding-inline: 14px;
}

html[data-experience="storyline"] #org-people-screen .invite-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    justify-self: start;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

html[data-experience="storyline"] #org-people-screen .invite-toggle-button:hover,
html[data-experience="storyline"] #org-people-screen .invite-toggle-button:focus-visible {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
}

html[data-experience="storyline"] #org-people-screen #org-invite-form .primary-button {
    min-height: 52px;
}

html[data-experience="storyline"] #org-people-screen .pilot-access-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

html[data-experience="storyline"] #org-people-screen .pilot-access-code:not(.empty):not(.informational) span {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

@media (min-width: 701px) and (max-width: 1100px) {
    html[data-experience="storyline"] #org-people-screen .org-people-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (min-width: 701px) {
    html[data-experience="storyline"] #org-people-screen .pilot-access-code.empty,
    html[data-experience="storyline"] #org-people-screen .pilot-access-code.informational {
        grid-template-columns: minmax(0, 1fr);
    }

    html[data-experience="storyline"] #org-people-screen .pilot-access-code.empty span,
    html[data-experience="storyline"] #org-people-screen .pilot-access-code.informational span {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    html[data-experience="storyline"] #org-people-screen .pilot-access-code.empty .secondary-button,
    html[data-experience="storyline"] #org-people-screen .pilot-access-code.informational .secondary-button {
        width: 100%;
    }
}

@media (min-width: 901px) {
    html[data-experience="storyline"] #org-people-screen .pilot-access-grid .pilot-access-code .secondary-button[data-action="copy-invite-code"] {
        width: 44px;
        min-width: 44px;
        padding: 0;
        font-size: 0;
    }

    html[data-experience="storyline"] #org-people-screen .pilot-access-grid .pilot-access-code .secondary-button[data-action="copy-invite-code"] svg {
        width: 18px;
        height: 18px;
    }
}

html[data-experience="storyline"] #org-reports-screen .history-item {
    border-left: 5px solid var(--story-mint);
}

html[data-experience="storyline"] #org-codes-screen .lobby-code-board {
    gap: 18px;
}

html[data-experience="storyline"] #org-codes-screen .lobby-code-card,
html[data-experience="storyline"] #org-codes-screen .code-sheet-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    box-shadow: none;
}

html[data-experience="storyline"] #org-codes-screen .lobby-code-card {
    background: var(--story-navy);
    color: #fff;
}

html[data-experience="storyline"] #org-codes-screen .lobby-code-card .item-meta {
    color: rgba(255, 255, 255, 0.66);
}

html[data-experience="storyline"] .scan-code-box,
html[data-experience="storyline"] .qr-render {
    border-radius: 4px;
    background: #fff;
}

/* Official scoring */
html[data-experience="storyline"] #referee-screen,
html[data-experience="storyline"] #ref-setup-screen,
html[data-experience="storyline"] #ref-review-screen {
    max-width: 1020px;
    margin: 0 auto;
}

html[data-experience="storyline"] body.storyline-role-referee .workspace-switcher-icon,
html[data-experience="storyline"] body.storyline-role-referee .workspace-option-icon {
    color: var(--story-orange-dark);
    background: transparent;
}

html[data-experience="storyline"] #referee-screen .assignment-list {
    display: grid;
    gap: 13px;
}

html[data-experience="storyline"] #referee-screen .assignment-item {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 112px;
    padding-left: 22px;
}

html[data-experience="storyline"] #referee-screen .assignment-item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--story-orange);
}

html[data-experience="storyline"] #ref-setup-screen .form-grid {
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    box-shadow: none;
}

html[data-experience="storyline"] #ref-live-screen {
    width: min(1180px, 100%);
    margin: 0 auto;
}

html[data-experience="storyline"] #ref-live-screen .ref-live-shell {
    overflow: hidden;
    padding: clamp(15px, 3vw, 28px);
    border: 0;
    border-radius: 0;
    background: #0d192a;
    color: #fff;
    box-shadow: none;
}

html[data-experience="storyline"] #ref-live-screen h1 {
    color: #fff;
    font-size: clamp(24px, 4vw, 38px);
}

html[data-experience="storyline"] #ref-live-screen .eyebrow {
    color: rgba(255, 255, 255, 0.58);
}

html[data-experience="storyline"] #ref-live-screen .icon-button {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

html[data-experience="storyline"] #ref-live-screen .ref-scoreboard {
    overflow: hidden;
    margin: 18px 0;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

html[data-experience="storyline"] #ref-live-screen .ref-team-score {
    min-height: 154px;
}

html[data-experience="storyline"] #ref-live-screen .ref-team-score strong {
    color: #fff;
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: clamp(52px, 9vw, 84px);
}

html[data-experience="storyline"] #ref-live-screen .ref-team-score > span,
html[data-experience="storyline"] #ref-live-screen .ref-team-column > span,
html[data-experience="storyline"] #ref-live-screen .timeout-mini span {
    color: #f5f7f6;
}

html[data-experience="storyline"] #ref-live-screen .ref-clock-box {
    min-height: 154px;
    border-color: rgba(255, 255, 255, 0.1);
    background: var(--story-orange);
    color: #fff;
}

html[data-experience="storyline"] #ref-live-screen .ref-clock-box strong {
    color: #fff;
    font-family: "Tanker", "Arial Narrow", sans-serif;
}

html[data-experience="storyline"] #ref-live-screen .ref-clock-box > span {
    color: #030b14;
    font-weight: 800;
}

html[data-experience="storyline"] #ref-live-screen .ref-team-column {
    gap: 8px;
}

html[data-experience="storyline"] #ref-live-screen .ref-team-column button {
    min-height: 62px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: transparent;
    color: #fff;
    font-weight: 800;
}

html[data-experience="storyline"] #ref-live-screen .ref-team-column button[data-points] {
    min-height: 78px;
    background: rgba(247, 200, 87, 0.12);
    color: var(--story-gold);
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: 26px;
}

html[data-experience="storyline"] #ref-live-screen .ref-team-column button:hover {
    border-color: rgba(247, 200, 87, 0.52);
    background: rgba(247, 200, 87, 0.18);
}

html[data-experience="storyline"] #ref-live-screen .ref-live-bottom {
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-experience="storyline"] #ref-live-screen .secondary-button {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

html[data-experience="storyline"] #ref-review-screen .review-layout {
    gap: 16px;
}

/* Public board */
html[data-experience="storyline"] #public-screen {
    max-width: 1040px;
    margin: 0 auto;
}

html[data-experience="storyline"] #public-screen .public-scoreboard {
    overflow: hidden;
    border: 0;
    border-radius: 4px;
    background: var(--story-navy);
    color: #fff;
    box-shadow: none;
}

html[data-experience="storyline"] #public-screen .public-board-inner {
    padding: clamp(22px, 5vw, 52px);
}

html[data-experience="storyline"] #public-screen .item-meta {
    color: rgba(255, 255, 255, 0.62);
}

html[data-experience="storyline"] #public-screen .public-score-row {
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-experience="storyline"] #public-screen .public-team-score strong {
    color: #fff;
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: clamp(58px, 12vw, 112px);
}

html[data-experience="storyline"] #public-screen .public-score-row > .status-pill {
    background: var(--story-orange-dark);
    color: #fff;
}

html[data-experience="storyline"] #public-screen .secondary-button {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Settings */
html[data-experience="storyline"] #settings-screen {
    max-width: 900px;
    margin: 0 auto;
}

html[data-experience="storyline"] #settings-screen .settings-list {
    display: grid;
    gap: 11px;
}

html[data-experience="storyline"] #settings-screen .settings-row {
    min-height: 92px;
    padding: 18px 20px;
    box-shadow: none;
}

html[data-experience="storyline"] #settings-screen .settings-row:hover {
    border-color: color-mix(in srgb, var(--story-orange) 28%, var(--line));
}

html[data-experience="storyline"] #settings-screen .settings-row > div:first-child {
    display: grid;
    gap: 4px;
}

html[data-experience="storyline"] #settings-screen .settings-row > div:first-child strong {
    color: var(--story-navy);
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: 18px;
}

html[data-experience="storyline"][data-theme="dark"] #settings-screen .settings-row > div:first-child strong {
    color: var(--ink);
}

html[data-experience="storyline"] #settings-screen .settings-row > div:first-child span {
    color: var(--muted);
    font-size: 11px;
}

html[data-experience="storyline"] #settings-screen .theme-toggle {
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-2);
}

/* Fields and forms */
html[data-experience="storyline"] .field-control,
html[data-experience="storyline"] .notes-area,
html[data-experience="storyline"] input,
html[data-experience="storyline"] select,
html[data-experience="storyline"] textarea {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
}

html[data-experience="storyline"] textarea,
html[data-experience="storyline"] .notes-area {
    min-height: 120px;
}

html[data-experience="storyline"] .field-control:hover,
html[data-experience="storyline"] .notes-area:hover {
    border-color: color-mix(in srgb, var(--story-orange) 34%, var(--line));
}

html[data-experience="storyline"] label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

/* Modals */
html[data-experience="storyline"] .modal {
    z-index: 120;
    padding: 18px;
    background: rgba(21, 38, 63, 0.66);
    backdrop-filter: blur(9px);
}

html[data-experience="storyline"] .modal-panel {
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 32px 100px rgba(21, 38, 63, 0.32);
}

html[data-experience="storyline"] .modal-panel::before {
    content: "";
    display: block;
    height: 5px;
    margin: calc(-1 * var(--modal-padding, 0px));
    background: linear-gradient(90deg, var(--story-orange), var(--story-gold), var(--story-mint));
}

html[data-experience="storyline"] .modal-head {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

html[data-experience="storyline"] .segmented-control {
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-2);
}

html[data-experience="storyline"] .segmented-control button {
    border-radius: 3px;
}

html[data-experience="storyline"] .segmented-control button.active {
    background: var(--story-navy);
    color: #fff;
}

html[data-experience="storyline"] #auth-modal .modal-panel {
    max-width: 480px;
}

html[data-experience="storyline"] #auth-modal .modal-head::after {
    content: "Your athlete’s story, safe in the cloud.";
    display: block;
    max-width: 190px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
    text-align: right;
}

html[data-experience="storyline"] #athlete-modal .modal-panel,
html[data-experience="storyline"] #schedule-modal .modal-panel,
html[data-experience="storyline"] #stat-help-modal .modal-panel {
    max-width: 760px;
}

html[data-experience="storyline"] #final-score-modal .modal-panel,
html[data-experience="storyline"] #ref-resume-modal .modal-panel,
html[data-experience="storyline"] #notes-modal .modal-panel {
    max-width: 520px;
}

html[data-experience="storyline"] #ref-resume-modal .resume-summary-grid > div {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-2);
}

html[data-experience="storyline"] .toast {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    background: var(--story-navy);
    color: #fff;
    box-shadow: 0 18px 50px rgba(21, 38, 63, 0.28);
}

/* Footer and parent-first navigation */
html[data-experience="storyline"] .site-footer {
    justify-content: center;
    gap: 20px;
    margin-top: 48px;
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
    color: var(--story-footer-muted);
    font-size: 11px;
}

html[data-experience="storyline"] .site-footer a,
html[data-experience="storyline"] .legal-footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    color: var(--story-footer-muted);
}

html[data-experience="storyline"] .bottom-nav {
    position: fixed;
    right: 50%;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: auto;
    z-index: 45;
    width: min(560px, calc(100% - 28px));
    min-height: 72px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    gap: 2px;
    padding: 7px 8px;
    border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
    border-radius: 6px;
    background: var(--nav-bg);
    box-shadow: none;
    backdrop-filter: blur(20px) saturate(1.15);
    transform: translateX(50%);
}

html[data-experience="storyline"] .bottom-nav-item {
    position: relative;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 4px;
    color: #626560;
    font-size: 9px;
    font-weight: 800;
}

html[data-experience="storyline"] .bottom-nav-item:hover {
    background: var(--surface-2);
    color: var(--story-navy);
}

html[data-experience="storyline"] .bottom-nav-item.active {
    background: color-mix(in srgb, var(--story-orange) 9%, var(--surface));
    color: #b83d1e;
}

html[data-experience="storyline"] .bottom-nav-item.active::after {
    content: "";
    position: absolute;
    bottom: 3px;
    width: 17px;
    height: 3px;
    border-radius: 99px;
    background: var(--story-orange);
}

html[data-experience="storyline"] .bottom-nav-item > svg {
    width: 19px;
    height: 19px;
}

html[data-experience="storyline"] .storyline-track-nav {
    overflow: visible;
    background: transparent !important;
}

html[data-experience="storyline"] .storyline-track-nav-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-top: -25px;
    border: 5px solid var(--nav-bg);
    border-radius: 4px;
    background: var(--story-orange);
    color: var(--story-navy);
    box-shadow: 0 8px 20px rgba(217, 83, 43, 0.28);
    transform: rotate(45deg);
}

html[data-experience="storyline"] .storyline-track-nav-icon svg {
    width: 21px;
    height: 21px;
    transform: rotate(-45deg);
}

html[data-experience="storyline"] .storyline-track-nav.active::after {
    display: none;
}

/* Tablet */
@media (max-width: 1050px) {
    html[data-experience="storyline"] #home-screen .home-layout {
        grid-template-columns: 1fr;
    }


    html[data-experience="storyline"] #organization-screen .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-experience="storyline"] #organization-screen .dashboard-grid .wide {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

@media (max-width: 860px) {
    html[data-experience="storyline"] .topbar {
        grid-template-columns: auto 1fr auto;
        gap: 10px;
    }

    html[data-experience="storyline"] .storyline-hero {
        min-height: 700px;
    }

    html[data-experience="storyline"] .storyline-hero-title {
        width: 100%;
        min-height: 0;
    }

    html[data-experience="storyline"] .storyline-hero-art {
        width: 100%;
        padding: 0;
    }

    html[data-experience="storyline"] .storyline-hero-art > img {
        max-height: 420px;
    }

    html[data-experience="storyline"] .role-card-grid {
        grid-template-columns: 1fr;
    }

    html[data-experience="storyline"] .role-card {
        min-height: 230px;
    }

    html[data-experience="storyline"] #parent-screen .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    html[data-experience="storyline"] #parent-screen .dashboard-grid .wide {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    html[data-experience="storyline"] #parent-screen .panel:nth-child(2),
    html[data-experience="storyline"] #parent-screen .panel:nth-child(3) {
        grid-column: auto;
    }

    html[data-experience="storyline"] #referee-screen .assignment-item {
        grid-template-columns: 1fr 1fr;
    }

    html[data-experience="storyline"] #referee-screen .assignment-main {
        grid-column: 1 / -1;
    }
}

/* Mobile */
@media (max-width: 620px) {
    html[data-experience="storyline"] .topbar {
        width: 100%;
        min-width: 0;
        max-width: 100vw;
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-height: 66px;
        padding: 8px 10px;
    }

    html[data-experience="storyline"] .beta-notice,
    html[data-experience="storyline"] .screen-stack {
        width: 100%;
        min-width: 0;
        max-width: 100vw;
    }

    html[data-experience="storyline"] .screen,
    html[data-experience="storyline"] .home-layout,
    html[data-experience="storyline"] .home-main,
    html[data-experience="storyline"] .storyline-hero,
    html[data-experience="storyline"] .storyline-hero-title,
    html[data-experience="storyline"] .storyline-field-note,
    html[data-experience="storyline"] .storyline-section-heading,
    html[data-experience="storyline"] .role-card-grid,
    html[data-experience="storyline"] .role-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    html[data-experience="storyline"] .storyline-hero h1,
    html[data-experience="storyline"] .storyline-lede,
    html[data-experience="storyline"] .storyline-section-heading h2,
    html[data-experience="storyline"] .role-card-copy {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    html[data-experience="storyline"] .brand-badge {
        width: 44px;
        height: 44px;
        border-radius: 6px;
    }

    html[data-experience="storyline"] .brand-lockup > span:last-child {
        display: none;
    }

    html[data-experience="storyline"] .workspace-switcher {
        width: min(100%, 180px);
        min-width: 0;
        min-height: 46px;
        grid-template-columns: 30px minmax(0, 1fr) 15px;
        gap: 7px;
        padding: 6px 9px 6px 7px;
        border-radius: 6px;
    }

    html[data-experience="storyline"] .workspace-switcher-icon {
        width: 30px;
        height: 30px;
        border-radius: 9px;
    }

    html[data-experience="storyline"] .workspace-switcher-copy strong {
        font-size: 12px;
    }

    html[data-experience="storyline"] .workspace-switcher-copy small {
        font-size: 8px;
    }

    html[data-experience="storyline"] .workspace-menu {
        position: fixed;
        top: 72px;
        right: 12px;
        left: 12px;
        width: auto;
        transform: none;
    }

    html[data-experience="storyline"] .top-actions {
        gap: 0;
    }

    html[data-experience="storyline"] .top-actions > .icon-button,
    html[data-experience="storyline"] .sync-pill,
    html[data-experience="storyline"] .account-button span {
        display: none !important;
    }

    html[data-experience="storyline"] .account-button {
        width: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 6px;
    }

    html[data-experience="storyline"] .beta-notice {
        min-height: 31px;
        padding: 5px 10px;
        font-size: 9px;
    }

    html[data-experience="storyline"] .beta-notice span {
        display: none;
    }

    html[data-experience="storyline"] .screen-stack {
        padding: 16px 12px calc(124px + env(safe-area-inset-bottom));
    }

    html[data-experience="storyline"] .workspace-heading {
        align-items: flex-start;
        gap: 13px;
        margin-bottom: 17px;
        padding-bottom: 15px;
    }

    html[data-experience="storyline"] .workspace-heading h1 {
        font-size: clamp(29px, 10vw, 40px);
    }

    html[data-experience="storyline"] .workspace-heading .button-cluster {
        width: 100%;
        justify-content: flex-start;
    }

    html[data-experience="storyline"] .workspace-heading .button-cluster > button,
    html[data-experience="storyline"] .workspace-heading > button {
        min-height: 42px;
        padding: 0 11px;
        font-size: 10px;
    }

    html[data-experience="storyline"] .storyline-hero {
        min-height: 680px;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        grid-template-rows: repeat(12, minmax(0, 1fr));
        border-radius: 6px;
    }

    html[data-experience="storyline"] .storyline-hero::before {
        background: linear-gradient(154deg, rgba(16, 39, 32, 0.98) 0%, rgba(16, 39, 32, 0.82) 35%, rgba(16, 39, 32, 0.12) 62%, rgba(16, 39, 32, 0.78) 100%);
    }

    html[data-experience="storyline"] .storyline-hero-title {
        grid-column: 1 / 7;
        grid-row: 1 / 5;
        padding: 34px 24px 0;
    }

    html[data-experience="storyline"] .storyline-hero h1 {
        font-size: clamp(32px, 9vw, 42px);
        line-height: 0.96;
    }

    html[data-experience="storyline"] .storyline-field-note {
        grid-column: 3 / 7;
        grid-row: 5 / 8;
        align-self: start;
        padding: 0 24px 0 12px;
    }

    html[data-experience="storyline"] .storyline-lede {
        font-size: 14px;
        text-shadow: 0 1px 2px rgba(8, 21, 17, 0.72);
    }

    html[data-experience="storyline"] .storyline-hero > .primary-button {
        grid-column: 1 / 5;
        grid-row: 11 / 13;
        margin-left: 24px;
    }

    html[data-experience="storyline"] .storyline-promise {
        grid-column: 2 / 7;
        grid-row: 9 / 11;
        align-items: flex-start;
        justify-content: flex-end;
        font-size: 9px;
        padding: 0 24px 0 12px;
    }

    html[data-experience="storyline"] .storyline-hero-art {
        position: absolute;
        inset: 0;
        width: auto;
        min-height: 0;
        height: auto;
        padding: 0;
        opacity: 0.9;
    }

    html[data-experience="storyline"] .storyline-hero-art > img {
        width: 118%;
        height: 100%;
        max-height: none;
        object-position: 52% 62%;
    }

    html[data-experience="storyline"] .storyline-chapters {
        grid-template-columns: 1fr;
    }

    html[data-experience="storyline"] .storyline-chapters > div {
        border-right: 0;
        border-bottom: 0;
    }

    html[data-experience="storyline"] .storyline-chapters > div:last-child {
        border-bottom: 0;
    }

    html[data-experience="storyline"] .storyline-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    html[data-experience="storyline"] .storyline-section-heading h2 {
        font-size: 33px;
    }

    html[data-experience="storyline"] .home-sports-row {
        justify-content: flex-start;
    }

    html[data-experience="storyline"] .role-card {
        min-height: 245px;
    }

    html[data-experience="storyline"] #parent-screen .dashboard-grid,
    html[data-experience="storyline"] #organization-screen .dashboard-grid {
        grid-template-columns: 1fr;
    }

    html[data-experience="storyline"] #parent-screen .panel:nth-child(2),
    html[data-experience="storyline"] #parent-screen .panel:nth-child(3) {
        grid-column: 1;
    }

    html[data-experience="storyline"] .athlete-strip,
    html[data-experience="storyline"] .entity-grid {
        grid-template-columns: 1fr;
    }

    html[data-experience="storyline"] #history-screen .history-list {
        padding-left: 17px;
    }

    html[data-experience="storyline"] #history-screen .history-item::before {
        left: -20px;
    }

    html[data-experience="storyline"] #tracker-screen .tracker-shell,
    html[data-experience="storyline"] #ref-live-screen .ref-live-shell {
        margin: 0 -4px;
        padding: 13px;
        border-radius: 0;
    }

    html[data-experience="storyline"] #tracker-screen .parent-score-card {
        min-height: 94px;
        padding: 9px;
    }

    html[data-experience="storyline"] #tracker-screen .parent-score-card strong,
    html[data-experience="storyline"] #tracker-screen .parent-score-card input {
        font-size: 34px;
    }

    html[data-experience="storyline"] #tracker-screen .score-control button,
    html[data-experience="storyline"] #review-screen .score-control button {
        width: 44px;
        min-height: 44px;
        height: 44px;
    }

    html[data-experience="storyline"] .workspace-heading :where(button, .primary-button, .secondary-button, .soft-button),
    html[data-experience="storyline"] .card-actions :where(button, .primary-button, .secondary-button),
    html[data-experience="storyline"] #settings-screen .workspace-heading button {
        min-height: 44px;
    }

    html[data-experience="storyline"] #tracker-screen .stat-button-grid {
        grid-template-columns: repeat(var(--stat-columns, 3), minmax(0, 1fr));
        gap: 7px;
    }

    html[data-experience="storyline"] #tracker-screen .stat-button {
        min-height: 82px;
        padding: 7px;
        border-radius: 6px;
    }

    html[data-experience="storyline"] #tracker-screen .sticky-command-bar {
        bottom: max(10px, env(safe-area-inset-bottom));
    }

    html[data-experience="storyline"] #referee-screen .assignment-item {
        grid-template-columns: 1fr;
    }

    html[data-experience="storyline"] #referee-screen .assignment-main {
        grid-column: 1;
    }

    html[data-experience="storyline"] #ref-live-screen .ref-team-score,
    html[data-experience="storyline"] #ref-live-screen .ref-clock-box {
        min-height: 122px;
    }

    html[data-experience="storyline"] #ref-live-screen .ref-team-score strong {
        font-size: 52px;
    }

    html[data-experience="storyline"] #ref-live-screen .ref-team-column button {
        min-height: 54px;
        border-radius: 4px;
        font-size: 11px;
    }

    html[data-experience="storyline"] #ref-live-screen .ref-team-column button[data-points] {
        min-height: 68px;
        font-size: 22px;
    }

    html[data-experience="storyline"] #settings-screen .settings-row {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
        padding: 16px;
    }

    html[data-experience="storyline"] #settings-screen .theme-toggle {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    html[data-experience="storyline"] #settings-screen .theme-toggle button {
        min-width: 0;
        padding: 0 7px;
        font-size: 10px;
    }

    html[data-experience="storyline"] .modal {
        align-items: flex-end;
        padding: 8px;
    }

    html[data-experience="storyline"] .modal-panel {
        width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 25px 25px 18px 18px;
    }

    html[data-experience="storyline"] #auth-modal .modal-head::after {
        display: none;
    }

    html[data-experience="storyline"] .bottom-nav {
        bottom: max(8px, env(safe-area-inset-bottom));
        width: calc(100% - 16px);
        min-height: 68px;
        padding: 6px;
        border-radius: 6px;
    }

    html[data-experience="storyline"] .bottom-nav-item {
        min-height: 53px;
        font-size: 8px;
    }

    html[data-experience="storyline"] .storyline-track-nav-icon {
        width: 45px;
        height: 45px;
        margin-top: -24px;
        border-width: 4px;
        border-radius: 4px;
    }

    html[data-experience="storyline"] .site-footer {
        flex-wrap: wrap;
        gap: 10px 16px;
        margin-top: 34px;
    }
}

/* Live game surfaces own the bottom of the viewport. The global nav would
   compete with their score and command controls, so it intentionally yields. */
html[data-experience="storyline"] body[data-screen="tracker"] .bottom-nav,
html[data-experience="storyline"] body[data-screen="ref-live"] .bottom-nav {
    display: none;
}

/* Athlete progression uses the same saved-game record as History. */
html[data-experience="storyline"] .athlete-progress-shell {
    margin-bottom: 28px;
}

html[data-experience="storyline"] .athlete-progress-card {
    overflow: hidden;
    padding: 28px;
}

html[data-experience="storyline"] .progress-card-head,
html[data-experience="storyline"] .progress-focus-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

html[data-experience="storyline"] .progress-card-head h2 {
    margin: 2px 0 5px;
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: clamp(28px, 4vw, 42px);
}

html[data-experience="storyline"] .progress-athlete-picker {
    width: min(240px, 100%);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

html[data-experience="storyline"] .progress-athlete-picker select {
    margin-top: 6px;
    color: var(--ink);
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
}

html[data-experience="storyline"] .progress-metric-rail {
    display: flex;
    gap: 8px;
    margin: 24px -4px 0;
    padding: 4px 4px 10px;
    overflow-x: auto;
    scrollbar-width: thin;
}

html[data-experience="storyline"] .progress-metric-button {
    flex: 0 0 auto;
    min-width: 64px;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

html[data-experience="storyline"] .progress-metric-button.active {
    border-color: var(--story-navy);
    background: var(--story-navy);
    color: #fff;
}

html[data-experience="storyline"][data-theme="dark"] .progress-metric-button.active {
    border-color: var(--story-gold);
    background: var(--story-gold);
    color: var(--story-navy);
}

html[data-experience="storyline"] .progress-focus-head {
    margin-top: 20px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

html[data-experience="storyline"] .progress-focus-head h3,
html[data-experience="storyline"] .progress-game-list h3 {
    margin: 3px 0 0;
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: 24px;
}

html[data-experience="storyline"] .progress-insight {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 18px 0;
    padding: 16px 18px;
    border: 0;
    border-left: 4px solid var(--story-mint-dark);
    border-radius: 0;
    background: transparent;
}

html[data-experience="storyline"] .progress-insight > svg {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    color: var(--story-mint-dark);
}

html[data-experience="storyline"] .progress-insight strong {
    display: block;
    color: var(--ink);
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: 17px;
}

html[data-experience="storyline"] .progress-insight p {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

html[data-experience="storyline"] .progress-chart-scroll {
    width: 100%;
    margin-top: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--line);
    border-radius: 4px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--story-gold) 8%, transparent), transparent 60%),
        var(--surface-2);
    scrollbar-width: thin;
}

html[data-experience="storyline"] .progress-chart-canvas {
    position: relative;
    min-width: 100%;
    margin: 0 auto;
}

html[data-experience="storyline"] .progress-chart-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

html[data-experience="storyline"] .progress-chart-lines line {
    stroke: color-mix(in srgb, var(--line) 78%, transparent);
    stroke-dasharray: 4 7;
    stroke-width: 1;
}

html[data-experience="storyline"] .progress-chart-lines polyline {
    fill: none;
    stroke: var(--story-orange);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
}

html[data-experience="storyline"] .progress-chart-point {
    position: absolute;
    z-index: 2;
    display: grid;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
}

html[data-experience="storyline"] .progress-chart-point span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 3px solid var(--surface-2);
    border-radius: 50%;
    background: var(--story-orange);
    box-shadow: 0 5px 14px rgba(181, 59, 29, 0.24);
    font-size: 12px;
    font-weight: 900;
}

html[data-experience="storyline"] .progress-chart-point:hover span,
html[data-experience="storyline"] .progress-chart-point:focus-visible span {
    transform: scale(1.08);
    background: var(--story-orange-dark);
}

html[data-experience="storyline"] .progress-game-label {
    position: absolute;
    bottom: 12px;
    width: 76px;
    color: var(--muted);
    text-align: center;
}

html[data-experience="storyline"] .progress-game-label strong,
html[data-experience="storyline"] .progress-game-label span {
    display: block;
}

html[data-experience="storyline"] .progress-game-label strong {
    color: var(--ink);
    font-size: 12px;
}

html[data-experience="storyline"] .progress-game-label span {
    margin-top: 3px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-experience="storyline"] .progress-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 0;
}

html[data-experience="storyline"] .progress-summary-grid > div {
    padding: 14px;
    border-right: 1px solid var(--line);
    background: var(--surface);
}

html[data-experience="storyline"] .progress-summary-grid > div:last-child {
    border-right: 0;
}

html[data-experience="storyline"] .progress-summary-grid span,
html[data-experience="storyline"] .progress-summary-grid strong {
    display: block;
}

html[data-experience="storyline"] .progress-summary-grid span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

html[data-experience="storyline"] .progress-summary-grid strong {
    margin-top: 5px;
    color: var(--ink);
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: 24px;
}

html[data-experience="storyline"] .progress-game-list {
    margin-top: 28px;
}

html[data-experience="storyline"] .progress-game-row {
    display: flex;
    width: 100%;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 2px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
}

html[data-experience="storyline"] .progress-game-row:hover {
    background: color-mix(in srgb, var(--story-mint) 8%, transparent);
}

html[data-experience="storyline"] .progress-game-row > span,
html[data-experience="storyline"] .progress-game-row strong,
html[data-experience="storyline"] .progress-game-row small {
    display: block;
}

html[data-experience="storyline"] .progress-game-row small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

html[data-experience="storyline"] .progress-game-value {
    flex: 0 0 auto;
    text-align: right;
}

html[data-experience="storyline"] .progress-game-value strong {
    color: var(--story-orange-dark);
}

html[data-experience="storyline"][data-theme="dark"] .progress-game-value strong {
    color: #ff9b79;
}

html[data-experience="storyline"] .progress-empty-state {
    padding: 32px;
    text-align: center;
}

html[data-experience="storyline"] .progress-empty-state p:not(.eyebrow) {
    color: var(--muted);
}

@media (max-width: 620px) {
    html[data-experience="storyline"] body[data-screen="history"].storyline-role-parent #history-screen .workspace-heading {
        margin-bottom: 14px;
    }

    html[data-experience="storyline"] body[data-screen="history"].storyline-role-parent #history-screen .workspace-heading h1 {
        font-size: 34px;
    }

    html[data-experience="storyline"] .athlete-progress-card {
        margin: 0 -4px;
        padding: 18px 16px;
        border-radius: 0;
    }

    html[data-experience="storyline"] .progress-card-head {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    html[data-experience="storyline"] .progress-athlete-picker {
        width: 100%;
    }

    html[data-experience="storyline"] .progress-metric-rail {
        margin-top: 14px;
    }

    html[data-experience="storyline"] .progress-focus-head {
        margin-top: 10px;
        padding-top: 14px;
    }

    html[data-experience="storyline"] .progress-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-experience="storyline"] .progress-summary-grid > div {
        border-right: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
    }

    html[data-experience="storyline"] .progress-summary-grid > div:nth-child(2n) {
        border-right: 0;
    }

    html[data-experience="storyline"] .progress-summary-grid > div:last-child {
        grid-column: 1 / -1;
        border-bottom: 0;
    }

    html[data-experience="storyline"] .progress-game-row {
        align-items: flex-start;
    }
}

html[data-experience="storyline"] body[data-screen="tracker"] .site-footer,
html[data-experience="storyline"] body[data-screen="ref-live"] .site-footer {
    display: none;
}

html[data-experience="storyline"] body[data-screen="tracker"] .topbar,
html[data-experience="storyline"] body[data-screen="ref-live"] .topbar {
    display: none;
}

/* Desktop gets a quiet vertical navigation rail instead of a mobile bar
   floating across the hero and data cards. */
@media (min-width: 1100px) {
    html[data-experience="storyline"] .screen-stack {
        width: min(1240px, calc(100% - 138px));
        margin-right: auto;
        margin-left: 118px;
    }

    html[data-experience="storyline"] .bottom-nav {
        top: 50%;
        right: auto;
        bottom: auto;
        left: 20px;
        width: 78px;
        min-height: 390px;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, 1fr);
        align-items: stretch;
        padding: 8px;
        transform: translateY(-50%);
    }

    html[data-experience="storyline"] .bottom-nav-item {
        min-height: 66px;
    }

    html[data-experience="storyline"] .storyline-track-nav-icon {
        width: 45px;
        height: 45px;
        margin-top: 0;
        border-width: 4px;
    }
}

@media (max-width: 620px) {
    html[data-experience="storyline"] button:not(.bottom-nav-item) {
        min-height: 44px !important;
    }

    html[data-experience="storyline"] #review-screen aside.panel .usage-card {
        grid-column: 1 / -1;
        margin-top: 0;
    }

    html[data-experience="storyline"] #tracker-screen .score-control button,
    html[data-experience="storyline"] #review-screen .score-control button {
        width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
    }
}

@media (max-width: 390px) {
    html[data-experience="storyline"] .workspace-switcher {
        width: 184px;
    }

    html[data-experience="storyline"] .storyline-hero-title {
        padding-right: 19px;
        padding-left: 19px;
    }

    html[data-experience="storyline"] .storyline-hero h1 {
        font-size: 34px;
    }

    html[data-experience="storyline"] .storyline-hero > .primary-button {
        margin-left: 19px;
    }

    html[data-experience="storyline"] .history-main {
        align-items: flex-start;
        flex-direction: column;
    }

    html[data-experience="storyline"] .history-score-card {
        width: 100%;
    }
}

/* Approved field-journal hero composition. */
html[data-experience="storyline"] .storyline-field-note {
    width: 220px;
    justify-self: end;
    margin-right: clamp(18px, 2.2vw, 28px);
    padding: 20px 22px 22px;
    border-left: 3px solid var(--story-gold);
    background: rgba(16, 39, 32, 0.91);
    box-shadow: none;
}

html[data-experience="storyline"] .storyline-field-note::before {
    content: "FROM THE SIDELINE";
    display: block;
    margin-bottom: 10px;
    color: var(--story-gold);
    font-family: "Tanker", "Arial Narrow", sans-serif;
    font-size: 13px;
    letter-spacing: 0.1em;
}

html[data-experience="storyline"] .storyline-lede {
    color: rgba(255, 255, 255, 0.94);
    text-shadow: none;
}

html[data-experience="storyline"] .storyline-hero-art > img {
    object-position: 44% bottom;
}

@media (max-width: 760px) {
    html[data-experience="storyline"] .storyline-hero {
        min-height: 710px;
    }

    html[data-experience="storyline"] .storyline-field-note {
        grid-column: 3 / 7;
        grid-row: 4 / 8;
        align-self: start;
        width: 238px;
        margin: 0 14px 0 0;
        padding: 14px 14px 15px 17px;
        border-left-width: 2px;
        background: rgba(16, 39, 32, 0.92);
    }

    html[data-experience="storyline"] .storyline-field-note::before {
        margin-bottom: 7px;
        font-size: 11px;
    }

    html[data-experience="storyline"] .storyline-lede {
        font-size: 13px;
        line-height: 1.46;
    }

    html[data-experience="storyline"] .storyline-hero-art > img {
        object-position: 46% 62%;
    }

    html[data-experience="storyline"] .storyline-promise {
        grid-row: 8 / 10;
    }

    html[data-experience="storyline"] .storyline-hero > .primary-button {
        grid-row: 10 / 12;
    }
}

@media (prefers-reduced-motion: reduce) {
    html[data-experience="storyline"] {
        scroll-behavior: auto;
    }

    html[data-experience="storyline"] *,
    html[data-experience="storyline"] *::before,
    html[data-experience="storyline"] *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    html[data-experience="storyline"] .topbar,
    html[data-experience="storyline"] .beta-notice,
    html[data-experience="storyline"] .bottom-nav,
    html[data-experience="storyline"] .site-footer,
    html[data-experience="storyline"] .workspace-heading .button-cluster {
        display: none !important;
    }

    html[data-experience="storyline"] body,
    html[data-experience="storyline"] .screen-stack {
        background: #fff !important;
        color: #111 !important;
    }

    html[data-experience="storyline"] .screen-stack {
        width: 100%;
        padding: 0;
    }

    html[data-experience="storyline"] #org-codes-screen .lobby-code-card,
    html[data-experience="storyline"] #org-codes-screen .code-sheet-card {
        break-inside: avoid;
        border: 1px solid #222;
        box-shadow: none;
    }
}
