/* ==========================================================================
   polonium_theme.css
   One stylesheet for the Polonium-210 sites that share a look.
   Served from shared-resources/polonium_theme.css

   HOW TO USE IT
     * Link it:   <link rel="stylesheet" href="shared-resources/polonium_theme.css">
     * Pick the page's section with a class on <body>:
         <body class="theme-hub">     the apex site, polonium-210.space
         <body class="theme-panel">   the management panel
     * Everything outside the two section blocks is shared by both.

   WHAT'S IN HERE
     1. Shared base      font, reset, color tokens, the glowing accent text
     2. .theme-hub       styles for the apex site (every rule starts with .theme-hub)
     3. .theme-panel     styles for the management panel (every rule starts with .theme-panel)
     4. .theme-page      extra pieces for the apex info pages and the 404 pages (use together with .theme-hub)

   Because each section's rules are scoped to its body class, a rule written for
   one site can't change the other. To restyle both at once, change a token in
   the shared base. To add a new site, add a new "theme-NAME" section at the end.

   CACHING: nginx makes browsers re-check this file on every visit (see the
   shared-resources block in /etc/nginx/sites-available/default), so edits show
   up straight away. If Cloudflare still serves an old copy, purge its cache or
   add ?v=2 to the <link> address.
   ========================================================================== */

/* ---------- 1. Shared base ---------- */

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* palette shared by every site */
  --bg: #000000;
  --bg2: #0a090f;
  --bg3: #16141f;
  --text: #cfcfcf;
  --text-bright: #e8e4f4;
  --sky: #7dd3fc;            /* the site's blue highlight */
  --purple: #9b8fd4;

  --ok: #4cf56e;
  --info: #3b82f6;
  --warn: #eab308;
  --heavy: #f97316;
  --bad: #f43f5e;

  /* older names the apex site's rules still use */
  --background-text-color: var(--text);
  --link-purple: var(--purple);
  --email-color: #ff0000;
}

