/* =========================================================
   Thrane.dev – custom.css (T4 / t4_bs5_blank, Joomla 6)
   Lys og teknisk: papirhvid, blæk, signalorange
   Fonte (Inter + JetBrains Mono) hentes lokalt via FontKit
   ========================================================= */

:root {
  --tx-ink: #0e1116;
  --tx-ink-2: #3a4250;
  --tx-muted: #6b7380;
  --tx-paper: #ffffff;
  --tx-paper-2: #f6f7f9;
  --tx-paper-3: #eef0f3;
  --tx-line: #e2e5ea;
  --tx-line-2: #cfd4db;
  --tx-accent: #ff5a1f;
  --tx-accent-deep: #e0460f;
  --tx-accent-soft: #fff1eb;
  --tx-ok: #12a150;
  --tx-surface: #ffffff;
  --tx-glass: rgba(255,255,255,.92);
  --tx-on-ink: #ffffff;
  --tx-night: #0e1116;
  --tx-night-line: #0e1116;
  color-scheme: light;
  --tx-radius: 10px;
  --tx-radius-lg: 16px;
  --tx-shadow: 0 1px 2px rgba(14,17,22,.04), 0 8px 24px rgba(14,17,22,.06);
  --tx-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tx-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* T4 / Bootstrap-variabler */
  --body-bg-color: var(--tx-paper);
  --body-text-color: var(--tx-ink-2);
  --body-link-color: var(--tx-ink);
  --body-link-hover-color: var(--tx-accent-deep);
  --bs-primary: var(--tx-accent);
  --bs-primary-rgb: 255, 90, 31;
  --bs-body-font-family: var(--tx-sans);
  --bs-body-color: var(--tx-ink-2);
  --bs-border-color: var(--tx-line);
}

