/* MultiplyOS UI v1 (HR), default OFF. Every rule below starts html[data-ui="multiplyos"], except .mos-brand-new, which is hidden when the flag is off. Presentation only. */
.mos-brand-new { display: none; }
/* Approved artwork replaces only the shell lockups. */
html[data-ui="multiplyos"] .mos-brand-legacy { display: none; }
html[data-ui="multiplyos"] .mos-brand-new {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 270px;
  min-width: 0;
  flex-wrap: wrap;
}
html[data-ui="multiplyos"] .mos-brand-new img:first-child { width: 48px; height: auto; flex: none; }
html[data-ui="multiplyos"] .mos-brand-new img + img { width: 210px; max-width: calc(100% - 60px); height: auto; min-width: 0; }
html[data-ui="multiplyos"] .mos-brand-context {
  flex-basis: 100%;
  font-size: 0.7em;
  font-weight: 600;
  line-height: 1.3;
  color: var(--mos-nav-muted);
}
/* Light-only bridge: resolve the app aliases at the same boundary as the kit tokens. */
html[data-ui="multiplyos"] {
  color-scheme: light;
  --mo-page: var(--mos-background);
  --mo-card: var(--mos-surface);
  --mo-field: var(--mos-surface);
  --mo-inset: var(--mos-surface-soft);
  --mo-ink: var(--mos-text);
  --mo-muted: var(--mos-muted);
  --mo-line: var(--mos-border);
  --mo-accent: var(--mos-primary);
  --mo-accent-tint: var(--mos-info-tint);
  --mo-btn-fill: var(--mos-primary);
  --mo-btn-ink: var(--mos-on-primary);
  --mo-btn-hover: var(--mos-primary-hover);
  --mo-danger: var(--mos-danger);
  --mo-danger-ink: var(--mos-on-primary);
  --mo-module-ink: var(--mos-text);
  --mo-font: var(--mos-font-family);
  --bg: var(--mos-background);
  --card: var(--mos-surface);
  --field: var(--mos-surface);
  --ink: var(--mos-text);
  --muted: var(--mos-muted);
  --line: var(--mos-border);
  --accent: var(--mos-primary);
  --accent-soft: var(--mos-info-tint);
  --btn-fill: var(--mos-primary);
  --btn-ink: var(--mos-on-primary);
  --btn-hover: var(--mos-primary-hover);
  --danger: var(--mos-danger);
}
/* Both auth routes use signin-wrap; their layout and reading size stay intact. */
html[data-ui="multiplyos"] .signin-brand .mos-brand-context { color: var(--mos-muted); font-size: 15px; }
html[data-ui="multiplyos"] .mos-shell:has(.signin-wrap) .mos-shell__header .mos-brand-new {
  padding: 12px;
  border-radius: 12px;
  background: var(--mos-nav-background);
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
  min-width: 0;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  background: var(--mos-background);
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__header {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 24px;
  min-width: 0;
  margin: 0;
  padding: 24px 20px;
  border: 0;
  background: var(--mos-nav-background);
  color: var(--mos-nav-text);
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-brand-context { font-size: 12px; }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__nav {
  display: grid;
  flex: none;
  order: 0;
  gap: 8px;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__nav-item {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--mos-nav-text);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__nav-item:hover {
  background: var(--mos-nav-active);
  color: var(--mos-nav-text);
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__nav-item:is([aria-current="page"], .is-active, .active) {
  background: var(--mos-nav-active);
  border-color: #365B89;
  font-weight: 600;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__account {
  margin: auto 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--mos-nav-muted);
  color: var(--mos-nav-text);
  overflow-wrap: anywhere;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main {
  width: 100%;
  max-width: 1672px;
  min-width: 0;
  padding: 36px;
  margin-inline: auto;
  font-family: var(--mos-font-family);
  font-size: var(--mos-font-size);
  line-height: 1.4;
  color: var(--mos-text);
  overflow-wrap: anywhere;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.18;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main h2 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main :is(.sub, .detail-list, .detail-list dt, .notice, .error, .pill, label, .decide-note, .linklike) {
  font-size: 1em;
  line-height: 1.4;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main a:not(.btn),
html[data-ui="multiplyos"] .mos-shell .mos-shell__main .linklike {
  color: var(--mos-primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main .grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main .card {
  min-width: 0;
  border: 1px solid var(--mos-border);
  border-radius: 22px;
  background: var(--mos-surface);
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main .pill {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--mos-info);
  background: var(--mos-info-tint);
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main .pill.neutral {
  color: var(--mos-muted);
  background: var(--mos-surface-soft);
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main .notice {
  color: var(--mos-info);
  background: var(--mos-info-tint);
  border-radius: 12px;
}
/* Existing primary/secondary ownership is preserved, including auth buttons. */
html[data-ui="multiplyos"] .mos-shell .mos-shell__main :is(.btn, .mo-button--main) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 32px;
  max-width: 100%;
  padding: 6px 14px;
  border: 1px solid var(--mos-primary);
  border-radius: 12px;
  background: var(--mos-primary);
  color: var(--mos-on-primary);
  font-family: var(--mos-font-family);
  font-size: 1em;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}
html[data-ui="multiplyos"] .mos-shell .mos-shell__main :is(.btn:not(.secondary):not(.quiet), .mo-button--main) { min-height: 36px; }
html[data-ui="multiplyos"] .mos-shell .mos-shell__main :is(.btn, .mo-button--main):hover {
  background: var(--mos-primary-hover);
  border-color: var(--mos-primary-hover);
}
html[data-ui="multiplyos"] .mos-shell .mos-shell__main .btn:is(.secondary, .quiet) {
  background: var(--mos-surface);
  border-color: var(--mos-control-border);
  color: var(--mos-text);
}
html[data-ui="multiplyos"] .mos-shell .mos-shell__main .btn:is(.secondary, .quiet):hover { background: var(--mos-surface-soft); }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea) {
  height: auto;
  min-height: 32px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--mos-control-border);
  border-radius: 12px;
  background: var(--mos-surface);
  color: var(--mos-text);
  font: inherit;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main :is(input, textarea)::placeholder { color: var(--mos-muted); opacity: 1; }
/* Keep true tables at the reading size (13px desktop, 17px phone), including the kit's phone breakpoint. */
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main :is(.table-scroll, :where(div, section):has(> table)) {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main table {
  display: table;
  width: 100%;
  font-size: var(--mos-font-size);
  line-height: 1.4;
  border-collapse: collapse;
  overflow-wrap: normal;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main thead {
  display: table-header-group;
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main tbody { display: table-row-group; }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main tr {
  display: table-row;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main :is(th, td) {
  display: table-cell;
  padding: 8px 12px;
  border-bottom: 1px solid var(--mos-border);
  font-size: 1em;
  line-height: 1.4;
  vertical-align: top;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main th {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
  color: var(--mos-muted);
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main td::before { content: none; }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main td > * { margin-left: 0; text-align: inherit; }
/* The phone tab bar is a sibling of the shell. */
html[data-ui="multiplyos"] .mos-shell__tabbar {
  display: none;
  height: auto;
  overflow-x: auto;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--mos-surface);
  border-top: 1px solid var(--mos-border);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
html[data-ui="multiplyos"] .mos-shell__tabbar > a {
  flex: 1 0 auto;
  min-width: max-content;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--mos-muted);
}
html[data-ui="multiplyos"] .mos-shell__tabbar > a:is([aria-current="page"], .is-active) {
  color: var(--mos-primary);
  border-color: var(--mos-primary);
}
html[data-ui="multiplyos"] .mos-shell :is(.mos-shell__nav-item, .btn, .mo-button--main, .linklike, input, select, textarea):focus-visible,
html[data-ui="multiplyos"] .mos-shell .mos-shell__main a:focus-visible,
html[data-ui="multiplyos"] .mos-shell__tabbar > a:focus-visible,
html[data-ui="multiplyos"] .mos-shell .mos-shell__main :is(input, select, textarea):focus {
  outline: 3px solid var(--mos-focus);
  outline-offset: 4px;
}
  @media (min-width: 769px) {
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) { grid-template-columns: 260px minmax(0, 1fr); }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__header {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  overflow-y: auto;
  padding-top: 32px;
}
  }
  @media (max-width: 768px) {
/* Phone: Apple standard 17px body (owner ruling 5 Oct 2026). */
html[data-ui="multiplyos"] { --mos-font-size: 17px; }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main { line-height: 1.35; }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main h1 { font-size: 28px; }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main h2 { font-size: 20px; }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-brand-context { font-size: 15px; }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__nav-item { min-height: 44px; padding: 10px 14px; font-size: 17px; }
html[data-ui="multiplyos"] .mos-shell .mos-shell__main :is(.btn, .mo-button--main) { min-height: 44px; padding: 10px 16px; }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea) { min-height: 44px; padding: 10px 12px; }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main :is(th, td) { padding: 12px 14px; }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) { align-content: start; }
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__header {
  position: static;
  padding: 20px 16px;
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main {
  padding: 24px 16px calc(112px + env(safe-area-inset-bottom));
}
html[data-ui="multiplyos"] .mos-shell:not(:has(.signin-wrap)) .mos-shell__main :is(.grid, .field-row, .detail-list) { grid-template-columns: minmax(0, 1fr); }
html[data-ui="multiplyos"] .mos-shell__tabbar { display: flex; }
html[data-ui="multiplyos"] .mos-shell .mos-shell__main :is(.btn:not(.secondary):not(.quiet), .mo-button--main) { width: 100%; min-height: 50px; }
  }
