/* Base styles for both apps. Themes set the --tm-* variables in theme.json and add anything else in themes/{key}/theme.css.
   The tm-* class names are the stable contract for designers. */

@font-face {
    font-family: "Nunito";
    src: url("../fonts/nunito-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/nunito-latin-wght-normal.woff2") format("woff2");
    font-weight: 200 1000;
    font-style: normal;
    font-display: swap;
}

/* Fallbacks for optional theme values. Colours a theme always sets come from _ThemeHead. */
:root {
    --tm-heading: var(--tm-text);
    --tm-link: var(--tm-primary);
    --tm-accent: var(--tm-heading);
    --tm-border: #dbdde0;
    --tm-hero-bg: var(--tm-primary);
    --tm-hero-position: center;
    --tm-font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --tm-font-heading: var(--tm-font-body);
    --tm-radius: 10px;
    --tm-icon: #8a8d93;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--tm-font-body); font-size: 1rem; background: var(--tm-bg); color: var(--tm-text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--tm-font-heading); color: var(--tm-heading); line-height: 1.2; }
h1 { font-size: 2rem; font-weight: 800; margin: 0 0 1rem; }
h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 .75rem; }
h3 { font-size: 1.0625rem; font-weight: 700; }
a { color: var(--tm-link); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--tm-accent) 45%, transparent); outline-offset: 2px; }
code { word-break: break-all; font-size: .9em; }
img { max-width: 100%; }

/* ---------- Split layout: player-facing pages (_TmSplitLayout) ---------- */

.tm-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.tm-hero { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--tm-hero-bg); }
.tm-hero img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--tm-hero-position); }
.tm-split-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; padding: 3rem 2rem 1.5rem; }
.tm-shell-card { width: 100%; max-width: 30rem; background: var(--tm-surface); border-radius: 24px; padding: 2.5rem 3rem 2.25rem;
    box-shadow: 0 12px 40px rgba(40, 45, 35, .08), 0 1px 3px rgba(0, 0, 0, .05); }
.tm-shell-card-wide { max-width: 46rem; }
.tm-card-header { text-align: center; margin-bottom: 1.75rem; }
.tm-card-logo { display: block; height: 64px; width: auto; max-width: 75%; margin: 0 auto 1rem; object-fit: contain; }
.tm-card-header h1 { font-size: 2.125rem; margin: 0 0 .375rem; }
.tm-subtitle { margin: 0; color: var(--tm-muted); font-size: 1.0625rem; }
.tm-shell-card form > .tm-btn-primary, .tm-shell-card .tm-btn-block { width: 100%; }
.tm-shell-card > p:last-child { margin-bottom: 0; }

/* Panels inside the card (account pages) */
.tm-shell-card .tm-card { box-shadow: none; border: 1px solid var(--tm-border); border-radius: 14px; padding: 1.25rem 1.5rem; }
.tm-shell-card .tm-card h2 { font-size: 1.125rem; }

/* Navigation between account pages, inside the card */
.tm-account-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; margin: -.5rem 0 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--tm-border); }
.tm-account-nav a, .tm-account-nav button { padding: .375rem .75rem; border-radius: 999px; color: var(--tm-text); font: inherit; font-weight: 600; font-size: .9375rem; background: none; border: 0; cursor: pointer; }
.tm-account-nav a:hover, .tm-account-nav button:hover { background: color-mix(in srgb, var(--tm-accent) 8%, transparent); text-decoration: none; }
.tm-account-nav a[aria-current="page"] { background: color-mix(in srgb, var(--tm-accent) 12%, transparent); color: var(--tm-heading); }
.tm-account-nav form { margin: 0; }

@media (max-width: 960px) {
    .tm-split { grid-template-columns: minmax(0, 1fr); }
    .tm-hero { position: static; height: 220px; }
    .tm-split-main { justify-content: flex-start; margin-top: -3.5rem; padding: 0 1rem 1.5rem; position: relative; }
}

