/* Design-only token preview, scoped to avoid changing existing Settings cards. */
.token-ring { width: 44px; height: 44px; position: relative; flex: 0 0 auto; display: inline-grid; place-items: center; border-radius: 50%; background: white; box-shadow: 0 0 0 1px #e2e8f0; color: #0f172a; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.token-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.token-ring circle { fill: none; stroke-width: 3; }
.token-ring-track { stroke: white; }
.token-ring-progress { stroke: var(--token-color); stroke-dasharray: 100; transition: stroke-dashoffset .25s ease, stroke .25s ease; }
.token-ring > span { position: relative; }
@media (prefers-reduced-motion: reduce) { .token-ring-progress { transition: none; } }
.token-nav-link { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 44px; padding: 6px 10px; border-radius: 999px; background: #eff6ff; color: #334155; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-decoration: none; }
.token-nav-icon { flex-shrink: 0; }
.token-nav-link:focus-visible, .token-demo-controls select:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 4px;
}
.token-nav-link:hover { box-shadow: 0 0 0 4px #eff6ff; }
.token-usage-card { scroll-margin-top: 180px; }
.token-usage-card:focus { outline: 2px solid #2563eb; outline-offset: 3px; }
.token-card-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.token-card-heading h2 { margin: 0; }
.token-preview-badge { border-radius: 999px; background: #eff6ff; color: #1d4ed8; padding: 5px 10px; font-size: 12px; font-weight: 700; }
.token-description { color: #64748b; margin: 0 0 24px; font-size: 15px; }
.token-balance-row { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.token-balance-row .token-ring { width: 72px; height: 72px; font-size: 20px; }
.token-balance { margin: 0 0 6px; font-size: 26px; font-weight: 800; color: #0f172a; }
.token-balance > span:last-child { font-size: 15px; font-weight: 400; color: #475569; }
.token-muted { font-size: 13px; color: #64748b; margin: 0; line-height: 1.5; }
.token-meter { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.token-meter > span { display: block; height: 100%; width: var(--token-progress); background: var(--token-color); }
.token-price { font-size: 16px; font-weight: 700; color: #334155; margin: 22px 0 6px; }
.token-demo-controls { border-top: 1px solid #e2e8f0; margin-top: 22px; padding-top: 18px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #475569; }
.token-demo-controls[hidden] { display: none; }
.token-demo-controls select { font: inherit; background: #fff; color: #334155; border: 1px solid #cbd5e1; border-radius: 8px; min-height: 44px; padding: 8px 12px; }
/* Give the extra navigation control its own room without removing the syllabus. */
@media (min-width: 1101px) {
    .navbar:not(.navbar--guest) { flex-wrap: wrap; gap: 14px; }
    .navbar:not(.navbar--guest) .nav-center { position: static; transform: none; margin-inline: auto; }
    .navbar:not(.navbar--guest) .nav-right { margin-left: auto; }
}
@media (max-width: 760px) {
    .navbar:not(.navbar--guest) { grid-template-columns: auto 1fr; grid-template-areas: "toggle logo" "user user"; }
    .navbar:not(.navbar--guest) .nav-right { flex-wrap: wrap; gap: 10px; min-width: 0; }
    .navbar:not(.navbar--guest) .nav-btn-live { margin-right: auto; }
    .token-balance-row { gap: 12px; }
    .token-balance > span:last-child { display: block; }
}

/* Signed-in navigation uses the home logo without a duplicate central column. */
@media (max-width: 1100px) {
    .navbar.navbar--home-logo { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "toggle user"; }
    .navbar.navbar--home-logo .nav-right { min-width: 0; flex-wrap: wrap; }
}

.token-subscription-lines { margin: 0 0 18px; }
.subscription-cancel-confirm:not(:disabled) { background: #b91c1c; color: white; border-color: #b91c1c; cursor: pointer; }
.subscription-cancel-confirm:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.subscription-cancellation { margin-top: 24px; border: 1px solid #e2e8f0; border-radius: 12px; }
.subscription-cancellation summary { padding: 14px 16px; min-height: 44px; cursor: pointer; color: #b91c1c; font-weight: 600; }
.subscription-cancellation summary:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; border-radius: 12px; }
.subscription-cancellation-body { padding: 0 16px 16px; color: #334155; line-height: 1.6; }
.subscription-cancellation-body h3 { margin: 8px 0 12px; font-size: 18px; }
.subscription-cancellation-body ul { padding-left: 22px; }
.subscription-cancel-dialog { width: min(420px, calc(100% - 40px)); box-sizing: border-box; padding: 24px; border: 0; border-radius: 14px; color: #334155; box-shadow: 0 20px 60px #0003; }
.subscription-cancel-dialog::backdrop { background: #0f172a80; }
.subscription-cancel-dialog h3 { margin: 0 0 12px; }
.subscription-cancel-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.subscription-cancel-dialog-actions button { min-width: 80px; min-height: 44px; padding: 10px 18px; border: 1px solid #cbd5e1; border-radius: 8px; background: white; color: #334155; font: inherit; cursor: pointer; }
.subscription-cancel-dialog-actions #subscription-cancel-yes, .subscription-cancel-dialog-actions [data-addon-cancel-yes] { background: #b91c1c; border-color: #b91c1c; color: white; }
.subscription-cancel-dialog-actions button:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.subscription-cancel-dialog-actions button:disabled { opacity: .65; cursor: wait; }
.subscription-cancel-confirm { display: block; max-width: 100%; min-height: 44px; margin: 16px 0 10px; padding: 10px 16px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f1f5f9; color: #475569; font: inherit; white-space: normal; cursor: not-allowed; }
.token-subscription-lines > div { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid #e2e8f0; }
.token-subscription-lines dt { color: #334155; font-weight: 700; }
.token-subscription-lines dd { margin: 0; font-weight: 800; white-space: nowrap; }
.token-subscription-total { font-size: 18px; }
.token-add-subject { margin: 20px 0 12px; }
.token-upcoming { border-top: 1px solid #e2e8f0; margin-top: 24px; padding-top: 18px; }
.token-upcoming ul { padding-left: 20px; margin-top: 10px; color: #475569; font-size: 14px; line-height: 1.8; }
.token-add-subject:focus-visible { outline: 3px solid #2563eb; outline-offset: 4px; }
@media (max-width: 480px) { .token-subscription-lines > div { align-items: flex-start; gap: 12px; } .token-subscription-lines dd span { display: block; } }
