/* ══════════════════════════════════════
   PAGE-LEVEL TOKENS
══════════════════════════════════════ */
:root {
    --bg0: #f5f9f8;
    --bg1: #ffffff;
    --bg2: #f0f7f4;
    --bg3: #e6f2ee;
    --border: rgba(78,179,154,0.18);
    --brand: #4eb39a;
    --brand-dark: #3a9b83;
    --brand-deep: #0e2d27;
    --text0: #1a2e2b;
    --text1: #5f7a74;
    --text2: #94aaa6;
    --mono: 'DM Mono', monospace;
    --sans: 'DM Sans', sans-serif;
    --yes-bg: #dcfce7; --yes-fg: #16a34a; --yes-border: #bbf7d0;
    --no-bg: #fee2e2;  --no-fg: #dc2626;  --no-border: #fecaca;
    --partial-bg: #fef9c3; --partial-fg: #ca8a04; --partial-border: #fde68a;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(14,45,39,0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ══════════════════════════════════════
   MASTHEAD
══════════════════════════════════════ */
.acm-masthead {
    background: linear-gradient(145deg, #0e2d27 0%, #1a4a3d 60%, #0d3530 100%);
    border-bottom: 1px solid rgba(78,179,154,0.2);
    padding: 2.5rem 2rem 2.5rem;
    position: relative;
    overflow: hidden;
}
.acm-masthead::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 65% 40%, rgba(78,179,154,0.1) 0%, transparent 65%);
    pointer-events: none;
}
.acm-masthead-inner {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.acm-hero-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.acm-brand { display: flex; align-items: flex-start; gap: 16px; }
.acm-brand-icon {
    width: 52px; height: 52px;
    background: rgba(78,179,154,0.14);
    border: 1.5px solid rgba(78,179,154,0.4);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.acm-brand-icon svg { width: 26px; height: 26px; stroke: #6fd1b3; fill: none; }
.acm-brand-text h1 {
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.025em;
    line-height: 1.25;
    margin-bottom: 5px;
}
.acm-brand-text p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    max-width: 520px;
}
.acm-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.acm-badge {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 20px;
    padding: 3px 10px;
    border: 1px solid;
}
.acm-badge-green { background: rgba(78,179,154,0.15); color: #6fd1b3; border-color: rgba(78,179,154,0.3); }
.acm-badge-blue  { background: rgba(99,179,237,0.15); color: #90cdf4; border-color: rgba(99,179,237,0.3); }
.acm-badge-amber { background: rgba(251,191,36,0.12); color: #fcd34d; border-color: rgba(251,191,36,0.25); }

/* Stats pills */
.acm-stats-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.acm-stat {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 10px 16px;
    min-width: 110px;
    text-align: center;
}
.acm-stat-num {
    font-family: var(--mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: #6fd1b3;
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}
.acm-stat-lbl { font-size: 0.7rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.05em; }

/* ══════════════════════════════════════
   CONTROLS BAR
══════════════════════════════════════ */
.acm-controls {
    background: var(--bg1);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(14,45,39,0.05);
}
.acm-controls-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.acm-search-wrap {
    position: relative;
    flex: 1;
    min-width: 180px;
    max-width: 300px;
}
.acm-search-wrap svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px; height: 15px;
    stroke: var(--text2);
    fill: none;
    pointer-events: none;
}
.acm-search-wrap input {
    width: 100%;
    padding: 7px 10px 7px 32px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--text0);
    background: var(--bg0);
    outline: none;
    transition: border-color 0.18s;
}
.acm-search-wrap input:focus { border-color: var(--brand); }

.acm-filter-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.acm-filter-btn {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--bg0);
    color: var(--text1);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}
.acm-filter-btn:hover { border-color: var(--brand); color: var(--brand); background: #e8f5f0; }
.acm-filter-btn.active { border-color: var(--brand); background: var(--brand); color: #fff; }

.acm-right-actions { display: flex; gap: 6px; margin-left: auto; }
.acm-action-btn {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: var(--bg0);
    color: var(--text1);
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}
.acm-action-btn:hover { border-color: var(--brand); color: var(--brand); background: #e8f5f0; }
.acm-action-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; }

/* ══════════════════════════════════════
   PAGE BODY
══════════════════════════════════════ */
.acm-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 5rem;
}

/* ══════════════════════════════════════
   LEGEND
══════════════════════════════════════ */
.acm-legend {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.acm-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text1);
    font-weight: 500;
}
.acm-legend-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.acm-legend-dot.yes     { background: var(--yes-fg); }
.acm-legend-dot.no      { background: var(--no-fg); }
.acm-legend-dot.partial { background: var(--partial-fg); }

/* ══════════════════════════════════════
   REGION SCORECARD STRIP
══════════════════════════════════════ */
.acm-scorecards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 1.5rem;
}
.acm-scorecard {
    background: var(--bg1);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.acm-scorecard::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--brand);
    opacity: 0;
    transition: opacity 0.2s;
}
.acm-scorecard:hover { border-color: var(--brand); box-shadow: 0 4px 16px rgba(78,179,154,0.12); }
.acm-scorecard:hover::before { opacity: 1; }
.acm-scorecard.selected { border-color: var(--brand); background: #edf9f5; }
.acm-scorecard.selected::before { opacity: 1; }
.acm-sc-region {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 3px;
}
.acm-sc-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text0);
    margin-bottom: 8px;
    line-height: 1.3;
}
.acm-sc-bar-wrap {
    height: 5px;
    background: var(--bg3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}
.acm-sc-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand), var(--brand-dark));
    border-radius: 10px;
    transition: width 0.5s ease;
}
.acm-sc-score {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text1);
}
.acm-sc-score span { color: var(--brand); font-weight: 600; }