/* Where the two sites deliberately differ. Make them equal to unify the look. */
.theme-hub   { --muted: #5a5570; --border: rgba(255, 255, 255, 0.07); }
.theme-panel { --muted: #7d7896; --border: rgba(255, 255, 255, 0.09); --accent: var(--sky); }
/* Note: the apex site deliberately has NO global --accent. Its cards set --accent
   themselves (from index-data.json) and fall back to the normal text color. */

html:has(body.theme-panel) { color-scheme: dark; }
.theme-panel [hidden] { display: none !important; }

/* The glowing accent text used for site names */
.accent-glow {
  color: var(--sky);
  text-shadow: 0 0 18px #1e3a8a, 0 0 40px #1e3a8a88;
}

/* ---------- 2. Apex site: <body class="theme-hub"> ---------- */

.theme-hub .sub {
  color: var(--accent, inherit);
  text-shadow: 0 0 18px var(--glow, var(--accent, transparent)), 0 0 40px color-mix(in srgb, var(--glow, var(--accent, transparent)) 53%, transparent);
}

body.theme-hub {
  background: var(--bg);
  color: var(--background-text-color);
  font-family: 'IBM Plex Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

.theme-hub .header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.theme-hub .header-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.theme-hub header {
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.theme-hub .domain {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.theme-hub .tagline {
  font-size: 0.8rem;
  color: var(--background-text-color);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
}

.theme-hub main {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 2.5rem 6rem;
}

.theme-hub .hero {
  margin-bottom: 6rem;
}

.theme-hub .hero h1 {
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  color: #e8e4f4;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.theme-hub .hero h1 em {
  font-style: normal;
  font-size: 0.7em;
}

.theme-hub .hero p {
  color: var(--background-text-color);
  font-size: 1rem;
  max-width: 480px;
  line-height: 1.7;
  font-weight: 400;
}

.theme-hub .section-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--background-text-color);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.theme-hub .subdomains-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 3rem;
}

.theme-hub .subdomain-card {
  background: var(--bg2);
  padding: 1.2rem 1.6rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
  cursor: default;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}

.theme-hub .subdomain-card:last-child {
  border-bottom: none;
}

.theme-hub .subdomain-card:hover {
  background: #16141f;
}

.theme-hub .subdomain-url {
  font-size: 0.82rem;
  color: #e0dcea;
  display: flex;
  align-items: baseline;
  gap: 0;
  flex-shrink: 0;
  text-decoration: none;
}

.theme-hub .subdomain-url .base {
  color: var(--background-text-color);
}

.theme-hub .subdomain-desc {
  font-size: 0.82rem;
  color: var(--background-text-color);
  line-height: 1.5;
  text-align: right;
}

.theme-hub .footer {
  border-top: 1px solid var(--border);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.theme-hub .footer-domain {
  font-size: 0.75rem;
}

.theme-hub .footer-note {
  font-size: 0.75rem;
  color: var(--background-text-color);
}

.theme-hub .email-link {
  color: var(--email-color);
}

.theme-hub .footer-note .email-link {
  color: var(--link-purple);
  text-decoration: none;
  font-size: 0.72rem;
}

.theme-hub .footer-note .label {
  color: var(--background-text-color);
}

.theme-hub .footer-note .desc {
  color: var(--background-text-color);
  font-size: 0.68rem;
}

.theme-hub .community-search-wrap {
  position: relative;
}

.theme-hub .community-search {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  font-size: 0.78rem;
  color: var(--background-text-color);
  outline: none;
  transition: border-color 0.15s ease;
}

.theme-hub .community-search::placeholder {
  color: var(--muted);
}

.theme-hub .community-search:focus {
  border-color: rgba(255,255,255,0.15);
}

.theme-hub .community-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 0.75rem;
}

.theme-hub .subdomains-list.scrollable {
  max-height: 340px;
  overflow-y: auto;
  border-radius: 0 0 12px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.theme-hub .subdomains-list.scrollable::-webkit-scrollbar {
  width: 5px;
}

.theme-hub .subdomains-list.scrollable::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

.theme-hub .no-results {
  padding: 1.4rem 1.6rem;
  font-size: 0.8rem;
  color: var(--background-text-color);
  display: none;
}

@media (max-width: 600px) {
  .theme-hub header,
.theme-hub main,
.theme-hub .footer { padding-left: 1.25rem; padding-right: 1.25rem; }
  .theme-hub main { padding-top: 3rem; }
  .theme-hub .subdomain-card { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .theme-hub .subdomain-desc { text-align: left; }
}

/* ---------- 3. Management panel: <body class="theme-panel"> ---------- */

body.theme-panel {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

.theme-panel h1,
.theme-panel h2,
.theme-panel h3 { font-weight: 400; color: var(--text-bright); }
.theme-panel h2 { font-size: 1.3rem; margin-bottom: 1.2rem; }
.theme-panel h3 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.theme-panel a { color: var(--purple); }
.theme-panel .muted { color: var(--muted); }
.theme-panel .small { font-size: 0.78rem; }

/* ---- buttons and form controls ---- */
.theme-panel .btn {
  font: inherit;
  font-size: 0.82rem;
  color: var(--text-bright);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}
.theme-panel .btn:hover { border-color: rgba(255, 255, 255, 0.25); }
.theme-panel .btn:disabled { opacity: 0.5; cursor: default; }
.theme-panel .btn.primary { background: #1e3a8a; border-color: #2d4fb0; }
.theme-panel .btn.danger { border-color: rgba(244, 63, 94, 0.5); color: #fda4af; }
.theme-panel .btn:focus-visible,
.theme-panel select:focus-visible,
.theme-panel input:focus-visible,
.theme-panel a:focus-visible,
.theme-panel .log:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-panel input[type="text"],
.theme-panel input[type="password"],
.theme-panel select {
  font: inherit;
  font-size: 0.85rem;
  color: var(--text-bright);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
}

/* ---- login ---- */
.theme-panel .login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.theme-panel .login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.theme-panel .login-card h1 { font-size: 1.4rem; margin-bottom: 0.25rem; }
.theme-panel .login-card label { font-size: 0.75rem; color: var(--muted); margin-top: 0.7rem; }
.theme-panel .login-card button { margin-top: 1.1rem; padding: 0.55rem; }
.theme-panel .form-error { color: var(--bad); font-size: 0.8rem; margin-top: 0.6rem; }
.theme-panel .form-error.warn { color: var(--warn); }
.theme-panel .pw-field { position: relative; display: flex; }
.theme-panel .pw-field input { flex: 1; padding-right: 2.3rem; }
.theme-panel .pw-toggle {
  position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 0.72rem; padding: 0.25rem 0.5rem; letter-spacing: 0.02em;
}
.theme-panel .pw-toggle:hover { color: var(--text-bright); }
.theme-panel .login-card .check-row { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.7rem; font-size: 0.8rem; color: var(--muted); }
.theme-panel .login-card button.loading { opacity: 0.75; cursor: default; }

/* ---- app shell ---- */
.theme-panel .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  position: sticky;
  top: 0;
  z-index: 5;
}
.theme-panel .brand { font-size: 1.05rem; display: flex; align-items: center; gap: 0.6rem; }
.theme-panel .badge {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warn);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
}
.theme-panel .topbar-right { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; justify-content: flex-end; }
.theme-panel .user-label { color: var(--text-bright); }

.theme-panel .layout { display: flex; min-height: calc(100vh - 54px); }

.theme-panel .sidebar {
  width: 190px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
}
.theme-panel .sidebar a {
  color: var(--text);
  text-decoration: none;
  padding: 0.6rem 1.25rem;
  border-left: 3px solid transparent;
}
.theme-panel .sidebar a:hover { background: var(--bg2); }
.theme-panel .sidebar a.active {
  color: var(--text-bright);
  background: var(--bg3);
  border-left-color: var(--accent);
}

.theme-panel .content { flex: 1; padding: 1.5rem; min-width: 0; max-width: 1100px; }

.theme-panel .banner {
  border: 1px solid rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.08);
  color: #fda4af;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
}
.theme-panel .banner.good {
  border-color: rgba(76, 245, 110, 0.4);
  background: rgba(76, 245, 110, 0.07);
  color: #86efac;
}

/* ---- cards ---- */
.theme-panel .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.theme-panel .card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  min-width: 0;
}
.theme-panel .card.wide { grid-column: 1 / -1; }

.theme-panel .kv { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; font-size: 0.85rem; }
.theme-panel .kv dt { color: var(--muted); }
.theme-panel .kv dd { color: var(--text-bright); text-align: right; overflow-wrap: anywhere; }

.theme-panel .metric { font-size: 1.6rem; color: var(--text-bright); margin-bottom: 0.5rem; }
.theme-panel .bar { height: 7px; background: rgba(255, 255, 255, 0.07); border-radius: 4px; overflow: hidden; }
.theme-panel .bar-fill { height: 100%; width: 0; border-radius: 4px; background: var(--ok); transition: width 0.5s ease, background 0.5s ease; }

/* HTTPS certificate card on the Overview page */
.theme-panel #cert-note { margin: 0.9rem 0; }

.theme-panel .history-label { margin-top: 0.8rem; margin-bottom: 0.25rem; }
.theme-panel .history-bar { display: flex; align-items: stretch; gap: 1px; height: 22px; }
.theme-panel .history-bar .seg {
  flex: 1 1 0;
  min-width: 1px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.3s ease;
}
.theme-panel .history-bar .seg.empty { background: rgba(255, 255, 255, 0.04); }

.theme-panel .disk-row { margin-bottom: 0.9rem; }
.theme-panel .disk-row:last-child { margin-bottom: 0; }
.theme-panel .disk-head { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.82rem; margin-bottom: 0.3rem; }
.theme-panel .disk-head span:first-child { overflow-wrap: anywhere; }

/* ---- tables and logs ---- */
.theme-panel .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.theme-panel .inline { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--muted); }
.theme-panel .inline.check { color: var(--text); }

.theme-panel .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 1rem; }
.theme-panel .table { width: 100%; border-collapse: collapse; font-size: 0.82rem; min-width: 640px; }
.theme-panel .table th,
.theme-panel .table td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.theme-panel .table th { color: var(--muted); font-weight: 400; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; background: var(--bg2); }
.theme-panel .table tr:last-child td { border-bottom: none; }
.theme-panel .table .unit { color: var(--text-bright); }
.theme-panel .table .desc { color: var(--muted); font-size: 0.75rem; }
.theme-panel .actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.theme-panel .table th.sortable { cursor: pointer; user-select: none; }
.theme-panel .table th.sortable:hover { color: var(--text-bright); }
.theme-panel .table th.sortable .arrow { display: inline-block; margin-left: 0.3rem; opacity: 0.5; }
.theme-panel .table th.sortable .arrow::after { content: '▲▼'; font-size: 0.6em; }
.theme-panel .table th.sort-asc .arrow::after { content: '▲'; opacity: 1; }
.theme-panel .table th.sort-desc .arrow::after { content: '▼'; opacity: 1; }
.theme-panel .table th.sort-asc .arrow, .theme-panel .table th.sort-desc .arrow { opacity: 1; }

.theme-panel .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.45rem; background: var(--muted); }
.theme-panel .dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.theme-panel .dot.bad { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.theme-panel .dot.warn { background: var(--warn); }
.theme-panel .dot.info { background: var(--info); box-shadow: 0 0 8px var(--info); }

.theme-panel .log {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font: inherit;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 60vh;
  overflow-y: auto;
  margin-bottom: 1rem;
}
.theme-panel .log-wrap { position: relative; }
.theme-panel .log-wrap .log { margin-bottom: 0; }
.theme-panel .log-jump {
  position: absolute; right: 1rem; bottom: 0.9rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.theme-panel .log-toolbar { margin-top: 0.7rem; margin-bottom: 1rem; }

.theme-panel .noscript { padding: 2rem; color: var(--bad); }

/* ---- small screens ---- */
@media (max-width: 760px) {
  .theme-panel .layout { flex-direction: column; }
  .theme-panel .sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0;
  }
  .theme-panel .sidebar a { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .theme-panel .sidebar a.active { border-bottom-color: var(--accent); }
  .theme-panel .content { padding: 1rem; }
  .theme-panel .grid { grid-template-columns: 1fr; }
  .theme-panel .topbar { padding: 0.7rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-panel .bar-fill { transition: none; }
}

/* ---- Files and Terminal ---- */
.theme-panel .files-card { position: relative; }
.theme-panel .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-bottom: 0.9rem; font-size: 0.85rem; }
.theme-panel .crumbs .sep { color: var(--muted); }
.theme-panel .num { text-align: right !important; white-space: nowrap; }
.theme-panel .files-table .table { min-width: 560px; }
.theme-panel .fname a { color: var(--text-bright); text-decoration: none; overflow-wrap: anywhere; }
.theme-panel .fname a:hover { text-decoration: underline; }
.theme-panel a.btn { text-decoration: none; display: inline-block; }
.theme-panel .uploads { list-style: none; margin-bottom: 1rem; }
.theme-panel .uploads li { margin-bottom: 0.7rem; }
.theme-panel .uploads li.failed .disk-head span:last-child { color: var(--bad); }
.theme-panel .uploads li.done .bar-fill { background: var(--ok); }
.theme-panel .drop-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 9, 15, 0.88);
  border: 2px dashed var(--accent);
  border-radius: 12px;
  color: var(--accent);
  font-size: 1.1rem;
  pointer-events: none;
}
.theme-panel .term-frame {
  width: 100%;
  height: calc(100vh - 210px);
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0b0d12;
}
.theme-panel code { color: var(--text-bright); }
.theme-panel .term-status { display: inline-flex; align-items: center; font-size: 0.8rem; color: var(--muted); }
.theme-panel .term-status .dot { margin-right: 0.4rem; }

/* ---- Files search/sort ---- */
.theme-panel #files-search { flex: 1 1 14rem; max-width: 22rem; }
.theme-panel .files-card .toolbar { margin-bottom: 0.9rem; }

/* ---- Overview: failed services as links, pause toggle ---- */
.theme-panel #ov-failed a { color: var(--text); text-decoration: none; display: block; }
.theme-panel #ov-failed a:hover { color: var(--text-bright); text-decoration: underline; }
.theme-panel .card h3 { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }

/* ---- Packages ---- */
.theme-panel .pkg-card { margin-bottom: 1rem; }
.theme-panel .pkg-card h3 { font-size: 0.95rem; font-weight: 400; color: var(--text-bright); margin-bottom: 0.6rem; }
.theme-panel .pkg-card .toolbar { margin-bottom: 0.6rem; }
.theme-panel #pkg-name { flex: 1 1 14rem; max-width: 22rem; }
.theme-panel #pkg-search { flex: 1 1 14rem; max-width: 24rem; }
.theme-panel .pkg-table .table { min-width: 680px; }
.theme-panel .pkg-table .desc { max-width: 28rem; }
.theme-panel .pkg-card .log { max-height: 22rem; }
.theme-panel .pkg-new { color: var(--ok); }

/* ---------- 4. Info and error pages: <body class="theme-hub theme-page"> ----------
   Used by the apex about / setup / important pages and the pages on the 404
   subdomain. They share the apex look (section 2) and add the pieces below.
   Add "theme-info" to the body of a page that has the tabbed layout (about,
   setup, important): it tightens the space under the heading. */

.theme-page .hero { margin-bottom: 4rem; }
.theme-page .hero p { max-width: 520px; }
.theme-info .hero { margin-bottom: 2.5rem; }

.theme-page .hero .status-code {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #f43f5e;
  border: 1px solid rgba(244,63,94,0.25);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.theme-page .hero .status-code.soon {
  color:#eab308;
  border-color:rgba(234,179,8,0.3);
}

.theme-page .reason-label {
  font-size: 0.85rem;
  color: #e0dcea;
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.theme-page .reason-label .dot {
  color: var(--accent, var(--muted));
  text-shadow: 0 0 10px var(--glow, transparent);
}

.theme-page .back-link {
  color: var(--link-purple);
  text-decoration: none;
  font-size: 0.88em;
}

.theme-page .page-nav {
  display:flex;
  gap:1.25rem;
  align-items:center;
  flex-wrap:wrap;
}

.theme-page .page-nav a {
  color: var(--link-purple);
  text-decoration:none;
  font-size:0.8rem;
  letter-spacing:0.08em;
  text-transform:uppercase;
}

.theme-page .page-nav a:hover,
.theme-page .page-nav a[aria-current="page"] {
  color:#e8e4f4;
}

.theme-page .tabs {
  display:flex;
  flex-wrap:wrap;
  gap:0.25rem;
  border-bottom:1px solid var(--border);
  margin-bottom:2rem;
}

.theme-page .tab {
  font: inherit;
  font-size:0.85rem;
  letter-spacing:0.04em;
  color:var(--background-text-color);
  background:none;
  border:1px solid transparent;
  border-bottom:none;
  border-radius:8px 8px 0 0;
  padding:0.7rem 1.2rem;
  cursor:pointer;
  margin-bottom:-1px;
}

.theme-page .tab:hover {
  background:var(--bg2);
  color:#e8e4f4;
}

.theme-page .tab[aria-selected="true"] {
  background:var(--bg2);
  color:#7dd3fc;
  border-color:var(--border);
  border-bottom:1px solid var(--bg2);
  text-shadow:0 0 14px #1e3a8a;
}

.theme-page .tab:focus-visible {
  outline:2px solid var(--link-purple);
  outline-offset:2px;
}

.theme-page .panel-box {
  background:var(--bg2);
  border:1px solid var(--border);
  border-radius:12px;
  padding:1.6rem 1.8rem;
  margin-bottom:1.5rem;
}

.theme-page .panel-box h2 {
  font-weight:400;
  font-size:1.25rem;
  color:#e8e4f4;
  margin-bottom:0.9rem;
  letter-spacing:-0.02em;
}

.theme-page .panel-box h3 {
  font-weight:400;
  font-size:0.78rem;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color:var(--muted);
  margin:1.4rem 0 0.5rem;
}

.theme-page .panel-box p,
.theme-page .panel-box li {
  font-size:0.9rem;
  line-height:1.7;
  color:var(--background-text-color);
}

.theme-page .panel-box ul {
  padding-left:1.2rem;
}

.theme-page .panel-box ol {
  padding-left:1.4rem;
}

.theme-page .placeholder-note {
  color:var(--muted);
  font-style:italic;
}

.theme-page .js .tab-panel[hidden] {
  display:none;
}

.theme-page .panel-box .status-code {
  font-size:0.7rem;
  letter-spacing:0.15em;
  text-transform:uppercase;
  border:1px solid;
  border-radius:4px;
  padding:0.15rem 0.5rem;
  display:inline-block;
  margin-bottom:1rem;
}

.theme-page .panel-box .status-code.soon {
  color:#eab308;
  border-color:rgba(234,179,8,0.3);
}

.theme-page main.tabbed {
  padding-top: 2.5rem;
}

/* the "reveal" fade-in on the joke page on the 404 subdomain */
.theme-page .reveal { animation: reveal 0.6s ease 1.6s both; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .theme-page .reveal { animation: none; } }
