:root {
    --primary: #1565c0;
    --primary-dark: #0d47a1;
    --primary-light: #e3f2fd;
    --accent: #ff8f00;
    --accent-hover: #e65100;
    --bg: #ffffff;
    --bg-alt: #f4f7fb;
    --bg-dark: #0a2540;
    --text: #1a2b3c;
    --text-muted: #5a6b7d;
    --border: #dde4ee;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 8px 30px rgba(21, 101, 192, 0.08);
    --shadow-lg: 0 20px 50px rgba(10, 37, 64, 0.12);
    --font: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", "PMingLiU", sans-serif;
    --nav-h: 68px;
    --transition: 0.22s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container { width: min(1160px, 92vw); margin: 0 auto; }

/* Header */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--nav-h);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.site-header.scrolled {
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.nav-inner {
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    list-style: none;
}

.nav-menu a {
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-cta {
    margin-left: 0.35rem;
    padding: 0.55rem 1.15rem !important;
    background: var(--accent) !important;
    color: #fff !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
}

.nav-cta:hover { background: var(--accent-hover) !important; color: #fff !important; }

.lang-switch a { font-size: 0.82rem !important; padding: 0.4rem 0.6rem !important; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 20px rgba(255, 143, 0, 0.35);
}

.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-outline {
    background: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover { background: var(--primary-light); }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* Hero */
.hero {
    padding: calc(var(--nav-h) + 3.5rem) 0 4rem;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 70%);
}

.hero-inner { text-align: center; max-width: 820px; margin: 0 auto; }

.hero-tag {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.2;
    color: var(--bg-dark);
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.hero h1 em {
    font-style: normal;
    color: var(--primary);
}

.hero-sub {
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.module-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.module-pills span {
    padding: 0.4rem 0.9rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    margin-bottom: 3rem;
}

/* Feature highlight row */
.highlight-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: left;
    box-shadow: var(--shadow);
}

.highlight-box .icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary-light);
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.highlight-box h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--bg-dark); }
.highlight-box p { color: var(--text-muted); font-size: 0.95rem; }

/* Sections */
section { padding: 4.5rem 0; }

section.alt { background: var(--bg-alt); }

.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 2.5rem;
}

.section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--bg-dark);
    margin-bottom: 0.6rem;
    letter-spacing: -0.02em;
}

.section-head p { color: var(--text-muted); }

.section-head .label {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

/* Stats band */
.stats-band {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.stats-grid strong {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stats-grid span { font-size: 0.9rem; opacity: 0.9; }

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.card h3 { font-size: 1.05rem; margin-bottom: 0.45rem; color: var(--bg-dark); }
.card p { color: var(--text-muted); font-size: 0.92rem; }

.card-link {
    display: inline-flex;
    margin-top: 0.85rem;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 700;
}

.card-link:hover { color: var(--accent); }

/* Why choose list */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.why-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.why-item i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.why-item h4 { font-size: 1rem; margin-bottom: 0.3rem; }
.why-item p { font-size: 0.88rem; color: var(--text-muted); }

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.price-card {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.price-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.price-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
}

.price-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.price-card .amount { font-size: 2.5rem; font-weight: 800; color: var(--primary); }
.price-card .amount small { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.price-card .period { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 1.25rem; }

.price-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}

.price-card li {
    padding: 0.45rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.price-card li::before {
    content: "✓ ";
    color: var(--primary);
    font-weight: 700;
}

/* Page hero */
.page-hero {
    padding: calc(var(--nav-h) + 2.5rem) 0 2rem;
    background: var(--primary-light);
    border-bottom: 1px solid var(--border);
}

.page-hero h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); color: var(--bg-dark); margin-bottom: 0.5rem; }
.page-hero p { color: var(--text-muted); max-width: 600px; }

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.info-list { list-style: none; display: grid; gap: 1rem; }

.info-item {
    display: flex;
    gap: 1rem;
    padding: 1.15rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #fff;
}

.info-item i { color: var(--primary); margin-top: 0.2rem; }

.form-card {
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow);
}

.form-card h3 { margin-bottom: 1rem; color: var(--bg-dark); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text);
    font: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}

textarea { min-height: 130px; resize: vertical; }

/* Case study */
.case-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.case-card .case-head {
    background: var(--primary-light);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.case-card .case-head h3 { color: var(--primary-dark); }
.case-card .case-body { padding: 1.5rem; }
.case-card .case-meta { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.5rem; }

/* CTA band */
.cta-band {
    background: var(--bg-dark);
    color: #fff;
    text-align: center;
    padding: 3.5rem 0;
}

.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.75rem; }
.cta-band p { opacity: 0.85; margin-bottom: 1.5rem; max-width: 520px; margin-left: auto; margin-right: auto; }