@media (max-width: 520px) {
    .tm-hero { height: 160px; }
    .tm-split-main { margin-top: -2rem; }
    .tm-shell-card { padding: 1.75rem 1.25rem; border-radius: 18px; }
    .tm-card-logo { height: 52px; }
    .tm-card-header h1 { font-size: 1.75rem; }
    .tm-account-nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: -1.25rem; padding-inline: 1.25rem; scrollbar-width: none; }
    .tm-account-nav > * { flex: none; }
}

/* ---------- Wide layout: admin and docs (portal _Layout) ---------- */

.tm-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .75rem 1.5rem; background: var(--tm-surface); border-bottom: 1px solid var(--tm-border); }
.tm-brand { display: flex; align-items: center; gap: .625rem; font-family: var(--tm-font-heading); font-weight: 800; font-size: 1.125rem; color: var(--tm-heading); text-decoration: none; }
.tm-brand:hover { text-decoration: none; }
.tm-brand img { height: 36px; width: auto; }
.tm-nav { display: flex; gap: .25rem 1rem; flex-wrap: wrap; align-items: center; }
.tm-nav a { color: var(--tm-text); }
.tm-nav a:hover { color: var(--tm-link); }
.tm-nav form { margin: 0; }
.tm-nav .tm-link-button { color: var(--tm-text); }
.tm-nav .tm-link-button:hover { color: var(--tm-link); text-decoration: none; }
.tm-admin-nav { margin-bottom: 1.25rem; }
.tm-admin-nav a { padding: .375rem .875rem; border-radius: 999px; background: var(--tm-surface); border: 1px solid var(--tm-border); }
.tm-main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }
.tm-main-narrow { max-width: 420px; }
.tm-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem 1.25rem; padding: 0 1rem 1rem; color: var(--tm-muted); font-size: .9375rem; }
.tm-footer a { color: var(--tm-heading); font-weight: 500; }
.tm-footer a:not(:first-child)::before { content: "•"; color: var(--tm-muted); margin-right: 1.25rem; display: inline-block; }
.tm-main + .tm-footer { max-width: 1100px; margin: 0 auto 2rem; }

/* ---------- Components ---------- */

.tm-card { background: var(--tm-surface); border-radius: 16px; padding: 1.5rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }

.tm-field { display: flex; flex-direction: column; gap: .375rem; margin-bottom: 1.125rem; }
.tm-field label { font-weight: 600; font-size: .9375rem; }
/* :where() keeps this at single-class specificity so icon and component rules below can adjust padding. */
.tm-field :where(input:not([type=checkbox]):not([type=radio]), select, textarea) {
    width: 100%; min-height: 48px; padding: .625rem .875rem; font: inherit; color: var(--tm-text); background-color: var(--tm-surface);
    border: 1px solid var(--tm-border); border-radius: var(--tm-radius); transition: border-color .15s, box-shadow .15s; }
