/* =========================
   ACE v2 • GLOBAL (shared)
   ========================= */

/* ---------- Tokens (Themes) ---------- */
:root {
  --app-header-h: 70px;
  /* Day defaults */
  --bg: #f6f7fb;
  --panel: #ffffff;
  --surface-alt: #f2f4f8;
  --border: #d9dee7;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #1976d2;
  --accent-2: #2196f3;
  --shadow: 0 10px 24px rgba(0,0,0,0.08);
  --scroll-track: #f3f5f8;
  --scroll-thumb: #c0c8d2;
  --scroll-thumb-hover: #aab4bf;
  --toolCol: #0000CD ;
  --branch: #e6eefc ;
   /* …your existing tokens… */
  --warn: #f59e0b;   /* amber 500 */
  --danger: #ef4444; /* red 500  */
  --accentHead: #3b82f6;    /* Replace with your ACE brand blue if different - contact us */
}

/* Smooth theme switch (opt‑in via .theme-anim on <html>) */
html.theme-anim,
html.theme-anim body,
/* add your drawer selectors ↓ */
html.theme-anim #left-drawer,
html.theme-anim .left-drawer,
html.theme-anim [data-role="drawer"],
/* and typical surfaces */
html.theme-anim .surface,
html.theme-anim .surface-alt,
html.theme-anim .card,
html.theme-anim .border,
html.theme-anim .border-soft,
html.theme-anim .btn,
html.theme-anim .bg-app,
html.theme-anim .bg-soft,
html.theme-anim .bg-accent {
  transition: background-color .28s ease, color .28s ease, border-color .28s ease, box-shadow .28s ease;
}

/* (optional) reduce flicker on fixed/sticky drawers */
#left-drawer, .left-drawer, [data-role="drawer"] {
  will-change: background-color, color, border-color, box-shadow;
}


/* Prevent big flashes on initial paint */
html, body {
  background-color: var(--app-bg);
  color: var(--text);
}



html[data-theme="light"], html[data-theme="day"] {
  --bg: #f6f7fb; --panel: #ffffff; --surface-alt: #f2f4f8; --border: #d9dee7; --text: #0f172a; --muted: #64748b;
  --accent: #1976d2; --accent-2: #2196f3; --shadow: 0 10px 24px rgba(0,0,0,0.08);
  --scroll-track: #f3f5f8; --scroll-thumb: #c0c8d2; --scroll-thumb-hover: #aab4bf; --toolCol: #0000CD ;
}
html[data-theme="dark"] {
  --bg: #0b1220; --panel: #0f172a; --surface-alt: #12192a; --border: #22304e; --text: #e6eefc; --muted: #94a3b8;
  --accent: #1976d2; --accent-2: #2196f3; --shadow: 0 10px 28px rgba(0,0,0,0.25);
  --scroll-track: #1f242b; --scroll-thumb: #4b5563; --scroll-thumb-hover: #606b7a; --toolCol: #0CAFFF ;
  /* keep same values for dark; they read well on dark bg */
  --warn: #f59e0b; --danger: #ef4444;
} 

/* Scrollbars */
html::-webkit-scrollbar, body::-webkit-scrollbar, #left-scroller::-webkit-scrollbar, .app-main::-webkit-scrollbar { width:10px; height:10px }
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track, #left-scroller::-webkit-scrollbar-track, .app-main::-webkit-scrollbar-track { background:var(--scroll-track) }
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb, #left-scroller::-webkit-scrollbar-thumb, .app-main::-webkit-scrollbar-thumb {
  background-color:var(--scroll-thumb); border-radius:6px; border:2px solid var(--scroll-track)
}
html::-webkit-scrollbar-thumb:hover, body::-webkit-scrollbar-thumb:hover, #left-scroller::-webkit-scrollbar-thumb:hover, .app-main::-webkit-scrollbar-thumb:hover { background-color:var(--scroll-thumb-hover) }
html, body, #left-scroller, .app-main { scrollbar-color: var(--scroll-thumb) var(--scroll-track); scrollbar-width: thin }

/* Smooth theme fade */
html { transition: background-color .3s ease, color .3s ease }
body, .btn, .chip, .prompt, .select, .nav, .panel, .left-col, .right-col {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease
}

/* Base */
*,*::before,*::after{ box-sizing:border-box }
html,body{ height:100% }
body{
  margin:0; font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Arial,"Noto Sans","Helvetica Neue",sans-serif;
  color:var(--text); background:var(--bg); overflow:hidden; /* columns manage scroll */
}

