/* =============================================================================
   YURBI AI — styles for /ai/, /ai/security/, /ai/cost/ and the shared AI
   partials (ai-flow, ai-cost). Uses the design tokens in global.css.
   ============================================================================= */

/* ---------- Shared bits ---------- */
.ai-more { color: var(--blue); font-weight: var(--w-bold); white-space: nowrap; }
.ai-more:hover { text-decoration: underline; }
.ai-lede { font-size: var(--t-lead); color: var(--text-sec); line-height: var(--lh-relaxed); max-width: 600px; }
.ai-center { text-align: center; }
.ai-center .ai-lede { margin-inline: auto; }
.ai-caption { font-size: var(--t-sm); color: var(--text-muted); line-height: var(--lh-normal); margin-top: var(--s-3); max-width: 860px; }
.ai-section-tight { padding-block: var(--s-16); }

.ai-head-art { display: grid; grid-template-columns: 1fr auto; gap: var(--s-10); align-items: end; margin-bottom: var(--s-12); }
.ai-head-art .sh-block { margin-bottom: 0; }
.ai-head-art img { width: 190px; height: auto; display: block; }
@media (max-width: 800px) { .ai-head-art { grid-template-columns: 1fr; } .ai-head-art img { display: none; } }

/* ---------- Hero ---------- */
.ai-hero { padding-block: var(--s-14) var(--s-16); background: linear-gradient(180deg, var(--bg-blue) 0%, var(--bg) 100%); }
.ai-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--s-14); align-items: center; }
.ai-hero h1 { font-size: var(--t-hero-page); line-height: var(--lh-tight); letter-spacing: var(--ls-tight); color: var(--text); margin-bottom: var(--s-5); }
.ai-hero h1 em { font-style: normal; color: var(--blue); }
.ai-hero .ai-lede { margin-bottom: var(--s-6); max-width: 540px; }
.ai-chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-8); padding: 0; }
.ai-chips li { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: var(--w-semibold); color: var(--blue-deeper); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-full); padding: 6px 14px; }
.ai-chips li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.ai-ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.ai-fine { font-size: var(--t-sm); color: var(--text-muted); margin-top: var(--s-4); }
.ai-fine a { color: var(--blue); font-weight: var(--w-semibold); }

.ai-hero-art { position: relative; padding-top: 116px; }
.ai-hero-mascot { position: absolute; top: 0; right: 16px; width: 172px; height: auto; z-index: 2; pointer-events: none; }
.ai-asks { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--sh-lg); padding: var(--s-6); }
.ai-asks-title { font-size: var(--t-label); font-weight: var(--w-bold); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--s-4); padding-right: 190px; }
.ai-asks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.ai-asks li { background: var(--bg-subtle); border: 1px solid var(--border-sub); border-radius: var(--r-lg); padding: var(--s-4); }
.ai-asks q { display: block; font-weight: var(--w-bold); color: var(--text); font-size: var(--t-base); line-height: var(--lh-snug); quotes: none; }
.ai-asks q::before, .ai-asks q::after { content: none; }
.ai-asks li span { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s-2); font-size: var(--t-sm); font-weight: var(--w-semibold); color: var(--green); }
.ai-asks li span::before { content: '→'; }
.ai-asks-foot { margin: var(--s-4) 0 0; font-size: var(--t-sm); color: var(--text-sec); }
.ai-asks-foot strong { color: var(--text); }
.ai-frame { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg); border: 1px solid var(--border); }
.ai-frame video { display: block; width: 100%; height: auto; }

@media (max-width: 960px) {
  .ai-hero-grid { grid-template-columns: 1fr; gap: var(--s-10); }
  .ai-hero h1 { font-size: var(--t-4xl); }
  .ai-hero-art { padding-top: 0; }
  .ai-hero-mascot { display: none; }
  .ai-asks-title { padding-right: 0; }
}
@media (max-width: 480px) { .ai-hero h1 { font-size: var(--t-3xl); } }

