/* Bento Grid & Technical Manual Theme - Adjusted Emerald/Teal Palette */
:root {
    --bg: #ffffff;
    --bg-panel: #f5f8f8;
    --bg-panel-2: #e8f0f0;
    --border: #dbe5e5;
    --border-strong: #c2d4d4;
    --accent: #0f766e;
    --accent-dark: #115e59;
    --accent-hl: #ccfbf1;
    --accent-soft: rgba(15, 118, 110, 0.08);
    --text: #132020;
    --text-muted: #4e6161;
    --text-faint: #6c7e7e;
    --success: #059669;
    --warn: #d97706;
    --shadow-card: 0 1px 3px rgba(19, 32, 32, 0.05), 0 10px 28px -14px rgba(19, 32, 32, 0.16);
    --shadow-card-hover: 0 3px 6px rgba(19, 32, 32, 0.08), 0 16px 34px -14px rgba(19, 32, 32, 0.22);
    --r-card: 10px;
    --r-btn: 6px;
    --r-pill: 999px;
    --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-display);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.wrap {
    width: min(1200px, 100% - 32px);
    margin: 0 auto;
}

/* Header */
.site-header {
    height: 66px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    z-index: 100;
}

.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.brand-name {
    font-weight: 800;
    font-size: 17px;
    color: var(--text);
}

.brand-sub {
    font-size: 13px;
    color: var(--text-muted);
    padding-left: 10px;
    border-left: 1px solid var(--border);
}

.primary-nav ul {
    display: flex;
    list-style: none;
    gap: 22px;
    align-items: center;
}

.primary-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.primary-nav a:hover, .primary-nav a.active {
    color: var(--accent);
}

.header-btn {
    background: var(--accent);
    color: #fff !important;
    padding: 7px 16px;
    border-radius: var(--r-btn);
    font-weight: 600;
    font-size: 13px;
}

.header-btn:hover {
    background: var(--accent-dark);
}

/* Hero Section */
.hero {
    padding: 48px 0 36px 0;
    background: linear-gradient(180deg, #f8faf9 0%, #ffffff 100%);
}

.bento {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}

.side-row {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cell {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.cell-side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.side-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.side-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.side-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.side-chips {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 14px 0;
}

.side-chips li {
    background: var(--bg-panel-2);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.side-more {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

.cell-main {
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.badge-tag {
    background: var(--accent-hl);
    color: var(--accent-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
}

.hero-title {
    font-size: clamp(28px, 3.4vw, 42px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.hl {
    color: var(--accent);
}

.lede {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 720px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border-radius: var(--r-btn);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.25);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-ghost {
    background: var(--bg-panel-2);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--border);
}

.facts {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 14px;
}

.fact-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.fact-pill {
    background: var(--bg-panel-2);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

/* Devices strip */
.home-devices {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    list-style: none;
    margin: 16px 0 0 0;
}

.home-devices li {
    flex: 1;
}

.dev {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.dev svg {
    width: 18px;
    height: 18px;
}

.statusbar {
    margin-top: 18px;
    padding: 10px 18px;
    background: var(--bg-panel-2);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 12px;
    color: var(--text-muted);
}

.sb-tag {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* Sections */
.section {
    padding: 56px 0;
    border-top: 1px solid var(--border);
}

.section-head {
    margin-bottom: 32px;
}

.eyebrow {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-head h2 {
    font-size: 26px;
    font-weight: 800;
    margin: 8px 0;
}

.section-head p {
    color: var(--text-muted);
    max-width: 800px;
    font-size: 15px;
}

/* Tabs & Manuscript */
.tabs {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.tab-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tab-btn {
    text-align: left;
    background: transparent;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.tab-btn:hover {
    background: var(--bg-panel-2);
    color: var(--text);
}

.tab-btn.active {
    background: #ffffff;
    color: var(--accent);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.manuscript {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.manuscript pre {
    background: #141c1c;
    color: #e2ecec;
    padding: 16px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
}

.rule-mark {
    color: #2dd4bf;
    font-weight: 700;
}

.annotation {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.68;
    background: var(--bg-panel);
    padding: 14px;
    border-radius: 6px;
    border-left: 3px solid var(--accent);
}

.home-reading-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 36px;
}

.prose h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.prose p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
}

/* Neutral Band & Facts */
.neutral-band {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    padding: 36px;
}

.home-verification-facts {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-bottom: 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.home-verification-facts img {
    border-radius: 8px;
    border: 1px solid var(--border);
}

.home-verification-facts dl {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.home-verification-facts dt {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.home-verification-facts dd {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

/* FAQ Accordion */
.home-faq {
    margin-top: 32px;
}

.home-faq h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
}

.faq-item {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-item summary {
    padding: 14px 18px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    outline: none;
}

.faq-item summary:hover {
    color: var(--accent);
}

.faq-answer {
    padding: 0 18px 14px 18px;
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Articles Grid */
.home-articles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.article-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    padding: 22px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-strong);
}

.article-meta {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
    display: block;
}

.article-card h3 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.article-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 16px;
}

.text-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

/* Download Hero */
.download-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    padding: 40px;
    box-shadow: var(--shadow-card);
    margin: 40px auto;
    max-width: 800px;
    text-align: center;
}

.download-box h1 {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 12px;
}

.spec-table {
    width: 100%;
    margin: 24px 0;
    border-collapse: collapse;
    text-align: left;
}

.spec-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.spec-table td:first-child {
    font-weight: 700;
    color: var(--text-muted);
    width: 120px;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    font-size: 13px;
    color: var(--text-muted);
    background: #ffffff;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

/* Responsive */
@media (max-width: 860px) {
    .bento {
        grid-template-columns: 1fr;
    }
    .tabs {
        grid-template-columns: 1fr;
    }
    .home-devices {
        flex-wrap: wrap;
    }
    .home-reading-grid {
        grid-template-columns: 1fr;
    }
    .home-articles {
        grid-template-columns: 1fr;
    }
    .home-verification-facts dl {
        grid-template-columns: 1fr;
    }
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
@media (max-width: 880px) {
    .nav-links, .nav-menu {
        display: none !important;
    }
}
