/* Tracking Nexus Hub: Ledger brand, light and dark. Tokens mirror theme.json (light); dark redefines the same
   presets, so every block, SureCart, BetterDocs and Bit Connect follow one set of variables. */

:root {
	--tn-shadow: 0 1px 2px rgba(20, 48, 42, .06), 0 4px 14px rgba(20, 48, 42, .06);
	--tn-r-s: 6px; --tn-r-m: 10px; --tn-r-l: 14px;
	--tn-mono: var(--wp--preset--font-family--mono);
	color-scheme: light;
}
:root[data-theme="dark"] {
	--wp--preset--color--canvas: #132823;
	--wp--preset--color--wash: #0e211d;
	--wp--preset--color--ink: #e8f1ed;
	--wp--preset--color--heading: #e8f1ed;
	--wp--preset--color--body: #b9c9c2;
	--wp--preset--color--muted: #8fa39b;
	--wp--preset--color--rule: #24413a;
	--wp--preset--color--rule-strong: #335a50;
	--wp--preset--color--accent: #3cc49f;
	--wp--preset--color--accent-hover: #5fd4b3;
	--wp--preset--color--accent-wash: #163a31;
	--wp--preset--color--on-accent: #08201a;
	--wp--preset--color--warning: #e6c35c;
	--wp--preset--color--warning-wash: #2c2816;
	--wp--preset--color--danger: #ff9b72;
	--wp--preset--color--danger-wash: #3a2116;
	--tn-shadow: 0 0 0 1px rgba(255, 255, 255, .02);
	color-scheme: dark;
}

:root {
	--c-canvas: var(--wp--preset--color--canvas); --c-wash: var(--wp--preset--color--wash); --c-ink: var(--wp--preset--color--ink);
	--c-head: var(--wp--preset--color--heading); --c-body: var(--wp--preset--color--body); --c-muted: var(--wp--preset--color--muted);
	--c-rule: var(--wp--preset--color--rule); --c-rule2: var(--wp--preset--color--rule-strong); --c-accent: var(--wp--preset--color--accent);
	--c-accent-h: var(--wp--preset--color--accent-hover); --c-accent-wash: var(--wp--preset--color--accent-wash); --c-on-accent: var(--wp--preset--color--on-accent);
	--c-warn: var(--wp--preset--color--warning); --c-warn-wash: var(--wp--preset--color--warning-wash); --c-bad: var(--wp--preset--color--danger); --c-bad-wash: var(--wp--preset--color--danger-wash);
}

body { background: var(--c-wash); color: var(--c-body); -webkit-font-smoothing: antialiased; }
:where(h1, h2, h3, h4) { color: var(--c-head); }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
code, kbd, pre, .tn-mono { font-family: var(--tn-mono); }

/* ---------- Top bar ---------- */
.tn-topbar { position: sticky; top: 0; z-index: 50; background: var(--c-canvas); border-bottom: 1px solid var(--c-rule); }
.admin-bar .tn-topbar { top: 32px; }
.tn-topbar__in { max-width: 1280px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 16px; }
.tn-logo { display: inline-flex; flex: 0 0 auto; } .tn-logo img { height: 28px; width: auto; display: block; }
.tn-logo-dark { display: none !important; }
:root[data-theme="dark"] .tn-logo-light { display: none !important; }
:root[data-theme="dark"] .tn-logo-dark { display: block !important; }
.tn-nav { display: flex; gap: 4px; margin: 0 auto; }
.tn-nav a { color: var(--c-ink); text-decoration: none; font-weight: 550; padding: 8px 14px; border-radius: var(--tn-r-s); }
.tn-nav a:hover { background: var(--c-wash); }
.tn-nav a[aria-current="page"] { background: var(--c-accent-wash); color: var(--c-accent); }
.tn-topbar__right { display: flex; align-items: center; gap: 10px; }
.tn-iconbtn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--tn-r-s); border: 1px solid var(--c-rule); background: var(--c-canvas); color: var(--c-ink); cursor: pointer; }
.tn-iconbtn:hover { border-color: var(--c-rule2); }
.tn-ico-moon { display: none; } :root[data-theme="dark"] .tn-ico-moon { display: block; } :root[data-theme="dark"] .tn-ico-sun { display: none; }
.tn-menu-btn { display: none; }
.tn-user { position: relative; } .tn-user summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--c-ink); padding: 4px; border-radius: var(--tn-r-s); }
.tn-user summary::-webkit-details-marker { display: none; }
.tn-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--c-accent-wash); color: var(--c-accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.tn-user-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; background: var(--c-canvas); border: 1px solid var(--c-rule); border-radius: var(--tn-r-m); box-shadow: var(--tn-shadow); padding: 6px; display: grid; }
.tn-user-menu a { padding: 9px 12px; border-radius: var(--tn-r-s); color: var(--c-ink); text-decoration: none; }
.tn-user-menu a:hover { background: var(--c-wash); }

