/* =========================================
   SMTInsider Design System v2.0
   ========================================= */

/* ── Design Tokens ── */
:root {
    --panel: rgba(15, 23, 34, 0.78);
    --strong: rgba(12, 17, 25, 0.94);
    --line: rgba(146, 165, 185, 0.18);
    --text: #edf2f7;
    --muted: #94a3b8;
    --signal: #53d1cc;
    --signal-hover: #3fb8b4;
    --signal-light: #6edcd8;
    --violet: #6c35de;
    --green: #4caf50;
    --orange: #ff9800;
    --red: #f44336;
    --yellow: #f6c343;
    --shadow: 0 24px 60px rgba(0,0,0,0.28);
    --radius: 28px;
    --radius-sm: 1.5rem;
    --radius-xs: 1.25rem;
    --font-sans: 'IBM Plex Sans', sans-serif;
    --font-serif: 'IBM Plex Serif', serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

body {
    font-family: var(--font-sans);
    background-color: #0D1117;
    color: #edf2f7;
}

.tech-grid-bg {
    background-image:
        linear-gradient(rgba(83, 209, 204, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(83, 209, 204, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Custom Scrollbar for Dark Theme */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(83, 209, 204, 0.3);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(83, 209, 204, 0.7);
}

/* Firefox */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(83, 209, 204, 0.3) transparent;
}

/* =========================================
   Component System
   ========================================= */

/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 1.25rem;
    background: var(--signal);
    color: #070b11;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-primary:hover {
    background: var(--signal-hover);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #cbd5e1;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background, color 0.2s;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(244, 67, 54, 0.3);
    background: rgba(244, 67, 54, 0.1);
    color: #ef5350;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background, color 0.2s;
}
.btn-danger:hover {
    background: var(--red);
    color: #fff;
}

/* ── Tool Input / Select / Label ── */
.tool-input {
    width: 100%;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #08111a;
    color: #fff;
    padding: 0.95rem 1rem;
    outline: none;
    transition: border-color, box-shadow 0.2s;
    font-family: var(--font-mono);
}

.tool-input:focus {
    border-color: rgba(83, 209, 204, 0.8);
    box-shadow: 0 0 0 3px rgba(83, 209, 204, 0.12);
}

.tool-input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.tool-select {
    width: 100%;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #08111a;
    color: #fff;
    padding: 1rem 1.1rem;
    outline: none;
    transition: border-color, box-shadow 0.2s;
}

.tool-select:focus {
    border-color: rgba(83, 209, 204, 0.8);
    box-shadow: 0 0 0 3px rgba(83, 209, 204, 0.12);
}

.tool-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--signal);
    margin-bottom: 0.5rem;
}

/* ── Panels ── */
.glass-panel,
.editorial-panel {
    background: rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(4px);
}

.editorial-panel-strong,
.panel-strong {
    background: rgba(12, 17, 25, 0.94);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(4px);
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(4px);
}

/* ── Section Kicker ── */
.section-kicker {
    display: inline-block;
    color: var(--signal);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ── Scroll Anchors ── */
h1[id], h2[id], h3[id], h4[id], section[id] {
    scroll-margin-top: 100px;
}

/* ── Tabular Numbers ── */
table, .tabular-nums, .res-value, .metric-value, .stat-value {
    font-variant-numeric: tabular-nums;
}

/* ── Article Prose ── */
.article-prose h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: #fff;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.article-prose h3 {
    font-family: var(--font-sans);
    font-size: 1.35rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.article-prose p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.article-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-variant-numeric: tabular-nums;
}
.article-prose th,
.article-prose td {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}
.article-prose th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: #e2e8f0;
}
.article-prose td {
    color: #cbd5e1;
}

.article-prose ul,
.article-prose ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: #cbd5e1;
}

.article-prose li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.article-prose a {
    color: var(--signal);
    text-decoration: underline;
    transition: color 0.2s;
}

.article-prose a:hover {
    color: var(--signal-light);
}

/* ── List Chip (Category Filter) ── */
.list-chip {
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
}

.list-chip:hover {
    border-color: rgba(83, 209, 204, 0.4);
    color: #fff;
}

.list-chip.active {
    background: var(--signal);
    border-color: var(--signal);
    color: #070b11;
    font-weight: 600;
}

/* ── Editorial Card ── */
.editorial-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.9rem;
    transition: all 0.3s;
}

.editorial-card:hover {
    border-color: rgba(83, 209, 204, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.editorial-card__title {
    font-family: var(--font-sans);
    font-weight: 600;
    color: #fff;
    transition: color 0.2s;
    line-height: 1.25;
}

.editorial-card:hover .editorial-card__title {
    color: var(--signal);
}

/* ——— Homepage: The Daily Brief ——— */
.daily-brief__list {
    display: grid;
    gap: 12px;
}

.daily-brief__card {
    display: block;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.daily-brief__card:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(83, 209, 204, 0.28);
}

.daily-brief__row {
    display: flex;
    gap: 14px;
    padding: 14px;
    align-items: flex-start;
}

.daily-brief__thumb {
    flex: 0 0 auto;
    width: 94px;
    height: 70px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(8, 17, 26, 0.85);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.daily-brief__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1);
    transition: transform 0.35s ease;
}

.daily-brief__card:hover .daily-brief__img {
    transform: scale(1.04);
}

.daily-brief__content {
    min-width: 0;
    flex: 1 1 auto;
}

.daily-brief__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 11px;
    font-family: "IBM Plex Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(148, 163, 184, 0.95);
}

.daily-brief__dot {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.55);
}

.daily-brief__title {
    margin-top: 8px;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.22;
    color: #fff;
    transition: color 0.2s ease;
}

.daily-brief__card:hover .daily-brief__title {
    color: var(--signal);
}

.daily-brief__excerpt {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(148, 163, 184, 0.92);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 480px) {
    .daily-brief__row {
        padding: 12px;
        gap: 12px;
    }
    .daily-brief__thumb {
        width: 84px;
        height: 64px;
    }
}

/* ——— Homepage hero: make the right panel bottom feel intentional ——— */
.hero-covers {
    position: relative;
}

.hero-covers::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    pointer-events: none;
    background:
        radial-gradient(600px 240px at 20% 20%, rgba(83, 209, 204, 0.10), transparent 60%),
        radial-gradient(520px 260px at 80% 35%, rgba(255, 255, 255, 0.06), transparent 62%),
        linear-gradient(to bottom, transparent, rgba(8, 17, 26, 0.62));
    opacity: 0.85;
    mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,1) 30%, rgba(0,0,0,1));
}

/* ——— News cards (Industry News) ———
   Tailwind build in this repo is intentionally minimal, so card media sizing
   needs to be enforced via authored CSS to avoid gigantic remote images. */
.news-card__media {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1.25rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
    aspect-ratio: 16 / 10;
}

.news-card__media::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--news-media-bg);
    background-size: cover;
    background-position: center;
    filter: blur(18px) saturate(1.05);
    transform: scale(1.08);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.news-card__img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1);
    transition: transform 0.35s ease;
}

.news-card__media--contain::before {
    opacity: 0.9;
}

.news-card__media--contain .news-card__img {
    object-fit: contain;
    padding: 18px;
    transform: none;
}

.editorial-card:hover .news-card__img {
    transform: scale(1.02);
}

.editorial-card:hover .news-card__media--contain .news-card__img {
    transform: none;
}