.tm-field input::placeholder { color: var(--tm-icon); }
.tm-field :where(input, select, textarea):focus { outline: none; border-color: var(--tm-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tm-accent) 18%, transparent); }
.tm-field input[aria-invalid="true"], .tm-field input.input-validation-error { border-color: var(--tm-danger); }
.tm-field label:has(input[type=checkbox]) { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.tm-fieldset { border: 0; padding: 0; min-width: 0; gap: .625rem; }
.tm-fieldset legend { font-weight: 600; font-size: .9375rem; padding: 0; margin-bottom: .375rem; }
.tm-fieldset label:has(input[type=checkbox]) { align-items: flex-start; }
.tm-fieldset label input[type=checkbox] { margin-top: .2rem; flex: none; }
.tm-fieldset p { margin: 0; }

/* Leading icons for email and password inputs */
.tm-field input[type=email], .tm-field input[type=password], .tm-password input {
    padding-left: 2.75rem; background-repeat: no-repeat; background-position: .875rem center; background-size: 20px; }
.tm-field input[type=email] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8d93' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E"); }
.tm-field input[type=password], .tm-password input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8d93' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }

/* Show / hide password (tm-ui.js) */
.tm-password { position: relative; }
.tm-password input { padding-right: 3rem; }
.tm-password-toggle { position: absolute; top: 50%; right: .375rem; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 8px; cursor: pointer;
    background: transparent no-repeat center / 22px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8d93' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.tm-password-toggle[aria-pressed="true"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8d93' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.6 5.1A10.9 10.9 0 0 1 12 5c6.5 0 10 7 10 7a17.6 17.6 0 0 1-3.2 4.2M6.6 6.6A17.4 17.4 0 0 0 2 12s3.5 7 10 7a9.7 9.7 0 0 0 5.4-1.6'/%3E%3Cpath d='M9.9 9.9a3 3 0 0 0 4.2 4.2M3 3l18 18'/%3E%3C/svg%3E"); }
.tm-password-toggle:hover { background-color: rgba(0, 0, 0, .04); }

input[type=checkbox], input[type=radio] { accent-color: var(--tm-accent); width: 1.125rem; height: 1.125rem; margin: 0; }

.tm-btn { display: inline-flex; align-items: center; justify-content: center; gap: .625rem; min-height: 44px; padding: .5rem 1.125rem;
    font: inherit; font-weight: 600; line-height: 1.2; color: var(--tm-text); background: var(--tm-surface); border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius); cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, filter .15s; }
.tm-btn:hover { text-decoration: none; border-color: color-mix(in srgb, var(--tm-text) 30%, var(--tm-border)); }
/* 19px bold counts as large text for WCAG contrast, which lets themes use bright button colours. */
.tm-btn-primary { min-height: 52px; padding: .75rem 1.5rem; font-size: 1.1875rem; font-weight: 700; color: var(--tm-primary-text); background: var(--tm-primary); border-color: var(--tm-primary); }
.tm-btn-primary:hover { filter: brightness(.94); border-color: var(--tm-primary); }
.tm-btn-danger { color: var(--tm-danger); border-color: color-mix(in srgb, var(--tm-danger) 40%, var(--tm-border)); }
.tm-btn-danger:hover { background: color-mix(in srgb, var(--tm-danger) 6%, var(--tm-surface)); border-color: var(--tm-danger); }
.tm-btn-social { width: 100%; min-height: 48px; }
.tm-social-icon { width: 22px; height: 22px; flex: none; }
.tm-link-button { background: none; border: none; padding: 0; color: var(--tm-link); font: inherit; font-weight: 600; cursor: pointer; }
.tm-link-button:hover { text-decoration: underline; }

.tm-social { display: flex; flex-direction: column; gap: .75rem; }
.tm-social-google { display: flex; justify-content: center; min-height: 44px; }
.tm-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--tm-muted); font-size: .9375rem; }
.tm-divider::before, .tm-divider::after { content: ""; flex: 1; height: 1px; background: var(--tm-border); }
.tm-rule { border: 0; border-top: 1px solid var(--tm-border); margin: 1.5rem 0; }
.tm-email-status { margin-bottom: 1rem; }

.tm-row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: -.25rem 0 1.25rem; }
.tm-row-between .tm-field { margin: 0; }
.tm-card-foot { margin: 1.5rem 0 0; text-align: center; color: var(--tm-muted); }
.tm-back { display: flex; justify-content: center; align-items: center; gap: .5rem; color: var(--tm-heading); }
.tm-back::before { content: "←"; }

.tm-alert { padding: .875rem 1rem; border-radius: var(--tm-radius); margin-bottom: 1.25rem; background: rgba(0, 0, 0, .04); }
.tm-alert-error { background: color-mix(in srgb, var(--tm-danger) 9%, transparent); color: var(--tm-danger); }
.tm-alert-success { background: color-mix(in srgb, var(--tm-accent) 10%, transparent); color: var(--tm-heading); }
.tm-callout { display: flex; gap: .875rem; align-items: flex-start; padding: 1rem 1.125rem; margin: 1.5rem 0 0; border: 1px solid var(--tm-border); border-radius: 12px; background: color-mix(in srgb, var(--tm-bg) 60%, var(--tm-surface)); font-size: .9375rem; }
.tm-callout::before { content: "i"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tm-accent); color: var(--tm-surface); font-weight: 800; font-family: Georgia, serif; }
.tm-callout p { margin: 0; color: var(--tm-muted); }
.tm-callout strong { display: block; color: var(--tm-text); }