/* ---------- Flow diagram ---------- */
.ai-flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s-4); align-items: stretch; }
.ai-flow-zone { border-radius: var(--r-xl); padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-4); }
.ai-flow-zone-ai { background: var(--bg); border: 2px dashed var(--border); }
.ai-flow-zone-yurbi { background: var(--blue-soft); border: 2px solid var(--blue); }
.ai-flow-label { font-size: var(--t-label); font-weight: var(--w-bold); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--text-muted); }
.ai-flow-zone-yurbi .ai-flow-label { color: var(--blue-deeper); }
.ai-flow-nodes { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s-3); align-items: stretch; flex: 1; }
.ai-flow-node { background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-lg); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); box-shadow: var(--sh-sm); }
.ai-flow-node strong { font-size: var(--t-base); line-height: var(--lh-snug); color: var(--text); }
.ai-flow-node-result { border-color: var(--green-border); background: var(--green-soft); }
.ai-flow-n { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-size: var(--t-sm); font-weight: var(--w-bold); display: inline-flex; align-items: center; justify-content: center; }
.ai-flow-zone-yurbi .ai-flow-n { background: var(--blue); }
.ai-flow-bubble { font-size: var(--t-sm); color: var(--text-sec); background: var(--bg-subtle); border-radius: var(--r-md); padding: 8px 10px; line-height: 1.35; }
.ai-flow-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ai-flow-chips i { font-style: normal; font-size: var(--t-caption); font-weight: var(--w-semibold); color: var(--text-sec); background: var(--bg-muted); border-radius: var(--r-full); padding: 3px 9px; }
.ai-flow-zone-yurbi .ai-flow-chips i { background: var(--bg); color: var(--blue-deeper); border: 1px solid var(--blue-soft2); }
.ai-flow-node-result .ai-flow-chips i { border-color: var(--green-border); color: var(--green-hover); }
.ai-flow-arrow { align-self: center; width: 22px; height: 2px; background: var(--text-muted); position: relative; }
.ai-flow-arrow::after { content: ''; position: absolute; right: -1px; top: -4px; border-left: 7px solid var(--text-muted); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.ai-flow-foot { font-size: var(--t-sm); color: var(--text-sec); line-height: var(--lh-normal); margin: 0; }
.ai-flow-gate { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2); width: 112px; text-align: center; }
.ai-flow-gate img { width: 96px; height: auto; }
.ai-flow-gate span { font-size: var(--t-label); font-weight: var(--w-xbold); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--error); line-height: 1.2; }
@media (max-width: 1080px) {
  .ai-flow { grid-template-columns: 1fr; }
  .ai-flow-gate { flex-direction: row; width: auto; padding-block: var(--s-2); }
  .ai-flow-gate img { width: 64px; }
}
@media (max-width: 560px) {
  .ai-flow-nodes { grid-template-columns: 1fr; }
  .ai-flow-arrow { transform: rotate(90deg); justify-self: center; margin-block: 4px; }
}