/* ---------- Main and footer ---------- */
.wp-site-blocks { padding: 0; }
.wp-site-blocks > :not(:first-child):not(:last-child) { padding-left: 24px; padding-right: 24px; }
.tn-main { padding-top: 32px; padding-bottom: 56px; min-height: calc(100vh - 64px - 120px); }
.tn-footer { border-top: 1px solid var(--c-rule); background: var(--c-canvas); }
.tn-footer__in { max-width: 1280px; margin: 0 auto; padding: 22px 24px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--c-muted); }
.tn-footer p { margin: 0; } .tn-footer a { color: var(--c-ink); }
.tn-footer__links { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------- Components ---------- */
.tn-card { background: var(--c-canvas); border: 1px solid var(--c-rule); border-radius: var(--tn-r-l); box-shadow: var(--tn-shadow); padding: 22px; }
.tn-card > :first-child { margin-top: 0; } .tn-card > :last-child { margin-bottom: 0; }
.tn-card h2 { font-size: 17px; } .tn-card h3 { font-size: 15px; }
.tn-muted { color: var(--c-muted); }
.tn-btn, .wp-element-button, .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: var(--tn-r-m); font: 600 15px/1 var(--wp--preset--font-family--figtree); text-decoration: none; cursor: pointer; }
.tn-btn { border: 1px solid var(--c-rule2); color: var(--c-ink); background: var(--c-canvas); }
.tn-btn:hover { border-color: var(--c-ink); }
.tn-btn--primary { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
.tn-btn--primary:hover { background: var(--c-accent-h); border-color: var(--c-accent-h); }
.tn-btn--small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.tn-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--c-accent-wash); color: var(--c-accent); white-space: nowrap; }
.tn-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tn-badge--danger { background: var(--c-bad-wash); color: var(--c-bad); } .tn-badge--warn { background: var(--c-warn-wash); color: var(--c-warn); }
.tn-meter { height: 6px; border-radius: 9px; background: var(--c-rule); overflow: hidden; margin-top: 8px; } .tn-meter span { display: block; height: 100%; background: var(--c-accent); border-radius: 9px; }
.tn-linklist a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--c-rule); color: var(--c-ink); text-decoration: none; font-weight: 550; }
.tn-linklist a:first-child { border-top: 0; } .tn-linklist a::after { content: "→"; color: var(--c-accent); }
.tn-linklist a:hover { color: var(--c-accent); }
.tn-getsetup__forum { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--c-rule); }
.tn-licsum + .tn-licsum { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--c-rule); }
.tn-licsum__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tn-licsum p { margin: 6px 0 0; }
.tn-empty { text-align: center; padding: 40px 24px; }