/* Footer */
.site-footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.75);
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-grid h4 {
    color: #fff;
    margin-bottom: 0.85rem;
    font-size: 0.95rem;
}

.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-grid a { font-size: 0.88rem; opacity: 0.75; }
.footer-grid a:hover { opacity: 1; color: #fff; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.82rem;
    opacity: 0.65;
}

.back-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 900;
    box-shadow: var(--shadow);
}

.back-top.show { opacity: 1; pointer-events: auto; }

.whatsapp {
    position: fixed;
    right: 1.25rem;
    bottom: 4.5rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 900;
}

/* Features page — sidebar layout (ref: ecount erp_features) */
.features-page { padding: calc(var(--nav-h) + 2rem) 0 4rem; background: var(--bg-alt); }

.features-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.75rem;
    align-items: start;
}

.features-sidebar {
    position: sticky;
    top: calc(var(--nav-h) + 1.25rem);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.features-nav { list-style: none; padding: 0.5rem 0; }

.features-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.features-nav a i { width: 18px; text-align: center; font-size: 0.85rem; }

.features-nav a:hover { color: var(--accent); background: #fff8f0; }

.features-nav a.active {
    color: var(--accent-hover);
    background: #fff3e0;
    border-left-color: var(--accent);
    font-weight: 700;
}

.sidebar-boxes { border-top: 1px solid var(--border); padding: 0.85rem; display: grid; gap: 0.65rem; }

.sidebar-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-alt);
    font-size: 0.85rem;
    transition: var(--transition);
}

.sidebar-box:hover { border-color: var(--accent); }

.sidebar-box i, .sidebar-box .box-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.sidebar-box strong { display: block; color: var(--text); font-size: 0.88rem; }
.sidebar-box span { color: var(--text-muted); font-size: 0.78rem; }

.features-content {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    box-shadow: var(--shadow);
    min-height: 480px;
}

.feature-panel { display: none; }
.feature-panel.active { display: block; }

