/* ==========================================================================
   CASTRO THREAT REPORTER — styles.css
   Newspaper re-skin of jonathan-castro.com/tech-news (same skeleton, new skin).
   Two pages share this file:
     .ctr-landing  index.html    background: assets/homepage.png
     .ctr-wire     threats.html  background: assets/pages.png
   Tuning knobs live in :root (--bg-dim, --bg-blur, --card-alpha). No mobile
   breakpoints except the two small ones at the bottom (grid + toast width).
   ========================================================================== */

:root {
    /* Ink & paper */
    --ink:        #14100c;
    --ink-2:      #221a13;
    --paper:      #efe4cf;     /* aged cream — main text */
    --paper-dim:  #c9b89c;
    --paper-faint:#8f826c;
    --sepia:      #8a6a3a;
    --gold:       #c8962e;     /* active accent (the old "ember") */
    --gold-bright:#e0ad45;
    --gold-glow:  rgba(200, 150, 46, 0.45);
    --gold-soft:  rgba(200, 150, 46, 0.14);
    --red:        #b4231e;     /* newspaper red — critical */
    --red-bright: #d8342d;
    --orange:     #d97a1f;     /* high */
    --amber:      #c8962e;     /* medium */
    --slate:      #7d8a8f;     /* low / info */
    --live:       #4caf74;

    --border:       rgba(239, 228, 207, 0.10);
    --border-strong:rgba(239, 228, 207, 0.22);
    --border-gold:  rgba(200, 150, 46, 0.35);

    /* Background photo treatment — TUNE THESE */
    --bg-dim:   0.72;   /* 0 = raw photo, 1 = black */
    --bg-blur:  3px;
    --card-alpha: 0.78; /* card background opacity */

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --fast: 160ms var(--ease);
    --med:  260ms var(--ease);

    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body:    'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, Consolas, monospace;

    --active: var(--gold);
}

/* ==========================================================================
   1. PAGE ROOT + BACKGROUND PHOTO
   ========================================================================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ctr-page {
    margin: 0;
    min-height: 100vh;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
}
body.ctr-page::before {                 /* the photo */
    content: '';
    position: fixed; inset: -20px;      /* bleed hides blur edge */
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(var(--bg-blur)) sepia(0.35) contrast(1.05);
    transform: scale(1.02);
}
body.ctr-landing::before { background-image: url('/assets/homepage.png'); }
body.ctr-wire::before    { background-image: url('/assets/pages.png'); }
body.ctr-page::after {                  /* the dark wash + vignette */
    content: '';
    position: fixed; inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(20, 16, 12, 0.55) 100%),
        rgba(20, 16, 12, var(--bg-dim));
}

body.ctr-page ::selection { background: var(--gold); color: var(--ink); }
body.ctr-page ::-webkit-scrollbar { width: 10px; height: 10px; }
body.ctr-page ::-webkit-scrollbar-track { background: var(--ink); }
body.ctr-page ::-webkit-scrollbar-thumb { background: rgba(200, 150, 46, 0.30); border-radius: 4px; border: 2px solid var(--ink); }

/* Per-category accent — set by JS on <body data-ctr-active-cat> */
body.ctr-wire[data-ctr-active-cat="exploited"]  { --active: var(--red-bright); }
body.ctr-wire[data-ctr-active-cat="cve"]        { --active: var(--orange); }
body.ctr-wire[data-ctr-active-cat="advisories"] { --active: var(--gold-bright); }
body.ctr-wire[data-ctr-active-cat="news"]       { --active: #d6c39a; }
body.ctr-wire[data-ctr-active-cat="breaches"]   { --active: #c47a9a; }
body.ctr-wire[data-ctr-active-cat="community"]  { --active: var(--slate); }

/* ==========================================================================
   2. LANDING PAGE (index.html)
   ========================================================================== */
.ld-main {
    max-width: 880px;
    margin: 0 auto;
    padding: 8vh 1.5rem 3rem;
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    animation: ctr-rise 700ms var(--ease) both;
}
.ld-masthead { width: 100%; }
.ld-dateline {
    display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0.6rem;
    margin: 0 0 1.2rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-strong);
    border-bottom: 1px solid var(--border-strong);
    font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.04em;
    color: var(--paper-dim);
}
.ld-dateline__sep { color: var(--paper-faint); }
.ld-live { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--live); }
.ld-live__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; animation: ctr-pulse 2s ease-in-out infinite; }
.ld-live.is-down { color: var(--red-bright); }
.ld-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.6rem, 8vw, 5.4rem);
    line-height: 0.98;
    letter-spacing: -0.01em;
    margin: 0.2rem 0 0.9rem;
    color: var(--paper);
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 12px 40px rgba(0, 0, 0, 0.6);
}
.ld-lede {
    font-family: var(--font-display); font-style: italic; font-weight: 500;
    font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.55;
    color: var(--paper-dim);
    max-width: 62ch; margin: 0 auto 2.2rem;
    padding-bottom: 1.6rem;
    border-bottom: 3px double var(--border-strong);
}
.ld-lede span { color: var(--paper); font-style: normal; font-weight: 700; }

