/* GridMind AI landing page styles.
   Extracted from gridmind-ai.html so the page HTML stays under the 100 KB
   budget and the CSS can be cached. Loaded only by that page. */
/* ═══════════════════════════════════════════════════════════
     GridMind-specific additions on top of style-abb.css
     Uses ONLY ABB-Style tokens — no new colors / fonts / radii
     ═══════════════════════════════════════════════════════════ */

  /* Preview banner (top notice) */
  .preview-banner {
    background: var(--black);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    padding: 8px 16px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--black);
  }

  /* === 3 Gaps cards — minimal ABB style === */
  .gap-card {
    background: #fff;
    border: 1px solid var(--line);
    padding: 28px 24px;
    border-radius: var(--radius);
  }
  .gap-card .num {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--green);
    margin-bottom: 12px;
    text-transform: uppercase;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--green);
  }
  .gap-card h3 { font-size: 18px; margin-bottom: 8px; font-weight: 700; }
  .gap-card p  { font-size: 14px; color: var(--text-2); margin: 0; line-height: 1.6; }

  /* === Mechanism cards (numbered, ABB-style) === */
  .mech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    margin-top: 32px;
  }
  .mech-card {
    background: #fff;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 32px 28px;
    transition: background var(--transition);
  }
  .mech-card:hover { background: var(--bg-soft); }
  .mech-card .num {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--green);
    margin-bottom: 14px;
    display: inline-block;
  }
  .mech-card h3 { font-size: 18px; margin-bottom: 6px; font-weight: 700; }
  .mech-card .desc { font-size: 14px; color: var(--text-2); line-height: 1.6; margin-bottom: 12px; }
  .mech-card .meta {
    font-size: 12px;
    color: var(--muted);
    padding-top: 12px;
    border-top: 1px solid var(--line);
    margin-top: 12px;
  }
  .mech-card .meta strong { color: var(--text); font-weight: 600; }

  /* === SVG diagram wrapper === */
  .diagram-wrap {
    background: #fff;
    border: 1px solid var(--line);
    padding: 32px;
    margin-top: 32px;
    overflow-x: auto;
  }
  /* Cap diagrams to ~natural viewBox width so they never upscale past intent
     (was stretching to full container width, ~1135px = 1.4x, making both the
     graphic and its internal labels look oversized). */
  /* Diagrams cap at 720px so they never stretch to the full 1135px container —
     the fix for the "diagrams are huge" report. Covers <img> too: the larger
     charts were moved out to standalone .svg files to keep the page under the
     100 KB budget, and an img would otherwise escape this cap. */
  .diagram-wrap svg,
  .diagram-wrap img { display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto; }

  /* === outcome columns (what the forecast changes on site) === */
  .outcome-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
    margin-bottom: 32px;
  }
  .outcome-col {
    background: #fff;
    border: 1px solid var(--line);
    padding: 28px 24px;
  }
  .outcome-col .eyebrow { margin-bottom: 8px; }
  .outcome-col h3 { font-size: 18px; font-weight: 700; line-height: 1.3; margin-bottom: 16px; }
  .outcome-col ul { margin: 0; padding: 0; list-style: none; }
  .outcome-col ul li {
    position: relative;
    padding: 10px 0 10px 20px;
    border-bottom: 1px solid var(--line);
    font-size: 14px; line-height: 1.7;
    color: var(--text-2);
  }
  .outcome-col ul li:last-child { border-bottom: 0; padding-bottom: 0; }
  .outcome-col ul li::before {
    content: '';
    position: absolute;
    left: 0; top: calc(10px + (1.7em - 6px) / 2);
    width: 6px; height: 6px;
    background: var(--green);
  }
  .outcome-col ul li strong { color: var(--text); font-weight: 700; }
  @media (max-width: 720px) { .outcome-cols { grid-template-columns: 1fr; } }

  /* === Proof Box (Sabah outage proof) === */
  .proof-box {
    border: 1px solid var(--line);
    margin-top: 32px;
  }
  .proof-headline {
    background: var(--black);
    color: #fff;
    padding: 14px 24px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
  }
  .proof-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .proof-cell {
    padding: 32px 28px;
    background: #fff;
  }
  .proof-cell.bad { border-right: 1px solid var(--line); }
  .proof-cell h3 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 18px;
    padding-bottom: 6px;
    border-bottom: 2px solid;
  }
  .proof-cell.bad h3  { color: var(--text); border-color: var(--text-2); }
  .proof-cell.good h3 { color: var(--green); border-color: var(--green); }
  .proof-cell ul { list-style: none; padding: 0; margin: 0; }
  .proof-cell li {
    padding: 8px 0 8px 24px;
    position: relative;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    border-bottom: 1px solid var(--line-soft);
  }
  .proof-cell li:last-child { border-bottom: 0; }
  .proof-cell.bad li::before {
    content: '✕';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--muted);
  }
  .proof-cell.good li::before {
    content: '✓';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--green);
  }

  /* === Cases grid (reuses .project-card pattern from style-abb.css) === */
  .case-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    margin-top: 32px;
  }
  .case-cell {
    background: #fff;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 28px 24px;
    transition: background var(--transition);
  }
  .case-cell:hover { background: var(--bg-soft); }
  .case-cell .country {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 6px;
  }
  .case-cell h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
  .case-cell .loc { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
  .case-cell p { font-size: 14px; color: var(--text-2); line-height: 1.55; margin: 0 0 16px; }
  .case-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  .case-stats > div { font-feature-settings: 'tnum'; }
  .case-stats .v {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.01em;
  }
  .case-stats .l {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 6px;
  }

  /* === Q&A table (ABB-style: hairline rows, no rounded) === */
  .qa-table {
    border-top: 1px solid var(--line);
    margin-top: 32px;
  }
  .qa-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    border-bottom: 1px solid var(--line);
  }
  .qa-q {
    padding: 20px 28px 20px 0;
    font-weight: 600;
    color: var(--text);
    font-size: 16px;
    border-right: 1px solid var(--line);
    padding-right: 28px;
  }
  .qa-a {
    padding: 20px 0 20px 28px;
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.6;
  }
  .qa-a strong { color: var(--text); font-weight: 600; }

  /* === Feature lists (ABB-style checkmarks) === */
  .feature-list { list-style: none; padding: 0; margin: 0; }
  .feature-list li {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.6;
  }
  .feature-list li:last-child { border-bottom: 0; }
  .feature-list .check {
    color: var(--green);
    font-weight: 700;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
  }
  .feature-list strong { color: var(--text); font-weight: 600; }

  /* === Trust panel (right column) === */
  .trust-panel {
    background: var(--bg-soft);
    padding: 32px;
    border: 1px solid var(--line);
  }
  .trust-panel h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
  }
  .trust-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }
  .trust-cell {
    background: #fff;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 20px 18px;
  }
  .trust-cell .v {
    font-size: var(--fs-stat);
    font-weight: 800;
    color: var(--green);
    letter-spacing: -0.02em;
    line-height: 1;
  }
  .trust-cell .l {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 8px;
  }

  /* Inline highlight pills (subtle, ABB-style) */
  .hl {
    background: var(--green-pale);
    color: var(--green);
    padding: 1px 6px;
    border-radius: var(--radius);
    font-weight: 600;
  }

  /* Section heading layout */
  .section-head {
    max-width: 760px;
    margin-bottom: 40px;
  }
  .section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
  .section-head h2 { margin-bottom: 12px; }
  .section-head p  { font-size: 16px; color: var(--text-2); line-height: 1.6; max-width: 640px; }
  .section-head.center p { margin-left: auto; margin-right: auto; }

  /* Two-column layout for "Why LEONICS" */
  .two-col {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 48px;
    align-items: start;
  }

  /* Inline numbers row */
  .stat-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    margin-top: 32px;
  }
  .stat-row .item {
    background: #fff;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 24px 18px;
  }
  .stat-row .v {
    font-size: var(--fs-stat);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
    font-feature-settings: 'tnum';
  }
  .stat-row .v.green { color: var(--green); }
  .stat-row .l {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-top: 8px;
    line-height: 1.3;
  }

  /* Compliance pills row */
  .compliance-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 24px;
  }
  .compliance-pills .pill {
    display: inline-block;
    padding: 5px 10px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    letter-spacing: 0.3px;
  }

  /* Responsive */
  @media (max-width: 1024px) {
    .stat-row { grid-template-columns: repeat(3, 1fr); }
    .stat-row .item:nth-child(3n) { border-right: 0; }
    .two-col { grid-template-columns: 1fr; gap: 32px; }
  }
  @media (max-width: 768px) {
    .mech-grid, .outcome-cols, .proof-grid, .case-grid { grid-template-columns: 1fr; }
    .qa-row { grid-template-columns: 1fr; }
    .qa-q { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 0; }
    .qa-a { padding: 16px 0; }
    .stat-row { grid-template-columns: 1fr 1fr; }
    .trust-grid { grid-template-columns: 1fr 1fr; }
  }

  /* ═══════════════════════════════════════════════════════════
     On-Grid Operator Dashboard mockup (illustrative screenshot).
     Scoped .gm-* classes on ABB tokens; a dark UI header is the
     product's own chrome. Data-viz colors kept for chart legibility.
     ═══════════════════════════════════════════════════════════ */
  .gm-dash { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; margin-top: 20px; }
  .gm-dash-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #10263B; color: #fff; padding: 10px 14px; flex-wrap: wrap; }
  .gm-dash-top .gm-brand { font-weight: 800; font-size: 14px; letter-spacing: .2px; }
  .gm-dash-top .gm-brand b { color: #37D4A0; }
  .gm-dash-top .gm-site { font-size: 12px; color: #B9C6D4; }
  .gm-dash-top .gm-right { display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: #B9C6D4; flex-wrap: wrap; }
  .gm-badge-on { background: var(--green); color: #fff; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 100px; letter-spacing: .4px; }
  .gm-badge-ok { display: inline-flex; align-items: center; gap: 5px; background: rgba(55,212,160,.15); color: #37D4A0; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 100px; }
  .gm-badge-ok .gm-dt { width: 6px; height: 6px; border-radius: 50%; background: #37D4A0; }
  .gm-dash-body { padding: 12px; background: var(--bg-soft); }
  .gm-kpi-row { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin-bottom: 10px; }
  .gm-kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
  .gm-kpi .gm-kl { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
  .gm-kpi .gm-kv { font-weight: 800; font-size: 20px; margin-top: 2px; letter-spacing: -.01em; line-height: 1.1; }
  .gm-kpi .gm-ku { font-size: 11px; font-weight: 600; color: var(--muted); }
  .gm-kpi .gm-ks { font-size: 11px; margin-top: 2px; color: var(--muted); line-height: 1.35; }
  .gm-kv.pv { color: #B45309; } .gm-kv.load { color: #0369a1; } .gm-kv.grid { color: #dc2626; }
  .gm-kv.soc { color: var(--green); } .gm-kv.thb { color: var(--green-d); }
  .gm-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; overflow-x: auto; }
  .gm-card .gm-ct { font-weight: 700; font-size: 12.5px; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
  .gm-card .gm-ct .gm-csub { font-weight: 500; font-size: 11px; color: var(--muted); }
  .gm-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); margin: 2px 0 6px; }
  .gm-lg { display: inline-flex; align-items: center; gap: 4px; }
  .gm-sw { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
  .gm-sw.bar { height: 8px; width: 8px; border-radius: 2px; }
  .gm-bot { display: grid; grid-template-columns: 1.1fr .9fr 1.15fr; gap: 10px; }
  .gm-mini { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
  .gm-mini .gm-mt { font-weight: 700; font-size: 11.5px; margin-bottom: 6px; }
  .gm-tab { width: 100%; border-collapse: collapse; font-size: 11px; }
  .gm-tab th { background: #10263B; color: #fff; padding: 3px 5px; font-weight: 600; font-size: 11px; text-align: right; }
  .gm-tab th:first-child { text-align: left; }
  .gm-tab td { padding: 3px 5px; border-bottom: 1px solid var(--line); text-align: right; font-weight: 600; }
  .gm-tab td:first-child { text-align: left; font-weight: 600; color: var(--muted); }
  .gm-acc { display: flex; justify-content: space-between; align-items: center; font-size: 11px; padding: 4px 0; border-bottom: 1px solid var(--line); }
  .gm-acc:last-child { border: none; }
  .gm-acc .gm-av { font-weight: 800; font-size: 14px; color: var(--green); }
  .gm-log { font-family: 'Consolas','Courier New',monospace; font-size: 11px; line-height: 1.6; color: #2a3a2f; background: var(--green-pale); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; }
  .gm-log .gm-lt { color: #5a6b5f; }  /* was #6b7f70 = 4.06:1 on the pale-green log bg, under WCAG AA 4.5 */
  .gm-log .gm-lg2 { color: var(--green); font-weight: 700; }
  @media (max-width: 768px) {
    .gm-kpi-row { grid-template-columns: repeat(2,1fr); }
    .gm-bot { grid-template-columns: 1fr; }
  }

.ax { font: 500 11px Inter, sans-serif; fill: #6E6E6E; }
    .axs { font: 500 11px Inter, sans-serif; fill: #0F6E56; }
    .lg { font: 500 12px Inter, sans-serif; fill: #0A0A0A; }
    .note { font: 600 11.5px Inter, sans-serif; fill: #00734D; }
    .noteb { font: 600 11.5px Inter, sans-serif; fill: #BA7517; }
    .unit { font: 500 10px Inter, sans-serif; fill: #6E6E6E; letter-spacing:.5px; }

  /* === Demand-charge comparison (simulated Bang Bo case) ===
     Wide table scrolls inside its own container so the page body never does. */
  .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .dc-wrap { overflow-x: auto; margin-top: 24px; }
  .dc-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 14px;
  }
  .dc-table th,
  .dc-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: right;
    white-space: nowrap;
    color: var(--text-2);
    line-height: 1.5;
  }
  .dc-table thead th {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--black);
  }
  .dc-table th:first-child,
  .dc-table td:first-child { text-align: left; white-space: normal; }
  .dc-table tbody td:first-child { color: var(--text); font-weight: 500; }
  .dc-table tr:last-child td { border-bottom: 0; }
  .dc-table .is-best td { color: var(--green); font-weight: 600; }
  .dc-table .zero { color: var(--muted); }
  .dc-table .pct { color: var(--muted); font-weight: 400; }
  .dc-table .is-best .pct { color: var(--green); }
  @media (max-width: 560px) {
    .dc-table th, .dc-table td { padding: 12px 10px; }
  }

.gt { font: 600 13px Inter, sans-serif; fill:#0A0A0A; }
    .bv { font: 700 15px Inter, sans-serif; fill:#5F5E5A; }
    .bvg{ font: 700 15px Inter, sans-serif; fill:#00734D; }
    .bl { font: 500 11px Inter, sans-serif; fill:#6E6E6E; }
    .blg{ font: 600 11px Inter, sans-serif; fill:#00734D; }
    .delta { font: 700 20px Inter, sans-serif; fill:#00734D; }
    .sub { font: 500 11.5px Inter, sans-serif; fill:#6E6E6E; }
    .cap { font: 500 11px Inter, sans-serif; fill:#8A8A8A; }