.ai-after { list-style: none; margin: var(--s-10) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.ai-after li { font-size: var(--t-base); color: var(--text-sec); line-height: var(--lh-normal); border-left: 3px solid var(--blue); padding-left: var(--s-4); }
.ai-after li strong { display: block; color: var(--text); font-size: var(--t-body); margin-bottom: 4px; }
@media (max-width: 800px) { .ai-after { grid-template-columns: 1fr; } }

/* ---------- Two-column contrast (model-written SQL vs Ask AI) ---------- */
.ai-contrast { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.ai-contrast-col { border-radius: var(--r-xl); padding: var(--s-8); border: 1px solid var(--border-sub); background: var(--bg); }
.ai-contrast-col h3 { font-size: var(--t-card); color: var(--text); margin-bottom: var(--s-4); }
.ai-contrast-bad { background: var(--error-soft); border-color: #F2C4BE; }
.ai-contrast-good { background: var(--green-soft); border-color: var(--green-border); }
.ai-contrast ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.ai-contrast li { position: relative; padding-left: 28px; font-size: var(--t-base); color: var(--text-sec); line-height: var(--lh-normal); }
.ai-contrast li::before { position: absolute; left: 0; top: 0; font-weight: var(--w-xbold); }
.ai-contrast-bad li::before { content: '✕'; color: var(--error); }
.ai-contrast-good li::before { content: '✓'; color: var(--green); }
.ai-contrast li strong { color: var(--text); }
@media (max-width: 800px) { .ai-contrast { grid-template-columns: 1fr; } }

/* ---------- Tiles (what it builds) ---------- */
.ai-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.ai-tile { background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-sm); display: flex; flex-direction: column; }
.ai-tile-art { height: 150px; background: var(--bg-blue); display: flex; align-items: center; justify-content: center; padding: var(--s-5); }
.ai-tile-body { padding: var(--s-6); }
.ai-tile-body h3 { font-size: var(--t-card); color: var(--text); margin-bottom: var(--s-2); }
.ai-tile-body q { display: block; font-size: var(--t-sm); font-weight: var(--w-semibold); color: var(--blue-deeper); background: var(--blue-soft); border-radius: var(--r-md); padding: 8px 12px; margin-bottom: var(--s-3); quotes: none; }
.ai-tile-body q::before, .ai-tile-body q::after { content: none; }
.ai-tile-body p { font-size: var(--t-base); color: var(--text-sec); line-height: var(--lh-normal); margin: 0; }
@media (max-width: 900px) { .ai-tiles { grid-template-columns: 1fr; } }

/* mini art */
.ai-art-grid { width: 100%; max-width: 230px; background: var(--bg); border-radius: var(--r-md); box-shadow: var(--sh-sm); overflow: hidden; font-size: 11px; }
.ai-art-grid div { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--border-sub); color: var(--text-sec); }
.ai-art-grid div:first-child { background: var(--navy); color: #fff; font-weight: var(--w-bold); }
.ai-art-grid div:last-child { border-bottom: 0; }
.ai-art-grid b { color: var(--green); font-weight: var(--w-bold); }
.ai-art-grid b.dn { color: var(--error); }
.ai-art-kpi { background: var(--bg); border-radius: var(--r-md); box-shadow: var(--sh-sm); padding: 12px 18px; min-width: 190px; }
.ai-art-kpi small { display: block; font-size: 11px; font-weight: var(--w-bold); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--text-muted); }
.ai-art-kpi strong { display: block; font-size: 30px; font-weight: var(--w-xbold); color: var(--text); line-height: 1.15; }
.ai-art-kpi span { font-size: 12px; font-weight: var(--w-bold); color: var(--green); }
.ai-art-kpi svg { display: block; width: 100%; height: 26px; margin-top: 4px; }
.ai-art-bars { display: flex; align-items: flex-end; gap: 9px; height: 104px; background: var(--bg); border-radius: var(--r-md); box-shadow: var(--sh-sm); padding: 12px 16px; }
.ai-art-bars i { width: 20px; background: var(--blue); border-radius: 4px 4px 0 0; }
.ai-art-bars i:nth-child(even) { background: #6FB1E4; }

/* ---------- Expander ---------- */
.ai-details { margin-top: var(--s-8); border: 1px solid var(--border-sub); border-radius: var(--r-lg); background: var(--bg); }
.ai-details summary { cursor: pointer; padding: var(--s-5) var(--s-6); font-weight: var(--w-bold); color: var(--blue); font-size: var(--t-body); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }
.ai-details summary::-webkit-details-marker { display: none; }
.ai-details summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--text-muted); }
.ai-details[open] summary::after { content: '–'; }
.ai-details[open] summary { border-bottom: 1px solid var(--border-sub); }
.ai-details-body { padding: var(--s-6); }
.ai-details-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-8); }
.ai-details-body h4 { font-size: var(--t-base); color: var(--text); margin-bottom: var(--s-3); }
.ai-details-body h4 + ul { margin-bottom: var(--s-6); }
@media (max-width: 900px) { .ai-details-cols { grid-template-columns: 1fr; gap: var(--s-4); } }

