/* MELYVO presentation contract. Product engines, palettes, photographs and routes stay owned by their experiences. */
:root {
  --mly-font-ui:Arial,Helvetica,sans-serif;
  --mly-font-editorial:Georgia,'Times New Roman',serif;
  --mly-neutral-paper:#FFFDF7;
  --mly-neutral-ink:#28251F;
  --mly-neutral-muted:#625A51;
  --mly-success:#355C4A;
  --mly-warning:#864523;
  --mly-error:#AD4934;
  --mly-type-body:15px;
  --mly-type-control:14px;
  --mly-type-small:12px;
  --mly-type-title:clamp(34px,3.5vw,56px);
  --mly-type-section:clamp(23px,2vw,30px);
  --mly-leading-body:1.55;
  --mly-leading-heading:1.1;
  --mly-space-1:4px;
  --mly-space-2:8px;
  --mly-space-3:12px;
  --mly-space-4:16px;
  --mly-space-5:24px;
  --mly-space-6:32px;
  --mly-space-7:48px;
  --mly-radius-field:12px;
  --mly-radius-small:16px;
  --mly-radius-panel:24px;
  --mly-radius-dialog:28px;
  --mly-radius-control:999px;
  --mly-border-width:1px;
  --mly-border:rgba(98,90,81,.2);
  --mly-shadow-panel:0 6px 22px rgba(40,37,31,.07);
  --mly-shadow-control:0 3px 10px rgba(40,37,31,.06);
  --mly-shadow-dialog:0 16px 48px rgba(40,37,31,.16);
  --mly-duration-fast:160ms;
  --mly-duration-panel:200ms;
  --mly-duration-progress:280ms;
  --mly-ease:cubic-bezier(.2,.7,.2,1);
  --mly-target:44px;
  --mly-content-max:1440px;
  --mly-dialog-max:720px;
  --mly-panel-padding:clamp(16px,1.6vw,24px);
  /* CSS media queries use literals; these same values are exposed to JS and contract tests. */
  --mly-breakpoint-phone:600px;
  --mly-breakpoint-navigation:900px;
  --mly-breakpoint-wide:1200px;
}