/* ---------- Account home layout (direction A) ---------- */
.tn-account { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tn-account__main { display: grid; gap: 20px; min-width: 0; }
.tn-pagehead h1 { margin: 0; } .tn-pagehead p { margin: 6px 0 0; }

/* ---------- SureCart: its components read these variables ---------- */
:root, :root[data-theme="dark"] {
	--sc-font-sans: var(--wp--preset--font-family--figtree);
	--sc-color-primary-500: var(--c-accent);
	--sc-color-primary-600: var(--c-accent-h);
	--sc-color-primary-text: var(--c-on-accent);
	--sc-focus-ring-color-primary: var(--c-accent);
	--sc-input-border-radius-small: var(--tn-r-s);
	--sc-input-border-radius-medium: var(--tn-r-m);
	--sc-input-border-radius-large: var(--tn-r-m);
	--sc-border-radius-small: var(--tn-r-s);
	--sc-border-radius-medium: var(--tn-r-m);
	--sc-border-radius-large: var(--tn-r-l);
	--sc-color-gray-900: var(--c-ink);
	--sc-color-gray-800: var(--c-head);
	--sc-color-gray-700: var(--c-body);
	--sc-color-gray-600: var(--c-muted);
	--sc-color-gray-500: var(--c-muted);
	--sc-color-gray-300: var(--c-rule2);
	--sc-color-gray-200: var(--c-rule);
	--sc-color-gray-100: var(--c-wash);
	--sc-color-gray-50: var(--c-wash);
	--sc-color-white: var(--c-canvas);
	--sc-panel-background-color: var(--c-canvas);
	--sc-input-background-color: var(--c-canvas);
	--sc-input-border-color: var(--c-rule2);
	--sc-input-label-color: var(--c-ink);
	--sc-input-color: var(--c-ink);
	--sc-card-background-color: var(--c-canvas);
	--sc-card-border-color: var(--c-rule);
	--sc-shadow-small: var(--tn-shadow);
	--sc-shadow-medium: var(--tn-shadow);
	--sc-color-success-500: var(--c-accent);
	--sc-color-warning-500: var(--c-warn);
	--sc-color-danger-500: var(--c-bad);
}
sc-card, sc-dashboard-module, sc-order-summary { --sc-card-border-color: var(--c-rule); }

/* ---------- Phone ---------- */
@media (max-width: 960px) {
	.tn-account { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
	.tn-topbar__in { padding: 0 16px; gap: 10px; }
	.tn-menu-btn { display: grid; }
	.tn-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--c-canvas); border-bottom: 1px solid var(--c-rule); padding: 8px 16px 14px; flex-direction: column; margin: 0; }
	.tn-nav.is-open { display: flex; }
	.tn-nav a { padding: 12px; }
	.tn-user-name { display: none; }
	.wp-site-blocks > :not(:first-child):not(:last-child) { padding-left: 16px; padding-right: 16px; }
	.tn-main { padding-top: 20px; padding-bottom: 40px; }
	.tn-footer__in { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- Account: signed-out sign-in card ---------- */
.tn-signin { max-width: 440px; margin: 24px auto 0; text-align: center; background: none; border: 0; box-shadow: none; padding: 0; }
.tn-signin sc-login-form { text-align: left; }
.tn-signin h1 { font-size: 24px; margin: 0 0 6px; }
.tn-signin sc-login-form { display: block; margin-top: 18px; }
.tn-signin__new { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--c-rule); }
.tn-billing { margin-top: 28px; display: grid; gap: 20px; }
.tn-section-title { font-size: 19px; margin: 0; }

/* ---------- Bit Connect (forum): its tokens, mapped to the brand; its primary is hard-coded, so restated ----------
   `html:root` outranks Bit Connect's own `:root` / `:root.dark`, which it re-declares in a stylesheet it loads late
   (opening the new-post editor), so the brand holds without depending on stylesheet order. */
html:root, html:root.dark, html:root[data-theme="dark"] {
	--bc-surface: var(--c-canvas); --bc-surface-sunken: var(--c-wash); --bc-surface-raised: var(--c-accent-wash); --bc-surface-hover: var(--c-wash);
	--bc-ink: var(--c-ink); --bc-ink-muted: var(--c-muted); --bc-ink-subtle: var(--c-muted);
	--bc-line: var(--c-rule); --bc-line-strong: var(--c-rule2);
	--bc-positive: var(--c-accent); --bc-positive-soft: var(--c-accent-wash); --bc-negative: var(--c-bad); --bc-negative-soft: var(--c-bad-wash);
	--bc-info: var(--c-accent); --bc-info-soft: var(--c-accent-wash);
}
.bc-bg-primary { background-color: var(--c-accent) !important; color: var(--c-on-accent) !important; }
.bc-text-primary, .hover\:bc-text-primary:hover { color: var(--c-accent) !important; }
.bc-border-primary, .hover\:bc-border-primary:hover, .focus-within\:bc-border-primary:focus-within { border-color: var(--c-accent) !important; }
.bc-from-primary { --tw-gradient-from: var(--c-accent) var(--tw-gradient-from-position) !important; }
[class*="bc-"] { font-family: var(--wp--preset--font-family--figtree); }

/* ---------- Checkout: SureCart's column block carries fixed white and grey panels ---------- */
sc-columns.wp-block-surecart-columns.has-background { background-color: var(--c-wash) !important; border-radius: var(--tn-r-l); overflow: hidden; border: 1px solid var(--c-rule); }
sc-column.wp-block-surecart-column.has-white-background-color { background-color: var(--c-canvas) !important; }
.wp-block-surecart-columns, .wp-block-surecart-column { color: var(--c-body); }
/* The store logo comes from SureCart's media host (dark lockup); dark mode shows the theme's reversed lockup instead. */
:root[data-theme="dark"] .wp-block-surecart-column img[src*="media.surecart.com"] { content: url("tn-lockup-reversed.svg"); }

/* ---------- Forum: Ant Design primary buttons and the current item ---------- */
#bit-connect-u-root .ant-btn-primary { background: var(--c-accent) !important; border-color: var(--c-accent) !important; color: var(--c-on-accent) !important; box-shadow: none !important; }
#bit-connect-u-root .ant-btn-primary:hover { background: var(--c-accent-h) !important; border-color: var(--c-accent-h) !important; }
#bit-connect-u-root .bc-bg-primary\/10 { background-color: var(--c-accent-wash) !important; }
#bit-connect-u-root .bc-border-primary\/30 { border-color: color-mix(in srgb, var(--c-accent) 35%, transparent) !important; }
#bit-connect-u-root a[aria-current], #bit-connect-u-root .bc-text-primary { color: var(--c-accent) !important; }
/* Secondary buttons ("Open group", "Join"): Ant's default is near-black in both schemes. */
#bit-connect-u-root .ant-btn-default { background: var(--c-canvas) !important; border-color: var(--c-rule2) !important; color: var(--c-ink) !important; box-shadow: none !important; }
#bit-connect-u-root .ant-btn-default:hover { border-color: var(--c-accent) !important; color: var(--c-accent) !important; }
/* Inputs outside the top bar ("Search groups" and the like): Ant's default is near-black with a grey border and
   12px corners. Match the top bar's search: brand wash, brand rule, 8px corners, Figtree, accent focus ring. */
#bit-connect-u-root .ant-input-affix-wrapper, #bit-connect-u-root .ant-input-outlined:not(.ant-input-affix-wrapper *) { background: var(--c-wash) !important; border-color: var(--c-rule) !important; border-radius: 8px !important; box-shadow: none !important; }
#bit-connect-u-root .ant-input-affix-wrapper:hover, #bit-connect-u-root .ant-input-outlined:not(.ant-input-affix-wrapper *):hover { border-color: var(--c-rule2) !important; }
#bit-connect-u-root .ant-input-affix-wrapper-focused, #bit-connect-u-root .ant-input-outlined:not(.ant-input-affix-wrapper *):focus { border-color: var(--c-accent) !important; box-shadow: 0 0 0 3px var(--c-accent-wash) !important; }
#bit-connect-u-root .ant-input-affix-wrapper .ant-input { background: transparent !important; }
#bit-connect-u-root .ant-input, #bit-connect-u-root .ant-input-affix-wrapper { color: var(--c-ink) !important; font-family: var(--wp--preset--font-family--figtree) !important; font-size: 14px !important; }
#bit-connect-u-root .ant-input::placeholder { color: var(--c-muted) !important; }
#bit-connect-u-root .ant-input-prefix, #bit-connect-u-root .ant-input-suffix { color: var(--c-muted) !important; }

/* Groups: Bit Connect colours each group's initials from its name (inline violet, orange…) and tints the group
   header violet. Use the brand accent: soft initials as a wash, solid ones (group page) filled. */
#bit-connect-u-root .bc-font-semibold.bc-justify-center.bc-items-center[style*="background"] { background: var(--c-accent-wash) !important; color: var(--c-accent) !important; }
#bit-connect-u-root .bc-font-semibold.bc-justify-center.bc-items-center[style*="color: rgb(255, 255, 255)"] { background: var(--c-accent) !important; color: var(--c-on-accent) !important; }
#bit-connect-u-root div:not([class])[style*="linear-gradient"] { background: linear-gradient(135deg, var(--c-accent-wash), transparent) !important; }
/* Browse groups: cards share the row instead of sitting at a fixed 300px on the left. */
#bit-connect-u-root .bc-grid:has(> article) { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)) !important; max-width: 1100px; }

/* Forum logo (Bit Connect's logoLight setting points at tn-mark.svg): the reversed mark in dark mode. */
:root.dark #bit-connect-u-root img[src*="tn-mark.svg"] { content: url("tn-mark-reversed.svg"); }

/* ---------- Forum: the right column of links out (assets/forum.js) ---------- */
.tn-rail { flex: 0 0 280px; padding: 24px 24px 24px 0; display: grid; gap: 12px; align-content: start; }
.tn-rail__card { position: relative; display: grid; gap: 3px; padding: 14px 40px 14px 16px; border: 1px solid var(--c-rule); border-radius: var(--tn-r-m); background: var(--c-canvas); color: var(--c-ink); text-decoration: none; }
.tn-rail__card:hover { border-color: var(--c-accent); }
.tn-rail__card strong { font-size: 15px; font-weight: 650; }
.tn-rail__card span { font-size: 12.5px; color: var(--c-muted); }
.tn-rail__card i { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--c-accent); }
/* Progress: links to Bit Connect's status pages (the public roadmap). */
.tn-progress { display: grid; gap: 12px; padding: 14px 16px; border: 1px solid var(--c-rule); border-radius: var(--tn-r-m); background: var(--c-canvas); }
.tn-progress__title { margin: 0; font-size: 15px; font-weight: 650; color: var(--c-ink); }
.tn-progress__group { display: grid; gap: 6px; }
.tn-progress__label { margin: 0; font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--c-muted); }
.tn-progress__links { display: flex; flex-wrap: wrap; gap: 6px; }
.tn-progress .tn-progress__links a { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border: 1px solid var(--c-rule); border-radius: var(--tn-r-s); color: var(--c-ink); font-size: 13px; text-decoration: none; }
.tn-progress .tn-progress__links a:hover, .tn-progress .tn-progress__links a[aria-current="page"] { border-color: var(--c-accent); color: var(--c-accent); }
.tn-progress__dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
:root[data-theme="dark"] .tn-progress__dot { filter: brightness(2.2) saturate(1.2); }
.tn-nav-links .tn-progress { margin: 0 0 4px; }
@media (max-width: 1100px) { .tn-rail { display: none; } }