.ai-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.ai-list li { position: relative; padding-left: 22px; font-size: var(--t-base); color: var(--text-sec); line-height: var(--lh-normal); }
.ai-list li::before { content: ''; position: absolute; left: 4px; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.ai-list li strong { color: var(--text); }
.ai-list-x li::before { content: '✕'; background: none; width: auto; height: auto; top: 0; left: 2px; color: var(--error); font-weight: var(--w-xbold); font-size: var(--t-sm); }

/* ---------- Who can use it (today / next) ---------- */
.ai-who { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.ai-who-card { border-radius: var(--r-xl); padding: var(--s-8); border: 1px solid var(--border-sub); background: var(--bg); }
.ai-who-now { border: 2px solid var(--green); }
.ai-who-next { border-style: dashed; border-color: var(--border); background: var(--bg-subtle); }
.ai-who-tag { display: inline-block; font-size: var(--t-label); font-weight: var(--w-bold); letter-spacing: var(--ls-wider); text-transform: uppercase; border-radius: var(--r-full); padding: 4px 12px; margin-bottom: var(--s-4); }
.ai-who-now .ai-who-tag { background: var(--green-soft); color: var(--green-hover); }
.ai-who-next .ai-who-tag { background: var(--bg-muted); color: var(--text-sec); }
.ai-who-card h3 { font-size: var(--t-xl); color: var(--text); margin-bottom: var(--s-3); line-height: var(--lh-snug); }
.ai-who-card p { font-size: var(--t-base); color: var(--text-sec); line-height: var(--lh-relaxed); margin: 0 0 var(--s-4); }
.ai-roles { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.ai-role { display: inline-block; font-size: var(--t-caption); font-weight: var(--w-bold); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--blue-deeper); background: var(--blue-soft); border-radius: var(--r-full); padding: 4px 11px; }
@media (max-width: 800px) { .ai-who { grid-template-columns: 1fr; } }

/* ---------- Stepper ---------- */
.ai-stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); counter-reset: aistep; }
.ai-stepper li { position: relative; background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-xl); padding: var(--s-6); box-shadow: var(--sh-sm); counter-increment: aistep; }
.ai-stepper li::before { content: counter(aistep); position: absolute; top: var(--s-5); right: var(--s-5); font-size: var(--t-3xl); font-weight: var(--w-xbold); color: var(--blue-soft2); line-height: 1; }
.ai-stepper h3 { font-size: var(--t-card); color: var(--text); margin: var(--s-4) 0 var(--s-2); }
.ai-stepper p { font-size: var(--t-base); color: var(--text-sec); line-height: var(--lh-normal); margin: 0; }
@media (max-width: 960px) { .ai-stepper { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ai-stepper { grid-template-columns: 1fr; } }

/* ---------- What you pay / don't pay ---------- */
.ai-pay { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--s-5); align-items: stretch; }
.ai-pay-col { background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-xl); padding: var(--s-8); }
.ai-pay-col h3 { font-size: var(--t-card); color: var(--text); margin-bottom: var(--s-4); }
.ai-pay-no { background: var(--bg-subtle); }
.ai-pay-art { display: flex; align-items: flex-end; }
.ai-pay-art img { width: 170px; height: auto; display: block; }
@media (max-width: 960px) { .ai-pay { grid-template-columns: 1fr; } .ai-pay-art { display: none; } }
.ai-keyline { margin-top: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: center; background: var(--blue-soft); border: 1px solid var(--blue-soft2); border-radius: var(--r-lg); padding: var(--s-4) var(--s-6); font-size: var(--t-base); color: var(--text-sec); line-height: var(--lh-normal); }
.ai-keyline strong { color: var(--text); }
.ai-keyline span { flex: 1 1 380px; }

/* ---------- Cost strip ---------- */
.ai-coststrip { margin-top: var(--s-5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5); background: var(--navy); color: var(--on-dark-sec); border-radius: var(--r-xl); padding: var(--s-6) var(--s-8); }
.ai-coststrip-num { width: 56px; height: 56px; border-radius: 50%; background: var(--on-dark-badge); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: var(--w-xbold); flex-shrink: 0; }
.ai-coststrip-body { flex: 1 1 420px; font-size: var(--t-base); line-height: var(--lh-normal); }
.ai-coststrip-body strong { display: block; color: #fff; font-size: var(--t-card); margin-bottom: 4px; }
.ai-coststrip .ai-more { color: var(--on-dark-badge); }

/* ---------- Icon cards ---------- */
.ai-icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); }
.ai-icons-3 { grid-template-columns: repeat(3, 1fr); }
.ai-icon { background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-xl); padding: var(--s-6); box-shadow: var(--sh-sm); }
.ai-icon-badge { width: 46px; height: 46px; border-radius: var(--r-md); background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; margin-bottom: var(--s-4); }
.ai-icon-badge svg { width: 24px; height: 24px; }
.ai-icon h3 { font-size: var(--t-card); color: var(--text); margin-bottom: var(--s-2); line-height: var(--lh-snug); }
.ai-icon p { font-size: var(--t-base); color: var(--text-sec); line-height: var(--lh-normal); margin: 0; }
.ai-icon p + p { margin-top: var(--s-3); }
@media (max-width: 1024px) { .ai-icons { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ai-icons, .ai-icons-3 { grid-template-columns: 1fr; } }

/* ---------- Roadmap ---------- */
.ai-road { display: grid; grid-template-columns: auto 1fr; gap: var(--s-12); align-items: start; }
.ai-road > img { width: 200px; height: auto; }
.ai-road-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.ai-road-list li { display: grid; grid-template-columns: 130px 1fr; gap: var(--s-5); background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-lg); padding: var(--s-5) var(--s-6); align-items: start; }
.ai-road-list li.is-now { border-color: var(--green); background: var(--green-soft); }
.ai-road-when { font-size: var(--t-label); font-weight: var(--w-bold); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--blue); padding-top: 3px; }
.ai-road-list li.is-now .ai-road-when { color: var(--green-hover); }
.ai-road-list h3 { font-size: var(--t-body); color: var(--text); margin-bottom: 4px; }
.ai-road-list p { font-size: var(--t-base); color: var(--text-sec); line-height: var(--lh-normal); margin: 0; }
@media (max-width: 900px) { .ai-road { grid-template-columns: 1fr; } .ai-road > img { display: none; } }
@media (max-width: 560px) { .ai-road-list li { grid-template-columns: 1fr; gap: var(--s-2); } }

