/* The Clavia Catalog and Taller Lindavista design kit, from the Claude Design export (kit.css): brand tokens,
   shared scale and components. Element resets sit in the earlier layer, so any component class wins over them. */
@layer reset, components;

@layer reset {
.app *, .app *::before, .app *::after { box-sizing: border-box; }
.app h1, .app h2, .app h3, .app h4, .app p, .app ul, .app ol, .app dl, .app dd, .app figure { margin: 0; }
.app ul, .app ol { padding: 0; list-style: none; }
.app button, .app input, .app select, .app textarea { font: inherit; color: inherit; }
.app img, .app svg { display: block; max-width: 100%; }
.app a { color: inherit; }
.app :focus { outline: none; }
.app :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
}

@layer components {
/* Clavia Catalog: precise, technical. Graphite and signal blue. Dark by default. */
.brand-clavia {
  --font: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-s: 6px; --r-m: 8px; --r-l: 12px; --r-btn: 8px; --r-field: 8px;
  --bg: #0B0D12; --surface: #11141B; --surface-2: #171B24; --surface-3: #1E2330;
  --line: #252B38; --line-strong: #353D4F;
  --text: #EEF1F6; --text-2: #A3ACBE; --text-3: #8E98AC;
  --accent: #7B8FFF; --accent-ink: #0B0D12; --accent-strong: #A5B3FF; --accent-soft: #1A2140;
  --primary: #3D5AFE; --primary-ink: #FFFFFF; --primary-hover: #5570FF;
  --dark: #EEF1F6; --dark-ink: #0B0D12;
  --focus: #A5B3FF;
  --shadow-1: 0 1px 2px rgba(0,0,0,.5);
  --shadow-2: 0 16px 40px -16px rgba(0,0,0,.8);
  color-scheme: dark;
}
.brand-clavia[data-theme="light"] {
  --bg: #FAFBFC; --surface: #FFFFFF; --surface-2: #F3F5F8; --surface-3: #EAEDF2;
  --line: #E2E6ED; --line-strong: #C9CFDA;
  --text: #11131A; --text-2: #525B6E; --text-3: #5F6880;
  --accent: #3D5AFE; --accent-ink: #FFFFFF; --accent-strong: #2A44D6; --accent-soft: #E9EDFF;
  --primary: #3D5AFE; --primary-ink: #FFFFFF; --primary-hover: #2A44D6;
  --dark: #11131A; --dark-ink: #FFFFFF;
  --focus: #2A44D6;
  --shadow-1: 0 1px 2px rgba(17,19,26,.06);
  --shadow-2: 0 12px 30px -14px rgba(17,19,26,.2);
  color-scheme: light;
}

/* Taller Lindavista: plain and practical. Slate and workshop orange. */
.brand-taller {
  --font: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --r-s: 6px; --r-m: 8px; --r-l: 10px; --r-btn: 8px; --r-field: 8px;
  --bg: #F6F6F4; --surface: #FFFFFF; --surface-2: #EFEFEB; --surface-3: #E5E4DF;
  --line: #DDDCD6; --line-strong: #BFBDB5;
  --text: #1F2933; --text-2: #4E5A66; --text-3: #5B6672;
  --accent: #C2410C; --accent-ink: #FFFFFF; --accent-strong: #9A3412; --accent-soft: #FDEBDD;
  --primary: #1F2933; --primary-ink: #FFFFFF; --primary-hover: #323F4B;
  --dark: #1F2933; --dark-ink: #FFFFFF;
  --focus: #C2410C;
  --shadow-1: 0 1px 2px rgba(31,41,51,.06);
  --shadow-2: 0 12px 28px -14px rgba(31,41,51,.22);
  color-scheme: light;
}
.brand-taller[data-theme="dark"] {
  --bg: #111315; --surface: #191C1F; --surface-2: #212529; --surface-3: #2A2F34;
  --line: #2E3338; --line-strong: #474E56;
  --text: #F4F4F2; --text-2: #B1B8C0; --text-3: #9EA6AF;
  --accent: #F0772F; --accent-ink: #1A1A1A; --accent-strong: #F59B63; --accent-soft: #3A2215;
  --primary: #F4F4F2; --primary-ink: #111315; --primary-hover: #FFFFFF;
  --dark: #F4F4F2; --dark-ink: #111315;
  --focus: #F59B63;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 14px 34px -14px rgba(0,0,0,.7);
  color-scheme: dark;
}

/* Semantic status colors: same meaning in every brand; text always pairs with an icon. */
.app {
  --ok: #0F6E56; --ok-soft: #E2F3EC; --warn: #8A5300; --warn-soft: #FFF1D6;
  --err: #B42318; --err-soft: #FDECEA; --info: #1F57B0; --info-soft: #E7EFFB;
}
.app[data-theme="dark"], .brand-clavia:not([data-theme="light"]) {
  --ok: #5FD3A8; --ok-soft: #0F2C24; --warn: #F5C063; --warn-soft: #33270F;
  --err: #FF8A80; --err-soft: #3A1714; --info: #8DB4FF; --info-soft: #14223D;
}

/* ---------- 2. Shared scale ---------- */
.app {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --gutter: 32px;
  container: app / inline-size;
  font-family: var(--font); color: var(--text); background: var(--bg);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%; position: relative; isolation: isolate; min-width: 0;
}
.num, .amt, .app table td.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

/* Type scale */
.t-display { font-size: clamp(36px, 5.2cqi, 68px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 800; text-wrap: balance; }
.brand-rivera .t-display, .brand-clavia .t-display, .brand-taller .t-display { font-weight: 600; letter-spacing: -0.03em; }
.t-h1 { font-size: clamp(28px, 3.2cqi, 40px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 750; text-wrap: balance; }
.brand-rivera .t-h1, .brand-clavia .t-h1, .brand-taller .t-h1 { font-weight: 600; }
.t-h2 { font-size: clamp(22px, 2.2cqi, 28px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
.brand-rivera .t-h2, .brand-clavia .t-h2, .brand-taller .t-h2 { font-weight: 600; }
.t-h3 { font-size: 18px; line-height: 1.35; letter-spacing: -0.01em; font-weight: 700; }
.brand-rivera .t-h3, .brand-clavia .t-h3, .brand-taller .t-h3 { font-weight: 600; }
.t-lead { font-size: clamp(17px, 1.5cqi, 20px); line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.t-body { font-size: 16px; line-height: 1.55; text-wrap: pretty; }
.t-small { font-size: 14px; line-height: 1.45; }
.t-xs { font-size: 13px; line-height: 1.4; }
.t-label { font-size: 13px; line-height: 1.3; font-weight: 600; letter-spacing: .01em; color: var(--text-2); }
.t-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); }
.t-mono { font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 13.5px; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.center { text-align: center; }

/* Layout */
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap-m { width: 100%; max-width: 960px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap-s { width: 100%; max-width: 640px; margin-inline: auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); min-width: 0; }
.row { display: flex; align-items: center; gap: var(--gap, 12px); min-width: 0; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 12px); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 260px), 100%), 1fr)); gap: var(--gap, 20px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap, 20px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap, 20px); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.section { padding-block: clamp(48px, 7cqi, 112px); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.sticky-top { position: sticky; top: 0; z-index: 20; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.only-sm, .only-sm-flex { display: none !important; }

/* Buttons */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-btn); border: 1.5px solid transparent;
  font-weight: 700; font-size: 16px; line-height: 1.2; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: transform .12s var(--ease), background-color .15s, border-color .15s, box-shadow .15s, color .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.brand-rivera .btn, .brand-clavia .btn, .brand-taller .btn { font-weight: 600; }
.btn:active:not([disabled]) { transform: scale(.975); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover:not([disabled]) { background: var(--primary-hover); }
.btn-dark { background: var(--dark); color: var(--dark-ink); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover:not([disabled]) { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover:not([disabled]) { background: var(--surface-2); }
.btn-quiet { background: var(--surface-2); color: var(--text); }
.btn-quiet:hover:not([disabled]) { background: var(--surface-3); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; border-radius: 999px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-note { font-size: 13px; color: var(--text-2); text-align: center; min-height: 18px; }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.link { color: var(--accent-strong); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit; }
.link-plain { text-decoration: none; font-weight: 600; color: inherit; }
.link-plain:hover { color: var(--accent-strong); }
.actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.actions-row { display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

/* Fields: one shared design for every form */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { font-size: 15px; font-weight: 650; color: var(--text); }
.brand-rivera .field-label, .brand-taller .field-label, .brand-clavia .field-label { font-weight: 600; }
.field-label .opt { font-weight: 500; color: var(--text-2); }
.field-hint { font-size: 14px; color: var(--text-2); margin-top: -2px; }
.field-ctl { position: relative; display: flex; align-items: stretch; min-width: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 0 44px 0 16px; border-radius: var(--r-field);
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-size: 16px; transition: border-color .15s, box-shadow .15s; appearance: none; min-width: 0;
}
.textarea { padding: 14px 16px; min-height: 132px; resize: vertical; line-height: 1.5; }
.select { cursor: pointer; padding-right: 48px; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); outline: none; }
.field.is-ok .input, .field.is-ok .select { border-color: var(--ok); }
.field.is-err .input, .field.is-err .select, .field.is-err .textarea { border-color: var(--err); }
.field.is-err .input:focus, .field.is-err .select:focus { box-shadow: 0 0 0 4px var(--err-soft); }
.input[readonly], .input:disabled, .select:disabled, .textarea[readonly] { background: var(--surface-2); color: var(--text-2); border-style: dashed; }
.field-mark { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--ok); pointer-events: none; }
.field-chev { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-2); pointer-events: none; }
.field.is-ok .field-chev { right: 44px; }
.field-msg { min-height: 20px; font-size: 14px; line-height: 1.4; display: flex; gap: 6px; align-items: flex-start; }
.field-msg.err { color: var(--err); font-weight: 600; }
.field-msg svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.input-prefix { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; font-weight: 600; }
.has-prefix .input { padding-left: 34px; }
.parts { display: flex; gap: 10px; align-items: stretch; }
.parts .input { padding: 0 10px; text-align: center; }
.parts .p-d, .parts .p-m { width: 72px; flex: none; }
.parts .p-y { width: 96px; flex: none; }
.parts .sep { align-self: center; color: var(--text-3); }
.parts-labels { display: flex; gap: 10px; font-size: 13px; color: var(--text-2); }
.parts-labels span:nth-child(1), .parts-labels span:nth-child(2) { width: 72px; text-align: center; }
.parts-labels span:nth-child(3) { width: 96px; text-align: center; }
.phone { display: flex; gap: 8px; }
.phone .select { width: 118px; flex: none; padding: 0 30px 0 12px; }
.phone .cc { position: relative; flex: none; }
.phone .cc .field-chev { right: 10px; }
.combo { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2); padding: 6px; max-height: 300px; overflow: auto; }
.combo-opt { display: flex; width: 100%; text-align: left; gap: 8px; justify-content: space-between; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--r-s); background: none; border: 0; cursor: pointer; font-size: 15px; }
.combo-opt:hover, .combo-opt.on { background: var(--surface-2); }
.combo-empty { padding: 12px; color: var(--text-2); font-size: 14px; }

/* Checkbox and radio */
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 14px 16px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--surface); }
.check:hover { border-color: var(--line-strong); }
.check input { appearance: none; margin: 1px 0 0; flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line-strong); background: var(--surface); display: grid; place-content: center; cursor: pointer; transition: background .15s, border-color .15s; }
.check input:checked { background: var(--accent-strong); border-color: var(--accent-strong); }
.brand-bravo .check input:checked { background: var(--text); border-color: var(--text); }
.check input:checked::after { content: ''; width: 12px; height: 7px; border-left: 2.5px solid var(--surface); border-bottom: 2.5px solid var(--surface); transform: rotate(-45deg) translate(1px, -1px); }
.check.is-on { border-color: var(--text); }
.choice { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s, transform .12s; }
.choice:hover { border-color: var(--line-strong); }
.choice:active { transform: scale(.995); }
.choice input { appearance: none; margin: 2px 0 0; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); cursor: pointer; display: grid; place-content: center; }
.choice input:checked { border-color: var(--accent-strong); }
.choice input:checked::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-strong); }
.choice.is-on { border-color: var(--accent-strong); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.switch { appearance: none; flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch:checked { background: var(--accent-strong); }
.switch:checked::after { transform: translateX(20px); }

/* Segmented control (language, theme, filters) */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); gap: 2px; }
.seg button { appearance: none; border: 0; background: transparent; min-height: 36px; min-width: 44px; padding: 0 12px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.seg button svg { width: 16px; height: 16px; }
.brand-rivera .seg, .brand-clavia .seg, .brand-taller .seg { border-radius: var(--r-m); }
.brand-rivera .seg button, .brand-clavia .seg button, .brand-taller .seg button { border-radius: calc(var(--r-m) - 3px); font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { appearance: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; color: var(--text-2); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.chip[aria-pressed="true"] { border-color: var(--text); color: var(--text); background: var(--surface-2); }
.chip .count { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text); }

/* Cards and surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-1); min-width: 0; }
.card-pad { padding: clamp(18px, 2.4cqi, 28px); }
.card-hover { transition: box-shadow .2s, transform .2s var(--ease), border-color .2s; }
.card-hover:hover { box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.panel { background: var(--surface-2); border-radius: var(--r-l); padding: clamp(18px, 2.4cqi, 28px); }
.well { background: var(--surface-2); border-radius: var(--r-m); padding: 14px 16px; }
.kv { display: grid; grid-template-columns: minmax(120px, 40%) minmax(0, 1fr); gap: 12px 20px; }
.kv dt { color: var(--text-2); font-size: 15px; }
.kv dd { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.list { display: flex; flex-direction: column; }
.list > * + * { border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: 14px; padding: 14px 0; min-height: 60px; }
.li-btn { appearance: none; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 14px 4px; min-height: 60px; border-radius: var(--r-s); text-decoration: none; color: inherit; }
.li-btn:hover { background: var(--surface-2); }
.ico { width: 20px; height: 20px; flex: none; }
.ico-l { width: 24px; height: 24px; flex: none; }
.ico-tile { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--text); }
.brand-rivera .ico-tile { border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }

/* Badges: icon + words, never color alone */
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.brand-rivera .badge, .brand-clavia .badge, .brand-taller .badge { font-weight: 600; border-radius: 8px; }
.badge svg { width: 14px; height: 14px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-err { background: var(--err-soft); color: var(--err); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-accent { background: var(--accent-soft); color: var(--accent-strong); }

/* Notices */
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-m); background: var(--info-soft); color: var(--text); }
.notice > svg { width: 22px; height: 22px; flex: none; margin-top: 1px; color: var(--info); }
.notice-action { background: var(--warn-soft); }
.notice-action > svg { color: var(--warn); }
.notice-ok { background: var(--ok-soft); }
.notice-ok > svg { color: var(--ok); }
.notice-err { background: var(--err-soft); }
.notice-err > svg { color: var(--err); }
.notice-quiet { background: var(--surface-2); }
.notice-quiet > svg { color: var(--text-2); }
.notice .n-title { font-weight: 700; }
.notice .n-body { color: var(--text); font-size: 15px; }

/* Amounts */
.amt { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; white-space: nowrap; }
.amt-xl { font-size: clamp(30px, 3.4cqi, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.brand-rivera .amt-xl { font-weight: 600; }
.amt-l { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.brand-rivera .amt-l { font-weight: 600; }
.amt-old { text-decoration: line-through; color: var(--text-2); font-weight: 500; }
.amt-cur { font-size: .58em; font-weight: 600; color: var(--text-2); letter-spacing: 0; margin-left: 4px; }
.sum { display: flex; flex-direction: column; gap: 10px; }
.sum-row { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.sum-row .k { color: var(--text-2); }
.sum-total { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 800; font-size: 18px; align-items: baseline; }
.brand-rivera .sum-total { font-weight: 600; }

/* Stepper */
.stepper { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.step { appearance: none; background: none; border: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 6px; border-radius: 999px; font-weight: 650; font-size: 14px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.step:disabled { cursor: not-allowed; opacity: .55; }
.step .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; border: 1.5px solid var(--line-strong); color: var(--text-2); background: var(--surface); }
.step.is-done .dot { background: var(--text); color: var(--bg); border-color: var(--text); }
.step.is-done .dot svg { width: 14px; height: 14px; }
.step.is-cur { color: var(--text); background: var(--surface); box-shadow: var(--shadow-1); }
.step.is-cur .dot { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.step-sep { width: 16px; height: 1.5px; background: var(--line-strong); flex: none; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .4s var(--ease); }

/* Skeletons, not spinners */
.skel { position: relative; overflow: hidden; background: var(--surface-3); border-radius: 8px; }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 60%, transparent), transparent); animation: shimmer 1.3s infinite; }
.skel-t { height: 14px; }
.skel-h { height: 26px; width: 60%; }
.skel-b { height: 44px; border-radius: 999px; }

/* Tables become cards below a set width */
.tbl-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 13px; font-weight: 600; color: var(--text-2); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .r { text-align: right; }
.tbl a.rowlink { text-decoration: none; font-weight: 600; }

/* Navigation */
.topbar { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a, .nav-links button { appearance: none; background: none; border: 0; cursor: pointer; text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--text-2); min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.nav-links a:hover, .nav-links button:hover { color: var(--text); background: var(--surface-2); }
.nav-links [aria-current="page"] { color: var(--text); background: var(--surface-2); }
.sidenav { display: flex; flex-direction: column; gap: 4px; }
.sidenav button, .sidenav a { appearance: none; background: none; border: 0; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 12px; font-weight: 650; font-size: 15px; color: var(--text-2); text-decoration: none; text-align: left; width: 100%; }
.sidenav button:hover, .sidenav a:hover { background: var(--surface-2); color: var(--text); }
.sidenav [aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.sidenav .badge { margin-left: auto; }
.tabbar { display: none; position: sticky; bottom: 0; z-index: 25; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.tabbar-in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.tabbar button { appearance: none; background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; border-radius: 12px; font-size: 12px; font-weight: 700; color: var(--text-2); cursor: pointer; position: relative; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button[aria-current="page"] { color: var(--text); }
.tabbar button[aria-current="page"]::before { content: ''; position: absolute; top: 2px; width: 28px; height: 3px; border-radius: 3px; background: var(--accent); }
.tabbar .tb-dot { position: absolute; top: 8px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--err); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 800; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2); padding: 8px; }
.menu-item { appearance: none; width: 100%; background: none; border: 0; text-align: left; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--r-s); cursor: pointer; font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; }
.menu-item:hover { background: var(--surface-2); }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-btn { appearance: none; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 3px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 44px; font-weight: 700; font-size: 14px; }
.acct-btn .avatar { width: 36px; height: 36px; font-size: 13px; }

/* Timeline */
.tl { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-item.is-done::before { background: var(--accent-strong); }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: var(--surface); z-index: 1; }
.tl-dot svg { width: 14px; height: 14px; }
.tl-item.is-done .tl-dot { background: var(--accent-strong); border-color: var(--accent-strong); }
.tl-item.is-cur .tl-dot { border-color: var(--accent-strong); background: var(--surface); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-item.is-cur .tl-dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-strong); }
.tl-title { font-weight: 700; padding-top: 2px; }
.brand-rivera .tl-title { font-weight: 600; }
.tl-item.is-todo .tl-title { color: var(--text-2); font-weight: 500; }
.tl-meta { font-size: 14px; color: var(--text-2); }

/* Overlays */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(12,10,8,.5); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.overlay.in-frame { position: absolute; }
.dialog { width: min(460px, 100%); background: var(--surface); border-radius: var(--r-l); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); padding: 28px; animation: rise .28s var(--ease); }
.toast { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; display: flex; gap: 10px; align-items: center; background: var(--dark); color: var(--dark-ink); padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 15px; box-shadow: var(--shadow-2); animation: rise .28s var(--ease); white-space: nowrap; }
.toast svg { width: 18px; height: 18px; }

/* Uploads */
.drop { border: 2px dashed var(--line-strong); border-radius: var(--r-l); padding: 22px; background: var(--surface); display: flex; flex-direction: column; gap: 14px; }
.drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.slot { border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.slot-prev { aspect-ratio: 1.586; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--text-2); }
.slot-prev img { width: 100%; height: 100%; object-fit: cover; }
.file-tile { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); min-width: 0; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.thumb { aspect-ratio: 1; border-radius: 12px; background: var(--surface-2); overflow: hidden; position: relative; display: grid; place-items: center; color: var(--text-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: 0; display: grid; place-items: center; cursor: pointer; }

/* Code */
.code { font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 13px; line-height: 1.6; background: #0B0D12; color: #D6DCE8; border-radius: var(--r-l); padding: 18px 20px; overflow-x: auto; white-space: pre; border: 1px solid #252B38; }
.code .k { color: #A5B3FF; } .code .s { color: #8FE3B8; } .code .n { color: #FFC978; } .code .c { color: #7E879A; }

/* Brand frames */
.powered { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); font-weight: 500; }
.powered b { font-weight: 700; color: var(--text-2); }
.provider-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.provider-line svg { width: 20px; height: 20px; }

/* Motion */
.enter { animation: rise .32s var(--ease) both; }
.enter-fade { animation: fade .25s ease both; }
.pop { animation: pop .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes burst { 0% { transform: translate(0,0) rotate(0) scale(.4); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1); opacity: 0; } }
.celebrate { position: absolute; left: 50%; top: 48px; width: 0; height: 0; pointer-events: none; }
.celebrate i { position: absolute; width: 12px; height: 12px; border-radius: 3px; background: var(--accent); animation: burst 1.2s var(--ease) both; }
.celebrate i:nth-child(3n) { border-radius: 50%; background: var(--text); width: 9px; height: 9px; }
.celebrate i:nth-child(4n) { background: var(--accent-strong); width: 16px; height: 6px; }
.success-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.success-mark svg { width: 36px; height: 36px; }
.brand-bravo .success-mark { background: var(--accent); color: var(--accent-ink); }
@media (prefers-reduced-motion: reduce) {
  .app *, .app *::before, .app *::after { animation: none !important; transition: none !important; }
  .celebrate { display: none; }
}

/* ---------- Responsive by container (each screen adapts to its own width) ---------- */
@container app (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-md { display: none !important; }
  .only-md { display: block !important; }
}
@container app (max-width: 720px) {
  .app { --gutter: 16px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none !important; }
  .only-sm { display: block !important; }
  .only-sm-flex { display: flex !important; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 12px; }
  .actions-row { flex-direction: column-reverse; align-items: stretch; }
  .actions-row .btn { width: 100%; }
  .tabbar { display: block; }
  .card-pad { padding: 18px; }
  .dialog { padding: 22px; }
  .overlay { place-items: end center; padding: 0; }
  .overlay .dialog { width: 100%; border-radius: 22px 22px 0 0; }
  .tbl-box.to-cards { border: 0; background: transparent; overflow: visible; }
  .to-cards .tbl, .to-cards .tbl tbody, .to-cards .tbl tr, .to-cards .tbl td { display: block; width: 100%; }
  .to-cards .tbl thead { display: none; }
  .to-cards .tbl tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 6px 16px; margin-bottom: 12px; }
  .to-cards .tbl td { border: 0; padding: 8px 0; display: flex; justify-content: space-between; gap: 16px; text-align: right; }
  .to-cards .tbl td::before { content: attr(data-label); color: var(--text-2); font-size: 14px; text-align: left; font-weight: 500; }
  .to-cards .tbl td.r { text-align: right; }
  .choice-row { grid-template-columns: minmax(0, 1fr); }
  .phone .select { width: 104px; }
  .parts .p-d, .parts .p-m { width: 64px; }
  .parts .p-y { width: 88px; }
  .parts-labels span:nth-child(1), .parts-labels span:nth-child(2) { width: 64px; }
  .parts-labels span:nth-child(3) { width: 88px; }
}

.only-md { display: none !important; }
@container app (max-width: 1100px) { .only-md { display: inline-flex !important; } .only-md.blk { display: block !important; } }


/* Public page sections (from the website part of the kit) */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.band { background: var(--surface-2); }
.footer { border-top: 1px solid var(--line); padding-block: 48px 64px; }
@container app (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* Messages and codes */
.msg { background: var(--surface-2); border-radius: 16px 16px 16px 4px; padding: 12px 14px; max-width: 80%; align-self: flex-start; display: flex; flex-direction: column; gap: 2px; }
.msg-you { background: var(--accent-soft); border-radius: 16px 16px 4px 16px; align-self: flex-end; }
.code-input { font-size: 26px; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; padding: 0 16px; }

/* Signed-in shell */
.bk-shell { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 900px; }
.bk-side { flex: 0 0 260px; padding: 24px 16px; border-right: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; gap: 24px; }
.bk-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.bk-top { display: flex; align-items: center; gap: 12px; min-height: 72px; padding-inline: var(--gutter); border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.bk-body { padding: 28px var(--gutter) 56px; flex: 1 1 auto; max-width: 1180px; width: 100%; }
@container app (max-width: 1100px) {
  .bk-side { display: none; }
}
@container app (max-width: 720px) {
  .bk-body { padding-top: 20px; }
  .msg { max-width: 92%; }
}

/* ---------- Taller Lindavista ---------- */
.g-split { grid-template-columns: minmax(0, 1fr) 380px; }
.dmg { aspect-ratio: 16 / 10; border-radius: var(--r-m); background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; padding: 8px; }
.qline { display: grid; grid-template-columns: 150px minmax(0, 1fr) 90px 170px 130px 44px; gap: 10px; align-items: center; padding: 10px; }
.qline.qhead { padding: 0 10px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.qline .r, .r { text-align: right; }
.sbtn { appearance: none; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px; cursor: pointer; text-align: left; color: var(--text); width: 100%; transition: border-color .15s, background .15s, transform .12s; }
.sbtn:hover:not(:disabled) { border-color: var(--line-strong); }
.sbtn:active:not(:disabled) { transform: scale(.985); }
.sbtn.on { border-color: var(--accent); background: var(--accent-soft); }
.sbtn.done { color: var(--text-2); }
.sbtn:disabled { cursor: not-allowed; }
.sbtn:disabled:not(.done):not(.on) { opacity: .55; }
.sb-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.sb-dot svg { width: 12px; height: 12px; }
.sbtn.on .sb-dot { border-color: var(--accent); background: var(--accent); }
.sbtn.done .sb-dot { background: var(--text-2); border-color: var(--text-2); color: var(--surface); }

/* ---------- Clavia Catalog ---------- */
.k-hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; display: flex; flex-direction: column; gap: 22px; box-shadow: var(--shadow-2); }
.k-grid-art { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.k-grid-art span { aspect-ratio: 2.4; border-radius: 8px; border: 1.5px solid var(--line-strong); }
.k-grid-art span.on { background: var(--primary); border-color: var(--primary); }
.k-grid-art span.on2 { background: var(--accent-soft); border-color: var(--accent); }
.k-hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.k-dev { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; }
.code .jl { display: block; white-space: pre; }

@container app (max-width: 1100px) {
  .g-split { grid-template-columns: minmax(0, 1fr); }
  .qline { grid-template-columns: 130px minmax(0, 1fr) 70px 150px 110px 44px; }
}
@container app (max-width: 960px) {
  .k-hero-grid { grid-template-columns: minmax(0, 1fr); }
}
@container app (max-width: 900px) {
  .k-dev { grid-template-columns: minmax(0, 1fr); }
}
@container app (max-width: 720px) {
  .qline { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .qline > :nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .qline > :nth-child(5) { align-self: center; }
}

.fld { min-width: 0; }
.fld-alone { padding: 24px; background: var(--bg); }

}