/* ---------- Forum: Ant Design controls (sort, tags) and the new-post dialog, in the brand ---------- */
.ant-select .ant-select-selector, .ant-select-outlined .ant-select-selector { background: var(--c-canvas) !important; border-color: var(--c-rule2) !important; color: var(--c-ink) !important; box-shadow: none !important; }
.ant-select-selection-item { color: var(--c-ink) !important; }
.ant-select-selection-placeholder, .ant-select-arrow { color: var(--c-muted) !important; }
.ant-select-dropdown, .ant-dropdown-menu, .ant-popover-inner { background: var(--c-canvas) !important; border: 1px solid var(--c-rule) !important; box-shadow: var(--tn-shadow) !important; }
.ant-select-item { color: var(--c-ink) !important; }
.ant-select-item-option-active, .ant-dropdown-menu-item:hover { background: var(--c-wash) !important; }
.ant-select-item-option-selected { background: var(--c-accent-wash) !important; color: var(--c-accent) !important; }
.ant-modal .ant-modal-content { background: var(--c-canvas) !important; border: 1px solid var(--c-rule); border-radius: var(--tn-r-l) !important; box-shadow: 0 24px 60px rgba(0, 0, 0, .25) !important; font-family: var(--wp--preset--font-family--figtree) !important; }
.ant-modal .ant-modal-header { background: transparent !important; }
.ant-modal .ant-modal-title { color: var(--c-head) !important; font-weight: 700 !important; font-family: var(--wp--preset--font-family--figtree) !important; }
.ant-modal .ant-modal-close { color: var(--c-muted) !important; }
.ant-modal-mask { background: rgba(14, 33, 29, .55) !important; }
.ant-modal input, .ant-modal textarea, .ant-modal .ant-input, .ant-modal .ant-input-affix-wrapper, .ant-modal [contenteditable="true"] { background: var(--c-canvas) !important; color: var(--c-ink) !important; border-color: var(--c-rule2) !important; }
.ant-modal .ant-input:focus, .ant-modal .ant-input-affix-wrapper-focused, .ant-modal .ant-select-focused .ant-select-selector { border-color: var(--c-accent) !important; box-shadow: 0 0 0 3px var(--c-accent-wash) !important; }
.ant-modal .ant-btn-primary { background: var(--c-accent) !important; border-color: var(--c-accent) !important; color: var(--c-on-accent) !important; box-shadow: none !important; }
.ant-modal .ant-btn-default { background: var(--c-canvas) !important; border-color: var(--c-rule2) !important; color: var(--c-ink) !important; }
.ant-modal label, .ant-modal .ant-form-item-label > label { color: var(--c-ink) !important; }