/* ---------- Tables ---------- */
.ai-table-wrap { overflow-x: auto; border: 1px solid var(--border-sub); border-radius: var(--r-lg); background: var(--bg); }
.ai-table { width: 100%; border-collapse: collapse; font-size: var(--t-base); min-width: 640px; }
.ai-table th, .ai-table td { text-align: left; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border-sub); vertical-align: top; line-height: var(--lh-normal); color: var(--text-sec); }
.ai-table thead th { background: var(--navy); color: #fff; font-size: var(--t-sm); font-weight: var(--w-bold); border-bottom: 0; }
.ai-table tbody th { color: var(--text); font-weight: var(--w-bold); }
.ai-table tbody tr:last-child th, .ai-table tbody tr:last-child td { border-bottom: 0; }
.ai-table .is-good { color: var(--green-hover); font-weight: var(--w-bold); }
.ai-table tr.is-typical { background: var(--bg-blue); }
.ai-cost-sub { display: block; font-size: var(--t-sm); font-weight: var(--w-regular); color: var(--text-muted); }
.ai-table thead .ai-cost-sub { color: var(--on-dark-sec); }
.ai-pill { display: inline-block; font-size: var(--t-caption); font-weight: var(--w-bold); border-radius: var(--r-full); padding: 2px 10px; white-space: nowrap; }
.ai-pill-never { background: var(--green-soft); color: var(--green-hover); }
.ai-pill-always { background: var(--blue-soft); color: var(--blue-deeper); }
.ai-pill-opt { background: #FFF4D6; color: #7A5200; }

/* ---------- Security: boundary graphic ---------- */
.ai-bound { background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-xl); padding: var(--s-8); box-shadow: var(--sh-md); }
.ai-bound-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); margin-bottom: var(--s-6); }
.ai-bound-top > span { font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--text-muted); text-transform: uppercase; letter-spacing: var(--ls-wide); }
.ai-seg { display: inline-flex; background: var(--bg-muted); border-radius: var(--r-full); padding: 4px; gap: 2px; }
.ai-seg button { font-family: var(--font); font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--text-sec); background: none; border: 0; border-radius: var(--r-full); padding: 8px 16px; cursor: pointer; min-height: 36px; }
.ai-seg button.is-on { background: var(--blue); color: #fff; }
.ai-bound-note { font-size: var(--t-sm); color: var(--text-sec); font-weight: var(--w-semibold); }
.ai-bound-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s-5); align-items: stretch; }
.ai-bound-col { border-radius: var(--r-lg); padding: var(--s-6); }
.ai-bound-stay { background: var(--green-soft); border: 2px solid var(--green-border); }
.ai-bound-go { background: var(--bg-subtle); border: 2px dashed var(--border); }
.ai-bound-col h3 { font-size: var(--t-card); color: var(--text); margin-bottom: 2px; }
.ai-bound-col > p { font-size: var(--t-sm); color: var(--text-muted); margin: 0 0 var(--s-4); }
.ai-bound-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.ai-bound-col li { background: var(--bg); border-radius: var(--r-md); padding: 10px 14px; border: 1px solid var(--border-sub); display: none; }
.ai-bound-col li strong { display: block; font-size: var(--t-base); color: var(--text); line-height: var(--lh-snug); }
.ai-bound-col li span { font-size: var(--t-sm); color: var(--text-muted); }
.ai-bound-col li.is-moved { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft2); }
.ai-bound[data-mode="default"] li[data-modes~="default"],
.ai-bound[data-mode="share"] li[data-modes~="share"],
.ai-bound[data-mode="strict"] li[data-modes~="strict"] { display: block; }
.ai-bound-line { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2); width: 96px; text-align: center; }
.ai-bound-line img { width: 88px; height: auto; }
.ai-bound-line span { font-size: var(--t-label); font-weight: var(--w-xbold); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--blue-deeper); line-height: 1.2; }
@media (max-width: 900px) {
  .ai-bound-cols { grid-template-columns: 1fr; }
  .ai-bound-line { flex-direction: row; width: auto; }
  .ai-bound-line img { width: 56px; }
  .ai-bound { padding: var(--s-5); }
}

