/* ==========================================================================
   Platform page · 8 — Accounting that fits how you already work
   The wireframe's two options as tiles (the bento language of section 5):
   a diagram well, then title and text.
     Bundle Odoo        Finflow ──Native──▶ Odoo ledger; each entry lands at
                        the top with a soft flash, older rows shift down
     Use your platform  Finflow ──▶ [API]     a steady stream (full)
                               ┄┄▶ [No API]  automated batches
   SVG/SMIL, paused off screen by js/platform/accounting.js.
   Prefixed .ac- and scoped to .ac.
   ========================================================================== */

.ac {
  --ac-tile:      #FFFFFF;
  --ac-well:      #F4F7FB;
  --ac-well-edge: rgba(10,47,107,0.06);
  --ac-frame:     #FFFFFF;
  --ac-shadow:    0 1px 2px rgba(10,47,107,0.04), 0 18px 40px -28px rgba(10,47,107,0.28);
  --ac-dot:       rgba(10,47,107,0.13);

  position: relative;
  padding: clamp(72px, 9vw, 120px) var(--page-px);
  background: var(--surface-raised);
  border-top: 1px solid var(--border);
}
:root[data-theme="dark"] .ac {
  --ac-tile:      #0B1F42;
  --ac-well:      #08193A;
  --ac-well-edge: rgba(255,255,255,0.05);
  --ac-frame:     #0B1F42;
  --ac-shadow:    0 18px 40px -28px rgba(0,0,0,0.6);
  --ac-dot:       rgba(147,190,240,0.12);
}

.ac-inner { max-width: var(--container); margin: 0 auto; }
.ac-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(36px, 4.5vw, 56px); }
.ac-title { max-width: 900px; font-size: var(--fs-section-title); font-weight: 600; line-height: 1.12; letter-spacing: -0.03em; text-wrap: balance; }
.ac-title em { font-style: normal; color: var(--accent); }
.ac-sub { font-size: var(--fs-section-sub); line-height: 1.6; color: var(--text-secondary); }

.ac-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ac-opt {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 24px;
  background: var(--ac-tile);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--ac-shadow);
  transition: border-color 0.25s ease;
}
.ac-opt:hover { border-color: var(--accent-line); }
.ac-well {
  display: grid;
  place-items: center;
  height: 236px;
  padding: 16px;
  background: var(--ac-well);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--ac-well-edge);
  position: relative;
  isolation: isolate;            /* keeps the dots behind the diagram */
}
/* a fine dot grid, as in the home principles' demo wells: strongest in the
   middle, fading toward the edges so it never competes with the diagram */
.ac-well::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background-image: radial-gradient(circle, var(--ac-dot) 0.9px, transparent 1.3px);
  background-size: 14px 14px;
  background-position: 7px 7px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 30%, transparent 85%);
}
.ac-svg { display: block; width: 100%; max-width: 460px; height: 100%; overflow: visible; }
.ac-name { margin-top: 22px; padding: 0 4px; font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); }
.ac-text { margin-top: 6px; padding: 0 4px; max-width: 520px; font-size: 14.5px; line-height: 1.65; color: var(--text-secondary); }

/* ─── Diagram parts ───────────────────────────────────────────────────── */
.ac-fin rect { fill: var(--ac-frame); stroke: var(--accent); stroke-width: 1.4; }
.ac-fin text { font-family: var(--font-display); font-size: 12.5px; font-weight: 600; text-anchor: middle; fill: var(--text-primary); }
.ac-wire { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; }
.ac-wire--dash { stroke: var(--text-muted); stroke-dasharray: 4 5; }
.ac-pill rect { fill: var(--accent-soft); }
.ac-pill text { font-family: var(--font-body); font-size: 10.5px; font-weight: 600; text-anchor: middle; fill: var(--accent-text); }

.ac-panel rect { fill: var(--ac-frame); stroke: var(--border-strong); stroke-width: 1; }
.ac-odoo--dark { display: none; }
:root[data-theme="dark"] .ac-odoo--light { display: none; }
:root[data-theme="dark"] .ac-odoo--dark { display: inline; }
.ac-rule { stroke: var(--border); stroke-width: 1; }
.ac-dot { fill: var(--good); }
.ac-bar { fill: var(--text-muted); opacity: 0.35; }
.ac-bar--amt { fill: var(--text-secondary); opacity: 0.55; }
.ac-flash { fill: var(--accent-soft); opacity: 0; }

.ac-plat > rect:first-child { fill: var(--ac-frame); stroke: var(--accent); stroke-width: 1.2; }
.ac-plat.is-auto > rect:first-child { stroke: var(--border-strong); }
.ac-tag { fill: var(--accent-soft); }
.ac-tag-t { font-family: var(--font-body); font-size: 10px; font-weight: 600; text-anchor: middle; fill: var(--accent-text); }
.ac-plat.is-auto .ac-tag { fill: var(--ac-well); }
.ac-plat.is-auto .ac-tag-t { fill: var(--text-secondary); }

.ac-pkt { fill: var(--accent); }
.ac-pkt--auto { fill: var(--text-secondary); }

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .ac-opts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .ac-well { height: 196px; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-pkt { display: none; }
}