/* Password rules (_PasswordRules) */
.tm-rules { margin: -.25rem 0 1.25rem; font-size: .9375rem; }
.tm-rules-title { margin: 0 0 .375rem; color: var(--tm-muted); }
.tm-rules ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.tm-rules li { display: flex; align-items: center; gap: .5rem; color: var(--tm-muted); }
.tm-rules li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--tm-border); flex: none; transition: background-color .15s, border-color .15s; }
.tm-rules li.tm-rule-met { color: var(--tm-text); }
.tm-rules li.tm-rule-met::before { border-color: var(--tm-accent); background: var(--tm-accent) no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E"); }

/* Lists of items with an action: sign-in methods, player IDs */
.tm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.tm-list-item { display: flex; align-items: center; gap: 1rem; padding: .875rem 1rem; border: 1px solid var(--tm-border); border-radius: 12px; }
.tm-list-item .tm-social-icon { width: 26px; height: 26px; }
.tm-list-main { flex: 1; min-width: 0; }
.tm-list-main strong { display: block; }
.tm-list-main small { color: var(--tm-muted); overflow-wrap: anywhere; }
.tm-list-item form { margin: 0; }
.tm-status { display: inline-flex; align-items: center; gap: .375rem; color: var(--tm-heading); font-weight: 600; font-size: .9375rem; white-space: nowrap; }
.tm-status::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--tm-accent) no-repeat center / 11px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E"); }

.tm-muted { color: var(--tm-muted); }
.tm-inline { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; }
.tm-inline .tm-field { margin-bottom: 0; flex: 1 1 10rem; }
.tm-form-stack { display: grid; gap: 1rem; }
.tm-row-between h2 { margin: 0 0 .125rem; }
.tm-table-wrap { overflow-x: auto; }
.tm-table { width: 100%; border-collapse: collapse; }
.tm-table th, .tm-table td { text-align: left; padding: .625rem .5rem; border-bottom: 1px solid var(--tm-border); vertical-align: top; }
.tm-table thead th { font-size: .8125rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tm-muted); }
.tm-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.tm-actions form { margin: 0; }
.tm-qr { display: flex; justify-content: center; margin: 1rem 0; }
.tm-qr svg { width: 200px; height: 200px; }
.tm-codes { columns: 2; padding: 1rem 1.25rem; list-style: none; background: color-mix(in srgb, var(--tm-bg) 60%, var(--tm-surface)); border-radius: 12px; }
.tm-codes li { padding: .125rem 0; }
.field-validation-error, .validation-summary-errors { color: var(--tm-danger); font-size: .9375rem; }