/* ---------- Security: switches ---------- */
.ai-switches { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.ai-switch { background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-xl); padding: var(--s-6); box-shadow: var(--sh-sm); }
.ai-switch small { display: block; font-size: var(--t-label); font-weight: var(--w-bold); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--s-3); }
.ai-switch-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-4); }
.ai-switch-opts i { font-style: normal; font-size: var(--t-sm); font-weight: var(--w-bold); border-radius: var(--r-full); padding: 5px 13px; border: 1.5px solid var(--border); color: var(--text-sec); background: var(--bg); }
.ai-switch-opts i.is-default { border-color: var(--green); color: var(--green-hover); background: var(--green-soft); }
.ai-switch-opts i.is-strong { border-color: var(--blue); color: #fff; background: var(--blue); }
.ai-switch p { font-size: var(--t-base); color: var(--text-sec); line-height: var(--lh-normal); margin: 0; }
@media (max-width: 900px) { .ai-switches { grid-template-columns: 1fr; } }
.ai-warn { margin-top: var(--s-5); background: #FFF8E6; border: 1px solid #F0D48A; border-radius: var(--r-lg); padding: var(--s-5) var(--s-6); font-size: var(--t-base); color: var(--text-sec); line-height: var(--lh-normal); }
.ai-warn strong { color: var(--text); }

/* ---------- Security: network diagram ---------- */
.ai-net-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-12); align-items: center; }
.ai-net { border: 2px solid var(--blue); border-radius: var(--r-xl); padding: var(--s-6); background: var(--bg); position: relative; }
.ai-net-label { position: absolute; top: -13px; left: var(--s-5); background: var(--blue); color: #fff; font-size: var(--t-label); font-weight: var(--w-bold); letter-spacing: var(--ls-wider); text-transform: uppercase; border-radius: var(--r-full); padding: 4px 14px; }
.ai-net-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); margin-top: var(--s-3); }
.ai-net-box { background: var(--blue-soft); border-radius: var(--r-lg); padding: var(--s-4); text-align: center; }
.ai-net-box strong { display: block; font-size: var(--t-base); color: var(--text); line-height: var(--lh-snug); }
.ai-net-box span { font-size: var(--t-sm); color: var(--text-sec); }
.ai-net-foot { margin: var(--s-4) 0 0; font-size: var(--t-sm); color: var(--text-sec); text-align: center; line-height: var(--lh-normal); }
.ai-net-art { display: block; width: 240px; height: auto; margin: 0 auto var(--s-5); }
@media (max-width: 900px) { .ai-net-grid { grid-template-columns: 1fr; gap: var(--s-8); } .ai-net-row { grid-template-columns: 1fr; } }

