/* VERBA design system v1: tokens, presets, admin components, page builder blocks.
   No script is needed: menus, tabs, accordions, dialogs and lightboxes use <details>, :target and :has().
   Class prefix: none for blocks (as in the pagebuilder pack), "a-" for admin parts, "u-" for utilities. */
@import url("verba-tokens.css");

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--type-scale); scroll-behavior: smooth; }
body { margin: 0; font: 400 1rem/1.6 var(--font-body); color: var(--foreground); background: var(--background); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); line-height: 1.1; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); } h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; } h4 { font-size: 1rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
@media (prefers-reduced-motion: reduce) { :root { --motion: 0ms; } * { animation: none !important; scroll-behavior: auto !important; } }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--container-pad-sm); }
@media (min-width: 60rem) { .container { padding-inline: var(--container-pad-lg); } }
.section { padding-block: calc(var(--space-scale) * 5); position: relative; }
.section.pad-sm { padding-block: calc(var(--space-scale) * 2.5); }
.section.scheme-muted { background: var(--muted); }
.section.scheme-primary { background: var(--primary); color: var(--primary-foreground); }
.section.scheme-inverse { background: var(--foreground); color: var(--background); }
.section.scheme-inverse .muted, .section.scheme-primary .muted { color: inherit; opacity: .75; }
.backdrop { background-image: var(--backdrop); }
.eyebrow { display: inline-block; font: 600 .75rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--eyebrow, var(--primary)); margin-bottom: 1rem; }
.lead { font-size: 1.2rem; color: var(--muted-foreground); max-width: 42rem; }
.muted { color: var(--muted-foreground); }
.display { font-size: clamp(2.75rem, 7vw, 5rem); text-transform: var(--display-case); }
.display-xl { font-size: clamp(3.25rem, 11vw, 9rem); line-height: .92; text-transform: var(--display-case); }
.gradient-text { background: linear-gradient(100deg, var(--brand-1), var(--brand-2) 50%, var(--brand-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.center { text-align: center; } .center .lead { margin-inline: auto; }
.stack > * + * { margin-top: var(--space-scale); }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.center .row { justify-content: center; }
.grid { display: grid; gap: calc(var(--space-scale) * 1.5); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.split { display: grid; gap: calc(var(--space-scale) * 3); align-items: center; }
@media (min-width: 56rem) { .split { grid-template-columns: 1fr 1fr; } .split.reverse > :first-child { order: 2; } }
.divider { border: 0; border-top: var(--border-width) solid var(--border); margin: calc(var(--space-scale) * 2) 0; }
.divider-label { display: flex; align-items: center; gap: 1rem; color: var(--muted-foreground); font-size: .85rem; }
.divider-label::before, .divider-label::after { content: ""; flex: 1; border-top: var(--border-width) solid var(--border); }
.spacer { height: calc(var(--space-scale) * 3); }

/* ---------- 4. Primitives (shadcn/ui, Radix, MUI, Ant names) ---------- */
.btn { --b: var(--primary); --bf: var(--primary-foreground);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--tap-min); padding: 0 1.25rem;
  font: 600 .95rem/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  background: var(--b); color: var(--bf); border: var(--border-width) solid var(--b); border-radius: var(--radius);
  box-shadow: none; transition: transform var(--motion) var(--ease), box-shadow var(--motion), background var(--motion), opacity var(--motion); }
.btn:hover { opacity: .92; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.secondary { --b: var(--secondary); --bf: var(--secondary-foreground); }
.btn.outline { background: transparent; color: var(--foreground); border-color: var(--input); }
.btn.ghost { background: transparent; color: var(--foreground); border-color: transparent; }
.btn.ghost:hover { background: var(--accent); }
.btn.link { background: none; border: 0; color: var(--primary); padding: 0; min-height: auto; text-decoration: underline; }
.btn.danger { --b: var(--destructive); --bf: var(--destructive-foreground); }
.btn.gradient { background: linear-gradient(100deg, var(--brand-1), var(--brand-2)); border: 0; color: var(--on-gradient, #fff); }
.btn.glow { box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 40%, transparent), 0 8px 30px color-mix(in oklab, var(--primary) 45%, transparent); }
.btn.pill { border-radius: 999px; }
.btn.sm { min-height: 32px; padding: 0 .75rem; font-size: .85rem; }
.btn.lg { min-height: 52px; padding: 0 1.75rem; font-size: 1.05rem; }
.btn.icon { padding: 0; width: var(--tap-min); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .spin { width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
[data-preset="brutal"] .btn, :root:has(#preset-brutal:checked) .btn:not(.ghost, .link) { border-color: var(--foreground); box-shadow: 3px 3px 0 var(--foreground); text-transform: uppercase; }
[data-preset="brutal"] .btn:hover, :root:has(#preset-brutal:checked) .btn:not(.ghost, .link):hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--foreground); opacity: 1; }

.card { background: var(--surface-bg); color: var(--card-foreground); border: var(--border-width) solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: calc(var(--space-scale) * 1.5); backdrop-filter: var(--surface-filter); -webkit-backdrop-filter: var(--surface-filter); }
.card.flat { box-shadow: none; } .card.p0 { padding: 0; overflow: hidden; }
.card.hover { transition: transform var(--motion) var(--ease), box-shadow var(--motion); }
.card.hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card.glass { background: color-mix(in oklab, var(--card) 55%, transparent); backdrop-filter: blur(16px) saturate(1.4); }
.card.gradient-border { border: 1px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(120deg, var(--brand-1), var(--brand-2), var(--brand-3)) border-box; }
.card h3 { margin-bottom: .35em; }

.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; font: 600 .75rem/1.4 var(--font-body); border-radius: calc(var(--radius) * 50);
  background: var(--secondary); color: var(--secondary-foreground); border: var(--border-width) solid transparent; white-space: nowrap; }
.badge.primary { background: var(--primary); color: var(--primary-foreground); }
.badge.outline { background: transparent; border-color: var(--border); color: var(--foreground); }
.badge.success { background: color-mix(in oklab, var(--success) 15%, transparent); color: var(--success); }
.badge.warning { background: color-mix(in oklab, var(--warning) 25%, transparent); color: var(--warning-foreground); }
.badge.danger { background: color-mix(in oklab, var(--destructive) 15%, transparent); color: var(--destructive); }
.badge.info { background: color-mix(in oklab, var(--info) 15%, transparent); color: var(--info); }
.badge.dot::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
[data-scheme="dark"] .badge.warning, :root:has(#scheme-dark:checked) .badge.warning { color: var(--warning); }

.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: .85rem;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: #fff; flex: none; border: 2px solid var(--background); }
.avatar.sm { width: 28px; height: 28px; font-size: .7rem; } .avatar.lg { width: 64px; height: 64px; font-size: 1.2rem; }
.avatar-group { display: flex; } .avatar-group .avatar + .avatar { margin-left: -10px; }

.kbd { font: 500 .75rem/1 var(--font-mono); padding: .2rem .4rem; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; background: var(--muted); }
.icon-box { width: 48px; height: 48px; display: grid; place-items: center; border-radius: calc(var(--radius) * .8); background: var(--accent); color: var(--accent-foreground); font-size: 1.4rem; margin-bottom: 1rem; }
.icon-box.gradient { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: #fff; }

/* Forms */
.field { display: grid; gap: .4rem; }
.field label, .label { font-weight: 500; font-size: .9rem; }
.hint { font-size: .8rem; color: var(--muted-foreground); }
.field.error .input { border-color: var(--destructive); } .field.error .hint { color: var(--destructive); }
.input, .select, .textarea { width: 100%; min-height: var(--tap-min); padding: .55rem .8rem; font: inherit; font-size: .95rem; color: var(--foreground);
  background: var(--background); border: var(--border-width) solid var(--input); border-radius: calc(var(--radius) * .75); transition: border-color var(--motion), box-shadow var(--motion); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 25%, transparent); }
.textarea { min-height: 100px; resize: vertical; }
.input-group { display: flex; } .input-group .input { border-radius: calc(var(--radius) * .75) 0 0 calc(var(--radius) * .75); }
.input-group .btn { border-radius: 0 calc(var(--radius) * .75) calc(var(--radius) * .75) 0; }
.input-affix { position: relative; } .input-affix > span { position: absolute; left: .8rem; top: 50%; translate: 0 -50%; color: var(--muted-foreground); }
.input-affix .input { padding-left: 2.2rem; }
.check { display: flex; align-items: center; gap: .6rem; font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }
.switch { appearance: none; width: 40px; height: 22px; border-radius: 999px; background: var(--input); position: relative; cursor: pointer; transition: background var(--motion); margin: 0; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .3); transition: translate var(--motion) var(--ease); }
.switch:checked { background: var(--primary); } .switch:checked::after { translate: 18px 0; }
.range { width: 100%; accent-color: var(--primary); }
.segmented { position: relative; display: inline-flex; padding: 3px; background: var(--muted); border-radius: var(--radius); gap: 2px; }
.segmented label { padding: .4rem .9rem; border-radius: calc(var(--radius) * .7); font-size: .85rem; font-weight: 500; cursor: pointer; color: var(--muted-foreground); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + label { background: var(--card); color: var(--foreground); box-shadow: var(--shadow); }
.dropzone { border: 2px dashed var(--input); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--muted-foreground); background: var(--muted); }

/* Feedback */
.alert { display: flex; gap: .8rem; padding: 1rem 1.1rem; border-radius: var(--radius); border: var(--border-width) solid var(--border); background: var(--card); }
.alert strong { display: block; margin-bottom: .15rem; }
.alert.info { border-color: color-mix(in oklab, var(--info) 40%, transparent); background: color-mix(in oklab, var(--info) 8%, var(--card)); }
.alert.success { border-color: color-mix(in oklab, var(--success) 40%, transparent); background: color-mix(in oklab, var(--success) 8%, var(--card)); }
.alert.warning { border-color: color-mix(in oklab, var(--warning) 60%, transparent); background: color-mix(in oklab, var(--warning) 12%, var(--card)); }
.alert.danger { border-color: color-mix(in oklab, var(--destructive) 40%, transparent); background: color-mix(in oklab, var(--destructive) 8%, var(--card)); }
.toast { display: flex; gap: .8rem; align-items: flex-start; width: min(100%, 360px); padding: 1rem; background: var(--popover); color: var(--popover-foreground); border: var(--border-width) solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.progress { height: 8px; background: var(--muted); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.progress.gradient > i { background: linear-gradient(90deg, var(--brand-1), var(--brand-2)); }
.skeleton { background: linear-gradient(90deg, var(--muted) 25%, color-mix(in oklab, var(--muted) 60%, var(--background)) 50%, var(--muted) 75%) 0 0 / 200% 100%; border-radius: calc(var(--radius) * .6); animation: shimmer 1.4s infinite linear; height: 1rem; }
@keyframes shimmer { to { background-position: -200% 0; } }
.tooltip { position: relative; } .tooltip::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 4px; padding: .35rem .6rem; font-size: .75rem; white-space: nowrap;
  background: var(--foreground); color: var(--background); border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity var(--motion), translate var(--motion); }
.tooltip:hover::after, .tooltip:focus-visible::after { opacity: 1; translate: -50% 0; }
.empty { text-align: center; padding: 3rem 1rem; border: 2px dashed var(--border); border-radius: var(--radius); color: var(--muted-foreground); }
.empty .icon-box { margin-inline: auto; }

/* Disclosure: tabs (radio + :has), accordion (<details>), dropdown (<details>), dialog (:target) */
.tabs { --tab-gap: .25rem; }
.tabs > [role="tablist"] { display: flex; gap: var(--tab-gap); border-bottom: var(--border-width) solid var(--border); overflow-x: auto; }
.tabs > [role="tablist"] label { padding: .7rem 1rem; font-weight: 500; font-size: .95rem; color: var(--muted-foreground); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tabs > .panel { display: none; padding-top: 1.25rem; }
.tabs > input:nth-of-type(1):checked ~ [role="tablist"] label:nth-child(1), .tabs > input:nth-of-type(2):checked ~ [role="tablist"] label:nth-child(2),
.tabs > input:nth-of-type(3):checked ~ [role="tablist"] label:nth-child(3), .tabs > input:nth-of-type(4):checked ~ [role="tablist"] label:nth-child(4) { color: var(--foreground); border-color: var(--primary); }
.tabs > input:nth-of-type(1):checked ~ .panel:nth-of-type(1), .tabs > input:nth-of-type(2):checked ~ .panel:nth-of-type(2),
.tabs > input:nth-of-type(3):checked ~ .panel:nth-of-type(3), .tabs > input:nth-of-type(4):checked ~ .panel:nth-of-type(4) { display: block; }
.tabs.pills > [role="tablist"] { border: 0; background: var(--muted); padding: 4px; border-radius: var(--radius); display: inline-flex; }
.tabs.pills > [role="tablist"] label { border: 0; margin: 0; padding: .45rem .9rem; border-radius: calc(var(--radius) * .7); }
.tabs.pills > input:checked ~ [role="tablist"] label { background: none; }
.tabs.pills > input:nth-of-type(1):checked ~ [role="tablist"] label:nth-child(1), .tabs.pills > input:nth-of-type(2):checked ~ [role="tablist"] label:nth-child(2),
.tabs.pills > input:nth-of-type(3):checked ~ [role="tablist"] label:nth-child(3) { background: var(--card); box-shadow: var(--shadow); }

.accordion details { border-bottom: var(--border-width) solid var(--border); }
.accordion summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; font-weight: 600; font-size: 1.05rem; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--muted-foreground); transition: rotate var(--motion) var(--ease); }
.accordion details[open] summary::after { rotate: 45deg; }
.accordion details > div { padding-bottom: 1.1rem; color: var(--muted-foreground); }
.accordion.boxed details { border: var(--border-width) solid var(--border); border-radius: var(--radius); padding: 0 1.1rem; margin-bottom: .6rem; background: var(--surface-bg); }

.dropdown { position: relative; display: inline-block; }
.dropdown > summary { list-style: none; } .dropdown > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; min-width: 200px; padding: 4px; background: var(--popover); color: var(--popover-foreground);
  border: var(--border-width) solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.menu-pop a, .menu-pop button { display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: 100%; padding: .5rem .65rem; font: inherit; font-size: .9rem; color: inherit; text-decoration: none; background: none; border: 0; border-radius: calc(var(--radius) * .6); cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--accent); }
.menu-pop hr { border: 0; border-top: 1px solid var(--border); margin: 4px; }
.menu-pop .danger { color: var(--destructive); }

.dialog { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 1rem; background: rgb(0 0 0 / .5); backdrop-filter: blur(4px); }
.dialog:target { display: grid; }
.dialog > .card { width: min(100%, 480px); box-shadow: var(--shadow-lg); animation: pop 200ms var(--ease); }
.sheet { place-items: stretch end; padding: 0; } .sheet > .card { width: min(100%, 420px); border-radius: 0; animation: slide 250ms var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } } @keyframes slide { from { transform: translateX(100%); } }

.breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: var(--muted-foreground); list-style: none; padding: 0; margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; opacity: .5; }
.breadcrumb a { color: inherit; text-decoration: none; } .breadcrumb a:hover { color: var(--foreground); }
.pagination { display: flex; gap: .25rem; align-items: center; }
.pagination a { min-width: 36px; height: 36px; display: grid; place-items: center; padding: 0 .5rem; border-radius: calc(var(--radius) * .7); color: var(--foreground); text-decoration: none; font-size: .9rem; }
.pagination a:hover { background: var(--accent); } .pagination a[aria-current] { background: var(--primary); color: var(--primary-foreground); }

.table-wrap { overflow-x: auto; border: var(--border-width) solid var(--border); border-radius: var(--radius); background: var(--card); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 500; font-size: .8rem; color: var(--muted-foreground); background: var(--muted); padding: .65rem 1rem; white-space: nowrap; border-bottom: var(--border-width) solid var(--border); }
.table td { padding: 0 1rem; height: var(--row); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; } .table tbody tr:hover { background: color-mix(in oklab, var(--accent) 50%, transparent); }
.table tr:has(input:checked) { background: color-mix(in oklab, var(--primary) 7%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table th[aria-sort]::after { content: " ↓"; color: var(--foreground); }

/* ---------- 5. Admin shell (platform admin and app admin, ADR 0026) ---------- */
.a-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 680px; border: var(--border-width) solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--background); }
.a-side { background: var(--sidebar); color: var(--sidebar-foreground); border-right: var(--border-width) solid var(--sidebar-border); padding: .75rem; display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; }
.a-side .a-brand { display: flex; align-items: center; gap: .6rem; padding: .5rem; margin-bottom: .5rem; font-weight: 700; }
.a-logo { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); display: grid; place-items: center; color: #fff; font-weight: 800; }
.a-side .a-group { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-foreground); padding: 1rem .6rem .35rem; }
.a-side a { display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: calc(var(--radius) * .7); color: inherit; text-decoration: none; }
.a-side a:hover { background: var(--sidebar-accent); }
.a-side a[aria-current] { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); font-weight: 600; }
.a-side a .badge { margin-left: auto; }
.a-side .a-ico { width: 18px; text-align: center; opacity: .8; }
.a-side .a-foot { margin-top: auto; display: flex; align-items: center; gap: .6rem; padding: .6rem; border-top: 1px solid var(--sidebar-border); }
.a-main { display: flex; flex-direction: column; min-width: 0; }
.a-top { display: flex; align-items: center; gap: 1rem; padding: .65rem 1.25rem; border-bottom: var(--border-width) solid var(--border); background: var(--background); }
.a-top .input-affix { flex: 1; max-width: 420px; } .a-top .input { min-height: 36px; background: var(--muted); border-color: transparent; }
.a-top .row { margin-left: auto; }
.a-tenant { display: flex; align-items: center; gap: .5rem; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: calc(var(--radius) * .7); font-size: .85rem; font-weight: 500; }
.a-body { padding: 1.5rem; display: grid; gap: 1.25rem; align-content: start; }
.a-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; }
.a-head h1 { font-size: 1.6rem; margin: .25rem 0 0; letter-spacing: -0.02em; text-transform: none; }
.a-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.a-toolbar .input, .a-toolbar .select { min-height: 36px; width: auto; }
.chip { display: inline-flex; align-items: center; gap: .35rem; height: 32px; padding: 0 .7rem; border: 1px dashed var(--input); border-radius: 999px; font-size: .82rem; color: var(--foreground); background: none; }
.chip.on { border-style: solid; background: var(--accent); color: var(--accent-foreground); }
.stat { display: grid; gap: .3rem; }
.stat .v { font: 700 1.8rem/1.1 var(--font-body); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .d { font-size: .8rem; } .stat .d.up { color: var(--success); } .stat .d.down { color: var(--destructive); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 40px; }
.spark i { flex: 1; background: color-mix(in oklab, var(--chart-1) 70%, transparent); border-radius: 2px 2px 0 0; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 1rem; border-bottom: 1px solid var(--border); }
.bars i { flex: 1; border-radius: 4px 4px 0 0; background: var(--chart-1); position: relative; }
.bars i:nth-child(even) { background: var(--chart-2); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 1.1rem 40px; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 3px solid var(--primary); }
.timeline li.warn::before { border-color: var(--warning); } .timeline li.err::before { border-color: var(--destructive); } .timeline li.ok::before { border-color: var(--success); }
.timeline time { display: block; color: var(--muted-foreground); font-size: .78rem; font-family: var(--font-mono); }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 1rem; overflow-x: auto; }
.kanban > div { background: var(--muted); border-radius: var(--radius); padding: .75rem; display: grid; gap: .6rem; align-content: start; }
.kanban .card { padding: .85rem; font-size: .88rem; }
.cmdk { width: min(100%, 560px); padding: 0; overflow: hidden; }
.cmdk .input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; min-height: 52px; font-size: 1rem; }
.cmdk ul { list-style: none; margin: 0; padding: 6px; max-height: 280px; overflow: auto; }
.cmdk li { display: flex; gap: .7rem; align-items: center; padding: .55rem .7rem; border-radius: calc(var(--radius) * .6); font-size: .9rem; }
.cmdk li[aria-selected] { background: var(--accent); }
.cmdk .grp { font-size: .72rem; color: var(--muted-foreground); padding: .6rem .7rem .2rem; }
.confirm { border: var(--border-width) solid color-mix(in oklab, var(--warning) 60%, var(--border)); }
.diff { font: .82rem/1.6 var(--font-mono); background: var(--muted); border-radius: calc(var(--radius) * .6); padding: .75rem 1rem; overflow-x: auto; white-space: pre; }
.diff .add { color: var(--success); } .diff .del { color: var(--destructive); }
.steps-h { display: flex; gap: .5rem; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps-h li { flex: 1; counter-increment: s; font-size: .85rem; padding-top: .7rem; border-top: 3px solid var(--border); color: var(--muted-foreground); }
.steps-h li::before { content: counter(s) ". "; font-weight: 700; }
.steps-h li.done, .steps-h li.now { border-color: var(--primary); color: var(--foreground); } .steps-h li.now { font-weight: 600; }

/* Builder editor chrome: canvas, block outline, widget panel, props panel */
.b-editor { display: grid; grid-template-columns: 260px 1fr 280px; min-height: 560px; border: var(--border-width) solid var(--border); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 64rem) { .b-editor { grid-template-columns: 1fr; } }
.b-panel { background: var(--sidebar); padding: 1rem; display: grid; gap: .9rem; align-content: start; font-size: .85rem; border-right: 1px solid var(--border); }
.b-panel:last-child { border-right: 0; border-left: 1px solid var(--border); }
.b-widgets { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.b-widgets span { display: grid; gap: 4px; place-items: center; text-align: center; padding: .7rem .2rem; font-size: .7rem; background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) * .6); cursor: grab; }
.b-widgets span b { font-size: 1.1rem; font-weight: 400; }
.b-widgets span:hover { border-color: var(--primary); color: var(--primary); }
.b-canvas { background: var(--muted); padding: 1.25rem; display: grid; gap: 0; align-content: start; }
.b-canvas .b-node { position: relative; outline: 1px dashed transparent; outline-offset: -1px; background: var(--background); }
.b-canvas .b-node:hover { outline-color: var(--ring); }
.b-canvas .b-node.sel { outline: 2px solid var(--primary); }
.b-canvas .b-node.sel::before { content: attr(data-name); position: absolute; top: -1px; left: -1px; padding: 2px 8px; font-size: .7rem; font-weight: 600; background: var(--primary); color: var(--primary-foreground); border-radius: 0 0 6px 0; z-index: 1; }
.b-drop { height: 4px; background: var(--primary); border-radius: 2px; margin: 4px 0; }
.b-tree { list-style: none; padding: 0; margin: 0; } .b-tree ul { list-style: none; padding-left: 1rem; margin: 0; }
.b-tree li > span { display: block; padding: .3rem .5rem; border-radius: 6px; } .b-tree li > span.sel { background: var(--sidebar-accent); font-weight: 600; }
.b-devices { display: flex; gap: 4px; justify-content: center; }

/* ---------- 6. Page builder blocks (front) ---------- */
/* Header / navbar */
.navbar { position: sticky; top: 0; z-index: 30; background: color-mix(in oklab, var(--background) 80%, transparent); backdrop-filter: blur(12px); border-bottom: var(--border-width) solid var(--border); }
.navbar .container { display: flex; align-items: center; gap: 2rem; min-height: 68px; }
.navbar .logo { font: 800 1.2rem/1 var(--font-display); color: var(--foreground); text-decoration: none; display: flex; gap: .5rem; align-items: center; letter-spacing: -0.03em; }
.navbar nav { display: flex; gap: .25rem; } .navbar nav > a, .navbar nav summary { padding: .5rem .8rem; color: var(--muted-foreground); text-decoration: none; font-size: .95rem; font-weight: 500; border-radius: calc(var(--radius) * .7); cursor: pointer; list-style: none; }
.navbar nav > a:hover, .navbar nav summary:hover { color: var(--foreground); background: var(--accent); }
.navbar .row { margin-left: auto; }
.navbar.floating { position: relative; border: 0; background: none; backdrop-filter: none; padding-top: 1rem; }
.navbar.floating .container { max-width: 980px; background: var(--surface-bg); backdrop-filter: blur(16px); border: var(--border-width) solid var(--border); border-radius: 999px; min-height: 60px; padding-inline: 1.5rem .5rem; box-shadow: var(--shadow); }
.mega { position: absolute; left: 50%; translate: -50% 0; top: calc(100% + 10px); width: min(92vw, 720px); display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: 1rem; background: var(--popover); border: var(--border-width) solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 40; }
.mega a { display: block; padding: .7rem; border-radius: calc(var(--radius) * .7); color: var(--foreground); text-decoration: none; font-size: .9rem; } .mega a:hover { background: var(--accent); }
.mega a small { display: block; color: var(--muted-foreground); }
.navbar details { position: relative; }
.announce { background: var(--foreground); color: var(--background); text-align: center; font-size: .85rem; padding: .55rem 1rem; }
.announce a { color: inherit; font-weight: 600; }
.announce.gradient { background: linear-gradient(90deg, var(--brand-1), var(--brand-2), var(--brand-3)); color: #fff; }
@media (max-width: 48rem) { .navbar nav { display: none; } }

/* Hero variants */
.hero { padding-block: calc(var(--space-scale) * 7) calc(var(--space-scale) * 6); position: relative; overflow: hidden; }
.hero .pill-note { display: inline-flex; gap: .5rem; align-items: center; padding: .3rem .4rem .3rem .4rem; border: var(--border-width) solid var(--border); border-radius: 999px; font-size: .85rem; background: var(--surface-bg); margin-bottom: 1.5rem; color: var(--foreground); text-decoration: none; }
.hero .pill-note .badge { font-size: .7rem; }
.hero-image { min-height: 560px; display: grid; align-items: end; color: #fff; padding-block: 4rem; background: linear-gradient(to top, rgb(0 0 0 / .7), rgb(0 0 0 / .1)), var(--hero-img, linear-gradient(135deg, oklch(0.4 0.1 160), oklch(0.3 0.08 220))) center / cover; }
.hero-image .lead { color: rgb(255 255 255 / .85); }
.hero-shot { margin-top: 3.5rem; border-radius: calc(var(--radius) * 1.25); border: var(--border-width) solid var(--border); box-shadow: var(--shadow-lg); overflow: hidden; background: var(--card); }
.hero-shot.tilt { transform: perspective(1600px) rotateX(14deg); transform-origin: top; mask-image: linear-gradient(to bottom, #000 60%, transparent); }
.orb { position: absolute; width: 520px; aspect-ratio: 1; border-radius: 50%; filter: blur(90px); opacity: .45; pointer-events: none; z-index: -1; }
.hero > .container { position: relative; z-index: 1; }

/* Logo cloud / marquee */
.logos { display: flex; flex-wrap: wrap; gap: 2.5rem 3.5rem; justify-content: center; align-items: center; opacity: .6; font: 800 1.35rem/1 var(--font-display); letter-spacing: -0.03em; filter: grayscale(1); }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee > div { display: flex; gap: 4rem; width: max-content; animation: marquee 30s linear infinite; }
.marquee:hover > div { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee.big > div { font: var(--display-weight) clamp(2.5rem, 8vw, 6rem)/1 var(--font-display); text-transform: var(--display-case); letter-spacing: var(--display-tracking); gap: 2rem; }
.marquee.big span:nth-child(even) { -webkit-text-stroke: 2px var(--foreground); color: transparent; }

/* Features, bento */
.feature h3 { font-size: 1.1rem; } .feature p { color: var(--muted-foreground); margin: 0; }
.bento { display: grid; gap: 1rem; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; }
.bento > * { margin: 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; position: relative; }
.bento .w2 { grid-column: span 2; } .bento .h2 { grid-row: span 2; }
.bento .big-num { font: 800 3.5rem/1 var(--font-display); letter-spacing: -0.04em; }
@media (max-width: 52rem) { .bento { grid-template-columns: 1fr 1fr; } }
@media (max-width: 34rem) { .bento { grid-template-columns: 1fr; } .bento .w2 { grid-column: auto; } }

/* Stats / counters */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2rem; }
.stats .v { font: var(--display-weight) clamp(2.5rem, 5vw, 3.75rem)/1 var(--font-display); letter-spacing: -0.04em; }
.stats.divided > div + div { border-left: var(--border-width) solid var(--border); padding-left: 2rem; }

/* Steps / process */
.steps { counter-reset: st; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.steps > div { counter-increment: st; position: relative; padding-top: 3.5rem; }
.steps > div::before { content: counter(st, decimal-leading-zero); position: absolute; top: 0; font: 800 2.5rem/1 var(--font-display); color: transparent; -webkit-text-stroke: 1.5px var(--primary); }

/* Testimonials */
.quote-card blockquote { margin: 0 0 1.25rem; font-size: 1.05rem; }
.quote-card .who { display: flex; gap: .75rem; align-items: center; font-size: .9rem; }
.quote-card .who small { display: block; color: var(--muted-foreground); }
.stars { color: oklch(0.8 0.17 80); letter-spacing: 2px; }
.big-quote { font: var(--display-weight) clamp(1.6rem, 3.5vw, 2.6rem)/1.25 var(--font-display); letter-spacing: var(--display-tracking); max-width: 52rem; margin: 0 auto 2rem; }
.big-quote::before { content: "“"; display: block; font-size: 5rem; line-height: .6; color: var(--primary); }
.masonry { columns: 3 280px; gap: 1rem; } .masonry > * { break-inside: avoid; margin-bottom: 1rem; }

/* Pricing */
.pricing { display: grid; gap: 1.25rem; padding-top: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 1rem; }
.plan .price { font: 800 2.75rem/1 var(--font-display); letter-spacing: -0.04em; } .plan .price small { font: 400 .95rem var(--font-body); color: var(--muted-foreground); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; font-size: .92rem; flex: 1; }
.plan li::before { content: "✓"; color: var(--success); font-weight: 700; margin-right: .55rem; }
.plan li.no { color: var(--muted-foreground); } .plan li.no::before { content: "–"; color: var(--muted-foreground); }
.plan.featured { border: 2px solid var(--primary); position: relative; transform: scale(1.03); box-shadow: var(--shadow-lg); }
.plan.featured > .badge { position: absolute; top: -12px; left: 50%; translate: -50% 0; }
.compare th, .compare td { text-align: center; } .compare th:first-child, .compare td:first-child { text-align: left; }

/* Commerce: product card */
.product { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product .ph { aspect-ratio: 4/5; position: relative; }
.product .ph .badge { position: absolute; top: .75rem; left: .75rem; }
.product .ph .fav { position: absolute; top: .6rem; right: .6rem; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--background); border: 0; box-shadow: var(--shadow); }
.product .body { padding: 1rem; display: grid; gap: .35rem; }
.product .old { text-decoration: line-through; color: var(--muted-foreground); font-size: .9rem; margin-left: .4rem; }
.ph { background: linear-gradient(135deg, color-mix(in oklab, var(--brand-1) 35%, var(--muted)), color-mix(in oklab, var(--brand-2) 35%, var(--muted))); border-radius: inherit; }
.ph.r { border-radius: var(--radius); }
.ph.a16 { aspect-ratio: 16/9; } .ph.a43 { aspect-ratio: 4/3; } .ph.a1 { aspect-ratio: 1; }
.ph.photo1 { background: linear-gradient(160deg, oklch(0.75 0.08 150), oklch(0.45 0.1 160)); }
.ph.photo2 { background: linear-gradient(160deg, oklch(0.85 0.07 70), oklch(0.6 0.12 40)); }
.ph.photo3 { background: linear-gradient(160deg, oklch(0.8 0.05 240), oklch(0.5 0.1 260)); }
.ph.photo4 { background: linear-gradient(160deg, oklch(0.82 0.08 330), oklch(0.55 0.15 340)); }

/* Blog / post card */
.post { padding: 0; overflow: hidden; } .post .body { padding: 1.25rem; } .post .meta { font-size: .8rem; color: var(--muted-foreground); display: flex; gap: .6rem; margin-bottom: .5rem; }
.post h3 a { color: inherit; text-decoration: none; } .post:hover h3 a { color: var(--primary); }

/* Team */
.member { text-align: center; } .member .ph { aspect-ratio: 1; border-radius: 50%; width: 140px; margin: 0 auto 1rem; }
.member small { color: var(--muted-foreground); display: block; margin-bottom: .6rem; }
.social { display: flex; gap: .4rem; justify-content: center; }
.social a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); color: var(--foreground); text-decoration: none; font-size: .78rem; font-weight: 700; }
.social a:hover { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

/* Gallery + lightbox (:target), carousel (scroll-snap) */
.gallery { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; } .gallery a .ph { aspect-ratio: 1; transition: transform 400ms var(--ease); } .gallery a:hover .ph { transform: scale(1.06); }
.lightbox { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; background: rgb(0 0 0 / .88); padding: 2rem; }
.lightbox:target { display: grid; } .lightbox .ph { width: min(90vw, 900px); aspect-ratio: 16/10; } .lightbox .x { position: absolute; top: 1rem; right: 1.5rem; color: #fff; font-size: 2rem; text-decoration: none; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: min(85%, 380px); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; scrollbar-width: thin; }
.carousel > * { scroll-snap-align: start; }

/* Media / video */
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; }
.video .play { width: 76px; height: 76px; border-radius: 50%; background: rgb(255 255 255 / .92); display: grid; place-items: center; font-size: 1.6rem; color: #111; box-shadow: 0 0 0 12px rgb(255 255 255 / .25); }

/* CTA, newsletter */
.cta { border-radius: calc(var(--radius) * 1.5); padding: clamp(2rem, 6vw, 4.5rem); position: relative; overflow: hidden; background: var(--primary); color: var(--primary-foreground); }
.cta.gradient { background: linear-gradient(120deg, var(--brand-1), var(--brand-2) 60%, var(--brand-3)); color: #fff; }
.cta .lead { color: inherit; opacity: .85; }
.cta .btn.on-dark { --b: #fff; --bf: #111; }
.newsletter { display: flex; gap: .5rem; max-width: 440px; } .newsletter .input { flex: 1; }
.center .newsletter { margin-inline: auto; }

/* Countdown (static numbers; the renderer fills them at draw time) */
.countdown { display: flex; gap: .75rem; } .countdown > div { min-width: 82px; text-align: center; padding: .8rem; }
.countdown b { display: block; font: 800 2.2rem/1 var(--font-display); font-variant-numeric: tabular-nums; } .countdown small { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-foreground); }

/* Contact, map, opening hours */
.map { aspect-ratio: 16/10; border-radius: var(--radius); background: repeating-linear-gradient(45deg, var(--muted) 0 12px, color-mix(in oklab, var(--muted) 60%, var(--background)) 12px 24px); display: grid; place-items: center; color: var(--muted-foreground); text-align: center; }
.hours { width: 100%; font-size: .92rem; } .hours td { padding: .35rem 0; border-bottom: 1px dashed var(--border); } .hours td:last-child { text-align: right; } .hours tr.today { font-weight: 700; color: var(--primary); }

/* Footer */
.footer { border-top: var(--border-width) solid var(--border); padding-block: 4rem 2rem; font-size: .92rem; }
.footer .cols { display: grid; gap: 2rem; grid-template-columns: 2fr repeat(3, 1fr); }
@media (max-width: 48rem) { .footer .cols { grid-template-columns: 1fr 1fr; } }
.footer h4 { font: 600 .85rem var(--font-body); margin-bottom: 1rem; text-transform: none; letter-spacing: 0; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; } .footer a { color: var(--muted-foreground); text-decoration: none; } .footer a:hover { color: var(--foreground); }
.footer .legal { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--muted-foreground); font-size: .85rem; }
.footer-giant { font: 900 clamp(4rem, 18vw, 15rem)/.8 var(--font-display); letter-spacing: -0.06em; text-transform: var(--display-case); margin-top: 3rem; color: transparent; -webkit-text-stroke: 1px var(--border); text-align: center; overflow: hidden; white-space: nowrap; }

/* Cookie bar, back-to-top, sticky CTA */
.cookie { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: var(--popover); border: var(--border-width) solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: .9rem; max-width: 640px; }
.cookie p { margin: 0; flex: 1 1 260px; }

/* Scroll reveal: CSS scroll-driven animation; no script. Browsers without it show the block at once. */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 25%; }
  @keyframes reveal { from { opacity: 0; transform: translateY(32px); } }
}

/* Utilities */
.u-mt0 { margin-top: 0; } .u-mb0 { margin-bottom: 0; } .u-mt2 { margin-top: 2rem; } .u-mb2 { margin-bottom: 2rem; } .u-mb3 { margin-bottom: 3rem; }
.u-w-narrow { max-width: 720px; margin-inline: auto; } .u-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.u-between { justify-content: space-between; } .u-gap-sm { gap: .5rem; } .u-small { font-size: .85rem; } .u-mono { font-family: var(--font-mono); }
.hide-mobile { } @media (max-width: 48rem) { .hide-mobile { display: none !important; } } @media (min-width: 48.01rem) { .hide-desktop { display: none !important; } }
@media print { .hide-print, .navbar, .cookie { display: none !important; } }
.b-panel { min-width: 0; } .b-panel .tabs.pills > [role="tablist"] { display: flex; } .b-panel .tabs.pills label { flex: 1; text-align: center; padding-inline: .4rem; }

/* ---------- 7. Phone (below 52rem) ---------- */
@media (max-width: 52rem) {
  .a-shell { grid-template-columns: 1fr; min-height: 0; }
  .a-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: var(--border-width) solid var(--sidebar-border); padding: .5rem; scrollbar-width: none; }
  .a-side .a-group, .a-side .a-foot, .a-side a .badge { display: none; }
  .a-side .a-brand { margin: 0; padding: .3rem .5rem; flex: none; }
  .a-side a { flex: none; white-space: nowrap; }
  .a-top { flex-wrap: wrap; padding: .6rem .75rem; } .a-top .input-affix { order: 3; flex-basis: 100%; max-width: none; }
  .a-body { padding: 1rem .75rem; }
  .a-head .row { width: 100%; } .a-head .row .btn { flex: 1; }
  .a-toolbar .input-affix { width: 100% !important; }
  .b-panel { border-right: 0; border-bottom: 1px solid var(--border); }
  .b-panel:last-child { border-left: 0; }
  .plan.featured { transform: none; }
  .countdown { flex-wrap: wrap; justify-content: center; gap: .5rem; } .countdown > div { min-width: 64px; padding: .6rem; } .countdown b { font-size: 1.7rem; }
  .stats.divided > div + div { border-left: 0; padding-left: 0; }
  .hero { padding-block: calc(var(--space-scale) * 4) calc(var(--space-scale) * 3); }
  .hero-image { min-height: 440px; }
  .section { padding-block: calc(var(--space-scale) * 3); }
  .newsletter { flex-direction: column; } .newsletter .btn { width: 100%; }
  .cookie .row { width: 100%; } .cookie .btn { flex: 1; }
  .footer .legal { flex-direction: column; }
}

/* ---------- 8. Preset tweaks: component rules that a token cannot express ---------- */
[data-preset="liquid"] .btn:not(.link), :root:has(#preset-liquid:checked) .btn:not(.link) { border-radius: 999px; }
[data-preset="liquid"] .btn:not(.outline, .ghost, .link, .gradient), :root:has(#preset-liquid:checked) .btn:not(.outline, .ghost, .link, .gradient) {
  background: linear-gradient(180deg, color-mix(in oklab, var(--b) 78%, white), var(--b)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 6px 18px color-mix(in oklab, var(--b) 35%, transparent); }
[data-preset="liquid"] .btn.outline, :root:has(#preset-liquid:checked) .btn.outline { background: var(--surface-bg); backdrop-filter: var(--surface-filter); box-shadow: var(--shadow); }
[data-preset="liquid"] .backdrop, :root:has(#preset-liquid:checked) .backdrop { background-attachment: fixed; }
/* terminal */
[data-preset="terminal"] body, :root:has(#preset-terminal:checked) body { text-shadow: 0 0 6px color-mix(in oklab, var(--primary) 45%, transparent); }
[data-preset="terminal"] .btn:not(.link), :root:has(#preset-terminal:checked) .btn:not(.link) { text-transform: uppercase; letter-spacing: .06em; }
[data-preset="terminal"] .btn.outline:hover, :root:has(#preset-terminal:checked) .btn.outline:hover,
[data-preset="terminal"] .btn.ghost:hover, :root:has(#preset-terminal:checked) .btn.ghost:hover { background: var(--primary); color: var(--primary-foreground); text-shadow: none; }
[data-preset="terminal"] .btn.gradient, :root:has(#preset-terminal:checked) .btn.gradient { background: var(--primary); color: var(--primary-foreground); }
[data-preset="terminal"] .eyebrow::before, :root:has(#preset-terminal:checked) .eyebrow::before { content: "> "; }
[data-preset="terminal"] .display::after, :root:has(#preset-terminal:checked) .display::after,
[data-preset="terminal"] .display-xl::after, :root:has(#preset-terminal:checked) .display-xl::after { content: "_"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
[data-preset="terminal"] .ph, :root:has(#preset-terminal:checked) .ph { background: repeating-linear-gradient(45deg, var(--muted) 0 8px, var(--secondary) 8px 16px); }
/* win98 */
[data-preset="win98"] .btn:not(.link), :root:has(#preset-win98:checked) .btn:not(.link) { background: #c0c0c0; color: #000; border: 0; box-shadow: var(--shadow); font-weight: 400; transform: none; opacity: 1; }
[data-preset="win98"] .btn:not(.secondary, .outline, .ghost, .link, .danger), :root:has(#preset-win98:checked) .btn:not(.secondary, .outline, .ghost, .link, .danger) { outline: 1px solid #000; outline-offset: -1px; font-weight: 700; }
[data-preset="win98"] .btn:active, :root:has(#preset-win98:checked) .btn:active { box-shadow: inset 1px 1px #0a0a0a, inset -1px -1px #fff, inset 2px 2px #808080; }
[data-preset="win98"] .btn.ghost, :root:has(#preset-win98:checked) .btn.ghost { box-shadow: none; background: transparent; }
[data-preset="win98"] .card, :root:has(#preset-win98:checked) .card { border: 0; }
[data-preset="win98"] .input, [data-preset="win98"] .select, [data-preset="win98"] .textarea,
:root:has(#preset-win98:checked) .input, :root:has(#preset-win98:checked) .select, :root:has(#preset-win98:checked) .textarea {
  background: #fff; border: 0; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff, inset 2px 2px #0a0a0a, inset -2px -2px #dfdfdf; }
[data-preset="win98"] .a-top, :root:has(#preset-win98:checked) .a-top,
[data-preset="win98"] .a-side .a-brand, :root:has(#preset-win98:checked) .a-side .a-brand { background: linear-gradient(90deg, #000080, #1084d0); color: #fff; }
[data-preset="win98"] .a-top .a-tenant, :root:has(#preset-win98:checked) .a-top .a-tenant { color: #fff; border-color: #fff; }
[data-preset="win98"] .gradient-text, :root:has(#preset-win98:checked) .gradient-text { background: none; color: #000080; }
[data-preset="win98"] .table-wrap, :root:has(#preset-win98:checked) .table-wrap { background: #fff; border: 0; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff, inset 2px 2px #0a0a0a, inset -2px -2px #dfdfdf; }
/* bank */
[data-preset="bank"] .stat .v, :root:has(#preset-bank:checked) .stat .v, [data-preset="bank"] .plan .price, :root:has(#preset-bank:checked) .plan .price,
[data-preset="bank"] .stats .v, :root:has(#preset-bank:checked) .stats .v, [data-preset="bank"] .big-num, :root:has(#preset-bank:checked) .big-num,
[data-preset="bank"] .table .num, :root:has(#preset-bank:checked) .table .num { font-family: var(--font-mono); letter-spacing: -0.04em; }
[data-preset="bank"] .btn:not(.link), :root:has(#preset-bank:checked) .btn:not(.link) { text-transform: uppercase; letter-spacing: .05em; }
[data-preset="bank"] .btn:not(.ghost, .link):hover, :root:has(#preset-bank:checked) .btn:not(.ghost, .link):hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--foreground); opacity: 1; }
[data-preset="bank"] .card.hover:hover, :root:has(#preset-bank:checked) .card.hover:hover { transform: translate(-4px, -4px); }

/* ---------- 9. New block variants (blocks/*.json) ---------- */
.announce.plain { background: var(--muted); color: var(--foreground); }
.columns { display: grid; gap: calc(var(--space-scale) * 1.5); align-items: start; }
.columns.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .columns.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.columns.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .columns.c1-2 { grid-template-columns: 1fr 2fr; } .columns.c2-1 { grid-template-columns: 2fr 1fr; }
.columns.gap-sm { gap: calc(var(--space-scale) * .75); } .columns.gap-lg { gap: calc(var(--space-scale) * 3); }
@media (max-width: 48rem) { .columns { grid-template-columns: minmax(0, 1fr) !important; } }
.spacer.sm { height: calc(var(--space-scale) * 1.5); } .spacer.lg { height: calc(var(--space-scale) * 5); } .spacer.xl { height: calc(var(--space-scale) * 8); }
.divider-dots { text-align: center; color: var(--muted-foreground); margin: calc(var(--space-scale) * 2) 0; } .divider-dots::before { content: "•   •   •"; white-space: pre; }
.video.r43 { aspect-ratio: 4 / 3; } .video.r1 { aspect-ratio: 1; } .video.r916 { aspect-ratio: 9 / 16; max-width: 360px; }
.bento .w2h2 { grid-column: span 2; grid-row: span 2; }
.bento .tone-primary { background: var(--primary); color: var(--primary-foreground); }
.bento .tone-gradient { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: var(--on-gradient, #fff); border-color: transparent; }
.bento .tone-inverse { background: var(--foreground); color: var(--background); }
.bento [class*="tone-"] .muted { color: inherit; opacity: .8; }
.steps.timeline { grid-template-columns: minmax(0, 1fr); gap: 0; }
.steps.timeline > div { padding: 0 0 1.75rem 2.75rem; margin-left: 1.2rem; border-left: 2px solid var(--border); }
.steps.timeline > div:last-child { border-color: transparent; }
.steps.timeline > div::before { left: -1.25rem; top: 0; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; font: 700 .9rem/1 var(--font-body); color: var(--primary-foreground); background: var(--primary); -webkit-text-stroke: 0; }
.stats.cards > div { background: var(--surface-bg); border: var(--border-width) solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.marquee.slow > div { animation-duration: 50s; } .marquee.fast > div { animation-duration: 15s; }
.pricing.compact { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.pricing.compact .plan { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; transform: none; }
.pricing.compact .plan h3 { margin: 0; min-width: 8rem; } .pricing.compact .plan .price { font-size: 1.6rem; } .pricing.compact .plan ul, .pricing.compact .plan > .muted { display: none; }
.pricing.compact .plan .btn { margin-left: auto; } .pricing.compact .plan > .badge { position: static; translate: none; }
.countdown.inline { gap: .25rem; align-items: baseline; } .countdown.inline > div { min-width: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.countdown.inline b { display: inline; font-size: 1.75rem; } .countdown.inline small { margin: 0 .6rem 0 .2rem; }
.carousel.pv1 { grid-auto-columns: 100%; } .carousel.pv2 { grid-auto-columns: calc(50% - .5rem); } .carousel.pv4 { grid-auto-columns: calc(25% - .75rem); }
.carousel.pv3 { grid-auto-columns: calc(33.333% - .67rem); } .carousel.peek.pv2 { grid-auto-columns: 45%; } .carousel.peek.pv3 { grid-auto-columns: 30%; } .carousel.peek.pv4 { grid-auto-columns: 23%; }
@media (max-width: 48rem) { .carousel[class*="pv"] { grid-auto-columns: 85%; } }
.team-list { display: grid; gap: 1rem; } .team-list .member { display: flex; gap: 1rem; align-items: center; text-align: left; }
.team-list .member .ph { width: 64px; margin: 0; flex: none; } .team-list .member h3 { margin: 0; } .team-list .social { justify-content: flex-start; }
.cta.inverse { background: var(--foreground); color: var(--background); }
.cta.image { background: linear-gradient(rgb(0 0 0 / .55), rgb(0 0 0 / .55)), var(--hero-img, linear-gradient(135deg, oklch(0.45 0.1 160), oklch(0.3 0.08 220))) center / cover; color: #fff; }
.cta.left { text-align: left; } .cta.left .row { justify-content: flex-start; }

/* ---------- 10. CRM parts ---------- */
.crm-grid { display: grid; gap: 1rem; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; } .span-12 { grid-column: 1 / -1; }
@media (max-width: 72rem) { .span-3 { grid-column: span 6; } .span-4, .span-8 { grid-column: 1 / -1; } }
@media (max-width: 40rem) { .crm-grid > * { grid-column: 1 / -1; } }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.card-head h3 { margin: 0; font-size: 1rem; letter-spacing: -0.01em; text-transform: none; }
.funnel { display: grid; gap: .55rem; }
.funnel > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3.5rem; gap: .75rem; align-items: center; font-size: .85rem; }
.funnel i { display: block; height: 26px; border-radius: calc(var(--radius) * .4); background: var(--chart-1); }
.funnel b { text-align: right; font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
.donut { width: 140px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--chart-1) 0 38%, var(--chart-2) 0 64%, var(--chart-3) 0 82%, var(--chart-4) 0 93%, var(--chart-5) 0); }
.donut::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; background: var(--card); }
.donut span { position: relative; font-weight: 700; font-size: 1.2rem; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .85rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .5rem; background: var(--c); }
.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.agenda li { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .6rem .75rem; border-radius: calc(var(--radius) * .75); background: var(--muted); font-size: .88rem; }
.agenda time { font: 600 .8rem/1.2 var(--font-mono); } .agenda small { display: block; color: var(--muted-foreground); }
.agenda li.now { background: color-mix(in oklab, var(--primary) 12%, var(--card)); box-shadow: inset 3px 0 0 var(--primary); }
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li { display: flex; gap: .6rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.tasks li:last-child { border-bottom: 0; } .tasks input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; flex: none; }
.tasks li:has(input:checked) span { text-decoration: line-through; color: var(--muted-foreground); } .tasks .badge { margin-left: auto; }
.kanban.k4 { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
.kanban .col-head { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; font-weight: 600; padding: .1rem .2rem; }
.kanban .col-head span { color: var(--muted-foreground); font-weight: 500; }
.deal { display: grid; gap: .4rem; } .deal .row { justify-content: space-between; flex-wrap: nowrap; } .deal b { font-variant-numeric: tabular-nums; }
.bars.labeled { position: relative; } .bars.labeled i::after { content: attr(data-l); position: absolute; bottom: -1.4rem; left: 50%; translate: -50% 0; font-size: .7rem; color: var(--muted-foreground); font-style: normal; }
.bars i.target { background: transparent; border: 2px dashed var(--border); border-bottom: 0; }
.a-shell.full { min-height: 100vh; border: 0; border-radius: 0; }
.bars.mono i:not(.target) { background: var(--chart-1); }