/* Admin dashboard (portal /admin/dashboard). Marks use the theme accent; all text uses text colours. */
.tm-dash-filters { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tm-segmented { display: inline-flex; padding: 3px; border: 1px solid var(--tm-border); border-radius: 999px; background: var(--tm-surface); }
.tm-segmented a { padding: .3rem .9rem; border-radius: 999px; color: var(--tm-text); font-size: .9375rem; }
.tm-segmented a:hover { text-decoration: none; background: color-mix(in srgb, var(--tm-accent) 8%, transparent); }
.tm-segmented a[aria-current="true"] { background: var(--tm-accent); color: var(--tm-surface); }
.tm-dash-section { margin-bottom: 2rem; }
.tm-dash-heading { font-size: 1.0625rem; color: var(--tm-muted); font-family: var(--tm-font-body); font-weight: 700; margin: 0 0 .75rem; }
.tm-dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1rem; align-items: start; }
.tm-dash-grid > .tm-card { margin-bottom: 0; }
.tm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.tm-stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.tm-stat { background: var(--tm-surface); border-radius: 16px; padding: 1rem 1.25rem; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.tm-stat p { margin: 0; }
.tm-stat-label { color: var(--tm-muted); font-size: .9375rem; font-weight: 600; }
.tm-stat-value { font-size: 2rem; font-weight: 800; line-height: 1.2; color: var(--tm-text); }
.tm-stat-delta, .tm-stat-detail { font-size: .875rem; color: var(--tm-muted); }
.tm-stat-delta span { font-size: .7rem; margin-right: .125rem; }
.tm-stat-up span { color: var(--tm-accent); }
.tm-stat-down span { color: var(--tm-danger); }
.tm-chart { margin: 0; }
.tm-chart figcaption h2, .tm-chart > h2 { margin-bottom: .125rem; }
.tm-chart figcaption p, .tm-chart > p { margin: 0 0 .75rem; font-size: .9375rem; }
.tm-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.tm-chart-grid { stroke: var(--tm-border); stroke-width: 1; }
/* Chart text is in viewBox units (640 wide); the chart renders about 70% of that, so 15 shows at roughly 11px. */
.tm-chart-tick { fill: var(--tm-muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.tm-chart-value { fill: var(--tm-text); font-size: 16px; font-weight: 700; }
.tm-chart-bar { fill: var(--tm-accent); transition: opacity .1s; }
.tm-chart-hit { fill: transparent; }
.tm-chart-mark { outline: none; cursor: default; }
.tm-chart-mark:hover .tm-chart-bar, .tm-chart-mark:focus-visible .tm-chart-bar { opacity: .75; }
.tm-chart-mark:focus-visible .tm-chart-hit { fill: color-mix(in srgb, var(--tm-accent) 10%, transparent); }
.tm-chart-table { margin-top: .5rem; font-size: .9375rem; }
.tm-chart-table summary { cursor: pointer; color: var(--tm-link); font-weight: 600; }
.tm-chart-table table { margin-top: .5rem; }
.tm-num { text-align: right !important; font-variant-numeric: tabular-nums; }
.tm-barlist { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; }
.tm-barlist li { display: grid; grid-template-columns: minmax(6rem, 10rem) 1fr auto; align-items: center; gap: .75rem; }
.tm-barlist-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-barlist-track { height: 16px; }
.tm-barlist-bar { display: block; height: 100%; min-width: 2px; background: var(--tm-accent); border-radius: 0 4px 4px 0; }
.tm-barlist-value { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.5rem; text-align: right; }
.tm-tooltip { position: absolute; z-index: 10; pointer-events: none; display: grid; padding: .375rem .625rem; border-radius: 8px; background: var(--tm-text); color: var(--tm-surface); font-size: .8125rem; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.tm-tooltip strong { font-size: .9375rem; }
.tm-tooltip[hidden] { display: none; }

/* Developer docs (portal /docs) */
.tm-docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.tm-docs-toc { position: sticky; top: 1rem; font-size: .875rem; }
.tm-docs-toc ol { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: .35rem; }
.tm-docs-body h2 { margin-top: 0; }
.tm-docs-body section { scroll-margin-top: 1rem; }
.tm-code { position: relative; margin: .75rem 0; }
.tm-code pre { margin: 0; padding: 1rem; overflow-x: auto; border-radius: 6px; background: #1e1f24; color: #e6e6e6; font-size: .8125rem; line-height: 1.5; }
.tm-code pre code { word-break: normal; white-space: pre; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.tm-code-copy { position: absolute; top: .4rem; right: .4rem; padding: .15rem .5rem; font: inherit; font-size: .75rem; border-radius: 4px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #e6e6e6; cursor: pointer; }
.tm-docs-reference { padding: 0; overflow: hidden; }
.tm-tabs { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: -1px; }
.tm-tabs [role="tab"] { padding: .5rem 1rem; font: inherit; cursor: pointer; border: 1px solid rgba(0,0,0,.1); border-bottom: none; border-radius: 6px 6px 0 0; background: transparent; color: var(--tm-text); }
.tm-tabs [role="tab"][aria-selected="true"] { background: var(--tm-surface); color: var(--tm-primary); font-weight: 600; }
.tm-tab-panel { border-top-left-radius: 0; }
.tm-tab-panel h3 { margin-bottom: .25rem; font-size: 1rem; }
@media (max-width: 760px) {
    .tm-docs { grid-template-columns: minmax(0, 1fr); }
    .tm-docs-toc { position: static; }
}