/* ══════════════════════════════════════
   FEATURE MATRIX TABLE
══════════════════════════════════════ */
.acm-matrix-wrap {
    background: var(--bg1);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}
.acm-matrix-scroll { overflow-x: auto; }
.acm-matrix {
    border-collapse: collapse;
    width: 100%;
    min-width: 900px;
    font-size: 0.82rem;
}

/* Column headers (regions) */
.acm-matrix thead tr:first-child th {
    background: #0e2d27;
    color: rgba(255,255,255,0.5);
    font-family: var(--mono);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 8px 10px;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.06);
    font-weight: 500;
}
.acm-matrix thead tr:first-child th:first-child {
    text-align: left;
    background: #0a2219;
    min-width: 220px;
    color: rgba(255,255,255,0.35);
    font-size: 0.65rem;
}
.acm-matrix thead tr:second-child th { background: #1a4035; }
.acm-matrix thead tr.region-names th {
    background: #1a4035;
    color: #6fd1b3;
    font-size: 0.62rem;
    padding: 6px 10px;
    white-space: nowrap;
    border-right: 1px solid rgba(78,179,154,0.12);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}
.acm-matrix thead tr.region-names th:first-child {
    background: #0e2d27;
    color: transparent;
}

/* Category rows */
.acm-cat-row td {
    background: var(--bg2);
    padding: 8px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text1);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--border);
}
.acm-cat-row td:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}
.acm-cat-icon {
    width: 22px; height: 22px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.acm-cat-icon svg { width: 12px; height: 12px; stroke: currentColor; fill: none; }
.cat-ai    .acm-cat-icon { background: #f0e6ff; color: #7c3aed; }
.cat-msg   .acm-cat-icon { background: #e0f2fe; color: #0284c7; }
.cat-ana   .acm-cat-icon { background: #fef3c7; color: #d97706; }
.cat-voice .acm-cat-icon { background: #dcfce7; color: #16a34a; }
.cat-plat  .acm-cat-icon { background: #fee2e2; color: #dc2626; }

/* Feature rows */
.acm-feat-row {
    border-bottom: 1px solid rgba(78,179,154,0.07);
    transition: background 0.15s;
}
.acm-feat-row:hover { background: #f8fcfa; }
.acm-feat-row:last-child { border-bottom: none; }
.acm-feat-row td {
    padding: 0;
    border-right: 1px solid rgba(78,179,154,0.08);
    text-align: center;
    vertical-align: middle;
}
.acm-feat-row td:first-child {
    text-align: left;
    padding: 9px 14px;
    background: var(--bg1);
    border-right: 2px solid rgba(78,179,154,0.12);
    white-space: normal;
    position: relative;
}
.acm-feat-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text0);
    line-height: 1.35;
}
.acm-feat-tip {
    font-size: 0.7rem;
    color: var(--text2);
    margin-top: 2px;
    line-height: 1.3;
    display: none;
}

/* Availability chips */
.acm-cell { display: flex; align-items: center; justify-content: center; height: 100%; padding: 8px 4px; }
.acm-chip {
    width: 26px; height: 26px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.12s;
}
.acm-chip:hover { transform: scale(1.15); }
.acm-chip.yes     { background: var(--yes-bg);     color: var(--yes-fg);     border: 1px solid var(--yes-border); }
.acm-chip.no      { background: var(--no-bg);      color: var(--no-fg);      border: 1px solid var(--no-border); }
.acm-chip.partial { background: var(--partial-bg); color: var(--partial-fg); border: 1px solid var(--partial-border); }

/* ══════════════════════════════════════
   COMPARISON PANEL
══════════════════════════════════════ */
.acm-compare-panel {
    background: var(--bg1);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: none;
    box-shadow: var(--shadow);
}
.acm-compare-panel.visible { display: block; }
.acm-compare-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text0);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.acm-compare-title svg { width: 18px; height: 18px; stroke: var(--brand); fill: none; }
.acm-compare-grid {
    display: grid;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.acm-compare-head-row, .acm-compare-feat-row {
    display: grid;
    background: var(--bg1);
}
.acm-compare-head-row { background: var(--bg2); }
.acm-compare-cell {
    padding: 8px 12px;
    font-size: 0.78rem;
    border-right: 1px solid var(--border);
}
.acm-compare-cell:last-child { border-right: none; }
.acm-compare-head-row .acm-compare-cell {
    font-weight: 600;
    color: var(--brand);
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
}
.acm-compare-head-row .acm-compare-cell:first-child { color: var(--text1); }
.acm-compare-feat-row:nth-child(even) .acm-compare-cell { background: #fafcfb; }
.acm-compare-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}
.acm-compare-chip.yes     { background: var(--yes-bg);     color: var(--yes-fg); }
.acm-compare-chip.no      { background: var(--no-bg);      color: var(--no-fg); }
.acm-compare-chip.partial { background: var(--partial-bg); color: var(--partial-fg); }

/* ══════════════════════════════════════
   SEO CONTENT SECTION
══════════════════════════════════════ */
.acm-seo-section {
    background: var(--bg1);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 2rem;
    margin-bottom: 2rem;
}
.acm-seo-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text0);
    margin-bottom: 0.75rem;
}
.acm-seo-section p {
    font-size: 0.85rem;
    color: var(--text1);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}
.acm-faq-list { list-style: none; }
.acm-faq-item {
    border-bottom: 1px solid var(--border);
    padding: 0;
}
.acm-faq-item:last-child { border-bottom: none; }
.acm-faq-q {
    padding: 12px 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text0);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    user-select: none;
}
.acm-faq-q svg { width: 14px; height: 14px; stroke: var(--text2); fill: none; flex-shrink: 0; transition: transform 0.2s; }
.acm-faq-item.open .acm-faq-q svg { transform: rotate(180deg); }
.acm-faq-a {
    font-size: 0.82rem;
    color: var(--text1);
    line-height: 1.7;
    padding-bottom: 12px;
    display: none;
}
.acm-faq-item.open .acm-faq-a { display: block; }

/* Toast */
.acm-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0e2d27;
    color: #6fd1b3;
    border: 1px solid rgba(78,179,154,0.3);
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 0.82rem;
    font-weight: 500;
    z-index: 9999;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.acm-toast.show { transform: translateY(0); opacity: 1; }
.acm-toast svg { width: 14px; height: 14px; stroke: #6fd1b3; fill: none; }

/* Responsive */
@media (max-width: 768px) {
    .acm-masthead { padding: 1.5rem 1rem; }
    .acm-controls { padding: 0.75rem 1rem; }
    .acm-body { padding: 1rem 0.75rem 4rem; }
    .acm-scorecards { grid-template-columns: repeat(2, 1fr); }
    .acm-hero-row { flex-direction: column; gap: 1rem; }
    .acm-stats-row { gap: 6px; }
    .acm-stat { min-width: 90px; padding: 8px 12px; }
    .acm-stat-num { font-size: 1.1rem; }
}
@media (max-width: 480px) {
    .acm-scorecards { grid-template-columns: 1fr 1fr; }
    .acm-filter-group { gap: 4px; }
    .acm-filter-btn { font-size: 0.72rem; padding: 4px 9px; }
}