/* ---------- Grundtypografi ---------- */
body {
  font-family: var(--tx-sans);
  color: var(--tx-ink-2);
  background: var(--tx-paper);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4 {
  font-family: var(--tx-sans);
  color: var(--tx-ink);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
}
h1, .h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.035em; }
h2, .h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -.03em; }
h3, .h3 { font-size: 1.25rem; }
a { color: var(--tx-ink); text-decoration-color: var(--tx-line-2); text-underline-offset: 3px; }
a:hover { color: var(--tx-accent-deep); text-decoration-color: currentColor; }
code, kbd, pre, .tx-mono { font-family: var(--tx-mono); font-size: .9em; }
code { background: var(--tx-paper-3); color: var(--tx-ink); padding: .1em .4em; border-radius: 5px; }
::selection { background: var(--tx-accent); color: #fff; }

/* ---------- Knapper (T4's egne variabler, så tryk ikke blinker blåt) ---------- */
body .btn { font-weight: 600; border-radius: 8px; padding: .65rem 1.15rem; letter-spacing: -.005em; }
body .btn-primary {
  --t4-btn-color: #fff; --t4-btn-bg: var(--tx-accent); --t4-btn-border-color: var(--tx-accent);
  --t4-btn-hover-color: #fff; --t4-btn-hover-bg: var(--tx-accent-deep); --t4-btn-hover-border-color: var(--tx-accent-deep);
  --t4-btn-active-color: #fff; --t4-btn-active-bg: var(--tx-accent-deep); --t4-btn-active-border-color: var(--tx-accent-deep);
  --bs-btn-color: #fff; --bs-btn-bg: var(--tx-accent); --bs-btn-border-color: var(--tx-accent);
  --bs-btn-hover-bg: var(--tx-accent-deep); --bs-btn-hover-border-color: var(--tx-accent-deep);
  --bs-btn-active-bg: var(--tx-accent-deep); --bs-btn-active-border-color: var(--tx-accent-deep);
  --t4-btn-focus-shadow-rgb: 255, 90, 31; --bs-btn-focus-shadow-rgb: 255, 90, 31;
}
body .btn-primary:active, body .btn-primary:focus { background-color: var(--tx-accent-deep) !important; border-color: var(--tx-accent-deep) !important; color: #fff !important; }
body .btn-secondary, body .btn-outline-primary, body .btn-outline-secondary {
  --t4-btn-color: var(--tx-ink); --t4-btn-bg: var(--tx-surface); --t4-btn-border-color: var(--tx-line-2);
  --t4-btn-hover-color: var(--tx-ink); --t4-btn-hover-bg: var(--tx-paper-2); --t4-btn-hover-border-color: var(--tx-ink);
  --t4-btn-active-color: var(--tx-ink); --t4-btn-active-bg: var(--tx-paper-3); --t4-btn-active-border-color: var(--tx-ink);
  --bs-btn-color: var(--tx-ink); --bs-btn-bg: var(--tx-surface); --bs-btn-border-color: var(--tx-line-2);
  --bs-btn-hover-color: var(--tx-ink); --bs-btn-hover-bg: var(--tx-paper-2); --bs-btn-hover-border-color: var(--tx-ink);
  --bs-btn-active-color: var(--tx-ink); --bs-btn-active-bg: var(--tx-paper-3); --bs-btn-active-border-color: var(--tx-ink);
  --t4-btn-focus-shadow-rgb: 14, 17, 22; --bs-btn-focus-shadow-rgb: 14, 17, 22;
}
body .btn-secondary:active, body .btn-outline-primary:active, body .btn-outline-secondary:active { background-color: var(--tx-paper-3) !important; color: var(--tx-ink) !important; border-color: var(--tx-ink) !important; }
body .btn:focus-visible { outline: 2px solid var(--tx-accent); outline-offset: 2px; box-shadow: none; }
* { -webkit-tap-highlight-color: rgba(255, 90, 31, .15); }

/* ---------- Header ---------- */
body #t4-header, body #t4-header .t4-section-inner, body #t4-header .header-block {
  background-color: var(--tx-glass);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
}
body #t4-header { border-bottom: 1px solid var(--tx-line); }
body #t4-header .header-wrap { padding-top: .8rem; padding-bottom: .8rem; display: flex; align-items: center; gap: 2rem; }
body #t4-header .navbar-brand img, body #t4-header .logo-img { max-height: 32px; width: auto; }
body #t4-header .t4-navbar, body #t4-header .navbar, body #t4-header .t4-megamenu { margin-left: auto; justify-content: flex-end; }
body #t4-header .navbar-nav { align-items: center; gap: .15rem; margin-left: auto; }
body #t4-header .navbar-nav > li > a, body #t4-header .navbar-nav > li > .nav-link {
  color: var(--tx-ink-2); font-weight: 500; font-size: .95rem; padding: .45rem .8rem; border-radius: 7px;
}
body #t4-header .navbar-nav > li > a:hover,
body #t4-header .navbar-nav > li.active > a,
body #t4-header .navbar-nav > li.current > a { color: var(--tx-ink); background: var(--tx-paper-2); }
/* Menupunkt med Link CSS Style "tx-cta" */
body #t4-header .navbar-nav > li > a.tx-cta {
  background: var(--tx-ink); color: var(--tx-on-ink); margin-left: .5rem; padding: .5rem 1rem;
}
body #t4-header .navbar-nav > li > a.tx-cta:hover { background: var(--tx-accent); color: #fff; }

/* ---------- Footer ---------- */
body #t4-footer, body .t4-footer {
  background: var(--tx-paper-2); border-top: 1px solid var(--tx-line); color: var(--tx-muted); font-size: .9rem;
}
body #t4-footer a { color: var(--tx-ink-2); text-decoration: none; }
body #t4-footer a:hover { color: var(--tx-accent-deep); }

/* ---------- Fælles sektioner ---------- */
.tx-wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.tx-section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.tx-section--alt { background: var(--tx-paper-2); border-top: 1px solid var(--tx-line); border-bottom: 1px solid var(--tx-line); }
.tx-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--tx-mono); font-size: .78rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  color: var(--tx-ink-2); background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 999px; padding: .3rem .75rem;
}
.tx-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tx-accent); }
.tx-lead { font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--tx-ink-2); max-width: 38em; }
.tx-head { max-width: 46rem; margin-bottom: 2.5rem; }
.tx-head p { color: var(--tx-muted); }
.tx-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.tx-note { font-family: var(--tx-mono); font-size: .8rem; color: var(--tx-muted); margin-top: 1rem; }

/* Fuldbredde inde i T4's artikelcontainer */
.tx-full { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }

/* ---------- Hero ---------- */
.tx-hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
  background:
    linear-gradient(to bottom, transparent 60%, var(--tx-surface)),
    linear-gradient(var(--tx-line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--tx-line) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--tx-paper-2);
  border-bottom: 1px solid var(--tx-line);
}
.tx-hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.tx-hero h1 { margin: 1.25rem 0 1rem; }
.tx-hero h1 em { font-style: normal; color: var(--tx-accent); }