#bit-connect-u-root .ant-layout { background: var(--c-canvas) !important; }

/* ---------- Forum on narrower screens: links move into the menu, the page title shows ---------- */
.tn-nav-links { display: none; }
@media (max-width: 1100px) {
	.tn-nav-links { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--c-rule); }
	.tn-nav-links__title { margin: 0 0 2px; padding: 0 14px; font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--c-muted); }
	.tn-nav-links a { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--c-rule); border-radius: var(--tn-r-m); background: var(--c-canvas); color: var(--c-ink); text-decoration: none; }
	.tn-nav-links a:hover { border-color: var(--c-accent); }
	.tn-nav-links strong { font-size: 14.5px; font-weight: 650; }
	.tn-nav-links span { font-size: 12.5px; color: var(--c-muted); }
}
@media (max-width: 767px) {
	#bit-connect-u-root h1.bc-hidden { display: block !important; font-size: 20px !important; font-weight: 700 !important; }
	#bit-connect-u-root .bc-fixed.bc-left-0.bc-top-0 nav { overflow-y: auto; }
}

/* Phones: Bit Connect's floating "Create New Post" button sits where BetterDocs' help bubble (z-index 99) is;
   stack it above the bubble instead of under it. */
@media (max-width: 639px) {
	button.bc-fixed[aria-label="Create New Post"] { bottom: calc(84px + env(safe-area-inset-bottom)) !important; z-index: 100 !important; }
}

