/* ═══════════════════════════════════════════════════════════════
   MARMO — public demo list (/models) and the demo diagrams it shares with the home
   (includes/partials/demo_viz.php). The home loads this file before marmo-home.css.
   ═══════════════════════════════════════════════════════════════ */

/* ── Demo accents ── */
.acc-mas { --a: #8a5a07; --ai: #8a5a07; --at: #fbf1dc; }
.acc-st  { --a: #0b6f9e; --ai: #0b6f9e; --at: #e1f0f8; }
.acc-f1  { --a: #a31a22; --ai: #a31a22; --at: #f7dcd6; }
.acc-nhp { --a: #1f7a55; --ai: #1f7a55; --at: #e0f0e8; }
.acc-gen { --a: #6f5f3f; --ai: var(--bronze); --at: var(--surface2); }
:root:not([data-theme="light"]) .acc-mas { --ai: #e4b660; --at: #33270f; }
:root:not([data-theme="light"]) .acc-st  { --ai: #5cc4ee; --at: #0f2b3a; }
:root:not([data-theme="light"]) .acc-f1  { --ai: #ff8a84; --at: #3a1719; }
:root:not([data-theme="light"]) .acc-nhp { --ai: #4fd6a4; --at: #10301f; }

/* ── Diagrams ── */
.viz { display: flex; flex-direction: column; justify-content: center; gap: 18px; width: 100%; min-width: 0; line-height: normal; }
.viz.acc-f1 { gap: 14px; }
.viz-cap { font-size: 13px; color: var(--muted); }
.viz svg { display: block; max-width: 100%; }
.viz .viz-tall { max-width: 360px; height: auto; margin: 0 auto; }
.viz .v-flow { stroke: var(--ai); stroke-width: 1.8; fill: none; }
.viz .v-node { fill: var(--paper); stroke: var(--ai); }
.viz .v-tint { fill: var(--at); stroke: var(--ai); }
.viz .v-text { fill: var(--ink); font-family: var(--serif); }
.viz .v-solid { fill: var(--a); }
.viz .v-ok { fill: #2f6b3f; }
.viz .v-white { fill: #fffaf0; font-family: var(--serif); }
.viz .gauges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; justify-items: center; }
.viz .gauge { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; font-family: var(--serif); font-size: 21px; text-align: center; color: var(--ink); }
.viz .gauge svg { width: 170px; height: auto; aspect-ratio: 1; }
.viz .sources { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.viz .sources span { border: 1px solid var(--ai); color: var(--ai); padding: 5px 12px; }
.viz .stint { display: flex; gap: 5px; height: 56px; flex: none; }
.viz .stint span { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; min-width: 0; }
.viz .stint .soft { background: #c4262f; color: #fff; }
.viz .stint .med { background: #e2ac12; color: #241a02; }
.viz .stint .hard { background: #e6dfd3; color: #1c1715; }
:root:not([data-theme="light"]) .viz .stint .hard { background: #cfc6b8; }
.viz .stint.alt { opacity: .55; }
.viz .stint-label { font-family: var(--serif); font-size: 21px; color: var(--ink); }
.viz .stint-label.muted { color: var(--muted); }
.viz .laps { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--rule); padding-top: 10px; font-size: 13px; color: var(--muted); }
.viz .net { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 200px); gap: 24px; align-items: center; }
.viz .net svg { max-height: 230px; }
.viz .net-edge { stroke: var(--skel); stroke-width: 2; fill: none; }
.viz .net-path { stroke: var(--ai); stroke-width: 2.5; fill: none; }
.viz .net-node { fill: var(--paper); stroke: var(--ai); stroke-width: 2; }
.viz .net-bad { fill: #b01e26; }
.viz .net-ring { fill: none; stroke: var(--red-text); stroke-width: 1.5; stroke-dasharray: 4 4; }
.viz .plan { border-top: 1px solid var(--rule); }
.viz .plan li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink); display: flex; gap: 10px; }
.viz .plan i { flex: none; font-family: var(--serif); color: var(--ai); width: 20px; }
.viz-mark { align-self: center; width: 132px; height: 132px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--ai); border-radius: 50%; background: var(--at); color: var(--ai); }
.viz-mark svg { width: 58px; height: 58px; }

/* ── /models ── */
.demo-m { line-height: normal; }
.demo-m .d-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 80px var(--pad) 76px; }
.demo-m .d-head .display { font-size: clamp(42px, 4.2vw, 60px); }
.demo-m .d-head .lead { margin-top: 32px; }
.demo-m .d-head .lead strong { font-weight: inherit; }
.demo-m .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px 56px; padding: 0 var(--pad) 100px; }
.demo-m .card { position: relative; min-width: 0; border-radius: 10px; overflow: hidden; background: var(--a); padding: 10px 10px 0; display: flex; flex-direction: column; box-shadow: var(--shadow-s); transition: transform .25s; }
.demo-m .card.is-open:hover { transform: translateY(-4px); }
.demo-m .card-paper { min-height: 360px; flex: none; background: var(--surface); display: flex; align-items: center; padding: 24px 32px; }
.demo-m .card-foot { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: end; padding: 18px 18px 20px; color: #fffaf4; }
.demo-m .card-foot h2 { font-weight: 400; font-size: 24px; line-height: 1.15; margin-bottom: 8px; overflow-wrap: anywhere; }
.demo-m .card-foot p { font-size: 14px; line-height: 1.55; }
.demo-m .card-cta { background: #fbf9f5; color: #1c1715; border-radius: 3px; padding: 13px 18px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.demo-m .card-cta::after { content: ''; position: absolute; inset: 0; }
.demo-m .card.is-open:hover .card-cta { color: #b01e26; }
.demo-m .card-cta:focus-visible { outline: 0; }
.demo-m .card-cta:focus-visible::after { outline: 3px solid #fffaf4; outline-offset: -7px; }
.demo-m .card-note { font-size: 13px; opacity: .85; padding: 13px 0; }
@media (prefers-reduced-motion: reduce) {
    .demo-m .card { transition: none; }
    .demo-m .card.is-open:hover { transform: none; }
}

/* Two cards side by side leave the diagrams too small below this: one column */
@media (max-width: 1040px) {
    .demo-m .grid2 { grid-template-columns: minmax(0, 720px); justify-content: center; gap: 48px; }
    .demo-m .d-head { padding-top: 96px; padding-bottom: 88px; }
}
/* Two narrow columns: the button goes under the text */
@media (min-width: 1041px) and (max-width: 1180px) {
    .demo-m .grid2 { column-gap: 32px; }
    .demo-m .card-paper { padding-left: 20px; padding-right: 20px; }
    .demo-m .card-foot { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .demo-m .card-cta { justify-self: start; }
}

/* ── Phone ── */
@media (max-width: 760px) {
    .viz .gauge svg { width: 128px; max-width: 100%; }
    .viz .gauges { gap: 12px; }
    .viz .net { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .demo-m .d-head { padding: 56px 26px 52px; }
    .demo-m .d-head .display { font-size: 42px; }
    .demo-m .d-head .lead { margin-top: 20px; }
    .demo-m .grid2 { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 0 14px 80px; }
    .demo-m .card { padding: 8px 8px 0; }
    .demo-m .card.is-open:hover { transform: none; }
    .demo-m .card-paper { min-height: 0; padding: 22px 14px 26px; }
    .demo-m .card-foot { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px 10px; }
    .demo-m .card-foot h2 { font-size: 23px; }
    .demo-m .card-cta { text-align: center; padding: 15px; }
    .demo-m .card-note { text-align: center; }
}

.demo-m .grid2.sec-alt { padding-top: 64px; padding-bottom: 80px; }
@media (max-width: 760px) { .demo-m .grid2.sec-alt { padding-top: 28px; padding-bottom: 44px; } }
@media (max-width: 360px) { .demo-m .card-foot h2 { font-size: 20px; } }