.ld-index {
    width: 100%; max-width: 620px;
    text-align: left;
    background: rgba(20, 16, 12, var(--card-alpha));
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    padding: 1.1rem 1.4rem 0.6rem;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ld-index__head {
    display: flex; justify-content: space-between;
    font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
    padding-bottom: 0.55rem; margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-strong);
}
.ld-index__head span:last-child { color: var(--gold-bright); }
.ld-index__list { list-style: none; margin: 0; padding: 0; }
.ld-index__row { border-bottom: 1px dotted var(--border); }
.ld-index__row:last-child { border-bottom: 0; }
.ld-index__row--placeholder { padding: 0.7rem 0; color: var(--paper-faint); font-style: italic; }
.ld-index__link {
    display: flex; align-items: baseline; gap: 0.75rem;
    padding: 0.62rem 0.25rem;
    color: var(--paper); text-decoration: none;
    transition: background var(--fast), padding-left var(--fast);
}
.ld-index__link:hover { background: var(--gold-soft); padding-left: 0.6rem; }
.ld-index__name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.ld-index__leader { flex: 1; border-bottom: 1px dotted var(--paper-faint); transform: translateY(-4px); opacity: 0.6; }
.ld-index__new { font-weight: 600; color: var(--gold-bright); white-space: nowrap; }
.ld-index__new[data-zero] { color: var(--paper-faint); font-weight: 400; }
.ld-index__total { font-size: 0.85rem; color: var(--paper-faint); white-space: nowrap; min-width: 6.5ch; text-align: right; }

.ld-cta-row { margin-top: 2.2rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.ld-cta {
    display: inline-flex; align-items: center; gap: 0.7rem;
    padding: 0.95rem 2.1rem;
    background: var(--paper); color: var(--ink);
    font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
    text-decoration: none;
    border: 2px solid var(--paper);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 6px rgba(239, 228, 207, 0.08);
    transition: transform var(--fast), box-shadow var(--fast), background var(--fast), color var(--fast);
}
.ld-cta svg { width: 22px; height: 22px; transition: transform var(--fast); }
.ld-cta:hover { background: var(--gold-bright); border-color: var(--gold-bright); transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 0 8px var(--gold-soft); }
.ld-cta:hover svg { transform: translateX(4px); }
.ld-cta:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 4px; }
.ld-cta__note { margin: 0; font-size: 0.85rem; color: var(--paper-faint); }

.ld-footer { max-width: 880px; margin: 0 auto; padding: 0 1.5rem 2rem; text-align: center; color: var(--paper-faint); font-size: 0.78rem; line-height: 1.6; }
.ld-footer p { margin: 0.3rem 0; }

/* ==========================================================================
   3. WIRE PAGE — MAIN + STICKY HEADER
   ========================================================================== */
.ctr-wire .tn-main { width: 100%; max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; min-height: 100vh; }

.ctr-wire .tn-header {
    position: sticky; top: 0; z-index: 50;
    background: linear-gradient(180deg, rgba(20, 16, 12, 0.96) 0%, rgba(20, 16, 12, 0.90) 100%);
    backdrop-filter: blur(12px) saturate(120%); -webkit-backdrop-filter: blur(12px) saturate(120%);
    border-bottom: 3px double var(--border-strong);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 1rem 1.5rem 0;
}
.ctr-wire .tn-header__inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 0.9rem; }
.ctr-wire .tn-header__title-block { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; flex: 1 1 auto; }
.ctr-wire .tn-header__title-row { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; }
.ctr-wire .tn-header__title { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1.05; margin: 0; color: var(--paper); }
.ctr-wire .tn-header__subtitle { margin: 0; font-size: 0.95rem; color: var(--paper-dim); font-style: italic; font-family: var(--font-display); }