/* Terminal-/installvindue */
.tx-term {
  background: var(--tx-night); color: #d6dbe3; border-radius: var(--tx-radius-lg);
  box-shadow: 0 30px 60px -20px rgba(14,17,22,.35); overflow: hidden; font-family: var(--tx-mono); font-size: .85rem;
}
.tx-term__bar { display: flex; gap: 6px; padding: .8rem 1rem; background: #191d24; border-bottom: 1px solid #262b34; }
.tx-term__bar span { width: 11px; height: 11px; border-radius: 50%; background: #3a404b; }
.tx-term__bar span:first-child { background: var(--tx-accent); }
.tx-term__body { padding: 1.1rem 1.25rem 1.3rem; line-height: 1.9; }
.tx-term__body p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-term .c-dim { color: #6f7887; }
.tx-term .c-ok { color: #4ade80; }
.tx-term .c-acc { color: #ff8a5c; }

/* ---------- Produktkort ---------- */
.tx-products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.tx-card {
  background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: var(--tx-radius-lg);
  padding: 1.5rem; display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tx-card:hover { border-color: var(--tx-line-2); box-shadow: var(--tx-shadow); transform: translateY(-2px); }
.tx-card h3 { margin: 1.25rem 0 .35rem; display: flex; align-items: center; gap: .6rem; }
.tx-card p { color: var(--tx-muted); margin-bottom: 1rem; }
.tx-card .tx-tag { font-family: var(--tx-mono); font-size: .72rem; font-weight: 500; color: var(--tx-ink-2); background: var(--tx-paper-3); border-radius: 5px; padding: .15rem .45rem; letter-spacing: 0; }
.tx-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px dashed var(--tx-line); }
.tx-card__price { font-family: var(--tx-mono); font-size: .9rem; color: var(--tx-ink); }
.tx-card__price small { color: var(--tx-muted); }
.tx-card__link { font-weight: 600; text-decoration: none; color: var(--tx-ink); }
.tx-card__link::after { content: " →"; transition: margin .2s; }
.tx-card__link:hover::after { margin-left: .2rem; }
.tx-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.tx-list li { position: relative; padding-left: 1.4rem; margin: .35rem 0; color: var(--tx-ink-2); font-size: .97rem; }
.tx-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 2px; background: var(--tx-accent); }

/* CSS-mockups (ingen billeder nødvendige) */
.tx-mock { height: 190px; border-radius: var(--tx-radius); background: var(--tx-paper-2); border: 1px solid var(--tx-line); position: relative; overflow: hidden; }
.tx-mock--side .m-page { position: absolute; inset: 14px 14px 14px 14px; border-radius: 6px; background: var(--tx-surface); border: 1px solid var(--tx-line); }
.tx-mock--side .m-line { position: absolute; left: 30px; height: 8px; border-radius: 4px; background: var(--tx-paper-3); }
.tx-mock--side .m-panel {
  position: absolute; top: 14px; bottom: 14px; right: 14px; width: 42%; background: var(--tx-night); border-radius: 6px 6px 6px 6px;
  box-shadow: -12px 0 24px rgba(14,17,22,.15); padding: 16px;
}
.tx-mock--side .m-item { height: 8px; border-radius: 4px; background: #3a404b; margin-bottom: 12px; }
.tx-mock--side .m-item.is-on { background: var(--tx-accent); width: 70%; }
.tx-mock--side .m-burger { position: absolute; top: 24px; left: 28px; width: 18px; height: 12px; border-top: 2px solid var(--tx-ink); border-bottom: 2px solid var(--tx-ink); }
.tx-mock--side .m-burger::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid var(--tx-ink); }
.tx-mock--wall { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 22px; gap: 8px; padding: 14px; }
.tx-mock--wall .m-tile { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 6px; }
.tx-mock--wall .m-tile.t1 { grid-row: span 3; background: var(--tx-accent-soft); border-color: #ffd5c4; }
.tx-mock--wall .m-tile.t2 { grid-row: span 2; }
.tx-mock--wall .m-tile.t3 { grid-row: span 4; }
.tx-mock--wall .m-tile.t4 { grid-row: span 3; }
.tx-mock--wall .m-tile.t5 { grid-row: span 2; background: var(--tx-paper-3); }
.tx-mock--wall .m-tile.t6 { grid-row: span 3; }

/* ---------- Fordele (01/02/03) ---------- */
.tx-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.tx-feature { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: var(--tx-radius); padding: 1.4rem; }
.tx-feature__num { font-family: var(--tx-mono); font-size: .8rem; color: var(--tx-accent-deep); font-weight: 600; }
.tx-feature h3 { font-size: 1.08rem; margin: .6rem 0 .4rem; }
.tx-feature p { color: var(--tx-muted); font-size: .97rem; margin: 0; }
.tx-features--4 { grid-template-columns: repeat(2, 1fr); }

/* ---------- Priser ---------- */
.tx-pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: stretch; }
.tx-plan { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: var(--tx-radius-lg); padding: 1.6rem; display: flex; flex-direction: column; }
.tx-plan--hi { border: 2px solid var(--tx-ink); position: relative; }
.tx-plan--hi::before {
  content: "Best value"; position: absolute; top: -12px; left: 1.6rem; background: var(--tx-accent); color: #fff;
  font-family: var(--tx-mono); font-size: .72rem; font-weight: 600; padding: .2rem .55rem; border-radius: 5px; text-transform: uppercase; letter-spacing: .04em;
}
.tx-plan h3 { font-size: 1.1rem; margin: 0 0 .25rem; }
.tx-plan__sub { color: var(--tx-muted); font-size: .92rem; margin: 0 0 1rem; }
.tx-plan__price { font-size: 2.4rem; font-weight: 700; color: var(--tx-ink); letter-spacing: -.03em; line-height: 1; margin: .25rem 0 .35rem; }
.tx-plan__price small { font-size: .95rem; font-weight: 500; color: var(--tx-muted); letter-spacing: 0; }
.tx-plan__vat { font-family: var(--tx-mono); font-size: .75rem; color: var(--tx-muted); margin-bottom: 1.2rem; }
.tx-plan .btn { margin-top: auto; width: 100%; }

/* ---------- Spec-tabel ---------- */
.tx-specs { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: var(--tx-radius); overflow: hidden; }
.tx-specs th, .tx-specs td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--tx-line); vertical-align: top; }
.tx-specs th { width: 34%; font-weight: 600; color: var(--tx-ink); background: var(--tx-paper-2); }
.tx-specs tr:last-child th, .tx-specs tr:last-child td { border-bottom: 0; }
.tx-specs .is-yes { color: var(--tx-ok); font-weight: 600; }
.tx-specs .is-no { color: var(--tx-muted); }
.tx-specs thead th { background: var(--tx-ink); color: var(--tx-on-ink); font-family: var(--tx-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- FAQ (details/summary) ---------- */
.tx-faq { max-width: 46rem; }
.tx-faq details { border-bottom: 1px solid var(--tx-line); padding: 1rem 0; }
.tx-faq summary { cursor: pointer; font-weight: 600; color: var(--tx-ink); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.tx-faq summary::-webkit-details-marker { display: none; }
.tx-faq summary::after { content: "+"; font-family: var(--tx-mono); color: var(--tx-accent-deep); font-weight: 600; }
.tx-faq details[open] summary::after { content: "–"; }
.tx-faq details p { margin: .6rem 0 0; color: var(--tx-ink-2); }

/* ---------- CTA-boks ---------- */
.tx-cta {
  background: var(--tx-night); color: #c9cfd8; border: 1px solid var(--tx-night-line); border-radius: var(--tx-radius-lg); padding: clamp(2rem, 5vw, 3.25rem);
  display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center;
  background-image: radial-gradient(circle at 100% 0, rgba(255,90,31,.35), transparent 45%);
}
.tx-cta h2 { color: #fff; margin: 0 0 .5rem; }
.tx-cta p { margin: 0; }
.tx-cta .btn-secondary { --t4-btn-bg: transparent; --bs-btn-bg: transparent; --t4-btn-color: #fff; --bs-btn-color: #fff; --t4-btn-border-color: #4a515d; --bs-btn-border-color: #4a515d; }
.tx-cta .btn-secondary:hover { color: #0e1116 !important; background: var(--tx-surface) !important; }

/* ---------- Produktside-hero ---------- */
.tx-phero { padding: clamp(3rem, 7vw, 5rem) 0; border-bottom: 1px solid var(--tx-line); background: var(--tx-paper-2); }
.tx-phero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.tx-phero .tx-mock { height: 280px; background: var(--tx-surface); }
.tx-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.tx-meta span { font-family: var(--tx-mono); font-size: .75rem; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 5px; padding: .2rem .5rem; color: var(--tx-ink-2); }

/* ---------- Mobil ---------- */
@media (max-width: 991.98px) {
  .tx-hero__grid, .tx-phero__grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .tx-pricing { grid-template-columns: 1fr; }
  .tx-features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767.98px) {
  .tx-products, .tx-features, .tx-features--4 { grid-template-columns: 1fr; }
  .tx-cta { grid-template-columns: 1fr; }
  .tx-specs th { width: 42%; }
  .tx-term { font-size: .78rem; }
  .tx-actions .btn { flex: 1 1 auto; }
}

/* Knapper: faste farver, så de også ser rigtige ud uden T4's variabler */
body .btn-primary { background-color: var(--tx-accent); border: 1px solid var(--tx-accent); color: #fff; }
body .btn-primary:hover { background-color: var(--tx-accent-deep); border-color: var(--tx-accent-deep); color: #fff; }
body .btn-secondary { background-color: var(--tx-surface); border: 1px solid var(--tx-line-2); color: var(--tx-ink); }
body .btn-secondary:hover { background-color: var(--tx-paper-2); border-color: var(--tx-ink); color: var(--tx-ink); }
body .tx-actions .btn, body .tx-plan .btn { display: inline-block; text-decoration: none; text-align: center; }
.tx-full *, .tx-full *::before, .tx-full *::after { box-sizing: border-box; }

/* =========================================================
   Mørkt tema – følger systemet, kan låses med data-theme
   ========================================================= */
:root[data-theme="dark"] {
  --tx-ink: #f2f4f7; --tx-ink-2: #c3c9d3; --tx-muted: #8b94a3;
  --tx-paper: #0b0d11; --tx-paper-2: #111419; --tx-paper-3: #1b1f27;
  --tx-surface: #14181e; --tx-glass: rgba(11,13,17,.85);
  --tx-line: #232833; --tx-line-2: #343b48;
  --tx-accent: #ff6a32; --tx-accent-deep: #ff8452; --tx-accent-soft: #2a1710;
  --tx-on-ink: #0b0d11; --tx-night: #060709; --tx-night-line: #232833;
  --tx-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --bs-primary-rgb: 255, 106, 50;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tx-ink: #f2f4f7; --tx-ink-2: #c3c9d3; --tx-muted: #8b94a3;
    --tx-paper: #0b0d11; --tx-paper-2: #111419; --tx-paper-3: #1b1f27;
    --tx-surface: #14181e; --tx-glass: rgba(11,13,17,.85);
    --tx-line: #232833; --tx-line-2: #343b48;
    --tx-accent: #ff6a32; --tx-accent-deep: #ff8452; --tx-accent-soft: #2a1710;
    --tx-on-ink: #0b0d11; --tx-night: #060709; --tx-night-line: #232833;
    --tx-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --bs-primary-rgb: 255, 106, 50;
    color-scheme: dark;
  }
}
/* T4 sætter selv hvid baggrund på sektioner – følg temaet */
body, body .t4-wrapper, body .t4-content, body #t4-main-body, body .t4-section { background-color: var(--tx-paper); }
body .tx-mock--wall .m-tile.t1 { border-color: var(--tx-accent-soft); }
/* Logo: lys tekst i mørkt tema */
:root[data-theme="dark"] #t4-header .navbar-brand img { content: url("../images/logo-dark.svg"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #t4-header .navbar-brand img { content: url("../images/logo-dark.svg"); }
}

/* Temaknap (custom-modul i headeren) */
.tx-theme {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 8px; border: 1px solid var(--tx-line); background: var(--tx-surface); color: var(--tx-ink);
  cursor: pointer; padding: 0; margin-left: .5rem; transition: background .2s, border-color .2s;
}
.tx-theme:hover { background: var(--tx-paper-2); border-color: var(--tx-line-2); }
.tx-theme svg { width: 18px; height: 18px; }
.tx-theme .i-sun { display: none; }
:root[data-theme="dark"] .tx-theme .i-sun { display: block; }
:root[data-theme="dark"] .tx-theme .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tx-theme .i-sun { display: block; }
  :root:not([data-theme="light"]) .tx-theme .i-moon { display: none; }
}
