/* TechCommune shared stylesheet ("modern" edition): linked by every page.
   Edit the colour tokens below to re-theme the whole site.
   Page-specific styles stay in a small <style> block in that page. */

/* ---- Design tokens ---- */
:root {
    --bg: #0b0f17;
    --bg-glow-1: rgba(99, 102, 241, 0.16);
    --bg-glow-2: rgba(20, 184, 166, 0.12);
    --surface: #131a26;
    --surface-2: #1a2333;
    --border: #253147;
    --text: #e6ebf3;
    --text-muted: #93a1b8;
    --heading: #ffffff;
    --accent: #7c8cff;
    --accent-2: #2dd4bf;
    --accent-soft: rgba(124, 140, 255, 0.14);
    --warn: #f5b942;
    --warn-soft: rgba(245, 185, 66, 0.10);
    --code-bg: #0a0e15;
    --code-text: #d7e0ee;
    --code-border: #22304a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.28);
    --radius: 14px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
    color-scheme: dark;
}
@media (prefers-color-scheme: light) {
    :root {
        --bg: #f5f7fb;
        --bg-glow-1: rgba(99, 102, 241, 0.10);
        --bg-glow-2: rgba(20, 184, 166, 0.08);
        --surface: #ffffff;
        --surface-2: #f0f3f9;
        --border: #dde3ee;
        --text: #1e2735;
        --text-muted: #5d6b82;
        --heading: #0d1522;
        --accent: #4f5bd5;
        --accent-2: #0d9488;
        --accent-soft: rgba(79, 91, 213, 0.09);
        --warn: #b7791f;
        --warn-soft: rgba(245, 185, 66, 0.14);
        --code-bg: #0f172a;
        --code-text: #dbe4f3;
        --code-border: #0f172a;
        --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 12px 32px rgba(16, 24, 40, 0.07);
        color-scheme: light;
    }
}