.feature-panel h2 {
    font-size: 1.75rem;
    color: var(--bg-dark);
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.feature-panel .lead {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.feature-panel h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin: 1.25rem 0 0.65rem;
}

.feature-list {
    list-style: none;
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.feature-list li {
    padding-left: 1.35rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.feature-tags span {
    padding: 0.35rem 0.8rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.feature-preview {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-alt);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.feature-preview .preview-bar {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    justify-content: flex-start;
}

.feature-preview .preview-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
}

.feature-preview .preview-mock {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    text-align: left;
}

.mock-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.mock-row span {
    padding: 0.3rem 0.65rem;
    background: var(--bg-alt);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mock-row span.on { background: var(--accent); color: #fff; }

/* Sub-features (module > function > form) — ecount-style horizontal sub-nav */
.module-sub-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sub-nav-bar {
    margin: -2rem -2.25rem 1.75rem;
    padding: 0 0.5rem;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.sub-nav {
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    min-width: min-content;
    padding: 0;
}

.sub-nav li { flex-shrink: 0; }

.sub-nav a {
    display: block;
    padding: 0.9rem 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    margin-bottom: 0;
    transition: var(--transition);
}

.sub-nav a:hover {
    color: var(--accent-hover);
    background: transparent;
}

.sub-nav a.active {
    color: var(--accent-hover);
    background: transparent;
    border-bottom-color: var(--accent);
    font-weight: 700;
}

.sub-panels { padding-top: 0; }

.sub-panel { display: none; }
.sub-panel.active { display: block; }

.sub-panel h2 {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 0.5rem;
}

.sub-panel .lead {
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    border-bottom: none;
    padding-bottom: 0;
}

.feature-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem auto 1.75rem;
    max-width: 100%;
    position: relative;
}

.feature-divider::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.detail-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-top: 0.5rem;
}

.detail-text h3 {
    font-size: 1.05rem;
    color: var(--bg-dark);
    margin-bottom: 0.65rem;
}

.demo-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
}

.demo-table-wrap {
    border: none;
    border-radius: 0;
    overflow: visible;
    font-size: 0.8rem;
}

.demo-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

.demo-table thead th {
    background: #e8f4fc;
    color: var(--primary-dark);
    padding: 0.65rem 0.55rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #c5dff5;
    white-space: nowrap;
    font-size: 0.82rem;
}

.demo-table thead th::after {
    content: "▾";
    font-size: 0.6rem;
    margin-left: 0.2rem;
    opacity: 0.45;
}

.demo-table tbody td {
    padding: 0.6rem 0.55rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.demo-table tbody tr:hover { background: #fff8f0; }
.demo-table tbody tr:nth-child(even) { background: #f8fafc; }
.demo-table tbody tr:nth-child(even):hover { background: #fff8f0; }

.demo-table .item-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.demo-table .item-link:hover { color: var(--accent-hover); }

.demo-table .thumb {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #f0f4f8, #e2e8f0);
    border-radius: 4px;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    border: 1px solid var(--border);
}

.demo-table .tag {
    display: inline-block;
    padding: 0.2rem 0.45rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.demo-table .chk {
    width: 14px;
    height: 14px;
    border: 1px solid #bbb;
    border-radius: 2px;
    display: inline-block;
    background: #fff;
}

.sub-popup-toggle,
.sub-nav-overlay,
.sub-nav-popup { display: none; }

@media (min-width: 901px) {
    .sub-nav-mobile-wrap { display: contents; }
}

@media (max-width: 900px) {
    .highlight-row, .contact-grid, .footer-grid, .stats-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }

    /* Mobile: module nav → content (blue) → contact boxes (green) */
    .features-layout {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .features-sidebar {
        display: contents;
    }
    .features-nav {
        order: 1;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
        display: flex;
        flex-wrap: nowrap;
        padding: 0;
        margin: 0;
        list-style: none;
    }
    .features-nav-scroll {
        order: 1;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scrollbar-width: none;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        padding: 0.35rem 0.5rem;
    }
    .features-nav-scroll::-webkit-scrollbar { display: none; }
    .features-nav li { flex-shrink: 0; }
    .features-nav a {
        white-space: nowrap;
        border-left: none !important;
        border-bottom: 3px solid transparent;
        border-radius: 8px;
        padding: 0.6rem 0.9rem;
        font-size: 0.85rem;
    }
    .features-nav a.active {
        border-bottom-color: var(--accent);
        background: #fff8f0;
        color: var(--accent-hover);
    }

    /* Sub-nav: inline scroll + popup dropdown */
    .sub-nav-bar {
        margin: -1.25rem -1rem 1.25rem;
        padding: 0;
        display: flex;
        align-items: center;
        position: relative;
        background: #fff;
    }
    .sub-nav-mobile-wrap {
        display: flex;
        flex: 1;
        align-items: center;
        min-width: 0;
    }
    .sub-nav-inline-scroll {
        flex: 1;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scrollbar-width: none;
        padding: 0.35rem 0;
    }
    .sub-nav-inline-scroll::-webkit-scrollbar { display: none; }
    .sub-nav-bar .sub-nav {
        display: flex;
        flex-wrap: nowrap;
        min-width: min-content;
    }
    .sub-popup-toggle {
        flex-shrink: 0;
        width: 34px;
        height: 34px;
        margin: 0.35rem 0.5rem 0.35rem 0;
        border: none;
        border-radius: 50%;
        background: var(--accent);
        color: #fff;
        cursor: pointer;
        display: grid;
        place-items: center;
        font-size: 0.8rem;
        box-shadow: 0 2px 8px rgba(255, 143, 0, 0.35);
        transition: var(--transition);
    }
    .sub-popup-toggle.open i { transform: rotate(180deg); }
    .sub-popup-toggle i { transition: transform 0.2s ease; }
    .sub-nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(10, 37, 64, 0.45);
        z-index: 1100;
    }
    .sub-nav-popup {
        display: none;
        position: fixed;
        left: 1rem;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        max-height: 75vh;
        overflow-y: auto;
        background: #fff;
        border-radius: var(--radius-lg);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
        z-index: 1101;
        padding: 1.25rem 1rem 1rem;
    }
    .sub-nav-popup-title {
        font-size: 0.82rem;
        font-weight: 700;
        color: var(--text-muted);
        margin-bottom: 0.75rem;
        text-align: center;
    }
    .sub-nav-popup-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem;
        list-style: none;
        padding: 0;
    }
    .sub-nav-popup-list a {
        display: block;
        padding: 0.7rem 0.65rem;
        font-size: 0.85rem;
        color: var(--text);
        border-radius: 8px;
        border-bottom: none;
        white-space: normal;
        text-align: center;
        background: var(--bg-alt);
    }
    .sub-nav-popup-list a.active {
        background: #fff3e0;
        color: var(--accent-hover);
        font-weight: 700;
    }
    .sub-nav-bar.popup-open .sub-nav-overlay { display: block; }
    .sub-nav-bar.popup-open .sub-nav-popup { display: block; }
    body.sub-popup-open { overflow: hidden; }

    .features-content {
        order: 2;
        padding: 1.25rem 1rem;
        min-height: auto;
    }
    .sidebar-boxes {
        order: 3;
        border-top: none;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }

    .nav-toggle { display: block; }
    .nav-menu {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        display: none;
    }
    .nav-menu.open { display: flex; }
}
