/* Shared maxxICA app family. Imported by the existing app builds, without a runtime dependency. */
:root{--maxx-family-ink:#242120;--maxx-family-red:#b5121b;--maxx-family-ica:#e3000b;--maxx-family-surface:#fff;--maxx-family-background:#f9f5f5;--maxx-family-line:#e6e1de;--maxx-family-radius:10px;--maxx-family-width:1280px}
.maxx-family-header{position:sticky!important;top:0!important;z-index:100!important;display:flex!important;align-items:center!important;gap:12px!important;min-height:68px!important;height:auto!important;padding:10px 24px!important;box-sizing:border-box!important;background:var(--maxx-family-surface)!important;border:0!important;border-bottom:1px solid var(--maxx-family-line)!important;box-shadow:none!important}
.maxx-family-header .header-start{gap:6px;flex-wrap:nowrap}.maxx-family-header .brand{padding:0;gap:0;text-decoration:none;flex:none}.maxx-family-header .brand__descriptor,.maxx-family-header .budget-brand>small{display:none!important}
:is(.maxx-family-wordmark,.monica-wordmark){display:inline-flex!important;align-items:baseline!important;white-space:nowrap!important;gap:0!important;font-family:"ICA Rubrik",var(--font-ica-rubrik,Arial),sans-serif!important;font-size:26px!important;font-weight:900!important;letter-spacing:-.045em!important;line-height:1!important;color:var(--maxx-family-ink)!important}
:is(.maxx-family-wordmark,.monica-wordmark)>:is(span,b,strong){font:inherit!important;letter-spacing:inherit!important;color:var(--maxx-family-ink)!important}:is(.maxx-family-wordmark,.monica-wordmark)>:is(strong,.brand__ica){color:var(--maxx-family-ica)!important}
.maxx-family-header .maxx-global-link{border-radius:0;min-height:44px;padding:9px 10px;font-family:"ICA Text Ny","ICA Text",var(--font-ica-text,Arial),sans-serif!important;font-size:14px!important;font-weight:700!important;color:var(--maxx-family-red)!important;background:transparent!important}
.maxx-family-header .maxx-global-link:hover,.maxx-family-header .maxx-global-link[aria-current="page"]{box-shadow:inset 0 -3px var(--maxx-family-red)}
.maxx-family-menu,.maxx-family-account{position:relative;flex:none;font-family:"ICA Text Ny","ICA Text",var(--font-ica-text,Arial),sans-serif}
.maxx-family-menu>summary,.maxx-family-account>summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;min-height:44px;padding:8px 12px;box-sizing:border-box;border:1px solid var(--maxx-family-line);border-radius:8px;font-weight:700;font-size:14px;color:var(--maxx-family-ink);background:#fff}.maxx-family-menu>summary::-webkit-details-marker,.maxx-family-account>summary::-webkit-details-marker{display:none}
.maxx-family-menu>summary::after,.maxx-family-account>summary::after{content:"⌄";font-size:16px}.maxx-family-menu[open]>summary,.maxx-family-account[open]>summary{background:#fcece7}
.maxx-family-menu-content{position:absolute;top:calc(100% + 8px);right:0;z-index:120;min-width:240px;max-width:calc(100vw - 24px);padding:10px;border:1px solid var(--maxx-family-line);border-radius:10px;background:#fff;box-shadow:0 8px 30px #24212018}
.maxx-family-menu-content .nav-item,.maxx-family-menu-content .nav-link{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:10px 12px;box-sizing:border-box;border:0;border-radius:6px;background:#fff;color:var(--maxx-family-ink);text-decoration:none;font-size:14px;font-weight:700;text-align:left;cursor:pointer;margin:0}
.maxx-family-menu-content .nav-item:hover,.maxx-family-menu-content .nav-link:hover{background:#fcece7}.maxx-family-menu-content p{font-size:13px;margin:4px 12px 10px}.maxx-family-menu-content small{display:block;color:#686260}.maxx-family-account .avatar{width:30px;height:30px;object-fit:cover;flex:none}.maxx-family-account{margin-left:auto}.maxx-family-account summary span{font-size:13px}.maxx-family-tabs{display:flex;align-items:center;gap:4px;min-width:0;flex:1;overflow-x:auto;scrollbar-width:thin}.maxx-family-tabs a{display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:9px 10px;white-space:nowrap;font-size:14px;font-weight:700;border:0;border-radius:0;background:transparent;color:#514b48;text-decoration:none;flex:none;box-sizing:border-box}.maxx-family-tabs a[aria-current="page"]{color:var(--maxx-family-red);box-shadow:inset 0 -3px var(--maxx-family-red)}
.maxx-family-header :is(a,button,summary):focus-visible{outline:3px solid var(--maxx-family-red);outline-offset:-3px}
.maxx-family-shell{display:block!important;background:var(--maxx-family-background);min-height:100vh}.maxx-family-shell>.main-content,.maxx-family-shell>.main{margin:0 auto!important;width:100%;max-width:var(--maxx-family-width);min-width:0;box-sizing:border-box;padding:32px 28px 48px!important}.maxx-family-shell>.main .content{max-width:none;margin:0}.maxx-family-shell .maxxica-return{margin-left:0}
body:has(.klarica-shell)>.maxxica-homebar{display:none!important}body:has(.klarica-shell)>.maxxica-return{margin-left:0}.klarica-shell .maxx-family-header{position:sticky}.klarica-shell .maxx-family-account>summary{max-width:190px}.klarica-shell .maxx-family-tabs .nav-link[aria-current="page"]{background:transparent;color:var(--maxx-family-red)}
.maxx-family-header .store-switcher{margin-left:auto}.maxx-family-header .store-menu{left:auto;right:210px;top:70px}.maxx-family-header .profile{margin-left:auto}.maxx-family-header .product-brand{flex:none}.maxx-family-header .studio-header__store{margin-left:auto;font-size:12px;color:#686260}
@media(max-width:1000px){.maxx-family-header{gap:8px!important;padding:10px 16px!important}.maxx-family-header .studio-header__store{display:none}.maxx-family-header .store-switcher{display:none}.maxx-family-account>summary .account-name{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
@media(max-width:700px){.maxx-family-header{flex-wrap:wrap!important;gap:4px!important;min-height:62px!important;padding:8px 12px!important}:is(.maxx-family-wordmark,.monica-wordmark){font-size:24px!important}.maxx-family-header .header-start{flex-wrap:nowrap;gap:0}.maxx-family-header .maxx-global-link{padding:8px!important;gap:5px}.maxx-family-header .app-back{display:none}.maxx-family-shell>.main-content,.maxx-family-shell>.main{padding:24px 16px 36px!important}.maxx-family-tabs{order:3;flex-basis:100%;padding-top:4px}.maxx-family-account>summary{padding:6px;min-width:44px}.maxx-family-account>summary .account-name{display:none}.maxx-family-menu>summary{padding:8px;font-size:12px}.maxx-family-header .product-brand{flex:none!important}.maxx-family-header .product-brand small{display:none}.maxx-family-header .responsibility-selectors{order:3;flex-basis:100%}.maxx-family-menu-content{position:absolute;right:0}.maxx-family-header .brand{min-width:0}}

body:has(.responsibility-toolbar) > .maxxica-homebar { display: none !important; }
.maxx-family-account .avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #f5e9e9; color: #a52222; }
.app-shell--top > .app-main > .page { max-width: var(--maxx-family-width); margin-inline: auto; padding: 32px 28px 48px; }
@media (max-width: 700px) { .app-shell--top > .app-main > .page { padding: 24px 16px 36px; } }

.maxx-family-header .studio-nav__link > span { display: inline !important; position: static !important; width: auto !important; height: auto !important; margin: 0 !important; overflow: visible !important; clip: auto !important; }
@media (max-width: 700px) { .maxx-family-header .studio-back { display: none; } }

@media (max-width: 1000px) { .maxx-family-header .store-switcher { display: flex !important; } }
@media (max-width: 700px) { .maxx-family-header .store-switcher { order: 3; margin-left: 0; min-height: 44px; } .maxx-family-header .store-menu { right: 12px; top: 100%; } }

.app-shell--top { background: var(--maxx-family-background); }
.studio-header:has(.maxx-family-header) { border-top: 0; }

@media(max-width:1000px){.maxx-family-header{flex-wrap:wrap!important}.maxx-family-header .responsibility-selectors{display:flex;flex-wrap:wrap;gap:8px;min-width:0;flex:1 1 320px}.maxx-family-header .responsibility-selectors label{min-width:0;flex:1 1 140px}.maxx-family-header .responsibility-selectors select{max-width:100%}}

.maxx-global-link{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;flex:none;min-height:44px;min-width:44px;box-sizing:border-box;white-space:nowrap;text-decoration:none}.maxx-global-link svg{display:block;flex:none;width:22px;height:22px}.maxx-global-link span{display:inline!important}

body:has(.store-leadership-topbar.maxx-family-header) .maxxica-homebar{display:none!important}
body:has(.store-leadership-topbar.maxx-family-header) .store-leadership-topbar{top:0!important}

/* Compact app switcher floats over the current view and never reflows its work. */
.maxx-app-dropdown {
  position: fixed; z-index: 10000; box-sizing: border-box;
  width: min(360px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px; padding: 12px; background: #fff; color: #262626;
  border: 1px solid #e1dada; border-radius: 16px;
  box-shadow: 0 12px 34px #31101924;
  font-family: inherit;
}
.maxx-app-dropdown .maxx-app-choice {
  --app-color: #626262; display: flex; align-items: center; gap: 9px;
  box-sizing: border-box; min-width: 0; min-height: 56px; padding: 10px;
  border: 1px solid var(--app-color); border-radius: 10px;
  background: var(--app-color); color: #fff;
  font-family: inherit; line-height: 1.25; font-size: 14px; font-weight: 700;
  text-decoration: none; text-align: left; cursor: pointer;
}
.maxx-app-dropdown [data-app-tone="orange"] { --app-color: #b84400; }
.maxx-app-dropdown [data-app-tone="pink"] { --app-color: #c40063; }
.maxx-app-dropdown [data-app-tone="blue"] { --app-color: #006a9e; }
.maxx-app-dropdown [data-app-tone="purple"] { --app-color: #70318b; }
.maxx-app-dropdown [data-app-tone="green"] { --app-color: #27783c; }
.maxx-app-choice-icon { flex: 0 0 24px; width: 24px; height: 24px; }
.maxx-app-choice-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.maxx-app-dropdown .maxx-app-choice:hover { background: color-mix(in srgb, var(--app-color) 88%, black); }
.maxx-app-dropdown .maxx-app-choice:focus-visible { outline: 3px solid var(--app-color); outline-offset: 2px; }
.maxx-app-dropdown [aria-disabled="true"] { opacity: .5; cursor: default; }
.maxx-global-link[aria-expanded="true"] { background: #f9efef; border-radius: 9px; }

/* Audit refinements: preserve all controls, widen their mobile tap targets. */
.home-settings-list { grid-template-columns: 1fr; }
.lilla-toolbar-icon { width: auto !important; min-height: 44px; padding: 8px 10px !important; gap: 6px; }
.lilla-toolbar-icon .maxx-control-label { display: inline !important; font-size: 13px; }
.monthly-source-nav { display:flex; flex-wrap:wrap; gap:10px; max-width:1320px; margin:20px auto; padding:0 20px; align-items:center; }
.monthly-source-nav button { min-height:44px; padding:10px 18px; border:1px solid #b9afb5; border-radius:10px; background:white; color:#343034; font:inherit; font-weight:700; cursor:pointer; }
.monthly-source-nav button[aria-pressed="true"] { background:#753389; color:white; border-color:#753389; }
.monthly-main[hidden], .owner-month[hidden] { display:none !important; }
.monthly-source-period { display:grid; gap:6px; margin:16px 0; max-width:360px; font-weight:700; }
.monthly-source-period select { min-height:44px; padding:10px; width:100%; font:inherit; }
.owner-source-details { margin-top:16px; font-size:.85rem; }
.owner-source-details code { overflow-wrap:anywhere; }
.owner-source-details summary { min-height:44px; display:flex; align-items:center; cursor:pointer; }
.medica-scope-note { padding:12px 16px; border-radius:10px; background:#f6f1f4; color:#4b3742; font-size:.9rem; }
.app-shell--online .review-week-summary { display:flex; flex-wrap:wrap; gap:12px; padding:16px; background:#faf4f7; border-radius:12px; }
.app-shell--online .review-week-nav { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.app-shell--online .review-week-nav button,.app-shell--online .review-week-close { min-height:44px; padding:10px 14px; border:1px solid #bba6b2; border-radius:8px; background:white; color:#842653; font:inherit; font-weight:700; cursor:pointer; }
.app-shell--online .review-week-nav svg { width:18px; height:18px; }
@media(max-width:700px) {
 .budget-scope-controls { grid-template-columns:minmax(0,1fr) !important; }
 .budget-scope-controls .budget-period-select { display:grid; gap:5px; min-width:0; width:100%; box-sizing:border-box; }
 .budget-scope-controls .budget-period-select select { width:100%; min-height:44px; font-size:14px; padding:4px 0; }
 .budget-shell .budget-action-link,.budget-shell .budget-header button,.budget-shell .budget-header a { min-height:44px; padding:10px; font-size:14px; }
}

/* Existing medICA review styles, previously absent from the served bundle. */
.review-week { display: grid; gap: 18px; }
.review-week-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); background: #fff; }
.review-week-nav button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); background: #fff; font-weight: 700; }
.review-week-nav button svg { width: 17px; height: 17px; }
.review-week-nav label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.review-week-nav select { min-height: 40px; padding: 7px 12px; border: 1px solid var(--line); background: #fff; }
.review-week-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.review-week-summary > * { padding: 8px 11px; border-radius: 4px; background: #fff; border: 1px solid var(--line); font-size: .8rem; }
.review-week-summary > strong { background: #fff0b3; border-color: #ead46f; }
.review-week-warning, .review-week-loading { margin: 0; padding: 10px 13px; background: #fff6de; color: #5f4711; }
.review-week-day { display: grid; gap: 10px; }
.review-week-day h2 { margin: 8px 0 0; font-size: 1.2rem; text-transform: capitalize; }
.review-week-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.review-week-card { display: grid; grid-template-rows: auto 1fr; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 3px 13px #0000000d; text-align: left; cursor: pointer; }
.review-week-card:hover, .review-week-card:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.review-week-card > img, .review-week-card-empty { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f1f0eb; }
.review-week-card-empty { display: grid; place-items: center; color: var(--muted); font-weight: 750; }
.review-week-card-body { display: grid; gap: 5px; align-content: start; padding: 11px 13px 13px; }
.review-week-card-body small { color: var(--muted); font-size: .73rem; }
.review-week-card-body strong { font-size: .95rem; line-height: 1.25; }
.review-week-card-body em { width: fit-content; padding: 4px 7px; background: #fff0b3; color: #554000; font-size: .72rem; font-style: normal; font-weight: 750; }
.review-week-detail { position: fixed; z-index: 50; inset: 5vh max(12px, calc((100vw - 900px) / 2)); overflow-y: auto; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 0 0 100vmax #0008; }
.review-week-detail > img { display: block; width: min(100%, 510px); max-height: 55vh; margin: 14px auto; object-fit: contain; }
.review-week-detail h2 { margin: 0 0 7px; }
.review-week-detail h3 { margin: 16px 0 7px; }
.review-week-detail .review-week-copy { white-space: pre-wrap; line-height: 1.5; }
.review-week-detail > a { display: inline-flex; align-items: center; gap: 5px; margin: 10px 18px 0 0; color: var(--red); font-weight: 700; }
.review-week-detail > a svg { width: 16px; height: 16px; }
.review-week-close { float: right; padding: 8px 12px; border: 1px solid var(--line); background: #fff; }
@media (max-width: 900px) { .review-week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 590px) { .review-week-grid { grid-template-columns: 1fr; } .review-week-nav { justify-content: space-between; } .review-week-nav label { order: -1; width: 100%; } .review-week-nav select { flex: 1; min-width: 0; } .review-week-detail { inset: 8px; padding: 14px; } }
.review-week-grid { align-items: start; }
.review-week-card-text { grid-template-rows: auto auto; }
.review-week-card-idea { padding: 12px 13px 0; color: var(--muted); font-size: .75rem; font-weight: 650; }

.home-widget--orange { --tone:#a83b00; }
@media(max-width:700px) { .budget-actions button,.budget-actions a { min-height:44px; font-size:14px; padding:10px 14px; } }

@media(max-width:700px) { .budget-actions a { display:inline-flex; align-items:center; box-sizing:border-box; } }

/* Published budICA uses span-based ICA icons. Keep filter labels and controls together. */
@media(max-width:700px) {
 .budget-shell .budget-scope-controls .budget-period-select:has(> .ica-icon) { grid-template-columns:20px minmax(0,1fr) 16px; align-items:center; gap:8px; }
 .budget-shell .budget-scope-controls .budget-period-select > span:not(.ica-icon) { min-width:0; }
 .budget-shell .budget-scope-controls .budget-actions a { min-height:44px; display:inline-flex; align-items:center; padding:10px; font-size:14px; }
}
@media(max-width:700px) {
 .budget-shell .budget-scope-controls .budget-reopen-actions { gap:6px; }
 .budget-shell .budget-scope-controls .budget-reopen-action { min-height:44px; padding:10px 12px; font-size:14px; border:1px solid #76aa90; border-radius:7px; background:white; }
}
/* Full overview and dropdown share the verified app tone, including legacy class names. */
.tool-launcher[data-app-tone="orange"] { background:#b84400; color:white; }

/* Startup feedback keeps the existing global navigation available. */
.maxx-startup-shell .maxx-global-link { display:inline-flex; align-items:center; gap:6px; text-decoration:none; box-sizing:border-box; }
.maxx-startup-shell .maxx-global-link svg { width:22px; height:22px; flex:none; }
/* A branded fallback uses only bundled fonts; no delay, animation or network. */
.maxx-startup-shell { background:#fff!important; }
.maxx-startup { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; min-height:calc(100vh - 68px); min-height:calc(100dvh - 68px); padding:24px 20px; box-sizing:border-box; background:#fff; text-align:center; color:#343034; font-family:"ICA Text Ny",var(--font-ica-text,Arial),sans-serif; }
.maxx-startup h1 { font-size:24px; line-height:1.25; margin:0; }
.maxx-startup p { max-width:420px; font-size:16px; line-height:1.5; margin:0; color:#343034; }
.maxx-startup-spinner { width:28px; height:28px; border:3px solid #e6e1de; border-top-color:#b5121b; border-radius:50%; animation:maxx-startup-spin .9s linear infinite; }
.maxx-switch-status { position:fixed; z-index:11000; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:24px 20px; background:#fff; color:#343034; font:400 16px "ICA Text Ny",var(--font-ica-text,Arial),sans-serif; pointer-events:none; }
body:has(.maxx-switch-status) .maxx-family-header { z-index:11001!important; }
body:has(.maxx-switch-status) .maxx-app-dropdown { visibility:hidden; }
@keyframes maxx-startup-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .maxx-startup-spinner { animation:none; } }