/* Docs fixes, batch 2: icon colours follow the theme, reading time unboxed, help strip stacks in the article */

/* Glossary (BetterDocs encyclopedia) */


/* Docs polish (re-audit 2026-11-24-docs-r2): one step per size, 44px feedback and phone rows, scale radii */
@media (max-width: 860px) {
	.encyclopedia-alphabet-list a { min-width: 44px; height: 44px; }
}


/* Docs round 3 (owner feedback 2026-11-24): popup search, Listen, prev/next cards, phone header and article */
/* Search trigger (BetterDocs modal layout): one bar that opens the popup */

/* Listen chip and player */

/* Previous / next cards */
.tn-dnav__label { font-size: 13.5px; font-weight: 600; color: var(--c-accent); }
.tn-dnav__title { font-size: 15px; font-weight: 650; color: var(--c-head); }

/* Phone: header buttons to the right edge; article reading order and help items */
@media (max-width: 760px) {
	.tn-topbar__right { margin-left: auto; }
}
@media (max-width: 600px) {
	.tn-dhelp__item { flex-direction: column; align-items: flex-start; gap: 12px; }
	.tn-dhelp__item .tn-btn { width: 100%; }
}

/* Docs round 3b: the search popup on brand (both themes), next/prev cards, Listen, phone TOC and menu */