/* ---------- Security: audit receipt ---------- */
.ai-audit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-12); align-items: start; }
.ai-receipt { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-md); font-family: var(--mono); font-size: var(--t-sm); overflow: hidden; }
.ai-receipt-head { background: var(--navy); color: #fff; padding: var(--s-3) var(--s-5); font-family: var(--font); font-weight: var(--w-bold); font-size: var(--t-sm); }
.ai-receipt dl { margin: 0; padding: var(--s-2) var(--s-5) var(--s-4); }
.ai-receipt dl div { display: grid; grid-template-columns: 120px 1fr; gap: var(--s-3); padding: 9px 0; border-bottom: 1px dashed var(--border-sub); }
.ai-receipt dl div:last-child { border-bottom: 0; }
.ai-receipt dt { color: var(--text-muted); }
.ai-receipt dd { margin: 0; color: var(--text); }
@media (max-width: 900px) { .ai-audit-grid { grid-template-columns: 1fr; gap: var(--s-8); } }

/* ---------- Cost page ---------- */
.ai-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin-top: var(--s-8); }
.ai-stat { background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-lg); padding: var(--s-5); }
.ai-stat strong { display: block; font-size: var(--t-2xl); font-weight: var(--w-xbold); color: var(--blue); line-height: 1.15; }
.ai-stat span { font-size: var(--t-sm); color: var(--text-sec); line-height: var(--lh-normal); }
@media (max-width: 700px) { .ai-stat-row { grid-template-columns: 1fr; } }

.ai-notrow { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.ai-notrow-card { background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-xl); padding: var(--s-8); text-align: center; }
.ai-notrow-card h3 { font-size: var(--t-card); color: var(--text); margin-bottom: var(--s-2); }
.ai-notrow-card p { font-size: var(--t-base); color: var(--text-sec); margin: 0; line-height: var(--lh-normal); }
.ai-notrow-bars { display: flex; justify-content: center; align-items: flex-end; gap: var(--s-8); height: 130px; margin-bottom: var(--s-5); }
.ai-notrow-bars div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; font-size: var(--t-sm); font-weight: var(--w-semibold); color: var(--text-muted); }
.ai-notrow-bars i { display: block; width: 54px; border-radius: 6px 6px 0 0; background: var(--blue); }
.ai-notrow-bars i.flat { background: var(--green); }
@media (max-width: 800px) { .ai-notrow { grid-template-columns: 1fr; } }

.ai-savers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.ai-saver { background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-xl); padding: var(--s-6); box-shadow: var(--sh-sm); }
.ai-saver-n { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: var(--w-bold); align-items: center; justify-content: center; margin-bottom: var(--s-3); }
.ai-saver h3 { font-size: var(--t-card); color: var(--text); margin-bottom: var(--s-2); line-height: var(--lh-snug); }
.ai-saver > p { font-size: var(--t-base); color: var(--text-sec); line-height: var(--lh-normal); margin: 0; }
.ai-saver details { margin-top: var(--s-3); }
.ai-saver summary { cursor: pointer; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--blue); }
.ai-saver details .ai-list { margin-top: var(--s-3); }
.ai-saver details .ai-list li { font-size: var(--t-sm); }
@media (max-width: 1000px) { .ai-savers { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .ai-savers { grid-template-columns: 1fr; } }

.ai-est { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-xl); padding: var(--s-8); box-shadow: var(--sh-md); }
.ai-est-form { display: grid; gap: var(--s-5); align-content: start; }
.ai-est-form label { display: block; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--text); margin-bottom: 6px; }
.ai-est-form input[type="number"], .ai-est-form select { width: 100%; font-family: var(--font); font-size: var(--t-base); padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--r-md); background: var(--bg); color: var(--text); min-height: 44px; }
.ai-est-form input:focus, .ai-est-form select:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.ai-est-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.ai-est-check { display: flex; align-items: center; gap: var(--s-3); font-size: var(--t-base); color: var(--text-sec); }
.ai-est-check input { width: 20px; height: 20px; accent-color: var(--blue); }
.ai-est-out { background: var(--navy); color: var(--on-dark-sec); border-radius: var(--r-lg); padding: var(--s-8); display: flex; flex-direction: column; justify-content: center; }
.ai-est-out small { font-size: var(--t-label); font-weight: var(--w-bold); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--on-dark-head); }
.ai-est-big { font-size: 3rem; font-weight: var(--w-xbold); color: #fff; line-height: 1.1; margin: var(--s-2) 0 var(--s-4); }
.ai-est-out ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--t-base); }
.ai-est-out ul strong { color: #fff; }
.ai-est-out p { font-size: var(--t-sm); color: var(--on-dark-sec); margin: var(--s-4) 0 0; line-height: var(--lh-normal); }
.ai-est-out ul { color: var(--on-dark-sec); }
@media (max-width: 860px) { .ai-est { grid-template-columns: 1fr; padding: var(--s-5); } }

.ai-limits { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-12); align-items: center; }
.ai-formula { background: var(--navy); color: #fff; border-radius: var(--r-xl); padding: var(--s-8); }
.ai-formula small { display: block; font-size: var(--t-label); font-weight: var(--w-bold); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--on-dark-head); margin-bottom: var(--s-3); }
.ai-formula-eq { font-family: var(--mono); font-size: var(--t-card); line-height: 1.6; color: var(--on-dark-badge); }
.ai-formula p { font-size: var(--t-base); color: var(--on-dark-sec); margin: var(--s-4) 0 0; line-height: var(--lh-normal); }
@media (max-width: 900px) { .ai-limits { grid-template-columns: 1fr; gap: var(--s-8); } }