/* Live pulse */
.ctr-wire .tn-pulse { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.22rem 0.55rem; border: 1px solid rgba(76, 175, 116, 0.4); background: rgba(76, 175, 116, 0.08); color: var(--live); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.ctr-wire .tn-pulse__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; animation: ctr-pulse 2s ease-in-out infinite; }
.ctr-wire .tn-pulse.is-down { color: var(--red-bright); border-color: rgba(216, 52, 45, 0.4); background: rgba(216, 52, 45, 0.08); }
.ctr-wire .tn-pulse.is-down .tn-pulse__dot { animation: none; }

/* Controls */
.ctr-wire .tn-header__controls { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; flex-shrink: 0; }
.ctr-wire .tn-header__updated { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--paper-dim); padding: 0.5rem 0.7rem; border: 1px solid var(--border); background: rgba(239, 228, 207, 0.03); }
.ctr-wire .tn-header__updated-label { color: var(--paper-faint); }
.ctr-wire .tn-header__updated-time { color: var(--paper); font-family: var(--font-mono); font-size: 0.8rem; }

/* Buttons */
.ctr-page .tn-btn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    background: var(--paper); color: var(--ink);
    border: 1px solid var(--paper);
    font-family: var(--font-body); font-size: 0.88rem; font-weight: 600; letter-spacing: 0.01em;
    text-decoration: none; cursor: pointer; line-height: 1;
    transition: background var(--fast), color var(--fast), border-color var(--fast), box-shadow var(--fast), transform var(--fast);
}
.ctr-page .tn-btn svg { width: 15px; height: 15px; display: block; }
.ctr-page .tn-btn:hover { background: var(--gold-bright); border-color: var(--gold-bright); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
.ctr-page .tn-btn:active { transform: translateY(0); }
.ctr-page .tn-btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.ctr-page .tn-btn--ghost { background: transparent; color: var(--paper-dim); border-color: var(--border-strong); }
.ctr-page .tn-btn--ghost:hover { background: var(--gold-soft); color: var(--paper); border-color: var(--gold); }
.ctr-wire .tn-home { padding-left: 0.7rem; }
.ctr-wire .tn-crawl.is-busy { pointer-events: none; opacity: 0.8; }
.ctr-wire .tn-crawl.is-busy .tn-crawl__icon { animation: ctr-spin 1.2s linear infinite; }
.ctr-wire .tn-refresh.is-spinning { pointer-events: none; }
.ctr-wire .tn-refresh.is-spinning .tn-refresh__icon { animation: ctr-spin 600ms linear infinite; }
.ctr-wire .tn-reset-status { display: inline-flex; align-items: center; min-height: 1.2rem; padding: 0 0.4rem; font-size: 0.8rem; color: var(--gold-bright); opacity: 0; transform: translateY(-4px); transition: opacity var(--med), transform var(--med); white-space: nowrap; }
.ctr-wire .tn-reset-status.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   4. TAB STRIP
   ========================================================================== */
.ctr-wire .tn-tabs { display: flex; gap: 0.15rem; border-top: 1px solid var(--border); overflow-x: auto; scrollbar-width: thin; }
.ctr-wire .tn-tab {
    position: relative; display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.8rem 1.1rem;
    background: transparent; border: none; color: var(--paper-dim);
    font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
    cursor: pointer; white-space: nowrap; line-height: 1;
    transition: color var(--fast), background var(--fast);
}
.ctr-wire .tn-tab::after { content: ''; position: absolute; left: 0.8rem; right: 0.8rem; bottom: -1px; height: 3px; background: var(--active); transform: scaleX(0); transform-origin: center; transition: transform var(--med); }
.ctr-wire .tn-tab:hover { color: var(--paper); background: rgba(239, 228, 207, 0.03); }
.ctr-wire .tn-tab.is-active { color: var(--paper); }
.ctr-wire .tn-tab.is-active::after { transform: scaleX(1); box-shadow: 0 0 12px var(--active); }
.ctr-wire .tn-tab:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: -2px; }
.ctr-wire .tn-tab__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--paper-faint); flex-shrink: 0; }
.ctr-wire .tn-tab[data-ctr-tab="exploited"]  .tn-tab__dot { background: var(--red-bright); }
.ctr-wire .tn-tab[data-ctr-tab="cve"]        .tn-tab__dot { background: var(--orange); }
.ctr-wire .tn-tab[data-ctr-tab="advisories"] .tn-tab__dot { background: var(--gold-bright); }
.ctr-wire .tn-tab[data-ctr-tab="news"]       .tn-tab__dot { background: #d6c39a; }
.ctr-wire .tn-tab[data-ctr-tab="breaches"]   .tn-tab__dot { background: #c47a9a; }
.ctr-wire .tn-tab.is-active .tn-tab__dot { box-shadow: 0 0 8px currentColor; }
.ctr-wire .tn-tab__badge { font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.4rem; background: var(--gold); color: var(--ink); border-radius: 999px; min-width: 1.4em; text-align: center; }
.ctr-wire .tn-tab__badge[hidden] { display: none; }

/* ==========================================================================
   5. PANELS / FILTERS / STATES
   ========================================================================== */
.ctr-wire .tn-panels { flex: 1 1 auto; width: 100%; padding: 1.5rem 1.5rem 3rem; }
.ctr-wire .tn-panel { display: block; animation: ctr-rise 300ms var(--ease); }
.ctr-wire .tn-panel[hidden] { display: none; }
.ctr-wire .tn-panel__header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border-strong); }
.ctr-wire .tn-panel__count { display: inline-flex; align-items: baseline; gap: 0.5rem; }
.ctr-wire .tn-panel__count-num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; line-height: 1; }
.ctr-wire .tn-panel__count-label { font-size: 0.85rem; color: var(--paper-faint); }
.ctr-wire .tn-panel__filters { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: flex-end; }
.ctr-wire .tn-filter { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.72rem; color: var(--paper-faint); }
.ctr-wire .tn-filter select, .ctr-wire .tn-filter input {
    background: rgba(20, 16, 12, 0.7); color: var(--paper); border: 1px solid var(--border-strong);
    padding: 0.4rem 0.55rem; font-family: var(--font-body); font-size: 0.85rem; min-width: 7.5rem;
}
.ctr-wire .tn-filter--search input { min-width: 15rem; }
.ctr-wire .tn-filter select:focus, .ctr-wire .tn-filter input:focus { outline: 2px solid var(--gold-bright); outline-offset: 1px; }