/* Next / previous: BetterDocs makes the links flex; keep label over title */
.tn-dnav__label, .tn-dnav__title { display: block; }

/* Listen: one clean chip (BetterDocs gives the wrapper its own box) */

/* Phone: no empty contents box on articles without headings; the docs menu shows at the bottom */
.tn-dtoc-phone:not(:has(.toc-list li)) { display: none !important; }
.tn-dtoc:not(:has(.toc-list li)) { display: none !important; }
/* Docs round 3c: Copy page menu, Listen player, meta row like the reference, full-width home search */

/* Meta row: reading time + Listen on the left, Copy page on the right */
.tn-dmeta { display: block !important; }

/* Copy page: the split button only; the menu is its own panel */


/* Listen: the chip grows into the player (BetterDocs animates its width; never cap it) */


/* Copy page menu: closed means hidden (the plugin uses [hidden]); never squeezed by the generic width cap */
/* Search results: titles and categories readable in both themes */
.tn-dhelp__item .tn-btn { box-sizing: border-box; }

/* ---------- Account home (signed in), on the Ledger direction ----------
   One width for the whole hub: header, footer, docs and account at 1440px. */
.tn-topbar__in, .tn-footer__in { max-width: 1440px; }
.tn-account-shell { max-width: 1440px; margin: 0 auto; display: grid; gap: 28px; }
.tn-account-shell > sc-spacing, .sc-customer-dashboard { display: block; }
.tn-acc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; }
.tn-acc-head h1 { font-size: 32px; font-weight: 750; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 6px; color: var(--c-head); }
.tn-acc-head p { margin: 0; font-size: 16px; }
.tn-acc-head__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tn-account { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.tn-account__main { display: grid; gap: 24px; min-width: 0; }
.tn-acc-card { padding: 24px; }
.tn-acc-card > :first-child { margin-top: 0; }
.tn-eyebrow { margin: 0 0 4px; font-size: 12.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--c-muted); }
.tn-licsum__head h2 { font-size: 22px; margin: 0; }
.tn-licsum .tn-meter { height: 8px; margin-top: 12px; }

/* Empty state: an account with no licence */
.tn-acc-empty { display: flex; gap: 20px; align-items: flex-start; padding: 28px; }
.tn-acc-empty__icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: var(--tn-r-m); background: var(--c-accent-wash); color: var(--c-accent); }
.tn-acc-empty h2 { font-size: 20px; margin: 0 0 6px; }
.tn-acc-empty p { margin: 0 0 18px; max-width: 560px; }
.tn-acc-empty__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Get set up (right column) sticks while the main column scrolls */
.tn-account .tn-getsetup { position: sticky; top: 88px; padding: 24px; }
.admin-bar .tn-account .tn-getsetup { top: 120px; }
.tn-getsetup h2 { font-size: 17px; margin: 0 0 4px; }
.tn-getsetup > p { margin: 0 0 12px; }

/* Plan and billing: cards in a two-column grid */
.tn-billing { margin-top: 8px; display: grid; gap: 16px; }
.tn-billing > h2 { font-size: 22px; margin: 0; }
.tn-billing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.tn-billing-grid .tn-acc-card--wide { grid-column: 1 / -1; }