.ai-provs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.ai-prov { background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-xl); padding: var(--s-6); }
.ai-prov h3 { font-size: var(--t-card); color: var(--text); margin-bottom: var(--s-2); }
.ai-prov p { font-size: var(--t-sm); color: var(--text-muted); margin: 0 0 var(--s-4); line-height: var(--lh-normal); }
.ai-prov-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-prov-chips i { font-style: normal; font-size: var(--t-sm); font-weight: var(--w-semibold); color: var(--text-sec); background: var(--bg-subtle); border: 1px solid var(--border-sub); border-radius: var(--r-full); padding: 4px 12px; }
.ai-prov-builtin .ai-prov-chips i { background: var(--blue-soft); border-color: var(--blue-soft2); color: var(--blue-deeper); }
@media (max-width: 900px) { .ai-provs { grid-template-columns: 1fr; } }

/* ---------- FAQ footer links ---------- */
.ai-faq-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3) var(--s-6); margin-top: var(--s-8); }

/* ---------- Cost page: choosing, testing and costing a model ---------- */
.ai-model { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.ai-model-card { background: var(--bg); border: 1px solid var(--border-sub); border-radius: var(--r-xl); padding: var(--s-6); box-shadow: var(--sh-sm); display: flex; flex-direction: column; }
.ai-model-step { font-size: var(--t-label); font-weight: var(--w-bold); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--blue); margin-bottom: var(--s-4); }
.ai-model-card h3 { font-size: var(--t-card); color: var(--text); margin: var(--s-5) 0 var(--s-2); line-height: var(--lh-snug); }
.ai-model-card p { font-size: var(--t-base); color: var(--text-sec); line-height: var(--lh-normal); margin: 0; }
.ai-mock { background: var(--bg-subtle); border: 1px solid var(--border-sub); border-radius: var(--r-lg); padding: var(--s-4); min-height: 172px; display: flex; flex-direction: column; gap: var(--s-3); }
.ai-mock-head { font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--text); }
.ai-mock-ok { display: flex; gap: var(--s-2); align-items: flex-start; background: var(--green-soft); border: 1px solid var(--green-border); border-radius: var(--r-md); padding: 10px 12px; font-size: var(--t-sm); font-weight: var(--w-semibold); color: var(--green-hover); line-height: 1.35; }
.ai-mock-ok i { font-style: normal; font-weight: var(--w-xbold); }
.ai-mock-meta { font-size: var(--t-caption); color: var(--text-muted); line-height: 1.4; margin-top: auto; }
.ai-mock-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.ai-mock-prices span { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 8px 10px; }
.ai-mock-prices small { display: block; font-size: var(--t-caption); color: var(--text-muted); }
.ai-mock-prices b { font-family: var(--mono); font-size: var(--t-base); color: var(--text); }
.ai-mock-health b { display: block; font-size: var(--t-sm); color: var(--text); }
.ai-mock-health span { font-size: var(--t-sm); color: var(--text-sec); }
.ai-mock-bar { display: flex; height: 12px; border-radius: var(--r-full); overflow: hidden; gap: 2px; }
.ai-mock-bar i { display: block; background: var(--green); }
.ai-mock-bar i:nth-child(2) { background: #E0A100; }
.ai-mock-bar i:nth-child(3) { background: var(--error); }
.ai-pill-bad { background: var(--error-soft); color: var(--error); }
@media (max-width: 960px) { .ai-model { grid-template-columns: 1fr; } .ai-mock { min-height: 0; } }
@media (max-width: 700px) { .ai-details-cols[style] { grid-template-columns: 1fr !important; } }

/* centred call-to-action row between sections */
.ai-ctas-center { justify-content: center; margin-top: var(--s-8); }