/* Header */
.app-header{
  position:fixed; inset:0 0 auto 0; height:var(--app-header-h);
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center; padding:0 12px;
  background:linear-gradient(90deg,#0d47a1 0%, #1976d2 100%); color:#fff; box-shadow:0 8px 24px rgba(0,0,0,.26); z-index:50;
}
.icon-btn{ padding:8px 10px; min-width:40px; justify-content:center }
.header-left{ display:flex; align-items:center; gap:10px }
.header-center{ text-align:center }
.header-right{ display:flex; align-items:center; gap:8px; justify-content:end }
.brand-logo{ height:36px; width:auto; border-radius:6px; object-fit:cover }
.title{ font-weight:700; font-size:30px; letter-spacing:.2px }
.subtitle{ font-size:16px; opacity:.9 }
.header-center .subtitle { white-space: nowrap;          /* keep on one line for tablets & desktops */}
.header-center .subtitle span { display: inline;              /* keep inline on larger screens */}

/* Header buttons */
.app-header .btn{ background:rgba(255,255,255,.08); color:#fff; border-color:rgba(255,255,255,.25) }
.app-header .btn:hover{ background:rgba(255,255,255,.18); color:#fff; border-color:rgba(255,255,255,.45);
  transform:translateY(-1px); box-shadow:0 6px 16px rgba(0,0,0,.25) }
.app-header .btn:active{ transform:translateY(0); box-shadow:0 3px 10px rgba(0,0,0,.25) }
.app-header .btn:focus-visible{ outline:2px solid #fff; outline-offset:2px }

/* Buttons / Chips */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 12px; border-radius:10px; border:1px solid var(--border);
  background:var(--panel); color:var(--text); cursor:pointer; user-select:none
}
.btn:hover{ transform:translateY(-1px); background:var(--surface-alt); box-shadow:0 4px 12px rgba(0,0,0,.12) }
.btn:active{ transform:translateY(0); box-shadow:0 2px 6px rgba(0,0,0,.18) }
.btn.toggle{ display:inline-flex; align-items:center; gap:6px }
.btn.primary{ background:linear-gradient(90deg,var(--accent),var(--accent-2)); color:#fff; border-color:rgba(0,0,0,.2) }
.btn.primary:hover{ transform:translateY(-1px); filter:brightness(1.05); box-shadow:0 6px 18px rgba(0,0,0,.25) }
.btn.primary:active{ transform:translateY(0); box-shadow:0 3px 10px rgba(0,0,0,.22) }
.btn:focus-visible, .chip:focus-visible{ outline:2px solid var(--accent-2); outline-offset:2px }

.chip{
  display:inline-flex; align-items:center; gap:6px; width:100%;
  padding:10px 12px; border-radius:10px; background:var(--panel); color:var(--text); border:1px solid var(--border); cursor:pointer
}
.chip:hover{ background:var(--accent); color:#fff; border-color:var(--accent); transform:translateY(-1px); box-shadow:0 3px 10px rgba(0,0,0,.15) }
html[data-theme="day"] .chip{ background:#fff; color:#0b2a57; border-color:#c6d4f3 }
html[data-theme="day"] .chip:hover{ background:#dbe9ff; border-color:var(--accent) }
.chip .tag{ background: var(--blue-light, #4dabf7); color:#fff; font-size:11px; font-weight:600; padding:2px 6px; border-radius:6px; margin-left:6px; text-transform:uppercase }

/* Layout */
.app-main{ position:absolute; inset:var(--app-header-h) 0 0 0; display:grid; grid-template-columns:280px 1fr; gap:12px; padding:12px }
.left-col{
  background:var(--panel); border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow);
  display:flex; flex-direction:column; min-height:0; overflow:hidden
}
.left-scroller{ flex:1 1 auto; overflow:auto; padding:12px; display:flex; flex-direction:column; gap:16px }
#left-scroller::-webkit-scrollbar{ width:10px }
#left-scroller::-webkit-scrollbar-track{ background:var(--scroll-track) }
#left-scroller::-webkit-scrollbar-thumb{ background-color:var(--scroll-thumb); border-radius:6px }
#left-scroller::-webkit-scrollbar-thumb:hover{ background-color:var(--scroll-thumb-hover) }
#left-scroller{ scrollbar-color:var(--scroll-thumb) var(--scroll-track); scrollbar-width:thin }

.block{ background:var(--surface-alt); border:1px solid var(--border); border-radius:12px; padding:12px }
.block h3{ margin:0 0 10px 0; font-size:12px; text-transform:uppercase; letter-spacing:.6px; color:var(--muted) }

/* Navigation (left) */
.nav{ display:grid; gap:1px }
.nav .nav-item{
  display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:10px;
  color:var(--text); border:1px solid transparent; position:relative; transition:color .2s, background .2s, border-color .2s; text-decoration: none;
}
.nav .nav-item:hover{ background:rgba(25,118,210,.09); border-color:var(--border) }
.nav .nav-item.active{ color:var(--accent); background:rgba(25,118,210,.10); border-color:var(--accent) }
.nav .nav-item.active::after{ content:''; position:absolute; left:0; top:6px; bottom:6px; width:3px; border-radius:2px; background:var(--accent); transition:all .25s ease }

/* Shortcuts wrapper */
.shortcuts{ display:grid; grid-template-columns:1fr; gap:8px }

/* User card (left bottom) */
.user-card{
  position:relative; border-top:1px dashed var(--border); padding:10px 12px;
  display:grid; grid-template-columns:40px 1fr; gap:10px; align-items:center; background:var(--panel)
}
/*
.avatar{ width:40px; height:40px; border-radius:50%; display:grid; place-items:center; background:linear-gradient(180deg,var(--accent),var(--accent-2)); color:#fff; font-weight:700 }
*/
.user-meta .user-name{ font-weight:600 }
.user-meta .user-plan{ font-size:12px; color:var(--muted) }

/* Right column shell (shared) */
.right-col{
  background:var(--panel); border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow);
  display:flex; flex-direction:column; min-height:0; overflow:hidden
}
.right-scroll{ overflow-y:auto; padding:12px; display:flex; flex-direction:column; gap:12px; min-height:0; height:100% }

/* User Usage Details */
/* ===== Usage (left drawer) ===== */
.usage .usage-row{
  display:grid;
  grid-template-columns: 1fr auto;  /* label | value */
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.usage .usage-label{
  font-size:12px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.3px;
}
.usage .usage-value{
  font-weight:600;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

/* Row with progress bar under it */
.usage .row-with-bar{
  grid-template-columns: 1fr auto; /* label left, value right; bar spans full width below */
}
.usage .row-with-bar .meter{
  grid-column: 1 / -1;  /* bar spans both columns */
  margin-top:4px;
}

/* Progress meter */
.usage .meter{
  position:relative;
  width:100%;
  height:8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.usage .meter > span{
  display:block;
  height:100%;
  width:0%;
  font-size: 50px;
  background: var(--accent);         /* default = normal */
  transition: width .35s ease, background-color .25s ease;
  border-radius: 999px;
}

/* Subtle lines */
.usage .muted-line{
  font-size:12px;
  color: var(--muted);
  margin-top:6px;
}

/* Inline small Upgrade button (beside badge) */
.btn.upgrade-link{
  padding:4px 8px;
  font-size:12px;
  border:1px solid var(--accent);
  color:var(--accent);
  background:transparent;
  border-radius:6px;
}
.btn.upgrade-link:hover{ background:var(--accent); color:#fff }

/* Subtle inline Upgrade link under bars */
.usage-inline-cta {
  margin-top: 4px;
}

.usage-cta.upgrade-inline {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  opacity: .9;
}
.usage-cta.upgrade-inline:hover {
  text-decoration: underline;
  opacity: 1;
}

.usage .warn  { color: var(--warn); }
.usage .crit  { color: var(--danger); }

.usage .meter.is-warn > span { background: var(--warn) !important; }
.usage .meter.is-crit > span { background: var(--danger) !important; }

/* Badges + Upgrade (shared) */
.account-badge{ margin-left:8px; display:inline-block; padding:2px 8px; font-size:11px; font-weight:600; color:#fff; border-radius:6px; text-transform:uppercase }
.account-badge.free{ background:#9e9e9e } .account-badge.basic{ background:#1976d2 } .account-badge.premium{ background:#fbc02d; color:#111 }
.user-info{ display:flex; align-items:center; gap:6px; flex-wrap:wrap }
.btn.upgrade-btn{
  display:inline-flex; align-items:center; justify-content:center; line-height:1; vertical-align:middle;
  padding:6px 14px; font-size:13px; border:1px solid var(--accent); background:transparent; color:var(--accent); border-radius:6px; text-decoration: none;
}
.btn.upgrade-btn:hover{ background:var(--accent); color:#fff }

/* Footer (shared) */
.footer{
  font-size:12px; color:var(--muted); text-align:center; padding:10px 10px 0;
  margin-top:auto; border-top:1px solid var(--border); position:relative; z-index:90
}
.footer__legal  { font-size: 0.9rem; opacity: 0.85; margin: 0.25rem 0; }
.footer__credit { font-size: 0.9rem; opacity: 0.9;  margin: 0.15rem 0; }


/* Optional: hide hamburger on a specific page */
body.page-upgrade .mobile-only#drawer-toggle{ display:none !important }

/* Plan badge palette */
.badge-plan { padding: 2px 8px; border-radius: 999px; font-weight: 600; font-size: .8rem; }
.badge-free    { background: #e5e7eb; color: #111827; }
.badge-basic   { background: #dbeafe; color: #0b4aa2; }
.badge-premium { background: #fef08a; color: #7a5200; }

/* Dark theme */
[data-theme="dark"] .badge-free    { background:#30363d; color:#c9d1d9; }
[data-theme="dark"] .badge-basic   { background:#0d2b4d; color:#a8c7ff; }
[data-theme="dark"] .badge-premium { background:#3b2f00; color:#ffdf6b; }

/* Keep the card pinned nicely (optional finetunes) */
.left-col .user-card {
  display:flex; align-items:center; gap:10px;
  padding:10px 12px; border-top:1px solid var(--border, #e5e7eb);
}
/*
.left-col .user-card .avatar {
  width:36px; height:36px; border-radius:50%;
  display:grid; place-items:center; font-weight:700;
  background: var(--surface-2, #f3f4f6); color: var(--text, #111);
}
*/

/*
[data-theme="dark"] 
.left-col .user-card .avatar {
  background:#161b22; color:#e6edf3;
}
*/
/* Hero */
.page-hero{
  display: grid;
  row-gap: 4px;
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent), transparent 70%), transparent 70%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.page-hero .hero-title{
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  margin: 0; line-height: 1;
}
.page-hero .hero-subtitle{ margin: 0; color: var(--muted); }

/* Remove prism highlighting */
/* 1) Remove the gray bg on code blocks */
pre[class*="language-"],
code[class*="language-"] {
  background: transparent !important;   /* or your own var/color */
}

/* 2) If using the Line Highlight plugin */
pre[class*="language-"] > .line-highlight,
.line-highlight {
  background: transparent !important;
  box-shadow: none !important;
}

/* 3) If using the Line Numbers plugin (remove gutter gray) */
pre.line-numbers .line-numbers-rows {
  background: transparent !important;
  border-right: none !important; /* optional */
}

/* 4) If any tokens are getting shaded by the theme */
.token { background: transparent !important; }

/* Toast base (kept for fallback bottom placement) */
.ace-toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  max-width: 480px;
  width: max-content;
  min-width: 180px;
  padding: 10px 16px;
  border-radius: 8px;
  text-align: center;
  background-color: #00A700;         /* dark green */
  color: #ffffff;                    /* white text */
  border: 1px solid #166534;         /* mid-dark green border */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* === Themed Toast Variants === */
.toast-success {
  background-color: #00A700; /* dark green */
  border-color: #166534;
  color: #fff;
}

.toast-info {
  background-color: #1e3a8a; /* blue-900 */
  border-color: #2563eb;
  color: #fff;
}

.toast-error {
  background-color: #7f1d1d; /* red-900 */
  border-color: #dc2626;
  color: #fff;
}


.ace-toast.show {
  opacity: 1;
  pointer-events: auto;
}


/* Centered variant */
.ace-toast--center{
  top: 50%;
  bottom: auto;                 /* override bottom */
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Local overlay loader used by all pages */
#output { position: relative; }

.local-loader {
  position: fixed;                 /* screen-centered */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;                   /* shown only when #output.loading is set */
  z-index: 9999;
  padding: 16px;
  pointer-events: none;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#output.loading .local-loader {     /* JS toggles #output.loading */
  display: flex;
}

.local-spinner {
  width: 40px; height: 40px;
  border: 4px solid rgba(120,120,120,0.3);
  border-top-color: var(--accent, #0078d7);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* typing dots under spinner */
.typing-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  font-size: 40px;
  color: var(--accent, #0078d7);
  margin-top: 10px;
  animation: fadeIn 0.3s ease;
}
.typing-dots span { animation: blink 1.2s infinite; }
.typing-dots span:nth-child(2){ animation-delay: .2s; }
.typing-dots span:nth-child(3){ animation-delay: .4s; }
@keyframes blink { 0%,20%{opacity:0} 50%{opacity:1} 100%{opacity:0} }
@keyframes fadeIn { from{opacity:0; transform:translateY(-6px)} to{opacity:1; transform:none} }

/* success tick centered above */
.local-success {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  line-height: 1;
  font-weight: 800;
  color: #4ade80;
  z-index: 10000;
  display: none;
}
#output .local-success[aria-hidden="false"] { display: block; }

/* === ACE: Avatar Pills (global) === */
.avatar {
  /* sizing; use .avatar--sm/.avatar--lg when needed */
  width: 40px; height: 40px;
  aspect-ratio: 1 / 1;
  border-radius: 9999px;           /* exact circle */
  display: grid; place-items: center;
  font-weight: 400;
  font-size: 14px;                 /* tweak if you change size */
  letter-spacing: .2px;
  color: #fff;                     /* default text color */
  border: 1px solid rgba(0,0,0,.15);
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  user-select: none;
}

.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.avatar--lg { width: 48px; height: 48px; font-size: 16px; }

/* High-contrast text helper if a very light bg is used */
.avatar--darktext { color: #0f172a; border-color: rgba(0,0,0,.12); }

/* Deterministic color palette (assign via PHP class) */
.avc-1 { background:#2563eb; }  /* indigo/blue */
.avc-2 { background:#10b981; }  /* emerald   */
.avc-3 { background:#f59e0b; }  /* amber     */
.avc-4 { background:#ef4444; }  /* red       */
.avc-5 { background:#14b8a6; }  /* teal      */
.avc-6 { background:#8b5cf6; }  /* violet    */
.avc-7 { background:#e11d48; }  /* rose      */
.avc-8 { background:#0ea5e9; }  /* sky       */
.avc-9 { background:#22c55e; }  /* green     */
.avc-10{ background:#a855f7; }  /* purple    */

/* Optional: small inner stroke on dark theme for clarity */
[data-theme="dark"] .avatar { border-color: rgba(255,255,255,.15); }

/* Ensure the left-drawer user card uses the same avatar sizing */
.left-col .user-card .avatar { width: 40px; height: 40px; }

/* === ACE: User card CTA (Upgrade/Manage) — always small === */
.left-col .user-card #userPlanAction{
  font-size: 12px !important;
  line-height: 1.1 !important;
  padding: 4px 10px !important;
  border-radius: 10px !important;
  min-height: 0 !important;
  height: auto !important;
  border-width: 1px !important;
}

.emoji{ display:inline-block; line-height:1; vertical-align:-0.1em }
.emoji-sm{ font-size:1.1em }
.emoji-md{ font-size:1.2em }   /* good for labels/buttons */
.emoji-lg{ font-size:1.6em }    /* good for section titles */
.emoji-xl{ font-size:2.0em }    /* hero/spotlight size */

/* === ACE: Left-drawer active nav item === */
.left-col .nav a,
.left-col .menu a{
  border-left: 3px solid transparent;
  border-radius: 10px;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

/* Hover (subtle) */
.left-col .nav a:hover,
.left-col .menu a:hover{
  background: rgba(0,0,0,.04);
}
[data-theme="dark"] .left-col .nav a:hover,
[data-theme="dark"] .left-col .menu a:hover{
  background: rgba(255,255,255,.06);
}

/* Active state — apply with .is-active OR aria-current="page" */
.left-col .nav a.is-active,
.left-col .nav a[aria-current="page"],
.left-col .menu a.is-active,
.left-col .menu a[aria-current="page"]{
  border-left-color: var(--accent, #2563eb);
  background: rgba(37, 99, 235, .12);   /* fallback if --accent not rgba */
  color: var(--text-strong, #111);
  font-weight: 700;
}
[data-theme="dark"] .left-col .nav a.is-active,
[data-theme="dark"] .left-col .nav a[aria-current="page"],
[data-theme="dark"] .left-col .menu a.is-active,
[data-theme="dark"] .left-col .menu a[aria-current="page"]{
  background: rgba(255,255,255,.08);
  color: #e6edf3;
}

/* Keep icon visible even if label styles change */
.left-col .nav a.is-active .icon,
.left-col .nav a[aria-current="page"] .icon,
.left-col .menu a.is-active .icon,
.left-col .menu a[aria-current="page"] .icon{
  opacity: 1;
}

/* === ACE: Parent nav (when a child is active) === */
.left-col .nav a.is-active-parent,
.left-col .menu a.is-active-parent{
  border-left-color: var(--accent, #2563eb);
  background: rgba(37,99,235,.08);
  font-weight: 700;
}
[data-theme="dark"] .left-col .nav a.is-active-parent,
[data-theme="dark"] .left-col .menu a.is-active-parent{
  background: rgba(255,255,255,.06);
}

/* Copy chip theme tokens */
:root{
  --chip-bg: rgba(236,239,243,0.78);   /* light mode default */ 
  --chip-fg: #111;
  --chip-border: rgba(0,0,0,.20);
}
[data-theme="dark"]{
  --chip-bg: rgba(16,18,22,.72);      /* subtle translucent dark */
  --chip-fg: #fff;
  --chip-border: rgba(255,255,255,.18);
}

/* === Prism language label: top-right, same bg as code === */

/* Define code colors once (fallbacks if your theme doesn't set them) 
pre[class*="language-"] 
{
  --code-bg: var(--prism-code-bg, #f5f2f0); 
  --code-fg: var(--prism-code-fg, #222);
}

 If you have a dark theme toggle, you can override like this:
[data-theme="dark"] pre[class*="language-"] {
  --code-bg: var(--prism-code-bg, #1e1e1e);
  --code-fg: var(--prism-code-fg, #eaeaea);
}
*/

/* Toolbar plugin path */
div.code-toolbar { position: relative; background: inherit; }
div.code-toolbar > .toolbar {
  position: absolute !important;
  top: .4rem !important;
  right: .5rem !important;
  left: auto !important;
  bottom: auto !important;
  opacity: 1 !important;
  filter: none !important;
  backdrop-filter: none !important;
  background: none !important;
  z-index: 20 !important;
}
div.code-toolbar > .toolbar .toolbar-item > span,
div.code-toolbar > .toolbar .toolbar-item > a,
div.code-toolbar > .toolbar .toolbar-item > button {
  font: 600 12px/1.1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Arial;
  color: var(--code-fg) !important;
  background: var(--code-bg) !important;   /* ← match code background */
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 6px;
  padding: .25rem .5rem;
  text-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}

/* Standalone "Show Language" plugin path */
pre[class*="language-"] { position: relative; }
.prism-show-language-label {
  position: absolute !important;
  top: .4rem !important;
  right: .5rem !important;
  left: auto !important;
  opacity: 1 !important;
  color: var(--code-fg) !important;
  background: var(--code-bg) !important;   /* ← match code background */
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 6px;
  padding: .25rem .5rem;
  text-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  z-index: 20 !important;
}

/* FONT SIZE */
/* Body text size inside your output pane */
#output-content {
  font-size: 18px;          /* try 16–18px */
  line-height: 1.6;         /* improves readability */
  padding: 10px;
}

/* Code blocks */
#output-content pre,
#output-content code {
  font-size: 0.95rem;       /* scales with root; tweak 0.95–1.05 */
  line-height: 1.55;
}

/* (Optional) Global base size */
html { font-size: 16px; }    /* then use rem everywhere */

/* === ACE: Gated feature visuals (global) === */
.btn.is-disabled[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

.lock-note {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.85;
  vertical-align: middle;
}

/* Optional: keep "Open" and note on one line in tight layouts */
.open-btn + .lock-note { white-space: nowrap; }

.page-hero .tool-subtitle{ font-weight: 700; margin: 0; color: var(--toolCol); }

.small-subtitle{
  font-weight: 600;
  font-size: 15px;
  background-color: #007bff;
  color: var(--branch);
  padding: 4px 8px;
  border-radius: 9999px; /* or a very large pixel value */
  text-align: center;
  white-space: nowrap; /* Prevents the text from wrapping */
}

.small-branches{
  font-weight: 600;
  font-size: 15px;
  background-color: #007bff;
  color: var(--branch);
  padding: 4px 8px;
  border-radius: 9999px; /* or a very large pixel value */
  text-align: center;
  white-space: nowrap; /* Prevents the text from wrapping */
}

/* New Header Menu added 11-10-25 16:30 PM */
/* ================= Header Quick Menu (scoped) ================= */

/* Base panel */
#hdr-menu-panel[hidden] { display: none !important; }
#hdr-menu-panel {
  position: absolute; z-index: 2000;
  background: var(--panel, #fff);
  border: 1px solid var(--border, rgba(0,0,0,.08));
  border-radius: 12px;
  padding: 8px;
  min-width: 260px;
  max-width: min(92vw, 320px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* Dark theme */
[data-theme="dark"] #hdr-menu-panel {
  background: #111722;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 10px 28px rgba(0,0,0,.55);
}

/* List + rows */
#hdr-menu-panel .hdr-list { display: flex; flex-direction: column; gap: 2px; }

#hdr-menu-panel .hdr-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text, inherit);
  cursor: pointer;
}

/* Emojis in front (outside your button DOM) */
#hdr-menu-panel .hdr-item::before {
  content: attr(data-icon);
  font-size: 18px;
  line-height: 1;
  opacity: .95;
}

/* Slot (theme / auth buttons) */
#hdr-menu-panel .hdr-item .slot { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
#hdr-menu-panel .hdr-item.only-slot .label { display: none; } /* auth row has only the slot */

/* Hover */
#hdr-menu-panel .hdr-item:hover { background: rgba(0,0,0,.05); }
[data-theme="dark"] #hdr-menu-panel .hdr-item:hover { background: rgba(255,255,255,.07); }

/* Divider + chevron */
#hdr-menu-panel .hdr-divider { height: 1px; background: var(--border, rgba(0,0,0,.08)); margin: 4px 4px; }
#hdr-menu-panel .hdr-item.chevron::after { content: '›'; font-size: 16px; }

/* ===== Responsive buckets ===== */

/* Motion accessibility */
@media (prefers-reduced-motion:no-preference){
  .btn, .chip{
    transition: transform .15s ease, background-color .20s ease, color .20s ease, border-color .20s ease, box-shadow .20s ease, filter .20s ease;}
}

/* Mobile ≤599px — two-row header, 1-col layout, drawer active */
@media (max-width:599px){
  .app-header{ position: fixed; top:0; left:0; right:0; z-index:1000; display:grid; grid-template-columns:1fr; grid-template-rows:auto auto; height:auto; padding:6px 10px; row-gap:4px }
  .header-row1{ display:flex; justify-content:space-between; align-items:center; gap:8px }
  .header-left{ display:flex; align-items:center; gap:8px }
  .brand-logo{ height:32px; width:auto; }
  .header-center{ display:flex; flex-direction:column; gap:2px; margin-left: auto; margin-right: auto;}
  .title{ font-size:12px; opacity:.95; line-height:1.1 } .subtitle{ font-size:25px; letter-spacing: 2px; }
  .small-subtitle{  font-weight: 600; font-size: 10px; }

  .header-row2{ width:100% }
  .header-row2 > .header-right{ display:grid; grid-template-columns:1fr 1fr 1fr; align-items:center; gap:8px; width:100% }
  .header-row2 .btn{ width:auto; min-width:0; justify-content:center; font-size:13px; padding:6px 10px; min-height:36px }
  .header-row2 .btn:nth-child(1){ justify-self:start } 
  .header-row2 .btn:nth-child(2){ justify-self:center } 
  .header-row2 .btn:nth-child(3){ justify-self:end }
  .header-center .subtitle {
    white-space: normal;        /* allow wrap */
  }
  .header-center .subtitle span {
   display: block;              /* force the span onto a new line */
   width: fit-content;         /* width according to content */
   margin: 2px auto;            /* subtle breathing room */
   /* text-indent: -1ch;    push the first character (•) off-screen 
    padding-left: 1ch;    keep the text aligned */
  }
  .mobile-only{ display:inline-flex !important }

  .app-main{ position: absolute; grid-template-columns:1fr; inset:var(--app-header-h) 0 0 0; padding:10px 10px 0; gap:5px }
  
  /* Drawer */
  .left-col#mobile-drawer{
    position:fixed; top:var(--app-header-h); right:0; left:auto; bottom:0;
    width:min(88vw,320px); max-width:360px; transform:translateX(105%); transition:transform .28s ease; z-index:100;
    border-left:1px solid var(--border); border-radius:0; box-shadow:-12px 0 28px rgba(0,0,0,.28)
  }
  body.drawer-open .left-col#mobile-drawer{ transform:translateX(0) }
  .drawer-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.38); z-index:90; display:none }
  body.drawer-open .drawer-backdrop{ display:block !important }

  /* Upgrade button tweak on phones */
  .btn.upgrade-btn{ font-size:12px; padding:4px 10px; border-radius:5px }
  .btn, .chip{ min-height:44px; }
  
  .user-info {display: flex; align-items: center; gap: 6px; flex-wrap: wrap;}
  .user-info .username { order: 0; }
  .user-info .account-badge { order: 1; }
  .user-info .upgrade-btn { display: inline-flex; order: 2; width: auto; align-items: center; justify-content: center; vertical-align: middle; }
  
  .usage .usage-value{ gap:6px }
  .btn.upgrade-link{ font-size:12px; padding:4px 10px }
  
  .right-col{ background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  
  .right-scroll{ flex:1 1 auto; display:flex; flex-direction:column; gap:12px; overflow-y:auto; -webkit-overflow-scrolling:touch }
  
  .footer{
  font-size:12px; color:var(--muted); text-align:center; padding:5px 5px 0;
  margin-top:auto; border-top:1px solid var(--border); position:relative; z-index:90}
  
   /* Grid layout */
  .header-row2 > .header-right{
    display: grid;
    grid-template-columns: auto 1fr auto; /* menu | center | hamburger */
    align-items: center;
    column-gap: 8px;
    position: relative; /* anchor for ::before text */
    padding-block: 2px !important;
  }

  /* Put hamburger on the right, menu on the left */
  #hdr-menu-panel { min-width: 240px; }
  #hdr-menu-btn{ grid-column: 1; justify-self: start; }
  #drawer-toggle{ grid-column: 3; justify-self: end; }

  /* Compact buttons */
  :root { --hdr-btn-size: 32px; --hdr-icon-size: 10px; }
  #drawer-toggle,
  #hdr-menu-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--hdr-btn-size) !important;
    height: var(--hdr-btn-size) !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 4px !important;
    line-height: 1 !important;
    border-radius: 8px;
  }
  #drawer-toggle svg,
  #hdr-menu-btn svg{ width: var(--hdr-icon-size); height: var(--hdr-icon-size); }
  #hdr-menu-btn{ font-size: 18px; font-weight: 600; }

  /* Hide original version text in row1 and inject centered version in row2 */
  .header-row1 .small-subtitle{ display: none !important; }
  .header-row2 > .header-right::before{
    content: "ACE AI v1.0 (Beta)";
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;           /* mimic .small-subtitle */
    font-size: 15px;            /* phone size */
    background-color: #007bff;
    color: var(--branch);
    padding: 4px 8px;
    border-radius: 9999px; /* or a very large pixel value */
    text-align: center;
    white-space: nowrap;
    letter-spacing: .2px;
    line-height: 1.1;

    white-space: nowrap;
    pointer-events: none;       /* never blocks taps */
    user-select: none;
  }
}

/* Tablet 600–1023px — two-row header, 1-col layout, drawer active */
@media (min-width:600px) and (max-width:1023px){
  .app-main{ position: absolute; inset:var(--app-header-h) 0 0 0; grid-template-columns:1fr;  padding:12px; gap:12px }
  .app-header{ position: fixed; top:0; left:0; right:0; z-index:1000; display:grid; grid-template-columns:1fr; grid-template-rows:auto auto; height:auto; padding:8px 10px; row-gap:6px }
  .header-row1,.header-row2{ display:block }
  .header-row1{ display:flex; justify-content:space-between; align-items:center; gap:8px }
  .header-left{ display:flex; align-items:center; gap:8px; }
  .header-center{ display:flex; flex-direction:column; gap:2px; text-align:center; margin:0 auto; max-width:100% }
  .brand-logo{ height:38px; width: auto; } 
  .title{ font-size:12px; opacity:.85; line-height:1.1;} 
  .subtitle{ font-size:35px;  }
  .small-subtitle{ font-size: 12px; font-weight: 600; }
  .header-row2{ display:flex; justify-content:center }
  .header-row2 > .header-right{ display:grid; grid-template-columns:1fr 1fr 1fr; align-items:center; gap:8px; width:100% }
  .header-row2 .btn{ width: auto; min-width: 0; justify-content: center; font-size: 14px; padding: 8px 12px; min-height: 40px; }
  
   /* Position per column */
  .header-row2 .btn:nth-child(1) { justify-self: start; }   /* Login left */
  .header-row2 .btn:nth-child(2) { justify-self: center; }  /* Toggle center */
  .header-row2 .btn:nth-child(3) { justify-self: end; }     /* Hamburger right */
  
  /* Drawer (right-side, rectangular) */
  .left-col#mobile-drawer{
    position:fixed; top: var(--app-header-h); right:0; left:auto; bottom:0;
    width:min(88vw,320px); max-width:360px;
    transform: translateX(105%);
    transition: transform .28s ease;
    z-index:100;
    border-left:1px solid var(--border);
    border-radius:0;
    box-shadow:-12px 0 28px rgba(0,0,0,.28);
  }
  body.drawer-open .left-col#mobile-drawer{ transform: translateX(0); }

  .drawer-backdrop{
    position:fixed; inset:0; background:rgba(0,0,0,.38);
    z-index:90; display:none;
  }
  body.drawer-open .drawer-backdrop{ display:block !important; }

  .mobile-only{ display:inline-flex !important }
  
  #hdr-menu-panel { min-width: 260px; }
  
  .header-row2 > .header-right{
    display: grid;
    grid-template-columns: auto 1fr auto; /* menu | center | hamburger */
    align-items: center;
    column-gap: 10px;
    position: relative;
    padding-block: 2px !important;
  }

  #hdr-menu-btn{ grid-column: 1; justify-self: start; }
  #drawer-toggle{ grid-column: 3; justify-self: end; }

  /* Same compact sizing on tablets */
  :root { --hdr-btn-size: 32px; --hdr-icon-size: 10px; }
  #drawer-toggle,
  #hdr-menu-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--hdr-btn-size) !important;
    height: var(--hdr-btn-size) !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 4px !important;
    line-height: 1 !important;
    border-radius: 8px;
  }
  #drawer-toggle svg,
  #hdr-menu-btn svg{ width: var(--hdr-icon-size); height: var(--hdr-icon-size); }
  #hdr-menu-btn{ font-size: 18px; font-weight: 600; }

  /* Hide original version text in row1 and inject centered version in row2 */
  .header-row1 .small-subtitle{ display: none !important; }
  .header-row2 > .header-right::before{
    content: "ACE AI v1.0 (Beta)";
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;           /* mimic .small-subtitle */
    font-size: 14px;            /* tablet size */
    letter-spacing: .2px;
    line-height: 1.1;
    color: var(--text);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
  }
  
   .header-row2 > .header-right::before{
    /* mimic .small-subtitle */
      font-weight: 600;
      font-size: 15px;
      background-color: #007bff;
      color: var(--branch);
      padding: 4px 8px;
      border-radius: 9999px; /* or a very large pixel value */
      text-align: center;
      white-space: nowrap;
      letter-spacing: .2px;
      line-height: 1.1;
  }
}

/* Desktop ≥1024px — single-row header, 2-col layout */
@media (min-width:1024px){
 
  .app-header{ position: fixed; top:0 ; left:0 ; right: 0 ; z-index: 1000; height: var(--app-header-h); display: grid; grid-template-columns:1fr auto 1fr;  padding:5px 5px;  align-items:center; }
  .header-row1,.header-row2{ display:contents }
  .header-left  { justify-self:start;  display:flex; align-items:center; gap:10px; }
  .header-center{ justify-self:center; text-align:center; }
  .header-right { justify-self:end;    display:flex; align-items:center; gap:8px; }
  
  .brand-logo { height: 60px; width: auto; }
  .title{  font-size: 15px; opacity:.85; line-height:1.1; }
  .subtitle{ font-size: 30px; }
  
   /* Hide hamburger on desktop */
  .mobile-only{ display:none !important; }
  
  .left-col#mobile-drawer{ position:static; transform:none; box-shadow:none; border-radius:14px; border:1px solid var(--border) }
  
  #hdr-menu-panel { min-width: 280px; }
  .header-row2 > .header-right::before{ content: none; }
  /* (No need to touch .header-row1 .small-subtitle; it will show by default) */
}

/* Quick Menu: muted label for non-interactive email row */
#hdr-menu-panel #row-email { cursor: default; }
#hdr-menu-panel .label.muted { opacity: 0.66; }

/* === Feature Request CTA (theme-aware) === v1 */
.card.idea-cta {
  background: var(--card);
  color: var(--text);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
}

.card.idea-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 12px, var(--accent, #1976d2) 12px 14px, transparent 14px 100%),
    linear-gradient(180deg, rgba(0,0,0,0.00), rgba(0,0,0,0.00));
  opacity: 0.18; /* subtle accent rail on the left */
}

.idea-cta-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.idea-cta-icon {
  font-size: 1.6rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

.idea-cta-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.idea-cta-sub {
  margin: 2px 0 0 0;
  font-size: 0.92rem;
  opacity: 0.85;
}

.idea-cta-btn {
  display:inline-flex; 
  align-items:center;
  justify-content:center; 
  gap:8px;
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent, #1976d2);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.idea-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,0,0,0.16); }
.idea-cta-btn:active { transform: translateY(0); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }

/* Responsive refinement */
@media (max-width: 599px) {
  .idea-cta-wrap { grid-template-columns: auto 1fr; row-gap: 10px; }
  .idea-cta-btn { grid-column: 1 / -1; justify-self: start; }
}


/* 
 ===== Full-bleed utility for Right column =====
   Set this to your right column's actual horizontal padding. 
#right-scroll { --right-col-pad-x: 16px; }  change to 20/24px if needed 

 Make the wrapper bleed to container edges, bypassing inner padding 
.idea-cta-bleed {
  width: calc(100% + (2 * var(--right-col-pad-x)));
  margin-left: calc(-1 * var(--right-col-pad-x));
  margin-right: calc(-1 * var(--right-col-pad-x));
}
===== CTA Bar (theme-aware, no card chrome) v2 ===== 
.idea-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  color: var(--text);
  background:
    linear-gradient(90deg,
      rgba(25,118,210,0.10),
      rgba(25,118,210,0.06)
    );
  border-left: 4px solid var(--accent, #1976d2);
}

 Content 
.idea-cta-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.idea-cta-icon { font-size: 1.4rem; line-height: 1; }

.idea-cta-text {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.idea-cta-text strong {
  font-weight: 700;
  color: var(--text);
}

.idea-cta-sub {
  font-size: 0.95rem;
  opacity: 0.9;
}

 Link styled as primary action, not a button 
.idea-cta-link {
  font-weight: 700;
  text-decoration: none;
  color: var(--accent, #1976d2);
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}
.idea-cta-link:hover { opacity: 0.85; transform: translateY(-1px); }
.idea-cta-link:active { transform: translateY(0); }

 Dark theme tune: soften background a bit more 
@media (prefers-color-scheme: dark) {
  .idea-cta-bar {
    background:
      linear-gradient(90deg,
        rgba(25,118,210,0.14),
        rgba(25,118,210,0.10)
      );
  }
}

 Responsive 
@media (max-width: 599px) {
  .idea-cta-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .idea-cta-link { border-bottom-width: 2px; }
}
*/

/* ACE AI in middle 12-10-25 17:29 PM */
/* =========================
   Header row2 — small screens
   - 3-col grid: [menu] [center text] [hamburger]
   - Compact buttons
   - Version text centered on row2
   ========================= */
 
 /* === Comparison Card (theme-aware) === */
.card.compare-ace{
  background: var(--card);
  color: var(--text);
  border: 1px solid color-mix(in oklab, var(--text) 10%, transparent);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}

.compare-title{
  margin: 0 0 12px 0;
  font-size: 1.06rem;
  font-weight: 800;
}
.compare-title .ace-text{ color: var(--accent, #1976d2); }

/* Grid: mobile stack; tablet/desktop 2 columns */
.compare-grid{
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 600px){
  .compare-grid{ grid-template-columns: 1fr 1fr; }
}

/* Columns */
.compare-col{
  background: linear-gradient(180deg, color-mix(in oklab, var(--text) 3%, transparent), transparent 40%);
  border: 1px solid color-mix(in oklab, var(--text) 8%, transparent);
  border-radius: 14px;
  padding: 14px;
  position: relative;
}

.compare-col.other{
  opacity: .92;
}

/* ACE highlight */
.compare-col.ace{
  border-color: color-mix(in oklab, var(--accent, #1976d2) 45%, transparent);
  background:
    radial-gradient(1200px 180px at 0% 0%, color-mix(in oklab, var(--accent, #1976d2) 12%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in oklab, var(--accent, #1976d2) 10%, transparent), transparent 45%);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.compare-head{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.compare-logo{ font-size: 1.4rem; line-height: 1; }
.compare-name{
  font-weight: 800;
  letter-spacing: .2px;
}

.tag{
  margin-left: 8px;
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent, #1976d2) 18%, transparent);
  color: var(--text);
  border: 1px solid color-mix(in oklab, var(--accent, #1976d2) 45%, transparent);
}

/* Lists */
.compare-list{
  margin: 0 0 12px 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: .95rem;
}
.compare-list li strong{ font-weight: 700; }

/* CTA */
.compare-cta{
  display: inline-block;
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent, #1976d2);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}
.compare-cta:hover{ transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,0,0,0.16); }
.compare-cta:active{ transform: translateY(0); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.compare-cta:focus-visible{
  outline: 2px solid color-mix(in oklab, var(--accent, #1976d2) 70%, white);
  outline-offset: 2px;
}

/* Footer line */
.compare-foot{
  margin: 6px 2px 0 2px;
  font-size: .88rem;
  opacity: .85;
}

/* Breakpoint-specific polish */
@media (max-width: 599px){
  .compare-title{ font-size: 1.02rem; }
  .compare-col{ padding: 12px; }
  .compare-list{ gap: 7px; }
  .compare-cta{ width: 100%; text-align: center; }
}

@media (min-width: 600px) and (max-width: 1023px){
  .compare-list{ font-size: .95rem; }
}

@media (min-width: 1024px){
  .compare-col.ace{ transform: translateY(-2px); } /* subtle visual lift */
}

/* Dark-mode tuning */
@media (prefers-color-scheme: dark){
  .card.compare-ace{
    border-color: color-mix(in oklab, var(--text) 18%, transparent);
    box-shadow: 0 10px 28px rgba(0,0,0,.28);
  }
  .compare-col{
    border-color: color-mix(in oklab, var(--text) 16%, transparent);
    background: linear-gradient(180deg, color-mix(in oklab, var(--text) 6%, transparent), transparent 40%);
  }
  .compare-col.ace{
    border-color: color-mix(in oklab, var(--accent, #1976d2) 55%, transparent);
    background:
      radial-gradient(1200px 180px at 0% 0%, color-mix(in oklab, var(--accent, #1976d2) 20%, transparent), transparent 60%),
      linear-gradient(180deg, color-mix(in oklab, var(--accent, #1976d2) 14%, transparent), transparent 45%);
  }
}

/* Footer */
/* Only for the two passive chips */
.chip.badge-branch:hover,
.chip.badge-soon:hover{
  /* keep hover border/transform/shadow from .chip:hover */
  background-color: var(--chip-bg, var(--card-bg)) !important; /* cancel accent bg */
  color: var(--text) !important;                               /* cancel white text */
}

/* Stop the hover "lift" just for these chips */
.chip.badge-branch:hover,
.chip.badge-soon:hover{
  transform: none !important;  /* or translateY(0) */
}

/* Google Play compliance surfaces */
.footer__legal-links { display:flex; justify-content:center; gap:.45rem; flex-wrap:wrap; margin:.25rem 0; }
.footer__legal-links a { color:inherit; text-decoration:underline; }
.legal-body { overflow:auto; min-height:100vh; height:auto; display:flex; flex-direction:column; }
.legal-site-header { position:static; width:100%; color:#fff; background:linear-gradient(135deg, #174f9d, #1487df); border-bottom:1px solid rgba(255,255,255,.22); box-shadow:0 8px 24px rgba(0,32,80,.18); }
.legal-site-header__inner { width:min(920px, calc(100% - 2rem)); margin:0 auto; padding:1rem 0; display:flex; flex-direction:column; align-items:flex-start; gap:.15rem; }
.legal-site-header__title { font-size:clamp(1.35rem, 4vw, 1.75rem); line-height:1.15; }
.legal-site-header__subtitle { font-size:clamp(.86rem, 2.8vw, 1rem); line-height:1.35; opacity:.92; }
.legal-page { width:min(920px, calc(100% - 2rem)); margin:1.25rem auto 2rem; flex:1 0 auto; }
.legal-card { background:var(--panel, #fff); border:1px solid var(--border, #274b70); border-radius:16px; padding:clamp(1rem, 3vw, 2rem); line-height:1.65; }
.legal-card h1 { margin-top:0; }
.legal-card h2 { margin-top:1.5rem; }
.legal-card a { text-decoration:underline; }
.legal-updated { opacity:.8; }
.legal-form { display:grid; gap:.8rem; }
.legal-form textarea, .legal-form select, .legal-form input[type="email"] { width:100%; }
.legal-form input[type="email"] {
  min-height:44px;
  padding:.72rem .8rem;
  border:1px solid var(--border, #274b70);
  border-radius:10px;
  background:var(--surface-alt, #f4f7fb);
  color:var(--text, #10233a);
  font:inherit;
}
.legal-form input[type="email"]:focus-visible {
  outline:2px solid var(--accent-2, #1487df);
  outline-offset:2px;
}
.legal-form .btn[disabled] { opacity:.55; cursor:not-allowed; transform:none; box-shadow:none; }
.legal-check { display:flex; gap:.6rem; align-items:flex-start; }
.legal-callout { border-left:4px solid #f5b942; padding:.8rem 1rem; background:rgba(245,185,66,.08); }
.legal-callout--success { border-left-color:#28a745; background:rgba(40,167,69,.10); }
.legal-site-footer { flex:0 0 auto; width:100%; padding:1rem; text-align:center; border-top:1px solid var(--border, #274b70); background:var(--panel, #fff); color:var(--muted, #5f7288); }
.legal-site-footer__links { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:.55rem 1rem; }
.legal-site-footer__links a { color:inherit; text-decoration:underline; text-underline-offset:2px; }
.legal-site-footer p { margin:.65rem 0 0; font-size:.86rem; }
@media (max-width:599px) {
  .legal-site-header__inner { width:min(100% - 1.25rem, 920px); padding:.8rem 0; }
  .legal-page { width:min(100% - 1.25rem, 920px); margin:.75rem auto 1.25rem; }
  .legal-card { border-radius:12px; }
  .legal-site-footer__links { flex-direction:column; gap:.45rem; }
}
.ace-ai-report-button { margin:.65rem 0 1rem auto; display:block; border:1px solid currentColor; border-radius:8px; background:transparent; color:inherit; padding:.5rem .75rem; cursor:pointer; }
.ace-ai-report-dialog { width:min(520px, calc(100% - 2rem)); border:1px solid #41688f; border-radius:14px; padding:0; color:#eef6ff; background:#0d223a; }
.ace-ai-report-dialog::backdrop { background:rgba(0,0,0,.68); }
.ace-ai-report-form { display:grid; gap:.7rem; padding:1.25rem; position:relative; }
.ace-ai-report-form h2, .ace-ai-report-form p { margin:.1rem 0; }
.ace-ai-report-form textarea { width:100%; }
.ace-ai-report-close { position:absolute; top:.55rem; right:.65rem; border:0; background:transparent; color:inherit; font-size:1.6rem; cursor:pointer; }
.ace-ai-report-actions { display:flex; gap:.6rem; justify-content:flex-end; margin-top:.4rem; }
/* Google Play build: hide external upgrade and billing controls.
   These features are retained for future Google Play Billing integration. */
.ace-android-app a[href*="upgrade.php"],
.ace-android-app a[href*="billing.php"],
.ace-android-app #row-upgrade,
.ace-android-app .usage-inline-cta,
.ace-android-app #drawerManagePlanLink,
.ace-android-app #drawerManagePlanSeparator,
.ace-android-app #userPlanAction,
.ace-android-app #upgradeBtn,
.ace-android-app #manageBtn,
.ace-android-app #managePlanBtn,
.ace-android-app #saveUpgradeLink,
.ace-android-app #upgradeFaq {
    display: none !important;
}