/* ---- Base and layout ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    background-color: var(--bg);
    background-image:
        radial-gradient(900px 500px at 8% -5%, var(--bg-glow-1), transparent 60%),
        radial-gradient(800px 480px at 100% 0%, var(--bg-glow-2), transparent 60%);
    background-repeat: no-repeat;
    color: var(--text);
    font-family: var(--font);
    font-size: 16.5px;
    margin: 0;
    padding: 24px 20px 48px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: none;
}
h1 {
    color: var(--heading);
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0.4em 0 0.35em;
    padding: 0;
    border: none;
}
h2 {
    color: var(--heading);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 2.2em 0 0.7em;
    padding: 0;
    border: none;
}
h3 {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 1.4em 0 0.6em;
    padding: 0;
    border: none;
}
p { margin: 0.9em 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-2); }
ul, ol { padding-left: 1.4em; }
li { margin: 0.4em 0; }
li::marker { color: var(--accent); }
strong { color: var(--heading); }
hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 2.5em 0 1.5em;
}
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Tabs (sticky navigation bar) and terminal header ---- */
.tabs {
    position: sticky;
    top: 10px;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 6px;
    margin: 0 0 22px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow);
    justify-content: center;
}
.tab {
    white-space: nowrap;
    padding: 8px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 999px;
    transition: background-color 0.15s, color 0.15s;
}
.tab:hover {
    background-color: var(--accent-soft);
    color: var(--heading);
}
.tab.active {
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-2)));
    color: #fff;
}
.terminal-header {
    background-color: var(--code-bg);
    color: var(--code-text);
    border: 1px solid var(--code-border);
    border-radius: 10px;
    padding: 34px 16px 12px;
    margin: 0 0 18px;
    font-family: var(--mono);
    font-size: 0.85rem;
    line-height: 1.5;
    position: relative;
    overflow-wrap: anywhere;
}
.terminal-header::before {                       /* three window dots */
    content: "";
    position: absolute;
    top: 13px;
    left: 16px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff5f57;
    box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840;
}
.terminal-header .prompt {
    display: inline;
    color: var(--accent-2);
}
.cursor {
    display: inline-block;
    width: 8px;
    height: 1.05em;
    vertical-align: text-bottom;
    background-color: var(--accent-2);
    margin-left: 2px;
    border-radius: 1px;
    animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

.tabs-break { flex-basis: 100%; height: 0; }               /* forces a tidy second row on wide screens */
@media (max-width: 900px) { .tabs-break { display: none; } }   /* narrower screens just wrap naturally */

/* ---- Content boxes ---- */
.warning {
    background-color: var(--warn-soft);
    border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
    border-left: 4px solid var(--warn);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 22px 0;
}
.joke {
    background: linear-gradient(135deg, var(--accent-soft), transparent 80%), var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 22px 0;
    text-align: center;
    font-style: italic;
    color: var(--text);
    box-shadow: var(--shadow);
}
.command {
    font-family: var(--mono);
    font-size: 0.88em;
    font-weight: 500;
    font-style: normal;
    color: var(--accent-2);
    background-color: var(--surface-2);
    padding: 0.12em 0.45em;
    border: 1px solid var(--border);
    border-radius: 6px;
}
.tip {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin: 18px 0;
    box-shadow: var(--shadow);
}
.tip-title {
    color: var(--heading);
    font-weight: 700;
    margin-bottom: 5px;
}
pre {
    background-color: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 10px;
    padding: 18px 20px;
    overflow-x: auto;
    margin: 12px 0;
    color: var(--code-text);
    font-family: var(--mono);
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
pre .command {                                   /* command highlights inside code blocks */
    background: transparent;
    border: none;
    padding: 0;
    color: #5eead4;
    font-size: inherit;
}
.tip:has(> pre:only-child) { background: none; border: none; box-shadow: none; padding: 0; }
.tip pre { margin: 0; }
.tip > .tip-title + pre { margin-top: 6px; }
code {
    font-family: var(--mono);
    font-size: 0.88em;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.1em 0.4em;
}
.site-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}
.quip {
    display: inline-block;
    margin-top: 4px;
    color: var(--accent);
    font-style: italic;
}

/* ---- Documentation button list (cards) ---- */
.docs-section {
    margin: 22px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.docs-section > p,
.docs-section > .docs-note {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.doc-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    padding: 14px 16px;
    margin: 0;
    overflow-wrap: anywhere;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--heading);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.35;
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.doc-link::after {
    content: "\2192";
    flex-shrink: 0;
    color: var(--accent);
    transition: transform 0.15s;
}
.doc-link:hover {
    color: var(--heading);
    background-color: var(--surface-2);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.doc-link:hover::after { transform: translateX(3px); }

/* ---- Wide screens (900 px and up) ---- */
@media (min-width: 900px) {
    .container { max-width: 1160px; }
    .docs-section { grid-template-columns: repeat(3, 1fr); }
    /* keep running text at a comfortable reading width; code and cheat sheet boxes use the full width */
    .container > p:not(.center),
    .container > ul,
    .container > ol,
    .container > .warning { max-width: 78ch; }
    .joke { max-width: 78ch; margin-left: auto; margin-right: auto; }
}

/* ---- Phones and small screens ---- */
@media (max-width: 600px) {
    body { padding: 10px 10px 36px; font-size: 16px; }
    .tabs {
        position: static;                        /* wrapped nav is tall, so don't pin it on phones */
        gap: 3px;
        padding: 5px;
        border-radius: 18px;
    }
    .tab { padding: 7px 11px; font-size: 0.82rem; }
    h2 { font-size: 1.25rem; }
    .terminal-header { padding: 32px 12px 10px; font-size: 0.8rem; }
    .tip { padding: 6px; border-radius: 12px; }
    pre { padding: 12px; font-size: 0.78rem; }
    .warning { padding: 12px 14px; }
    .joke { padding: 16px; }
    .docs-section { gap: 8px; }
    .doc-link { padding: 12px; font-size: 0.9rem; }
}
@media (max-width: 340px) {
    .docs-section { grid-template-columns: 1fr; }
}

/* ---- Tools page: interactive calculators (tools.html) ---- */
.tool {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin: 26px 0;
    box-shadow: var(--shadow);
    scroll-margin-top: 120px;                        /* keep the heading clear of the sticky tab bar */
}
.tool > h2 { margin-top: 0; }
.tool .lead { color: var(--text-muted); margin-top: 0.2em; }
.tool label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin: 14px 0 6px; }
.tool input[type="text"],
.tool input[type="number"],
.tool input[type="email"],
.tool input[type="time"],
.tool input[type="datetime-local"],
.tool textarea,
.tool select {
    width: 100%;
    background: var(--code-bg);
    color: var(--code-text);
    border: 1px solid var(--code-border);
    border-radius: 10px;
    padding: 11px 13px;
    font-family: var(--mono);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.tool input:focus, .tool select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tool input.bad { border-color: var(--bad, #f87171); }
.tool button, .tool .chip {
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--heading);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 14px;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}
.tool button:hover, .tool .chip:hover { border-color: var(--accent); }
.tool button.primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-2))); color: #fff; border-color: transparent; }
.tool .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.tool .row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); align-items: end; }
.tool .row > div > label:first-child { margin-top: 14px; }
.tool .msg { min-height: 1.4em; margin: 10px 0 0; font-size: 0.9rem; color: var(--text-muted); }
.tool .msg.err { color: #f87171; font-weight: 600; }
:root[data-theme="light"] .tool .msg.err { color: #dc2626; }
@media (prefers-color-scheme: light) { .tool .msg.err { color: #dc2626; } }
.results { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 14px 0 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.results dt, .results dd { margin: 0; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.results dt { color: var(--text-muted); font-size: 0.85rem; background: var(--surface-2); }
.results dd { font-family: var(--mono); font-size: 0.9rem; overflow-wrap: anywhere; }
.results dt:last-of-type, .results dd:last-of-type { border-bottom: none; }
.bits { font-family: var(--mono); font-size: 0.85rem; line-height: 1.7; overflow-x: auto; white-space: pre; padding: 12px 14px; background: var(--code-bg); color: var(--code-text); border-radius: 10px; margin: 14px 0 0; }
.bits .net { color: #5eead4; }
.bits .host { color: #fbbf24; }
.tool .listbox { max-height: 320px; overflow: auto; margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; }
.tool table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.tool th { text-align: left; color: var(--text-muted); font-weight: 600; padding: 7px 12px; background: var(--surface-2); position: sticky; top: 0; }
.tool td { padding: 6px 12px; border-top: 1px solid var(--border); font-family: var(--mono); overflow-wrap: anywhere; }
.tool #cr-next .listbox { max-height: none; }
.big { font-family: var(--mono); font-size: clamp(1.5rem, 5vw, 2.4rem); font-weight: 700; letter-spacing: -0.02em; margin: 14px 0 6px; word-break: break-all; color: var(--heading); }
.expr { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; color: var(--accent-2); background: var(--code-bg); border: 1px solid var(--code-border); border-radius: 10px; padding: 12px 16px; margin: 14px 0 6px; overflow-x: auto; white-space: nowrap; }
.explain { font-size: 1.05rem; color: var(--heading); margin: 6px 0 4px; font-weight: 600; }
.perm-grid { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 8px 14px; align-items: center; margin: 14px 0 6px; max-width: 460px; }
.perm-grid .h { color: var(--text-muted); font-size: 0.8rem; font-weight: 600; text-align: center; }
.perm-grid .who { font-weight: 600; }
.perm-grid label.cb, .special label.cb { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: 0.85rem; cursor: pointer; }
.special { display: flex; flex-wrap: wrap; gap: 16px; margin: 6px 0 10px; }
.special label.cb { justify-content: flex-start; }
.tool input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.tool ul.small { color: var(--text-muted); font-size: 0.9rem; margin-top: 18px; }
@media (max-width: 600px) {
    .tool { padding: 16px 14px; }
    .results { grid-template-columns: 1fr; }
    .results dt { padding-bottom: 2px; border-bottom: none; }
    .results dd { padding-top: 2px; }
    .perm-grid { gap: 8px 6px; }
}

[hidden] { display: none !important; }

.tool textarea { min-height: 130px; resize: vertical; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.tool input[type="file"] { font-family: var(--font); font-size: 0.85rem; color: var(--text-muted); max-width: 100%; }
.tool .chip[aria-pressed="true"] { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-2))); color: #fff; border-color: transparent; }
.tool .optrow { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 12px 0 4px; }
.tool .optrow label.cb { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.88rem; cursor: pointer; }
.livetime { font-family: var(--mono); font-size: 0.95rem; color: var(--accent-2); margin: 4px 0 0; }

/* port reference table */
#pt-out .listbox { max-height: 560px; }
#pt-out td { font-family: var(--font); font-size: 0.86rem; vertical-align: top; }
#pt-out td.pn { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
#pt-out td.pn button { font-family: var(--mono); font-weight: 700; font-size: 0.86rem; padding: 2px 10px; }
#pt-out td.pt { font-family: var(--mono); white-space: nowrap; color: var(--text-muted); }
#pt-out td.sv { font-weight: 600; color: var(--heading); min-width: 150px; }
#pt-out .sub { display: block; font-family: var(--mono); font-weight: 400; font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 1px 9px; margin: 0 6px 4px 0; border: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.badge.enc { color: #4ade80; border-color: color-mix(in srgb, #4ade80 40%, transparent); }
.badge.plain { color: #fbbf24; border-color: color-mix(in srgb, #fbbf24 40%, transparent); }
.badge.internal { color: #fb923c; border-color: color-mix(in srgb, #fb923c 40%, transparent); }
.badge.avoid { color: #f87171; border-color: color-mix(in srgb, #f87171 45%, transparent); }
@media (prefers-color-scheme: light) {
    .badge.enc { color: #15803d; } .badge.plain { color: #a16207; } .badge.internal { color: #c2410c; } .badge.avoid { color: #b91c1c; }
}
.legend { font-size: 0.82rem; color: var(--text-muted); margin: 6px 0 0; }
/* port reference: on phones each row becomes a stacked card instead of a cramped table */
@media (max-width: 700px) {
    #pt-out .listbox { max-height: 640px; }
    #pt-out table, #pt-out tbody { display: block; }
    #pt-out tr:first-child { display: none; }                  /* the header row */
    #pt-out tr { display: block; padding: 12px 12px 8px; border-top: 1px solid var(--border); }
    #pt-out tr:nth-child(2) { border-top: none; }
    #pt-out td { display: block; border: none; padding: 2px 0; }
    #pt-out td.pn, #pt-out td.pt { display: inline-block; margin-right: 10px; }
    #pt-out td.sv { min-width: 0; font-size: 1rem; }
    #pt-out td:nth-child(4) { margin-top: 2px; }
    #pt-out td:nth-child(5) { margin-top: 6px; color: var(--text-muted); }
}

/* cheat sheets */
#cheats td.t { font-family: var(--font); font-size: 0.86rem; }
#cheats td.m { font-weight: 700; white-space: nowrap; }
#cheats td button { font-family: var(--mono); font-weight: 700; font-size: 0.85rem; padding: 2px 10px; }
#cheats .listbox.tall { max-height: 440px; }
#cheats .panel > h3:first-child { margin-top: 0.6em; }
#cheats .hosts-out { font-weight: 600; color: var(--heading); margin: 8px 0 0; }
@media print {
    :root { --bg: #fff; --surface: #fff; --surface-2: #f0f0f0; --border: #999; --text: #000; --text-muted: #333; --heading: #000; --accent: #000; --accent-2: #000; --code-bg: #fff; --code-text: #000; --code-border: #999; --shadow: none; color-scheme: light; }
    body { background: #fff !important; padding: 0 !important; font-size: 10pt; }
    .container > *:not(#cheats) { display: none !important; }
    #cheats { border: 0; box-shadow: none; padding: 0; margin: 0; }
    #cheats .no-print { display: none !important; }
    #cheats .panel[hidden] { display: block !important; }
    #cheats .panel + .panel { break-before: page; }
    #cheats .listbox, #cheats .listbox.tall { max-height: none !important; overflow: visible !important; border: 1px solid #999; }
    #cheats th { position: static; background: #eee; }
    #cheats tr { break-inside: avoid; }
    #cheats h2 { font-size: 16pt; margin-top: 0; }
    #cheats .command, #cheats .expr { background: #fff !important; color: #000 !important; border: 1px solid #bbb; }
    #cheats a { color: #000; }
}
/* cheat sheets: never break a number or a mode string in the middle; only description text may wrap */
#cheats td, #cheats th { overflow-wrap: break-word; }
#cheats td:not(.t), #cheats th { white-space: nowrap; }
/* cheat sheets: short tables show in full; only the two very long ones scroll. On phones the description columns keep a readable width and the table scrolls sideways. */
#cheats .listbox { max-height: none; overflow-x: auto; }
#cheats .listbox.tall { max-height: 440px; overflow: auto; }
@media (max-width: 700px) { #cheats td.t { min-width: 210px; } }

/* Contact form */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tool button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Automated threat feed (feed-ui.js) */
.tf-banner { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 0.88rem; color: var(--text-muted); margin: 8px 0 14px; }
.tf-banner strong { color: var(--text); }
.tf-warn-line { color: var(--warn); font-weight: 600; margin-top: 6px; }
.tf-list { display: grid; gap: 12px; }
.tf-card, .tf-sec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); }
.tf-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tf-cve { font-family: var(--mono); font-weight: 700; }
.tf-score { color: var(--text-muted); font-size: 0.85rem; }
.tf-title { margin: 6px 0 4px; overflow-wrap: anywhere; }
.tf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.tf-chip { display: inline-block; font-size: 0.78rem; line-height: 1.3; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--text); overflow-wrap: anywhere; }
.tf-ok { background: rgba(34, 197, 94, 0.16); border-color: rgba(34, 197, 94, 0.45); }
.tf-warn { background: rgba(245, 185, 66, 0.18); border-color: rgba(245, 185, 66, 0.5); }
.tf-bad { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.5); }
.tf-na { background: var(--surface-2); color: var(--text-muted); }
.tf-guide { font-size: 0.88rem; margin-top: 4px; }
.tf-more { margin-top: 12px; font: inherit; font-size: 0.9rem; padding: 8px 14px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.tf-more:hover { border-color: var(--accent); }
.tf-changes h3 { margin-bottom: 6px; }
.tf-changes ul, .tf-changeslist, .tf-fixlist { padding-left: 1.2em; font-size: 0.88rem; }
.tf-when { color: var(--text-muted); font-family: var(--mono); }
.tf-quiet { color: var(--text-muted); font-size: 0.85rem; margin: 8px 0; }
.tf-livecard { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 16px 14px; margin: 0 0 22px; }
.tf-livecard > h2 { margin-top: 8px; }
.tf-sec { margin: 12px 0; box-shadow: none; }
.tf-sub { font-weight: 600; margin: 10px 0 4px; }
.tf-scroll { overflow-x: auto; margin: 8px 0; }
.tf-table { border-collapse: collapse; font-size: 0.82rem; width: 100%; }
.tf-table th, .tf-table td { text-align: left; padding: 5px 8px; border-top: 1px solid var(--border); vertical-align: top; }
.tf-table thead th { color: var(--text-muted); border-top: 0; }
.tf-table tbody th { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.tf-rh details { margin-top: 6px; font-size: 0.88rem; }
@media print { .tf-more { display: none; } }

/* Small helpers (used instead of inline style attributes, so the Content-Security-Policy can forbid inline styles) */
.center { text-align: center; }
.listbox.gap-top { margin-top: 12px; }
.wrap { white-space: pre-wrap; }

/* Logo at the left of the tab bar: the smirk mark and wordmark, in a dark and a light version (the site's theme follows the browser setting).
   Only pages whose tab bar has the "tabs-logo" class reserve room for it. */
.tabs.tabs-logo { padding-left: 270px; }
.tab-logo { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); display: block; line-height: 0; border-radius: 10px; }
.tab-logo img { display: block; height: 49px; width: auto; }
.tab-logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1200px) {
    .tabs.tabs-logo { padding-left: 6px; }
    .tab-logo { position: static; transform: none; flex-basis: 100%; text-align: center; margin: 4px 0 2px; }
    .tab-logo img { display: inline-block; height: 40px; }
}