.ctr-wire .tn-panel__loading { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 4rem 2rem; color: var(--paper-dim); text-align: center; }
.ctr-wire .tn-panel__loading[hidden] { display: none; }
.ctr-wire .tn-spinner { width: 36px; height: 36px; border: 3px solid rgba(239, 228, 207, 0.1); border-top-color: var(--gold); border-right-color: var(--active); border-radius: 50%; animation: ctr-spin 800ms linear infinite; }
.ctr-wire .tn-panel__loading-text { margin: 0; font-style: italic; font-family: var(--font-display); }
.ctr-wire .tn-panel__error { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 3rem 2rem; border: 1px solid var(--border-strong); background: rgba(20, 16, 12, 0.6); text-align: center; }
.ctr-wire .tn-panel__error[hidden] { display: none; }
.ctr-wire .tn-panel__error-text { margin: 0; max-width: 52ch; line-height: 1.5; }
.ctr-wire .tn-more { display: flex; justify-content: center; padding: 1.5rem 0 0; }
.ctr-wire .tn-more[hidden] { display: none; }

/* ==========================================================================
   6. GRID + CARDS
   ========================================================================== */
.ctr-wire .tn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: stretch; }
.ctr-wire .tn-grid[hidden] { display: none; }

.ctr-wire .tn-card {
    display: flex; flex-direction: column; gap: 0.7rem;
    padding: 1.1rem 1.15rem;
    background: rgba(20, 16, 12, var(--card-alpha));
    border: 1px solid var(--border);
    border-left: 3px solid var(--slate);
    color: var(--paper); cursor: pointer; position: relative; min-height: 190px;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    transition: border-color var(--med), background var(--med), box-shadow var(--med), transform var(--med), opacity var(--med);
    animation: ctr-card-in 0.35s var(--ease) backwards;
}
.ctr-wire .tn-card.sev-critical { border-left-color: var(--red-bright); }
.ctr-wire .tn-card.sev-high     { border-left-color: var(--orange); }
.ctr-wire .tn-card.sev-medium   { border-left-color: var(--amber); }
.ctr-wire .tn-card.sev-low, .ctr-wire .tn-card.sev-info { border-left-color: var(--slate); }
.ctr-wire .tn-card:hover { border-color: var(--active); background: rgba(28, 22, 16, 0.92); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55); transform: translateY(-2px); }
.ctr-wire .tn-card.sev-critical:hover { border-left-color: var(--red-bright); }
.ctr-wire .tn-card.sev-high:hover     { border-left-color: var(--orange); }
.ctr-wire .tn-card:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.ctr-wire .tn-card.is-read { opacity: 0.5; filter: saturate(0.4); }
.ctr-wire .tn-card.is-read:hover { opacity: 0.85; filter: saturate(0.8); }

