/* Approved Collective mobile direction: pearl surfaces, blue actions, real film. */
html[data-design="pearl"] {
  --ink: #1d1d1f; --muted: #686b73; --paper: #f5f5f7; --line: #e5e6ea;
  --green: #192f50; --gold: #966323; --gold-light: #faf0dc; --danger: #ac343d;
  --accent: #1046ab; --accent-deep: #0d3889; --accent-soft: #eef3fc;
  --pearl-surface: linear-gradient(155deg, #fff, #fdfdfe);
  --pearl-shadow: 0 1px 2px #20263203, 0 12px 32px -24px #20263228;
  --pearl-action: linear-gradient(#195ccc, #1046ab);
  /* Solid surfaces (dark.css redefines each one, so text and background always flip together). */
  --surface: #fff; --surface-glass: #ffffffb5; --surface-tint: #f4f7fc; --surface-sunken: #eceef1; --surface-selected: #fff;
  --line-strong: #d6dbe4; --ink-soft: #3d4250; --muted-on-tint: #565a62;
  background: var(--paper); color-scheme: light;
}
html[data-design="pearl"] body { background: linear-gradient(180deg, #fafafb, #f5f5f7 480px); background-attachment: fixed; color: var(--ink); font: 16px/1.55 var(--app-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif); -webkit-font-smoothing: antialiased; }
html[data-design="pearl"] :is(.shell,.motion-app,.motion-auth) { --motion-ink: var(--ink); --motion-muted: var(--muted); --motion-line: #e2e7ef; --motion-blue: var(--accent); --motion-paper: transparent; font-family: var(--app-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif); background: transparent; color: var(--ink); }
html[data-design="pearl"] :is(h1,h2,h3) { color: var(--ink); font-weight: 600; }
html[data-design="pearl"] h1 { font-size: clamp(36px,4vw,44px); letter-spacing: -.04em; line-height: 1.12; }
html[data-design="pearl"] h2 { font-size: 25px; letter-spacing: -.035em; line-height: 1.22; }
html[data-design="pearl"] h3 { letter-spacing: -.02em; }
html[data-design="pearl"] :is(button,a,summary,input,select,textarea):focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
html[data-design="pearl"] button { min-height: 44px; }
html[data-design="pearl"] :is(.eyebrow,.motion-eyebrow) { color: var(--accent); font-size: 12px; font-weight: 650; letter-spacing: .085em; }
html[data-design="pearl"] .shell { padding: 0; display: block; }
html[data-design="pearl"] .shell .sidebar { position: sticky; top: 0; z-index: 60; grid-template-columns: 1fr auto 1fr; width: 100%; height: 80px; max-width: none; margin: 0; padding: 12px max(28px,calc((100vw - 1200px)/2)); border: 0; border-radius: 0; border-bottom: 1px solid #e2e7efbd; background: #fafafbd9; box-shadow: 0 1px 0 #fff; backdrop-filter: blur(22px); }
html[data-design="pearl"] .shell .brand { gap: 10px; letter-spacing: 0; }
html[data-design="pearl"] :is(.shell .brand img,.motion-brand img) { width: 40px; height: 40px; object-fit: contain; padding: 0; border: 0; border-radius: 0; background: none; filter: none; box-shadow: none; object-fit: contain; }
html[data-design="pearl"] :is(.brand-wordmark,.motion-brand span) { font-size: 20px; font-weight: 650; color: #142137; letter-spacing: -.04em; }
html[data-design="pearl"] .shell .nav { position: static; display: flex; flex-direction: row; width: auto; margin: 0; padding: 4px; gap: 5px; border: 1px solid #e8e9ed; border-radius: 16px; background: #eceef180; box-shadow: none; transform: none; }
html[data-design="pearl"] .shell .nav button { display: flex; align-items: center; gap: 8px; min-width: 86px; min-height: 44px; padding: 10px 13px; border: 1px solid transparent; border-radius: 13px; color: #647188; font-size: 13px; font-weight: 550; background: transparent; box-shadow: none; }
html[data-design="pearl"] .shell .nav .nav-icon { display: inline-flex; }
html[data-design="pearl"] .shell .nav button.active { background: var(--pearl-surface); color: var(--accent); border-color: #fff; box-shadow: 0 2px 5px #2636520c; }
html[data-design="pearl"] .shell .nav button:hover { color: var(--accent); }
html[data-design="pearl"] .account-menu { justify-self: end; margin: 0; }
html[data-design="pearl"] .tools-menu > summary { display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; background: transparent; border: 0; border-radius: 50%; }
html[data-design="pearl"] .account-avatar { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; background: linear-gradient(150deg,#3b4654,#101822); box-shadow: inset 0 1px 1px #ffffff33,0 2px 6px #12203b13; color: #fff; font-size: 18px; font-weight: 450; }
html[data-design="pearl"] .tools-popover { width: 256px; max-height: calc(100dvh - 150px); overflow-y: auto; border-radius: 19px; background: #fffffff5; backdrop-filter: blur(24px); box-shadow: 0 16px 44px #152c4c26; border: 1px solid #e3e8f0; }
html[data-design="pearl"] .tools-popover button { font-size: 14px; }
html[data-design="pearl"] .shell .main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 34px 34px 80px; }
html[data-design="pearl"] .data-shell .main { max-width: 1440px; }
html[data-design="pearl"] .data-shell .topbar { margin: 0 0 24px; border: 0; }
html[data-design="pearl"] :is(.journey-home,.session-page,.coach-overview) { max-width: 850px; margin-inline: auto; }
html[data-design="pearl"] .pearl-home { max-width: 1100px; }
html[data-design="pearl"] :is(.journey-heading,.page-heading,.motion-page-heading) { margin-bottom: 25px; }
html[data-design="pearl"] :is(.journey-heading p,.page-heading p,.motion-page-heading p) { font-size: 16px; color: var(--muted); line-height: 1.55; }
html[data-design="pearl"] .pearl-greeting { margin: 0 0 7px; font-size: 16px; }
/* A single surface language across the learning, video, coach and staff tools. */
html[data-design="pearl"] :is(.card,.today-task,.session-surface,.coach-queue,.coaching-card,.coaching-booking,.coaching-profile,.coaching-request,.coaching-management-body>section,.coaching-today-card,.motion-viewer,.motion-library-empty,.motion-capture-guide,.motion-processing,.motion-failed,.motion-clip,.wb-card,.wb-panel,.knowledge-card,.knowledge-panel,.position-card,.benchmark-card,.bm-card,.mi-card,.mi-panel) { border: 1px solid var(--line); border-radius: 20px; background: var(--pearl-surface); box-shadow: var(--pearl-shadow); color: var(--ink); }
html[data-design="pearl"] :is(.today-task,.session-surface) { padding: 26px; }
html[data-design="pearl"] :is(.today-task h2,.session-surface h2) { font-size: 25px; }
html[data-design="pearl"] :is(.task-description,.session-surface>p,.coaching-page p,.motion-page-heading p) { font-size: 15px; line-height: 1.6; }
html[data-design="pearl"] :is(.btn,.motion-primary,.coaching-button,.wb-primary,.knowledge-primary,.positions-primary,.benchmark-primary) { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 52px; padding: 13px 20px; border: 1px solid var(--accent); border-radius: 14px; color: #fff; background: var(--pearl-action); box-shadow: inset 0 1px 0 #ffffff24,0 3px 8px #1046ab18; font-size: 15px; font-weight: 550; text-decoration: none; }
html[data-design="pearl"] :is(.btn,.motion-primary,.coaching-button):hover { background: var(--pearl-action); color: #fff; }
html[data-design="pearl"] :is(.btn.secondary,.btn.outline,.coaching-button.secondary,.coaching-secondary) { background: #fff; border-color: #e0e3e9; color: var(--accent); box-shadow: inset 0 1px 0 #fff,0 2px 4px #24426704; }
html[data-design="pearl"] :is(.text-btn,.motion-text,.coaching-text,.btn.text-btn) { background: transparent; box-shadow: none; border: 0; color: var(--accent); border-radius: 8px; font-size: 14px; min-height: 44px; }
html[data-design="pearl"] .btn.full { width: 100%; }
html[data-design="pearl"] .btn svg { flex: 0 0 20px; }
html[data-design="pearl"] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),textarea,select) { border: 1px solid #d3dce8; border-radius: 12px; background: #f5f7faa8; box-shadow: inset 0 2px 4px #12213b04,0 1px 0 #fff; color: var(--ink); font-size: 16px; min-height: 46px; }
html[data-design="pearl"] :is(input[type=checkbox],input[type=radio],input[type=range],progress) { accent-color: var(--accent); }
html[data-design="pearl"] .field>span { font-size: 14px; color: #43536a; }
html[data-design="pearl"] .badge { background: #edf3fc; color: #315e96; border: 0; border-radius: 8px; }
html[data-design="pearl"] .badge.gold { background: #fcf2e1; color: #855d26; }
html[data-design="pearl"] :is(.quiet-note,.session-footnote) { color: #68778a; font-size: 12px; }
html[data-design="pearl"] .pearl-home-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 26px; align-items: start; }
.pearl-feature,.pearl-welcome { padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--pearl-surface); box-shadow: var(--pearl-shadow); }
.pearl-feature>.eyebrow,.pearl-welcome>.eyebrow { display: inline-block; margin-bottom: 10px; color: var(--accent); }
.pearl-feature>p,.pearl-welcome>p { margin-top: 8px; margin-bottom: 19px; font-size: 15px; color: var(--muted); }
.pearl-film-unit { width: fit-content; max-width: 100%; margin: 24px auto 0; }
.pearl-film-cover { position: relative; display: block; width: 100%; max-width: 100%; overflow: hidden; padding: 0; border: 0; border-radius: 16px; background: #e6ebf1; margin: 0 0 12px; box-shadow: inset 0 2px 6px #1b2b481a; }
.pearl-film-cover img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(58svh, 520px); object-fit: contain; }
.pearl-film-cover:has(.pearl-no-poster) { width: 100%; min-height: 180px; }
.pearl-play { position: absolute; inset: 0; width: 52px; height: 52px; margin: auto; display: grid; place-items: center; border: 1px solid #ffffffcc; border-radius: 50%; background: #16243b60; backdrop-filter: blur(7px); color: #fff; box-shadow: 0 3px 10px #13213530; }
.pearl-play svg { width: 23px; height: 23px; fill: currentColor; stroke-width: 1px; }
.pearl-duration { position: absolute; bottom: 11px; right: 10px; background: #152036bf; border-radius: 7px; padding: 3px 7px; color: #fff; font-size: 12px; }
html[data-design="pearl"] .pearl-film-unit>.btn { display: flex; justify-content: space-between; width: 100%; }
html[data-design="pearl"] .pearl-home-next .today-task { padding: 28px; }
html[data-design="pearl"] .pearl-home-next .today-task>h2 { font-size: 24px; }
html[data-design="pearl"] .pearl-home-next .today-task .btn { margin-top: 19px; }
.pearl-goal { margin-top: 15px; font-size: 14px; }
.pearl-goal summary { min-height: 44px; padding: 10px 0; color: var(--accent); }
.pearl-goal p { color: var(--muted); }
.pearl-progress { margin: 30px 4px; }
.pearl-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
html[data-design="pearl"] .pearl-section-heading h2 { font-size: 20px; }
.pearl-section-heading>span { color: var(--muted); font-size: 12px; }
html[data-design="pearl"] .journey-path { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 0; padding: 0; margin: 0; gap: 12px; }
html[data-design="pearl"] .journey-path li { display: flex; flex-direction: column; align-items: flex-start; color: var(--muted); text-align: left; font-size: 12px; padding: 0; position: relative; gap: 7px; line-height: 1.35; }
html[data-design="pearl"] .journey-path li::before { display: none; }
html[data-design="pearl"] .journey-path li:not(:last-child)::after { content: ''; position: absolute; height: 2px; background: #d6e0ed; top: 12px; left: 27px; width: calc(100% - 13px); }
html[data-design="pearl"] .journey-path li>span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #ccd7e5; background: #e7edf5; color: #586d8a; font-size: 12px; margin: 0; }
html[data-design="pearl"] .journey-path li.current>span { background: var(--pearl-action); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 3px #dceaff; }
html[data-design="pearl"] .journey-path li.complete>span { background: #4daf6b; color: #fff; border-color: #4daf6b; }
.pearl-add-row { display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: var(--pearl-surface); box-shadow: var(--pearl-shadow); margin-top: 24px; }
.pearl-add-row>svg { flex-shrink: 0; color: var(--accent); }
.pearl-add-row>div { flex: 1; min-width: 0; }
.pearl-add-row strong,.pearl-add-row span { display: block; }
.pearl-add-row strong { font-weight: 550; font-size: 14px; }
.pearl-add-row span { font-size: 12px; color: var(--muted); margin-top: 3px; }
html[data-design="pearl"] .pearl-add-row .btn { min-height: 44px; padding: 8px 12px; font-size: 13px; border-radius: 10px; flex-shrink: 0; }
.pearl-feedback-link { display: flex; align-items: center; gap: 12px; width: 100%; margin: 8px 0; padding: 15px 8px; color: var(--accent); background: transparent; font-size: 14px; }
.pearl-feedback-link span { flex: 1; text-align: left; }
.pearl-recent { margin-top: 38px; }
.pearl-recent:empty { display: none; }
.pearl-recent-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.pearl-recent-clip { display: block; padding: 10px; text-align: left; background: var(--pearl-surface); border: 1px solid #e4e9f1; border-radius: 17px; color: var(--ink); box-shadow: var(--pearl-shadow); min-width: 0; }
.pearl-recent-clip img { display: block; width: auto; max-width: 100%; height: auto; max-height: 220px; margin: 0 auto; object-fit: contain; border-radius: 10px; }
.pearl-recent-clip strong { display: block; font-size: 14px; font-weight: 550; overflow-wrap: anywhere; }
.pearl-recent-clip>span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
/* Review and library keep the actual footage intact. */
html[data-design="pearl"] .motion-embedded .motion-main { padding: 0; max-width: none; }
html[data-design="pearl"] .motion-library { gap: 19px; grid-template-columns: repeat(3,minmax(0,1fr)); }
html[data-design="pearl"] .motion-clip { padding: 10px 10px 15px; overflow: hidden; text-align: left; }
html[data-design="pearl"] .motion-thumbnail { border: 1px solid #dfe6ef; border-radius: 12px; aspect-ratio: 4/3; background: #e7edf5; }
html[data-design="pearl"] .motion-clip :is(h2,h3) { font-size: 17px; margin: 13px 5px 3px; line-height: 1.35; }
html[data-design="pearl"] .motion-clip>p { font-size: 13px; margin: 0 5px; }
html[data-design="pearl"] .motion-clip-status { background: #f8fbf2ef; color: #315643; border: 1px solid #ffffff90; font-size: 12px; border-radius: 7px; }
.pearl-library-label { display: flex; align-items: center; justify-content: space-between; margin: 27px 0 17px; }
html[data-design="pearl"] .pearl-library-label { font-size: 21px; }
.pearl-library-label>span { font-size: 13px; font-weight: 450; color: var(--muted); }
.pearl-source-library { margin-bottom: 32px; }
.pearl-source-placeholder,.pearl-no-poster { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; width: 100%; height: 100%; background: linear-gradient(140deg,#e8eef6,#cbd8e9); color: #395675; font-size: 14px; }
.pearl-source-placeholder svg { width: 34px; height: 34px; }
.pearl-source-viewer { overflow: hidden; }
.pearl-source-viewer video { width: 100%; display: block; max-height: 62dvh; background: #111d2e; }
.pearl-source-note { max-width: 720px; padding: 24px 4px; }
.pearl-source-note p { margin-top: 10px; color: var(--muted); }
html[data-design="pearl"] .video-frame { border-radius: 15px; border: 1px solid #d9e2ef; overflow: hidden; }
html[data-design="pearl"] .session-surface .video-frame { margin: -10px -10px 0; }
html[data-design="pearl"] .playback-tools { padding: 15px 0; }
html[data-design="pearl"] .motion-viewer { border-radius: 20px; overflow: hidden; }
html[data-design="pearl"] .motion-viewer-toolbar { background: #f9fbfd; color: #475f7d; border-color: #e1e7ef; }
html[data-design="pearl"] .motion-upload-layout { gap: 28px; }
html[data-design="pearl"] .motion-drop { border: 1px solid #d4ddeb; border-radius: 20px; background: linear-gradient(145deg,#edf2f8,#fff); box-shadow: inset 0 2px 5px #24395307; }
html[data-design="pearl"] .motion-upload-symbol { background: #e1eaf6; color: #284e80; border-radius: 15px; box-shadow: inset 0 1px 0 #fff; }
html[data-design="pearl"] .motion-capture-guide { padding: 25px; }
html[data-design="pearl"] .motion-library-empty { padding: 32px; }
html[data-design="pearl"] .motion-page-heading p { margin-top: 10px; }
html[data-design="pearl"] .motion-auth-header { min-height: 88px; }
html[data-design="pearl"] .motion-auth-layout { min-height: calc(100dvh - 88px); padding-top: 25px; }
html[data-design="pearl"] .motion-auth-intro h1 { color: #142137; font-size: clamp(50px,6vw,78px); }
html[data-design="pearl"] .motion-auth-intro h1 span { color: #375c89; }
html[data-design="pearl"] .motion-auth-form { padding: 30px; background: var(--pearl-surface); border: 1px solid #e4eaf2; border-radius: 25px; box-shadow: var(--pearl-shadow); max-width: 420px; }
html[data-design="pearl"] .motion-auth-form>p { font-size: 14px; }
html[data-design="pearl"] :is(.coaching-management,.journey-detail,.quiet-note) summary { min-height: 44px; }
html[data-design="pearl"] .context-nav { display: flex; overflow-x: auto; padding: 5px; background: #edf1f6; border-radius: 14px; gap: 5px; margin-bottom: 25px; }
html[data-design="pearl"] .context-nav button { flex-shrink: 0; border-radius: 10px; color: #5b6c82; font-size: 13px; }
html[data-design="pearl"] .context-nav button[aria-current] { background: #fff; color: var(--accent); box-shadow: 0 2px 4px #142a4410; }
html[data-design="pearl"] .cycle-selector { max-width: 400px; margin-bottom: 25px; }
@media (min-width: 801px) { html[data-design="pearl"] .view-home .cycle-selector { margin-left: auto; max-width: 280px; } }
@media (max-width: 800px) {
  html[data-design="pearl"] .shell .sidebar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; height: 72px; top: 0; backdrop-filter: none; -webkit-backdrop-filter: none; filter: none; transform: none; background: #f8fafd; }
  html[data-design="pearl"] .shell .brand { gap: 9px; }
  html[data-design="pearl"] .shell .brand img { width: 36px; height: 36px; }
  html[data-design="pearl"] .shell .brand-wordmark { font-size: 20px; }
  html[data-design="pearl"] .shell .nav { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-width: none; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: stretch; padding: 8px 12px max(10px,env(safe-area-inset-bottom)); margin: 0; border: 0; border-top: 1px solid #dfe5ee; border-radius: 0; background: #f9fbfdf2; box-shadow: 0 -2px 14px #16345305; backdrop-filter: blur(22px); transform: none; z-index: 65; }
  html[data-design="pearl"] .shell .nav button { flex-direction: column; justify-content: center; gap: 4px; min-width: 0; min-height: 51px; padding: 5px 2px; font-size: 12px; line-height: 1.2; border: 0; background: transparent; color: #5b6a80; box-shadow: none; border-radius: 10px; }
  html[data-design="pearl"] .shell .nav button.active { color: var(--accent); background: #eaf0f833; box-shadow: none; border: 0; font-weight: 650; }
  html[data-design="pearl"] .shell .nav .nav-icon svg { height: 21px; width: 21px; }
  html[data-design="pearl"] .shell .nav button.active .nav-icon svg { stroke-width: 2; }
  html[data-design="pearl"] .shell .main { padding: 25px 20px calc(100px + env(safe-area-inset-bottom)); }
  html[data-design="pearl"] h1 { font-size: 34px; }
  html[data-design="pearl"] .journey-heading h1 { font-size: 34px; }
  html[data-design="pearl"] .journey-heading { margin-bottom: 22px; }
  html[data-design="pearl"] .pearl-home-layout { grid-template-columns: 1fr; gap: 21px; }
  .pearl-feature,.pearl-welcome { padding: 19px; border-radius: 20px; }
  html[data-design="pearl"] .pearl-feature h2 { font-size: 24px; }
  .pearl-feature>p { font-size: 14px; margin-bottom: 15px; }
  .pearl-film-unit { margin-top: 20px; }
  .pearl-feature>.eyebrow { font-size: 12px; }
  .pearl-progress { margin: 30px 4px; }
  .pearl-recent-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .pearl-recent-clip:last-child:nth-child(odd) { grid-column: 1/-1; display: grid; grid-template-columns: 100px 1fr; column-gap: 14px; align-items: center; }
  .pearl-recent-clip:last-child:nth-child(odd) img { grid-row: span 2; margin: 0; }
  .pearl-recent-clip:last-child:nth-child(odd) strong { align-self: end; }
  .pearl-recent-clip:last-child:nth-child(odd)>span { align-self: start; }
  html[data-design="pearl"] .motion-library { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  html[data-design="pearl"] .motion-clip :is(h2,h3) { font-size: 14px; }
  html[data-design="pearl"] .motion-clip>p { font-size: 12px; }
  html[data-design="pearl"] .motion-clip-status { font-size: 9px; }
  html[data-design="pearl"] .motion-page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  html[data-design="pearl"] .motion-page-heading>.motion-primary { min-height: 44px; font-size: 14px; padding: 10px 17px; }
  html[data-design="pearl"] .motion-upload-layout { grid-template-columns: 1fr; gap: 23px; }
  html[data-design="pearl"] :is(.session-surface,.today-task) { padding: 20px; }
  html[data-design="pearl"] :is(.session-surface,.today-task) h2 { font-size: 24px; }
  html[data-design="pearl"] .session-surface .video-frame { margin: -8px -8px 0; border-radius: 13px; }
  html[data-design="pearl"] .motion-auth-header { padding: 16px 22px; min-height: 74px; }
  html[data-design="pearl"] .motion-auth-layout { display: flex; flex-direction: column; gap: 27px; padding: 18px 20px 40px; }
  html[data-design="pearl"] .motion-auth-intro { align-self: stretch; padding: 0; }
  html[data-design="pearl"] .motion-auth-intro h1 { font-size: 43px; margin: 13px 0; }
  html[data-design="pearl"] .motion-auth-intro h1 br { display: none; }
  html[data-design="pearl"] .motion-auth-intro>p { font-size: 15px; line-height: 1.5; }
  html[data-design="pearl"] .motion-auth-foot { display: none; }
  html[data-design="pearl"] .motion-auth-form { padding: 24px; max-width: none; }
  html[data-design="pearl"] .coaching-today-card { flex-direction: column; align-items: flex-start; }
  html[data-design="pearl"] .cycle-selector { margin-bottom: 20px; }
  html[data-design="pearl"] .tools-popover { top: calc(100% + 10px); }
}
@media(max-width:360px) {
  html[data-design="pearl"] .shell .main { padding-inline: 14px; }
  html[data-design="pearl"] .shell .sidebar { padding-inline: 16px; }
  .pearl-feature,.pearl-welcome { padding: 16px; }
  .pearl-add-row { padding: 13px; gap: 9px; }
  .pearl-add-row>svg { display: none; }
  html[data-design="pearl"] .pearl-add-row .btn { padding: 8px; }
}
@media(prefers-reduced-motion:reduce) { html[data-design="pearl"] *,html[data-design="pearl"] *::before,html[data-design="pearl"] *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
/* Override older form-specific rules with the same shared action treatment. */
html[data-design="pearl"] #app .shell :is(.btn,.motion-primary,.coaching-button,.bm-button,.kn-button,.ps-button) {
  border-radius: 14px; border: 1px solid var(--accent); color: #fff; background: var(--pearl-action);
  box-shadow: inset 0 1px 0 #ffffff24,0 3px 8px #1046ab18;
}
html[data-design="pearl"] #app .shell :is(.btn.outline,.btn.secondary,.coaching-button.secondary,.bm-button.secondary,.bm-button.bm-button-secondary,.kn-button.kn-secondary,.ps-button.ps-secondary,.ps-button.secondary) { background: #fff; border-color: #e0e3e9; color: var(--accent); box-shadow: inset 0 1px 0 #fff; }
html[data-design="pearl"] #app .shell :is(.btn.text-btn,.bm-text-button) { background: transparent; box-shadow: none; border: 0; color: var(--accent); }
html[data-design="pearl"] :is(.kn-card,.kn-teaching-card,.ps-surface,.bm-surface,.bm-drill-card,.dataset-card,.source-card,.import-card,.metric-card,.insights-panel) { border: 1px solid #e3e9f2; border-radius: 20px; background: var(--pearl-surface); box-shadow: var(--pearl-shadow); }
html[data-design="pearl"] :is(.knowledge,.positions-workspace,.benchmarks-workspace) { --kn-ink: #142137; --kn-muted: #5a6579; --kn-blue: var(--accent); --ps-ink: #142137; --ps-muted: #5a6579; --ps-blue: var(--accent); }

/* Route focus remains announced, without a border around a noninteractive heading. */
html[data-design="pearl"] .main h1[tabindex="-1"]:focus { outline: none; }
html[data-design="pearl"] .journey-heading h1 { font-weight: 650; }
html[data-design="pearl"] .pearl-home-next .today-task .eyebrow { margin-bottom: 12px; }
html[data-design="pearl"] .pearl-home-next .today-task h2 { line-height: 1.18; }
html[data-design="pearl"] .pearl-home-next .task-description { margin-top: 12px; }
html[data-design="pearl"] .journey-path li.current { color: var(--accent); }
html[data-design="pearl"] .pearl-feature>.eyebrow { color: var(--accent); }
@media(max-width:800px) { html[data-design="pearl"] .pearl-home-next .today-task { padding: 22px; } }
/* Phone-safe room rows: long emails wrap, headings wrap, a date never runs into its link. */
.row .grow{min-width:0}.row .grow p{overflow-wrap:anywhere}
.section-heading{flex-wrap:wrap;gap:6px 16px}
.row .grow .muted-line{display:block}
/* Grouped More menu; account actions stay pinned at the bottom of the scrolling popover. */
.tools-group+.tools-group,.tools-account{border-top:1px solid #e4e9f1;margin-top:4px;padding-top:4px}
.tools-heading{padding:8px 12px 2px;font-size:11px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:#5f6b7a}
html[data-design="pearl"] .tools-popover .tools-account{position:sticky;bottom:-10px;margin-bottom:-10px;padding-bottom:10px;background:#fff}

/* ---- IA shell (IA-SPEC 2.1): one header, one nav, one sticky primary. No black bar. ---- */
html[data-design="pearl"] .ia-shell { min-height: 100dvh; padding: 0; display: block; }
.ia-header { position: sticky; top: 0; z-index: 60; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 60px; padding: max(8px, env(safe-area-inset-top)) 12px 8px 16px; background: #f9fafb; border-bottom: 1px solid #e7e9ee; }
/* No backdrop-filter on the header at phone widths: it would become the containing block of the fixed bottom bar. */
.ia-logo { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
html[data-design="pearl"] .ia-logo img { display: block; width: 32px; height: 32px; object-fit: contain; }
.ia-title-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ia-title { overflow: hidden; font-size: 17px; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); }
.ia-actions { display: flex; align-items: center; gap: 2px; }
:is(.ia-bell,.ia-jump,.ia-more) { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 6px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; }
.ia-bell[hidden] { display: none; }
.ia-bell-dot { display: none; position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #fff; }
.ia-bell.has-new .ia-bell-dot { display: block; }
html[data-design="pearl"] .ia-more .account-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px #d4e0f5; font-size: 13px; font-weight: 700; }
.ia-more-label { color: var(--accent); font-size: 13px; font-weight: 650; }
.ia-more-name, .ia-jump-field, html[data-design="pearl"] #app .ia-shell .ia-film-btn { display: none; }
/* Bottom bar: labels always shown, each tab at least 64 px tall and wide (5 fit at 320). */
.ia-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(64px, 1fr); padding: 0 0 env(safe-area-inset-bottom); background: #fbfbfc; border-top: 1px solid #e3e6ec; } /* solid: no backdrop-filter (round 1 b4) */
.ia-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 64px; min-height: 64px; padding: 6px 2px; color: #5b687b; font-size: 12px; font-weight: 550; line-height: 1.2; text-decoration: none; }
.ia-tab .nav-icon { display: inline-flex; }
.ia-tab .nav-icon svg { width: 22px; height: 22px; }
.ia-tab.active { color: var(--accent); font-weight: 700; }
.ia-tab.active::before { content: ""; position: absolute; top: 0; left: 26%; right: 26%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.ia-tab.ia-film { color: var(--accent); }
.ia-tab.ia-film .nav-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-top: -20px; border-radius: 50%; background: var(--pearl-action); color: #fff; box-shadow: 0 6px 14px #1046ab3d, 0 0 0 4px #fbfbfc; }
.ia-tab.ia-film.active::before { display: none; }
.ia-tab .num { position: absolute; top: 6px; left: calc(50% + 6px); display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
html[data-design="pearl"] .ia-shell .main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 20px 16px calc(64px + 28px + env(safe-area-inset-bottom)); }
html[data-design="pearl"] .ia-shell.ia-chromeless .ia-nav, html[data-design="pearl"] .ia-shell.ia-chromeless .ia-header { display: none; }
html[data-design="pearl"] .ia-shell .main .ia-topbar { display: block; height: auto; min-height: 0; margin: 0; padding: 0; border: 0; background: none; position: static; }
.ia-topbar:empty { display: none; }
.ia-mode-chip { display: inline-flex; align-items: center; min-height: 28px; margin: 0 0 14px; padding: 3px 12px; border: 1px solid #cfdaeb; border-radius: 999px; background: #fff; color: var(--accent); font-size: 12px; font-weight: 650; }
/* The shell's sticky primary slot only (#ia-primary). Screen modules use .ia-primary for their own in-page buttons. */
#ia-primary.ia-primary { position: fixed; left: 16px; right: 16px; bottom: calc(64px + 12px + env(safe-area-inset-bottom)); z-index: 65; }
#ia-primary.ia-primary[hidden] { display: none; }
#ia-primary.ia-primary .ui-btn { width: 100%; box-shadow: 0 8px 20px #1046ab30; }
html[data-design="pearl"] .ia-shell:has(#ia-primary:not([hidden])) .main { padding-bottom: calc(64px + 28px + 64px + env(safe-area-inset-bottom)); }
.ia-state-host { padding: 12px 0; }
/* More: full-height sheet at 390 (one scroller, no inner trap), popover at 1440. */
html.ia-more-open { overflow: hidden; }
.ia-more-panel { position: fixed; inset: 0; z-index: 120; overflow-y: auto; padding: max(8px, env(safe-area-inset-top)) 16px 0; background: #fff; color: var(--ink); }
.ia-more-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.ia-more-head .tools-identity { margin: 0; padding: 0; font-size: 17px; font-weight: 650; line-height: 1.3; }
/* More's group headings and name are real headings (h2) styled as before: small caps label, the person's name. */
html[data-design="pearl"] .ia-more-panel h2.tools-heading { margin: 0; padding: 8px 12px 2px; font-size: 12px; font-weight: 650; letter-spacing: .06em; line-height: 1.4; text-transform: uppercase; color: #5f6b7a; }
html[data-design="pearl"] .ia-more-head h2.tools-identity { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: 0; line-height: 1.3; }
.ia-more-close { min-width: 44px; min-height: 44px; border: 0; border-radius: 50%; background: #f1f3f7; color: var(--ink); font-size: 15px; cursor: pointer; }
.ia-viewing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 0 14px; }
.ia-viewing-label { width: 100%; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ia-chip { min-height: 44px; padding: 8px 16px; border: 1px solid #dde2ea; border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.ia-chip.selected { border: 2px solid var(--accent); color: var(--accent); font-weight: 650; }
.ia-more-panel :is(a[data-menu],[data-action=logout]) { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; font-size: 16px; text-align: left; text-decoration: none; cursor: pointer; }
.ia-more-panel :is(a[data-menu],[data-action=logout]):hover { background: #f3f6fb; color: var(--accent); }
.ia-more-panel .tools-group, .ia-more-panel .tools-account { margin-top: 4px; padding-top: 4px; border-top: 1px solid #e8ebf0; }
/* Get help and Sign out stay reachable without scrolling; the panel is the only scroller. */
.ia-more-panel .tools-account { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; padding-bottom: max(12px, env(safe-area-inset-bottom)); background: #fff; }
.ia-more-panel .tools-account > * { width: auto; flex: 1 1 auto; }
.ia-more-panel.has-more-below .tools-account { box-shadow: 0 -18px 18px -6px #ffffffe6; }
.ia-jump-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-height: 48px; padding: 12px 8px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.ia-jump-row:hover, .ia-jump-row:focus-visible { background: #f3f6fb; color: var(--accent); }
.ia-jump-row small { color: var(--muted); }
@media (min-width: 1024px) {
  .ia-header { grid-template-columns: auto auto minmax(0,1fr); gap: 24px; min-height: 68px; padding: 10px 32px; background: #f9fafbf0; -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
  .ia-title-wrap { display: none; }
  .ia-nav { position: static; display: flex; gap: 2px; padding: 0; border: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .ia-tab { flex-direction: row; gap: 8px; min-width: 0; min-height: 44px; padding: 8px 14px; border-radius: 10px; font-size: 15px; }
  .ia-tab:hover { color: var(--accent); background: #f1f4f9; }
  .ia-tab .nav-icon, .ia-tab.ia-film { display: none; }
  .ia-tab.active::before { top: auto; bottom: -13px; left: 14px; right: 14px; height: 3px; border-radius: 3px 3px 0 0; }
  .ia-tab .num { position: static; }
  .ia-actions { justify-self: end; gap: 8px; order: 2; }
  .ia-nav { order: 1; } /* the header's actions come before the nav in the DOM; at 1440 the tabs still sit beside the logo */
  html[data-design="pearl"] #app .ia-shell .ia-film-btn { display: inline-flex; min-height: 44px; padding: 8px 16px; font-size: 14px; }
  .ia-jump { min-width: 230px; justify-content: flex-start; padding: 0 12px; border: 1px solid #dde2ea; background: #fff; color: var(--muted); }
  .ia-jump-field { display: inline-flex; flex: 1; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
  .ia-jump kbd { padding: 1px 6px; border: 1px solid #e0e3e9; border-radius: 6px; font: inherit; font-size: 12px; }
  .ia-more-label { display: none; }
  .ia-more-name { display: inline; color: var(--ink); font-size: 14px; font-weight: 600; }
  html[data-design="pearl"] .ia-shell .main { padding: 32px 32px 64px; }
  #ia-primary.ia-primary { position: static; max-width: 1180px; margin: 0 auto; padding: 0 32px 40px; }
  #ia-primary.ia-primary .ui-btn { width: auto; }
  html.ia-more-open { overflow: auto; }
  .ia-more-panel { inset: auto; top: 64px; right: 24px; width: 320px; max-height: 80vh; padding: 6px 12px 0; border: 1px solid #e5e8ee; border-radius: 18px; box-shadow: 0 18px 48px #1a264029; }
}
/* Pearl sign-in, sign-up and recovery (DM12 auth fold). */
.pearl-auth { min-height: 100dvh; padding: 0 16px 40px; }
.pearl-auth-main { display: block; }
.glink-arrival { display: grid; gap: 6px; margin: 18px 0 4px; }
html[data-design="pearl"] .glink-arrival .btn.full { width: 100%; min-height: 52px; }
.glink-arrival .text-btn { min-height: 48px; justify-content: center; text-align: center; }
.pearl-auth-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1080px; min-height: 68px; margin: 0 auto; }
.pearl-auth-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: #142137; text-decoration: none; font-size: 19px; font-weight: 650; letter-spacing: -.03em; }
html[data-design="pearl"] .pearl-auth-brand img { width: 32px; height: 32px; object-fit: contain; }
.pearl-auth-card { max-width: 440px; margin: 24px auto 0; padding: 26px 22px; border: 1px solid #e4e8ef; border-radius: 24px; background: var(--pearl-surface); box-shadow: var(--pearl-shadow); }
html[data-design="pearl"] .pearl-auth-card h1 { margin: 6px 0 6px; font-size: 32px; }
.pearl-auth-sub { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.pearl-auth-card form { display: grid; gap: 12px; }
.pearl-auth-card form[hidden], .pearl-auth-links[hidden], .pearl-auth-note[hidden] { display: none; }
html[data-design="pearl"] .pearl-auth-card .btn.full { width: 100%; min-height: 50px; margin-top: 4px; }
.pearl-auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 12px; }
html[data-design="pearl"] .pearl-auth-links .text-btn { min-height: 44px; padding: 8px 2px; }
.pearl-auth-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.pearl-auth .glink-auth-note { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: #23426f; font-size: 14px; }
.pearl-auth .family-status:empty, .pearl-auth .family-error:empty { display: none; }
@media (min-width: 1024px) { .pearl-auth-card { margin-top: 8vh; padding: 34px 32px; } }
/* Dark appearance for the shell only (dark.css stays with the accounts feature). */
html[data-theme="dark"] .ia-header { background: #14171cf0; border-bottom-color: #262a33; }
html[data-theme="dark"] .ia-nav { background: #14171c; border-top-color: #262a33; }
html[data-theme="dark"] .ia-more-panel, html[data-theme="dark"] .ia-more-panel .tools-account, html[data-theme="dark"] .ui-sheet, html[data-theme="dark"] .ui-sheet-head { background: #181b21; color: var(--ink); }
html[data-theme="dark"] .ia-tab.ia-film .nav-icon { box-shadow: 0 6px 14px #0006, 0 0 0 4px #14171c; }
html[data-theme="dark"] :is(.ia-chip,.ia-mode-chip,.ia-jump) { background: #1d2128; border-color: #323844; }
html[data-design="pearl"] .ia-more-panel :is(a,button):focus-visible, html[data-design="pearl"] .ia-jump-row:focus-visible { outline-offset: -3px; }
html[data-design="pearl"] .ia-more-head .tools-identity { color: var(--ink); }
html[data-design="pearl"] .pearl-auth-links .text-btn { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--accent); }
.pearl-auth #login-error:empty { display: none; }
/* All tools (#tools): the full grouped tool list as cards; the More menu keeps the everyday ones. */
.tools-all{border-top:1px solid #e4e9f1;margin-top:4px;padding-top:4px}
.tools-popover .tools-all button{font-weight:650;color:#1d4ed8}
.all-tools-page .all-tools-filter{max-width:420px;margin:14px 0 6px}
.all-tools{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin-top:12px}
.all-tools .tools-group{border:1px solid #e4e9f1;border-radius:16px;background:#fff;padding:6px;margin:0}
.all-tools .tools-group+.tools-group{border-top:1px solid #e4e9f1;margin-top:0;padding-top:6px}
.all-tools button{display:block;width:100%;min-height:44px;padding:10px 12px;border-radius:10px;background:transparent;color:#34465e;font-size:15px;text-align:left}
.all-tools button:hover,.all-tools button:focus-visible{background:#f0f5fd}
html[data-theme="dark"] .all-tools .tools-group{background:#1a1d23;border-color:#2b303a}
html[data-theme="dark"] .all-tools button{color:var(--ink)}
html[data-theme="dark"] .all-tools button:hover{background:#252a33}
.all-tools a{display:flex;flex-direction:column;justify-content:center;min-height:44px;padding:10px 12px;border-radius:10px;color:#34465e;font-size:15px;text-decoration:none}
.all-tools a small{color:var(--muted);font-size:12px}
.all-tools a:hover,.all-tools a:focus-visible{background:#f0f5fd;color:var(--accent)}
.all-tools a[hidden]{display:none}
html[data-theme="dark"] .all-tools a{color:var(--ink)}

/* IA-SPEC 12.1/12.2: build-claim and "Experimental" labels are hidden in the IA shell except on
   Service › Health (operations) and Knowledge › Tools (source-tools). The sentences that explain
   an estimate stay visible; only the label words go. */
.ia-shell:not(.view-operations):not(.view-source-tools) :is(.claim-strip, .claim-badge.claim-demonstrated, .mr-experimental > span:first-child, .bm-validation-note > span:first-child) { display: none !important; }
/* ui-kit tabs and state cards in dark mode (contrast ≥ 4.5:1) */
html[data-theme="dark"] .ui-tabs { background: #1d2128; }
html[data-theme="dark"] .ui-tab { color: #c3ccd9; }
html[data-theme="dark"] .ui-tab.active { background: #2a303a; color: #9cc0ff; box-shadow: none; }
h1.ia-title { margin: 0; line-height: inherit; }

/* Upload progress (rep-upload.js): one line, then a thin bar in the one blue. Indeterminate while the last save runs. */
progress.upload-bar { display: block; width: 100%; height: 8px; margin: 8px 0 2px; border: 0; border-radius: 999px; background: #e8ecf2; color: var(--accent, #1046ab); overflow: hidden; -webkit-appearance: none; appearance: none; }
progress.upload-bar::-webkit-progress-bar { background: #e8ecf2; border-radius: 999px; }
progress.upload-bar::-webkit-progress-value { background: var(--accent, #1046ab); border-radius: 999px; transition: width .3s ease; }
progress.upload-bar::-moz-progress-bar { background: var(--accent, #1046ab); border-radius: 999px; }
progress.upload-bar:indeterminate { background: linear-gradient(90deg, #e8ecf2 0 30%, var(--accent, #1046ab) 30% 55%, #e8ecf2 55%) 0 0 / 200% 100%; animation: upload-finishing 1.4s linear infinite; }
progress.upload-bar:indeterminate::-webkit-progress-bar { background: transparent; }
[data-connection="lost"] progress.upload-bar::-webkit-progress-value, [data-connection="waiting"] progress.upload-bar::-webkit-progress-value { background: #b54708; }
@keyframes upload-finishing { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { progress.upload-bar:indeterminate { animation: none; } }
html[data-theme="dark"] progress.upload-bar, html[data-theme="dark"] progress.upload-bar::-webkit-progress-bar { background: #262b34; }
/* The toast sits above the bottom tab bar wherever the bar is fixed (below 1024 px), never over it. */
@media (max-width: 1023px) { body:has(.ia-shell:not(.ia-chromeless) .ia-nav) #toast { bottom: calc(64px + 16px + env(safe-area-inset-bottom, 0px)); } }
/* A screen heading promoted to the page h1 on wide screens keeps its section-heading size (r1 b5) */
html[data-design="pearl"] h1[data-promoted-title], h1[data-promoted-title] { margin: 0 0 6px; font-size: 28px; line-height: 1.2; letter-spacing: -.02em; font-weight: 650; }
/* The bar's screen name stays bar-sized when it is the page's h1 (a legacy screen on a phone), r1 b5 */
html[data-design="pearl"] h1.ia-title { font-size: 17px; font-weight: 650; letter-spacing: -.02em; line-height: inherit; }