/* SureCart inside our cards: no second card, theme type */
.tn-acc-card sc-licenses-list, .tn-acc-card sc-dashboard-downloads-list, .tn-acc-card sc-subscriptions-list, .tn-acc-card sc-orders-list, .tn-acc-card sc-invoices-list, .tn-acc-card sc-payment-methods-list, .tn-acc-card sc-dashboard-customer-details { display: block; --sc-card-padding: 0; --sc-card-border: 0; --sc-card-border-color: transparent; --sc-card-background-color: transparent; --sc-card-box-shadow: none; --sc-shadow-small: none; --sc-shadow-medium: none; }

/* SureCart's own routed views (all orders, one licence, billing details): in the same shell, on a card */
.tn-account-shell .sc-customer-dashboard { background: var(--c-canvas); border: 1px solid var(--c-rule); border-radius: var(--tn-r-l); padding: 24px; }
.sc-customer-dashboard sc-breadcrumbs { --sc-breadcrumb-color: var(--c-muted); --sc-breadcrumb-hover-color: var(--c-accent); --sc-breadcrumb-active-color: var(--c-ink); font-family: var(--wp--preset--font-family--figtree); }

@media (max-width: 1100px) {
	.tn-account { grid-template-columns: minmax(0, 1fr); }
	.tn-account .tn-getsetup { position: static; }
	.tn-billing-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
	.tn-acc-head h1 { font-size: 26px; }
	.tn-acc-head__actions, .tn-acc-head__actions .tn-btn, .tn-acc-empty__actions .tn-btn { width: 100%; }
	.tn-acc-empty { flex-direction: column; padding: 20px; }
	.tn-acc-card, .tn-account .tn-getsetup { padding: 18px; }
	.tn-account-shell .sc-customer-dashboard { padding: 16px; }
}
/* Account: SureCart's dashboard wrapper escapes the 1120px content width; grid children never get flow margins */
.tn-main .entry-content > .sc-customer-dashboard, .tn-main .entry-content > sc-spacing { max-width: 1440px !important; width: 100%; margin-left: auto !important; margin-right: auto !important; }
.tn-account > *, .tn-account__main > *, .tn-billing-grid > *, .tn-account-shell > *, .tn-billing > * { margin-block: 0 !important; }
.tn-billing-grid { align-items: stretch; }
/* Account page (front page): its content wrapper is 1440px; SureCart's routed views sit on a 1120px card */
.home .tn-main > .entry-content { max-width: 1440px !important; width: 100%; }
.home .tn-main > .entry-content > .tn-signin { max-width: 440px !important; }
.sc-customer-dashboard:has(sc-breadcrumbs) { max-width: 1120px !important; background: var(--c-canvas); border: 1px solid var(--c-rule); border-radius: var(--tn-r-l); padding: 24px 28px; box-sizing: border-box; }
@media (max-width: 600px) { .sc-customer-dashboard:has(sc-breadcrumbs) { padding: 16px; } }

/* Support chat launcher (assets/support.js): sits where AnyChat's own launcher appears (20px in, 60px tall),
   so nothing moves when the widget takes over. Below the docs search popup (z-index 9999999), which covers it. */
.tn-help { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 9990; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--c-accent); color: var(--c-on-accent); font: 650 15px/1 var(--wp--preset--font-family--figtree, system-ui, sans-serif); box-shadow: 0 6px 20px rgba(13, 50, 40, .22); cursor: pointer; }
.tn-help:hover { background: var(--c-accent-h); }
.tn-help:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.tn-help[aria-busy="true"] { cursor: progress; opacity: .85; }
.tn-help svg { flex: 0 0 auto; }
/* While the chat is open it fills this corner and has its own minimise control. */
.tn-help.is-open { display: none; }
.tn-help__dot { display: none; position: absolute; top: 6px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--c-bad); box-shadow: 0 0 0 2px var(--c-accent); }
.tn-help.has-unread .tn-help__dot { display: block; }
/* Our button is the only launcher: AnyChat's own (an empty circle unless its icon is set) stays hidden. */
[id^="anw2-launcher-"] { display: none !important; }
@media print { .tn-help { display: none; } }