/* Aliases reference the effective legacy theme. Fallbacks are colours already present in that theme. */
[data-melyvo-theme="money"] {--mly-accent:var(--br-bronze,#864523);--mly-accent-mid:#EFBC94;--mly-tint:#FFECD5;--mly-paper:#FFFAF2;--mly-ink:var(--pb-ink,var(--br-ink,#28251F));--mly-muted:var(--pb-muted,var(--br-muted,#665E55))}
[data-melyvo-theme="commerce"] {--mly-accent:var(--commerce-deep,#234F53);--mly-accent-mid:var(--commerce-blue,#2F666B);--mly-tint:var(--commerce-pale,#D5E6E3);--mly-paper:var(--commerce-paper,#FFFDF6);--mly-ink:var(--commerce-ink,#203B3D);--mly-muted:var(--commerce-muted,#526166)}
[data-melyvo-theme="home"] {--mly-accent:var(--ma-forest,#355C4A);--mly-accent-mid:var(--ma-sage,#738D78);--mly-tint:var(--ma-pale,#DCE7DD);--mly-paper:#FFFCF4;--mly-ink:var(--ma-ink,#1E3027);--mly-muted:var(--ma-muted,#566459)}
[data-melyvo-theme="study"] {--mly-accent:var(--et-forest,#6E4177);--mly-accent-mid:#9665A5;--mly-tint:var(--et-pale,#D3BEDD);--mly-paper:#FCF9FD;--mly-ink:var(--et-ink,#412746);--mly-muted:var(--et-muted,#6E4177)}
[data-melyvo-theme="travel"] {--mly-accent:var(--vo-forest,#8E4638);--mly-accent-mid:#C56450;--mly-tint:var(--vo-pale,#F1B6A4);--mly-paper:#FFF9F7;--mly-ink:var(--vo-ink,#552F2A);--mly-muted:var(--vo-muted,#8E4638)}
[data-melyvo-theme="wedding"] {--mly-accent:var(--mw-forest,#6F1D2B);--mly-accent-mid:#B64F68;--mly-tint:var(--mw-pale,#E5A8B6);--mly-paper:#FFF9FA;--mly-ink:var(--mw-ink,#42151F);--mly-muted:var(--mw-muted,#6F1D2B)}
[data-melyvo-theme="create"] {--mly-accent:var(--cs-forest,#2436B8);--mly-accent-mid:var(--cs-eucalyptus,#7892F5);--mly-tint:var(--cs-pale,#DCE4FF);--mly-paper:#F8FAFF;--mly-ink:var(--cs-ink,#101642);--mly-muted:var(--cs-muted,#2436B8)}
[data-melyvo-theme="health"] {--mly-accent:var(--hg-forest,#087F78);--mly-accent-mid:var(--hg-eucalyptus,#73D2C5);--mly-tint:var(--hg-pale,#D8F3EF);--mly-paper:#F8FFFD;--mly-ink:var(--hg-ink,#102D31);--mly-muted:var(--hg-muted,#52696B)}

[data-melyvo-root],.mly-dialog {font-family:var(--mly-font-ui);font-size:var(--mly-type-body);line-height:var(--mly-leading-body)}
[data-melyvo-root] *,[data-melyvo-component="dialog"] * {box-sizing:border-box}
[data-melyvo-root][data-melyvo-theme] h1 {font-family:var(--mly-font-editorial);font-size:var(--mly-type-title);line-height:var(--mly-leading-heading);font-weight:400;letter-spacing:-.035em;text-wrap:pretty}
[data-melyvo-root] :is(h2,h3),.mly-dialog :is(h2,h3) {font-family:var(--mly-font-editorial);text-wrap:pretty}
[data-melyvo-root] :is(h1,h2,h3,label,td,th) {overflow-wrap:anywhere}
[data-melyvo-root] .br-workspace {max-width:var(--mly-content-max);min-width:0}
[data-melyvo-root] :is(.br-topbar,.pb-topbar) {gap:var(--mly-space-2);min-height:var(--mly-target)}
[data-melyvo-root] :is(.br-mobile-header,.pb-mobile-header) {gap:var(--mly-space-2)}
[data-melyvo-root] :is(.br-sidebar,.pb-sidebar) {border-radius:var(--mly-radius-dialog)}
[data-melyvo-root] :is(.br-sidebar,.pb-sidebar) nav {scrollbar-width:thin}
[data-melyvo-root] :is(.br-sidebar,.pb-sidebar) [aria-current="page"] {font-weight:600}

[data-melyvo-theme] [data-melyvo-component="panel"],.mly-panel {border-radius:var(--mly-radius-panel);box-shadow:var(--mly-shadow-panel);padding:var(--mly-panel-padding)}
.mly-panel {background:var(--mly-paper,var(--mly-neutral-paper));border:var(--mly-border-width) solid var(--mly-border);color:var(--mly-ink,var(--mly-neutral-ink))}
.mly-panel>h2 {font:400 var(--mly-type-section)/1.2 var(--mly-font-editorial);margin:0 0 var(--mly-space-3)}
[data-melyvo-theme] [data-melyvo-component="button"],.mly-button {min-height:var(--mly-target);min-width:var(--mly-target);border-radius:var(--mly-radius-control);font-family:var(--mly-font-ui);font-size:var(--mly-type-control);line-height:1.35;transition:border-color var(--mly-duration-fast) var(--mly-ease),box-shadow var(--mly-duration-fast) var(--mly-ease),background-color var(--mly-duration-fast) var(--mly-ease)}
.mly-button {display:inline-flex;align-items:center;justify-content:center;gap:var(--mly-space-2);padding:10px 17px;background:var(--mly-paper,var(--mly-neutral-paper));border:1px solid var(--mly-border);color:var(--mly-ink,var(--mly-neutral-ink));cursor:pointer;text-align:center;text-decoration:none;box-shadow:var(--mly-shadow-control)}
.mly-button--primary {background:var(--mly-accent);color:var(--mly-paper);border-color:var(--mly-accent)}
[data-melyvo-theme] [data-melyvo-component="button"]:disabled,.mly-button:disabled {cursor:not-allowed;border-style:dashed}
[data-melyvo-theme] :is(button,a,input,select,textarea,summary):focus-visible {outline:3px solid var(--mly-accent);outline-offset:3px}
[data-melyvo-theme] :is(input,select,textarea) {accent-color:var(--mly-accent)}
[data-melyvo-root][data-melyvo-theme] :is(input,select,textarea),[data-melyvo-component="dialog"] :is(input,select,textarea) {transition:border-color var(--mly-duration-fast) var(--mly-ease),box-shadow var(--mly-duration-fast) var(--mly-ease),background-color var(--mly-duration-fast) var(--mly-ease)}
[data-melyvo-root] :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea),[data-melyvo-component="dialog"] :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea) {min-height:var(--mly-target);border-radius:var(--mly-radius-field);font-family:var(--mly-font-ui);max-width:100%;min-width:0}
[data-melyvo-root] [data-melyvo-component="field"],.mly-field {gap:var(--mly-space-2)}
.mly-field {display:flex;flex-direction:column;color:var(--mly-ink,var(--mly-neutral-ink));font:var(--mly-type-body)/var(--mly-leading-body) var(--mly-font-ui)}
.mly-field :is(input,select,textarea) {width:100%;min-height:var(--mly-target);border-radius:var(--mly-radius-field);padding:12px;border:1px solid var(--mly-border);background:var(--mly-paper);color:inherit;font:inherit}
.mly-field textarea {min-height:100px;resize:vertical}
.mly-field-error {color:var(--mly-error);font-size:var(--mly-type-small)}
[data-melyvo-root] :is(.br-bar,.pb-bar),.mly-progress-track {border-radius:var(--mly-radius-control)}
[data-melyvo-root] :is(.br-bar,.pb-bar)>i,.mly-progress-fill {transition:width var(--mly-duration-progress) var(--mly-ease)}
.mly-progress-track {height:8px;background:var(--mly-tint);overflow:hidden;margin-top:var(--mly-space-2)}
.mly-progress-fill {display:block;width:var(--mly-progress);height:100%;background:var(--mly-accent)}
.mly-progress-caption {display:flex;justify-content:space-between;gap:var(--mly-space-3);font-size:var(--mly-type-small)}
[data-melyvo-root] table {max-width:100%;font-variant-numeric:tabular-nums}
[data-melyvo-root] :is(th,td) {vertical-align:top}
[data-melyvo-root] svg[role="img"] {max-inline-size:100%}
[data-melyvo-root] [data-melyvo-component="disclosure"]>summary,.mly-disclosure>summary {min-height:var(--mly-target);cursor:pointer}
.mly-disclosure {border:1px solid var(--mly-border);border-radius:var(--mly-radius-small);background:var(--mly-paper);padding:var(--mly-space-4)}
.mly-disclosure>summary strong {font-family:var(--mly-font-editorial);font-weight:400;font-size:22px}
.mly-disclosure-body {padding-top:var(--mly-space-4)}

/* Optional envelope for new products: no duplicated historical shell and no built-in routing or storage. */
.mly-app {display:grid;grid-template-columns:240px minmax(0,1fr);align-items:start;gap:var(--mly-space-5);min-height:100svh;padding:var(--mly-space-5);background:var(--mly-paper);color:var(--mly-ink)}
.mly-sidebar {display:grid;gap:var(--mly-space-5);padding:var(--mly-space-5);border:1px solid var(--mly-border);border-radius:var(--mly-radius-dialog);box-shadow:var(--mly-shadow-panel);background:var(--mly-paper)}
.mly-brand {display:grid;grid-template-columns:48px minmax(0,1fr);gap:0 10px;align-items:center}
.mly-brand img {width:48px;grid-row:1/3}.mly-brand strong {font:24px var(--mly-font-editorial);letter-spacing:.13em}.mly-brand small {font-size:11px;letter-spacing:.12em}
.mly-shell-workspace {min-width:0;max-width:var(--mly-content-max)}
.mly-product-header {display:flex;align-items:center;flex-wrap:wrap;gap:var(--mly-space-4);margin-bottom:var(--mly-space-5)}
.mly-product-title {flex:1;min-width:0}.mly-app[data-melyvo-root][data-melyvo-theme] .mly-product-title h1 {font-size:clamp(26px,2.5vw,36px);margin:4px 0 0}
.mly-product-title>small {color:var(--mly-muted)}.mly-header-actions {display:flex;flex-wrap:wrap;gap:var(--mly-space-2)}
.mly-shell-progress {display:grid;gap:var(--mly-space-4)}
.mly-mobile-logo,.mly-shell-progress--mobile {display:none}.mly-return {flex-shrink:0}
.mly-nav ul {list-style:none;padding:0;margin:0;display:grid;gap:var(--mly-space-2)}
.mly-nav li {min-width:0}.mly-nav .mly-button {width:100%;justify-content:flex-start;border-color:transparent;text-align:start;box-shadow:none;overflow-wrap:anywhere}
.mly-nav [aria-current="page"] {background:var(--mly-tint);color:var(--mly-accent);font-weight:600}
@media(max-width:900px) {
  .mly-app {display:block;padding:var(--mly-space-4)}
  .mly-app--navigated {padding-bottom:calc(144px + env(safe-area-inset-bottom))}
  .mly-sidebar {display:contents}.mly-sidebar>.mly-brand,.mly-sidebar>.mly-shell-progress {display:none}
  .mly-nav {position:fixed;z-index:50;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:calc(8px + env(safe-area-inset-bottom));padding:8px;border:1px solid var(--mly-border);border-radius:var(--mly-radius-panel);box-shadow:var(--mly-shadow-panel);background:var(--mly-paper)}
  .mly-nav ul {grid-template-columns:repeat(auto-fit,minmax(64px,1fr));gap:4px}.mly-nav .mly-button {justify-content:center;text-align:center;font-size:12px;padding:8px 5px}
  .mly-return-label {display:none}.mly-mobile-logo {display:block;width:32px;height:32px;object-fit:contain}
  .mly-product-header {gap:var(--mly-space-2)}.mly-header-actions {flex-basis:100%;justify-content:flex-end}
  .mly-shell-progress--mobile {display:grid;margin-bottom:var(--mly-space-5)}
}

[data-melyvo-note] {border-inline-start:3px solid var(--mly-accent)}
.mly-note {display:flex;align-items:flex-start;gap:var(--mly-space-3);border-radius:var(--mly-radius-small);padding:var(--mly-space-4);background:var(--mly-paper);color:var(--mly-ink);font:var(--mly-type-body)/var(--mly-leading-body) var(--mly-font-ui)}
.mly-note svg {width:24px;height:24px;flex-shrink:0}
.mly-note[data-melyvo-note="error"] {border-color:var(--mly-error)}
.mly-note[data-melyvo-note="warning"] {border-color:var(--mly-warning)}
.mly-note[data-melyvo-note="success"] {border-color:var(--mly-success)}
.mly-empty {text-align:center;padding:var(--mly-space-6);border:1px dashed var(--mly-border);border-radius:var(--mly-radius-panel);background:var(--mly-paper)}
.mly-empty h2 {font:400 var(--mly-type-section)/1.2 var(--mly-font-editorial)}
.mly-empty p {color:var(--mly-muted)}
[data-melyvo-theme] [data-melyvo-component="empty"] {border-radius:var(--mly-radius-panel);padding:var(--mly-space-5);text-align:center}
[data-melyvo-theme] [data-melyvo-component="feedback"]:not(:empty) {padding:var(--mly-space-3) var(--mly-space-4);border:1px solid var(--mly-border);border-radius:var(--mly-radius-small);background:var(--mly-paper);line-height:var(--mly-leading-body)}
[data-melyvo-theme] [aria-busy="true"] {cursor:progress}
[data-melyvo-component="dialog"],[data-melyvo-component="celebration"] {border-radius:var(--mly-radius-dialog);box-shadow:var(--mly-shadow-dialog)}
.mly-dialog {width:min(var(--mly-dialog-max),calc(100vw - 32px));max-height:calc(100dvh - 48px);overflow:auto;padding:var(--mly-space-5);border:1px solid var(--mly-border);background:var(--mly-paper);color:var(--mly-ink)}
.mly-dialog::backdrop {background:rgba(40,37,31,.3)}
.mly-dialog-close {float:inline-end;margin:0 0 16px 16px}
[data-melyvo-component="companion-panel"] {max-height:min(640px,calc(100dvh - 180px - env(safe-area-inset-bottom)));overflow:auto;overscroll-behavior:contain;animation:mly-panel-in var(--mly-duration-panel) var(--mly-ease)}
[data-melyvo-component="disclosure"][open]>.br-disclosure-body,.mly-disclosure[open]>.mly-disclosure-body {animation:mly-panel-in var(--mly-duration-panel) var(--mly-ease)}
[data-melyvo-component="celebration"][open] {animation:mly-validation var(--mly-duration-panel) var(--mly-ease)}
[data-melyvo-motion="step"],[data-melyvo-motion="advice"] {animation:mly-panel-in var(--mly-duration-panel) var(--mly-ease)}
[data-melyvo-motion="activation"] {animation:mly-validation var(--mly-duration-fast) var(--mly-ease)}
@keyframes mly-panel-in {from{transform:translateY(5px)}to{transform:translateY(0)}}
@keyframes mly-validation {from{transform:scale(.985)}to{transform:scale(1)}}
@media(max-width:600px) {
  [data-melyvo-root] :is(.br-bottom,.pb-bottom) {padding-bottom:max(8px,env(safe-area-inset-bottom));gap:var(--mly-space-1)}
  [data-melyvo-root] :is(.br-bottom,.pb-bottom) [data-melyvo-component="button"] {font-size:11px;min-width:0;padding-inline:4px}
  [data-melyvo-root] :is(.br-mobile-header,.pb-mobile-header)>strong {min-width:0;font-size:14px;line-height:1.3}
  [data-melyvo-root] [data-melyvo-component="introduction"] {margin-bottom:var(--mly-space-4)}
  [data-melyvo-root] [data-melyvo-component="next-step"] {scroll-margin-top:var(--mly-space-4)}
  .mly-dialog {padding:var(--mly-space-4);max-height:calc(100dvh - 32px - env(safe-area-inset-bottom));scroll-padding-bottom:var(--mly-space-5)}
}
@media(prefers-reduced-motion:reduce) {
  [data-melyvo-theme] *,[data-melyvo-theme] *::before,[data-melyvo-theme] *::after {animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