.ctr-wire .tn-card-top { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ctr-wire .tn-card-tag { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.22rem 0.55rem; border: 1px solid var(--border); background: rgba(239, 228, 207, 0.03); }
.ctr-wire .tn-tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--active); box-shadow: 0 0 4px var(--active); }
.ctr-wire .tn-tag-label { font-size: 0.72rem; font-weight: 600; color: var(--paper-dim); letter-spacing: 0.02em; }
.ctr-wire .tn-sev { font-size: 0.7rem; font-weight: 700; text-transform: capitalize; padding: 0.22rem 0.5rem; border: 1px solid; color: var(--slate); border-color: var(--slate); }
.ctr-wire .tn-sev b { font-family: var(--font-mono); font-weight: 600; margin-left: 0.2rem; }
.ctr-wire .tn-sev--critical { color: #fff; background: var(--red); border-color: var(--red); }
.ctr-wire .tn-sev--high     { color: var(--orange); border-color: var(--orange); }
.ctr-wire .tn-sev--medium   { color: var(--amber); border-color: var(--amber); }
.ctr-wire .tn-new { margin-left: auto; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); background: var(--gold-bright); padding: 0.2rem 0.45rem; }
.ctr-wire .tn-card-title { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; line-height: 1.3; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: color var(--fast); }
.ctr-wire .tn-card:hover .tn-card-title { color: var(--gold-bright); }
.ctr-wire .tn-card-desc { font-size: 0.9rem; color: var(--paper-dim); line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ctr-wire .tn-card-cves { margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ctr-wire .tn-card-cves span { font-family: var(--font-mono); font-size: 0.7rem; color: var(--paper-dim); border: 1px dashed var(--border-strong); padding: 0.12rem 0.35rem; }
.ctr-wire .tn-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: auto; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.ctr-wire .tn-card-date { font-size: 0.75rem; color: var(--paper-faint); white-space: nowrap; }
.ctr-wire .tn-card-domain { font-size: 0.72rem; color: var(--paper-faint); flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctr-wire .tn-card-link-icon { width: 14px; height: 14px; color: var(--paper-faint); flex-shrink: 0; transition: color var(--fast), transform var(--fast); }
.ctr-wire .tn-card:hover .tn-card-link-icon { color: var(--active); transform: translate(2px, -2px); }

/* ==========================================================================
   7. TOAST STACK  (alerts) — pick a side: .tn-toasts--right or --left
   ========================================================================== */
.ctr-wire .tn-toasts { position: fixed; bottom: 1.25rem; z-index: 800; display: flex; flex-direction: column; gap: 0.6rem; width: min(380px, calc(100vw - 2rem)); pointer-events: none; }
.ctr-wire .tn-toasts--right { right: 1.25rem; align-items: flex-end; }
.ctr-wire .tn-toasts--left  { left: 1.25rem;  align-items: flex-start; }
.ctr-wire .tn-toast {
    pointer-events: auto; display: flex; width: 100%;
    background: rgba(20, 16, 12, 0.96); color: var(--paper);
    border: 1px solid var(--border-strong);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
    opacity: 0; transform: translateY(12px);
    transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}
.ctr-wire .tn-toast.is-in { opacity: 1; transform: translateY(0); }
.ctr-wire .tn-toast.is-leaving { opacity: 0; transform: translateX(16px); }
.ctr-wire .tn-toasts--left .tn-toast.is-leaving { transform: translateX(-16px); }
.ctr-wire .tn-toast__bar { width: 5px; flex-shrink: 0; background: var(--slate); }
.ctr-wire .tn-toast--critical .tn-toast__bar { background: var(--red-bright); }
.ctr-wire .tn-toast--high .tn-toast__bar     { background: var(--orange); }
.ctr-wire .tn-toast--warn .tn-toast__bar     { background: var(--amber); }
.ctr-wire .tn-toast--ok .tn-toast__bar       { background: var(--live); }
.ctr-wire .tn-toast--info .tn-toast__bar     { background: var(--paper-dim); }
.ctr-wire .tn-toast__body { padding: 0.7rem 0.85rem; flex: 1; min-width: 0; }
.ctr-wire .tn-toast__title { margin: 0 0 0.2rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--paper-dim); }
.ctr-wire .tn-toast--critical .tn-toast__title { color: var(--red-bright); }
.ctr-wire .tn-toast--high .tn-toast__title     { color: var(--orange); }
.ctr-wire .tn-toast__text { margin: 0; font-family: var(--font-display); font-size: 0.98rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ctr-wire .tn-toast__link { display: inline-block; margin-top: 0.4rem; font-size: 0.8rem; font-weight: 600; color: var(--gold-bright); text-decoration: none; border-bottom: 1px solid currentColor; }
.ctr-wire .tn-toast__close { background: none; border: none; color: var(--paper-faint); font-size: 1.2rem; line-height: 1; padding: 0.5rem 0.65rem; cursor: pointer; align-self: flex-start; }
.ctr-wire .tn-toast__close:hover { color: var(--paper); }

/* ==========================================================================
   8. CONNECTION BANNER + FOOTER + NOSCRIPT
   ========================================================================== */
.ctr-wire .tn-conn-error { position: fixed; bottom: 0; left: 0; right: 0; z-index: 900; background: var(--red); border-top: 1px solid var(--red-bright); box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5); padding: 0.8rem 1.5rem; color: #fff; }
.ctr-wire .tn-conn-error[hidden] { display: none; }
.ctr-wire .tn-conn-error__inner { display: flex; align-items: center; justify-content: center; gap: 0.75rem; max-width: 1100px; margin: 0 auto; font-size: 0.9rem; font-weight: 500; }
.ctr-wire .tn-footer { border-top: 3px double var(--border-strong); background: rgba(20, 16, 12, 0.85); padding: 1.6rem 1.5rem; }
.ctr-wire .tn-footer__inner { max-width: 1000px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 0.6rem; }
.ctr-wire .tn-footer__line { margin: 0; font-size: 0.82rem; color: var(--paper-dim); }
.ctr-wire .tn-footer__line span { color: var(--gold-bright); font-weight: 600; }
.ctr-wire .tn-footer__link { color: var(--paper-dim); }
.ctr-wire .tn-footer__attr { margin: 0; font-size: 0.78rem; color: var(--paper-faint); line-height: 1.55; max-width: 80ch; margin: 0 auto; }
.ctr-wire .tn-footer__copy { margin: 0; font-size: 0.72rem; color: var(--paper-faint); }
.ctr-wire .tn-noscript { margin: 4rem auto; max-width: 600px; padding: 2rem; border: 1px solid var(--gold); text-align: center; }

/* ==========================================================================
   9. KEYFRAMES / MOTION / SMALL SCREENS
   ========================================================================== */
@keyframes ctr-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes ctr-spin { to { transform: rotate(360deg); } }
@keyframes ctr-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ctr-card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
    .ctr-page *, .ctr-page *::before, .ctr-page *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media (max-width: 720px) {
    .ctr-wire .tn-grid { grid-template-columns: 1fr; }
    .ctr-wire .tn-header__title { font-size: 1.5rem; }
    .ctr-wire .tn-filter--search input { min-width: 10rem; }
}
