/* Metodo: a standalone surface using Disciply's native theme and UI vocabulary. */
.m-app {
  --bg-main: #090b0f;
  --bg-card: #12151b;
  --bg-soft: #191d25;
  --surface-raised: #1c2028;
  --input-bg: #0e1117;
  --text-main: #f3f4f6;
  --text-soft: #b3bac5;
  --text-muted: #9099a7;
  --border-soft: rgba(226, 232, 240, .1);
  --border-strong: rgba(226, 232, 240, .2);
  --gold: #f5c400;
  --gold-dark: #d6a84f;
  --green: #43ce96;
  --red: #ff8189;
  --shadow-card: 0 12px 38px rgba(0, 0, 0, .17);
  --nav-bg: rgba(9, 11, 15, .93);
  --m-accent-text: #e6c45a;
  --m-accent-soft: rgba(245, 196, 0, .075);
  --m-accent-line: rgba(245, 196, 0, .27);
  --m-success-soft: rgba(67, 206, 150, .085);
  --m-error-soft: rgba(255, 129, 137, .085);
  --m-dialog-overlay: rgba(2, 4, 8, .78);
  --m-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(750px 350px at 65% -180px, rgba(214, 168, 79, .065), transparent 85%),
    var(--bg-main);
  color: var(--text-main);
  color-scheme: dark;
  font-family: Inter, Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

html[data-theme='light'] .m-app,
html[data-background-style='light'] .m-app,
.m-app[data-theme='light'] {
  --bg-main: #f6f7fb;
  --bg-card: #fff;
  --bg-soft: #eef1f6;
  --surface-raised: #f8f9fc;
  --input-bg: #fff;
  --text-main: #101828;
  --text-soft: #475467;
  --text-muted: #667085;
  --border-soft: rgba(16, 24, 40, .1);
  --border-strong: rgba(16, 24, 40, .18);
  --gold: #d6a84f;
  --gold-dark: #b8832f;
  --green: #087a4c;
  --red: #bf3347;
  --shadow-card: 0 12px 32px rgba(16, 24, 40, .055);
  --nav-bg: rgba(246, 247, 251, .95);
  --m-accent-text: #80601b;
  --m-accent-soft: rgba(214, 168, 79, .1);
  --m-accent-line: rgba(184, 131, 47, .27);
  --m-success-soft: rgba(8, 122, 76, .065);
  --m-error-soft: rgba(191, 51, 71, .06);
  --m-dialog-overlay: rgba(15, 23, 42, .44);
  color-scheme: light;
}

.m-app *, .m-app *::before, .m-app *::after { box-sizing: border-box; }
.m-app.m-modal-open { overflow: hidden; }
.m-app [hidden] { display: none !important; }
.m-app :where(h1, h2, h3, h4, p, ul, ol, figure) { margin: 0; }
.m-app :where(button, input, select, textarea) { font: inherit; }
.m-app :where(button, a, input, select, textarea, summary) { -webkit-tap-highlight-color: transparent; }
.m-app :where(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--m-accent-text);
  outline-offset: 4px;
}
.m-app :where(button) { color: inherit; cursor: pointer; }
.m-app :where(button:disabled, input:disabled, select:disabled, textarea:disabled) { cursor: not-allowed; }
.m-app :where(button:disabled, [aria-disabled='true']) { opacity: .48; }
.m-app a { color: inherit; text-decoration: none; }
.m-app img { max-width: 100%; }
.m-app svg { flex-shrink: 0; }
.m-app ::selection { background: var(--gold); color: #15120a; }

.m-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(24px, calc((100% - 1160px) / 2)) 12px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.m-brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; min-width: 0; font-size: 14px; font-weight: 800; letter-spacing: .11em; }
.m-brand img { display: block; width: 31px; height: 33px; object-fit: contain; }
.m-brand > span { display: grid; gap: 1px; }
.m-brand small { color: var(--text-muted); font-size: 10px; font-weight: 600; letter-spacing: .17em; }
.m-brand > .m-brand-divider { display: block; width: 1px; height: 18px; margin-inline: 3px; background: var(--border-strong); }
.m-brand > .m-brand-section { color: var(--text-muted); font-size: 12px; font-weight: 550; letter-spacing: 0; }
.m-header-actions { display: flex; flex: 0 1 auto; align-items: center; gap: 8px; min-width: 0; }
.m-header-actions > #auth-slot { display: flex; flex: 0 1 auto; min-width: 0; max-width: 200px; }
.m-language { display: flex; flex: 0 0 auto; align-items: center; min-width: 0; }
.m-language select { min-height: 42px; width: 58px; padding: 8px 5px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg-card); color: var(--text-soft); font-size: 12px; font-weight: 650; cursor: pointer; }
.m-icon-btn, .m-user-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-soft);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.m-icon-btn { width: 42px; padding: 10px; flex-shrink: 0; }
.m-icon-btn svg { width: 19px; height: 19px; }
.m-user-btn { min-width: 0; max-width: 200px; padding: 9px 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.m-user-btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-header-actions > #auth-slot > .m-user-btn { max-width: 100%; }
.m-user-btn svg { width: 17px; height: 17px; }
.m-shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; padding: 30px 0 48px; }
.m-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.m-intro { min-width: 0; margin-bottom: 22px; }
.m-intro .m-topline { display: flex; align-items: center; margin-bottom: 0; }
.m-intro h1 { font-size: clamp(28px, 3vw, 34px); line-height: 1.15; letter-spacing: -.045em; font-weight: 750; }
.m-intro > p:not(.m-eyebrow) { max-width: 650px; margin-top: 7px; color: var(--text-soft); font-size: 15px; line-height: 1.55; }
.m-eyebrow { margin-bottom: 7px; color: var(--m-accent-text); font-size: 10px; line-height: 1.4; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.m-tabs { display: flex; align-items: center; gap: 4px; width: fit-content; max-width: 100%; margin-bottom: 22px; padding: 4px; border: 1px solid var(--border-soft); border-radius: 14px; background: var(--input-bg); }
.m-tabs > button {
  min-height: 40px;
  padding: 9px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.m-tabs > button[aria-selected='true'], .m-tabs > button.active, .m-tabs > button.is-active { border-color: var(--border-soft); background: var(--surface-raised); color: var(--text-main); box-shadow: 0 2px 7px rgba(0, 0, 0, .08); }
.m-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 22px; }
.m-main, .m-aside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.m-aside { position: sticky; top: calc(94px + env(safe-area-inset-top, 0px)); }
.m-card { min-width: 0; padding: 24px; border: 1px solid var(--border-soft); border-radius: 20px; background: linear-gradient(150deg, rgba(148, 163, 184, .025), transparent 45%), var(--bg-card); box-shadow: var(--shadow-card); }
.m-card--hero { position: relative; border-color: var(--m-accent-line); background: radial-gradient(ellipse at 100% 0%, var(--m-accent-soft), transparent 66%), var(--bg-card); }
.m-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.m-card-head > div { min-width: 0; }
.m-card-head:last-child { margin-bottom: 0; }
.m-card-title { font-size: 18px; line-height: 1.35; font-weight: 700; letter-spacing: -.025em; }
.m-card--hero .m-card-title { font-size: 24px; letter-spacing: -.035em; }
.m-card-copy { margin-top: 7px; max-width: 56ch; color: var(--text-soft); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.m-card-copy + .m-actions { margin-top: 20px; }
.m-status, .m-tag { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 1px solid var(--border-soft); border-radius: 7px; padding: 4px 8px; color: var(--text-soft); background: var(--bg-soft); font-size: 11px; line-height: 1.4; font-weight: 650; }
.m-status { flex-shrink: 0; white-space: nowrap; }
.m-status::before { content: ''; width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.m-status:is([data-status='active'], [data-status='running'], [data-status='success'], [data-status='ready'], [data-status='saved'], [data-status='reviewed'], [data-status='complete'], [data-status='completed']) { color: var(--green); background: var(--m-success-soft); border-color: transparent; }
.m-status:is([data-status='draft'], [data-status='pending'], [data-status='paused'], [data-status='warning'], [data-status='review']) { color: var(--m-accent-text); background: var(--m-accent-soft); border-color: transparent; }
.m-status:is([data-status='error'], [data-status='failed'], [data-status='offline']) { color: var(--red); background: var(--m-error-soft); border-color: transparent; }
.m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  max-width: 100%;
  padding: 12px 19px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-raised);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.m-btn svg { width: 18px; height: 18px; }
.m-btn--primary, .m-btn.primary { min-height: 54px; border-color: var(--gold); background: var(--gold); color: #191509; box-shadow: 0 4px 14px var(--m-accent-soft); }
.m-btn--secondary, .m-btn.secondary { background: var(--bg-soft); border-color: var(--border-soft); }
.m-btn--ghost, .m-btn.ghost { background: transparent; border-color: transparent; color: var(--text-soft); box-shadow: none; }
.m-btn--danger, .m-btn.danger { background: var(--m-error-soft); border-color: transparent; color: var(--red); }
.m-btn--small { min-height: 40px; padding: 8px 13px; font-size: 13px; }
.m-btn--full { width: 100%; }
.m-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.m-actions + .m-meta, .m-actions + .m-hint { margin-top: 12px; }
.m-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.m-meta strong { color: var(--text-soft); font-weight: 600; }
.m-meta time { font-variant-numeric: tabular-nums; }
.m-rule-list { display: grid; gap: 0; padding: 0; list-style: none; }
.m-rule { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
.m-rule:first-child { padding-top: 0; }
.m-rule:last-child { border-bottom: 0; padding-bottom: 0; }
.m-rule > span:first-child, .m-rule-number { display: grid; place-items: center; min-width: 28px; min-height: 28px; border-radius: 8px; background: var(--m-accent-soft); color: var(--m-accent-text); font-family: var(--m-mono); font-size: 11px; }
.m-rule strong { display: block; margin: 2px 0 3px; font-size: 13px; font-weight: 650; }
.m-rule p { color: var(--text-soft); font-size: 13px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.m-empty { display: grid; justify-items: start; gap: 14px; padding: 6px 0; }
.m-empty > svg { width: 30px; height: 30px; padding: 0; color: var(--m-accent-text); }
.m-empty h2, .m-empty h3 { font-size: 22px; line-height: 1.3; letter-spacing: -.035em; }
.m-empty p { max-width: 53ch; color: var(--text-soft); font-size: 14px; line-height: 1.6; }
.m-empty .m-actions { margin-top: 3px; }
.m-empty--compact { gap: 8px; padding: 0; }
.m-empty--compact h3 { font-size: 16px; }
.m-stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 22px 0; padding: 0; list-style: none; }
.m-step { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 10px 8px; border: 1px solid var(--border-soft); border-radius: 10px; color: var(--text-muted); background: var(--input-bg); font-size: 11px; font-weight: 600; }
.m-step > span:first-child, .m-step-number { display: grid; place-items: center; width: 19px; height: 19px; flex-shrink: 0; border: 1px solid var(--border-strong); border-radius: 50%; font-size: 10px; font-family: var(--m-mono); }
.m-step[data-state='active'], .m-step[data-state='current'] { color: var(--m-accent-text); border-color: var(--m-accent-line); background: var(--m-accent-soft); }
.m-step:is([data-state='done'], [data-state='complete'], [data-state='completed']) { color: var(--green); }
.m-step:is([data-state='active'], [data-state='current']) > span:first-child { border-color: var(--m-accent-line); }
.m-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.m-stats--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.m-stat { min-width: 0; padding: 14px 12px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--input-bg); }
.m-stat > span, .m-stat > small, .m-stat > label { display: block; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
.m-stat > strong, .m-stat > b { display: block; margin-top: 6px; font-family: var(--m-mono); font-size: 26px; font-weight: 500; line-height: 1.2; letter-spacing: -.05em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.m-stat > p { margin-top: 5px; color: var(--text-muted); font-size: 11px; }
.m-session-list { display: grid; gap: 0; padding: 0; list-style: none; }
.m-session-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 15px 0; border: 0; border-bottom: 1px solid var(--border-soft); background: transparent; text-align: start; }
.m-session-row:first-child { padding-top: 0; }
.m-session-row:last-child { padding-bottom: 0; border-bottom: 0; }
.m-session-row > div { min-width: 0; }
.m-session-row strong { display: block; color: var(--text-main); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.m-session-row small, .m-session-row p { display: block; margin-top: 4px; color: var(--text-muted); font-size: 12px; }
.m-session-row > svg { width: 17px; height: 17px; color: var(--text-muted); }
.m-decision { min-width: 0; padding: 16px; border: 1px solid var(--border-soft); border-radius: 14px; background: var(--input-bg); }
.m-decision + .m-decision { margin-top: 12px; }
.m-decision-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.m-decision-head strong { font-size: 14px; font-weight: 650; }
.m-decision-head time { color: var(--text-muted); font-family: var(--m-mono); font-size: 11px; }
.m-decision-note { margin-top: 10px; color: var(--text-soft); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.m-decision-outcome { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.m-decision-outcome > * { min-width: 0; }
.m-decision .m-meta { margin-top: 10px; }
.m-tag { font-weight: 550; overflow-wrap: anywhere; }
.m-tag[data-status='success'], .m-tag--success { background: var(--m-success-soft); color: var(--green); border-color: transparent; }
.m-tag[data-status='warning'], .m-tag--warning { background: var(--m-accent-soft); color: var(--m-accent-text); border-color: transparent; }
.m-quicklink { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 47px; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 11px; background: var(--bg-soft); color: var(--text-soft); font-size: 13px; font-weight: 600; transition: border-color 180ms ease, background 180ms ease; }
.m-quicklink svg { width: 17px; height: 17px; color: var(--m-accent-text); }
.m-quicklink + .m-quicklink { margin-top: 8px; }
.m-save-state { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding-top: 3px; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
.m-save-state svg { width: 14px; height: 14px; flex-shrink: 0; }
.m-save-state[data-status='error'] { color: var(--red); }
.m-save-state[data-status='saved'], .m-save-state[data-status='success'] { color: var(--green); }
.m-notice, .m-demo-banner { padding: 13px 15px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg-soft); color: var(--text-soft); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.m-app #notice-slot:not(:empty) { margin-bottom: 16px; }
.m-notice strong, .m-demo-banner strong { color: var(--text-main); font-weight: 650; }
.m-notice p + p { margin-top: 5px; }
.m-notice--success, .m-notice.success, .m-notice[data-status='success'] { background: var(--m-success-soft); border-color: transparent; color: var(--green); }
.m-notice--error, .m-notice.error, .m-notice[data-status='error'] { background: var(--m-error-soft); border-color: transparent; color: var(--red); }
.m-notice--warning, .m-notice.warning, .m-notice[data-status='warning'], .m-demo-banner { background: var(--m-accent-soft); border-color: var(--m-accent-line); color: var(--m-accent-text); }
.m-demo-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.m-notice a, .m-hint a { text-decoration: underline; text-underline-offset: 3px; }
.m-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; margin-top: 30px; padding: 22px 0 max(12px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border-soft); color: var(--text-muted); font-size: 11px; line-height: 1.6; }
.m-footer a { text-decoration: underline; text-underline-offset: 3px; }

/* Native dialogs retain their browser-managed open/closed behavior. */
.m-dialog {
  position: fixed;
  inset: 0;
  width: min(640px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 28px 100px rgba(0, 0, 0, .35);
}
.m-dialog[open] { display: flex; flex-direction: column; }
.m-dialog::backdrop { background: var(--m-dialog-overlay, rgba(2, 4, 8, .78)); }
.m-dialog > form, .m-dialog > #dialog-content, .m-dialog > #dialog-content > form { display: flex; flex-direction: column; min-height: 0; max-height: inherit; overflow: hidden; }
.m-dialog-head { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 18px; border-bottom: 1px solid var(--border-soft); }
.m-dialog-head h2 { font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -.035em; }
.m-dialog-head p { margin-top: 5px; color: var(--text-muted); font-size: 13px; line-height: 1.55; }
.m-dialog-head .m-icon-btn { margin-top: -3px; }
.m-dialog-body { flex: 1 1 auto; min-height: 0; padding: 22px 24px 26px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; -webkit-overflow-scrolling: touch; }
.m-dialog-body > .m-notice { margin-bottom: 18px; }
.m-dialog-footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border-soft); background: var(--bg-card); }
.m-dialog-footer > .m-hint { flex-basis: 100%; margin: 0; }
.m-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.m-fieldset { min-width: 0; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.m-fieldset > legend { max-width: 100%; margin-bottom: 10px; padding: 0; color: var(--text-soft); font-size: 13px; line-height: 1.45; font-weight: 650; overflow-wrap: anywhere; }
.m-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.m-field--wide { grid-column: 1 / -1; }
.m-field > label, .m-field > span:first-child { color: var(--text-soft); font-size: 13px; line-height: 1.45; font-weight: 650; }
.m-field :where(input:not([type='checkbox']):not([type='radio']), select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 12px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.5;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.m-field select { padding-inline-end: 30px; }
.m-field textarea { min-height: 96px; resize: vertical; }
.m-field :where(input, textarea)::placeholder { color: var(--text-muted); opacity: .8; }
.m-field :where(input, select, textarea):focus { border-color: var(--m-accent-text); box-shadow: 0 0 0 3px var(--m-accent-soft); }
.m-field :where(input, select, textarea)[aria-invalid='true'] { border-color: var(--red); }
.m-field input:-webkit-autofill { -webkit-text-fill-color: var(--text-main); box-shadow: 0 0 0 100px var(--input-bg) inset; caret-color: var(--text-main); }
.m-field input[readonly] { color: var(--text-muted); background: var(--bg-soft); }
.m-hint { color: var(--text-muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.m-error { color: var(--red); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.m-form-error { margin-bottom: 16px; }
.m-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.m-choice-grid > label { display: flex; align-items: flex-start; gap: 9px; min-width: 0; min-height: 70px; padding: 13px 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--input-bg); color: var(--text-soft); font-size: 13px; line-height: 1.5; cursor: pointer; transition: background 180ms ease, border-color 180ms ease; }
.m-choice-grid > label:has(input:checked) { color: var(--text-main); border-color: var(--m-accent-line); background: var(--m-accent-soft); }
.m-choice-grid > label:has(input:focus-visible), .m-checklist > label:has(input:focus-visible) { outline: 2px solid var(--m-accent-text); outline-offset: 3px; }
.m-choice-grid strong { display: block; font-size: 13px; font-weight: 650; }
.m-choice-grid small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 11px; }
.m-choice-grid input, .m-checklist input { flex: 0 0 auto; width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--gold-dark); cursor: pointer; }
.m-checklist { display: grid; gap: 8px; padding: 0; list-style: none; }
.m-checklist > label { display: flex; align-items: flex-start; gap: 11px; min-height: 48px; padding: 13px 14px; border: 1px solid var(--border-soft); border-radius: 11px; background: var(--input-bg); color: var(--text-soft); font-size: 14px; line-height: 1.5; cursor: pointer; }
.m-checklist > label:has(input:checked) { background: var(--m-accent-soft); border-color: var(--m-accent-line); color: var(--text-main); }
.m-checklist small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 12px; }
.m-progress { display: block; width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 99px; background: var(--bg-soft); color: var(--gold); appearance: none; }
.m-progress > span, .m-progress > i { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.m-progress::-webkit-progress-bar { background: var(--bg-soft); border-radius: 99px; }
.m-progress::-webkit-progress-value { background: var(--gold); border-radius: 99px; }
.m-progress::-moz-progress-bar { background: var(--gold); border-radius: 99px; }
.m-template-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; padding: 16px; border: 1px solid var(--border-strong); border-radius: 13px; background: var(--input-bg); text-align: start; }
.m-template-card strong { font-size: 14px; font-weight: 650; }
.m-template-card p, .m-template-card small { color: var(--text-soft); font-size: 12px; line-height: 1.55; }
.m-template-card:has(input:checked), .m-template-card[aria-pressed='true'] { background: var(--m-accent-soft); border-color: var(--m-accent-line); }
.m-method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.m-method-card { display: flex; flex-direction: column; align-items: stretch; gap: 14px; min-width: 0; padding: 20px; border: 1px solid var(--border-soft); border-radius: 17px; background: var(--bg-card); box-shadow: var(--shadow-card); }
.m-method-card h3 { font-size: 17px; font-weight: 700; line-height: 1.4; letter-spacing: -.02em; overflow-wrap: anywhere; }
.m-method-card > p { color: var(--text-soft); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.m-method-card .m-card-head { margin-bottom: 0; }
.m-method-card .m-actions { margin-top: auto; padding-top: 4px; }
.m-method-card[data-selected='true'] { border-color: var(--m-accent-line); background: linear-gradient(var(--m-accent-soft), var(--m-accent-soft)), var(--bg-card); }
.m-skeleton { position: relative; display: block; min-height: 14px; overflow: hidden; border-radius: 7px; background: var(--bg-soft); }
.m-skeleton::after { position: absolute; inset: 0; content: ''; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(148, 163, 184, .1), transparent); animation: m-skeleton-sweep 1.8s ease-in-out infinite; }
@keyframes m-skeleton-sweep { to { transform: translateX(100%); } }

/* Optional small helpers for semantic markup; no dependencies on shared app JS. */
.m-spaced { margin-top: 16px; }
.m-before-card { margin-bottom: 16px; }
.m-details-title { display: list-item; min-height: 44px; padding: 11px 0; color: var(--text-soft); font-size: 13px; line-height: 1.6; font-weight: 650; list-style-position: inside; overflow-wrap: anywhere; cursor: pointer; }
.m-details-title::marker { color: var(--m-accent-text); }
.m-details-title:focus-visible { outline: 2px solid var(--m-accent-text); outline-offset: 4px; border-radius: 4px; }
.m-review-text { color: var(--text-soft); font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.m-stack { display: grid; gap: 16px; }
.m-stack--small { gap: 9px; }
.m-section-label { margin-bottom: 12px; color: var(--text-muted); font-size: 11px; font-weight: 700; line-height: 1.5; letter-spacing: .07em; text-transform: uppercase; }
.m-divider { width: 100%; height: 1px; margin: 20px 0; border: 0; background: var(--border-soft); }
.m-mono { font-family: var(--m-mono); font-variant-numeric: tabular-nums; }
.m-muted { color: var(--text-muted); }
.m-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.m-skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 18px; border-radius: 8px; background: var(--gold); color: #191509; }
.m-skip-link:focus { top: calc(10px + env(safe-area-inset-top, 0px)); }

@media (hover: hover) {
  .m-icon-btn:hover, .m-user-btn:hover { border-color: var(--border-strong); background: var(--surface-raised); color: var(--text-main); }
  .m-tabs > button:hover { color: var(--text-main); }
  .m-btn:not(:disabled):not([aria-disabled='true']):hover { border-color: var(--m-accent-line); box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
  .m-btn--primary:not(:disabled):hover, .m-btn.primary:not(:disabled):hover { border-color: var(--gold-dark); background: var(--gold-dark); }
  .m-btn--ghost:not(:disabled):hover, .m-btn.ghost:not(:disabled):hover { background: var(--bg-soft); border-color: transparent; }
  .m-quicklink:hover, button.m-template-card:hover { border-color: var(--m-accent-line); }
  button.m-session-row:hover strong, a.m-session-row:hover strong { color: var(--m-accent-text); }
}

@media (max-width: 979px) {
  .m-layout { grid-template-columns: minmax(0, 1fr); }
  .m-aside { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .m-aside > :only-child { grid-column: 1 / -1; }
  .m-topline { gap: 16px; }
}

@media (max-width: 639px) {
  .m-header { gap: 10px; min-height: 64px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; }
  .m-brand { gap: 8px; font-size: 12px; letter-spacing: .095em; }
  .m-brand img { width: 27px; height: 29px; }
  .m-brand small { font-size: 9px; }
  .m-brand > .m-brand-divider, .m-brand > .m-brand-section { display: none; }
  .m-language select { width: 51px; }
  .m-user-btn { max-width: 128px; padding-inline: 10px; font-size: 12px; }
  .m-header-actions { gap: 6px; }
  .m-header-actions > #auth-slot { max-width: 128px; }
  .m-shell { width: calc(100% - 32px); padding: 21px 0 28px; }
  .m-topline { display: block; margin-bottom: 15px; }
  .m-intro { margin-bottom: 18px; }
  .m-intro h1 { font-size: 29px; line-height: 1.15; }
  .m-intro > p:not(.m-eyebrow) { margin-top: 6px; font-size: 14px; line-height: 1.55; }
  .m-eyebrow { margin-bottom: 6px; font-size: 9px; }
  .m-topline > .m-save-state { margin-top: 8px; }
  .m-tabs { width: 100%; gap: 3px; margin-bottom: 16px; padding: 3px; }
  .m-tabs > button { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 9px 7px; font-size: 13px; }
  .m-layout { gap: 16px; }
  .m-main, .m-aside { gap: 16px; }
  .m-aside { display: flex; }
  .m-card { padding: 19px; border-radius: 18px; }
  .m-card-head { gap: 10px; margin-bottom: 15px; }
  .m-card-title { font-size: 17px; }
  .m-card--hero .m-card-title { font-size: 21px; line-height: 1.3; }
  .m-card-copy { margin-top: 6px; font-size: 13px; }
  .m-status { padding: 4px 6px; font-size: 10px; gap: 4px; }
  .m-btn { min-height: 46px; font-size: 14px; }
  .m-btn--primary, .m-btn.primary { width: 100%; min-height: 54px; font-size: 15px; }
  .m-actions { gap: 8px; }
  .m-actions > .m-btn--primary, .m-actions > .m-btn.primary { flex-basis: 100%; }
  .m-actions > .m-btn:not(.m-btn--primary):not(.primary) { flex: 1 1 auto; }
  .m-btn--small { min-height: 42px; font-size: 12px; }
  .m-empty { gap: 11px; padding: 0; }
  .m-empty h2, .m-empty h3 { font-size: 20px; }
  .m-empty p { font-size: 13px; line-height: 1.6; }
  .m-empty .m-actions { width: 100%; }
  .m-stepper { gap: 5px; margin: 18px 0; }
  .m-step { gap: 5px; padding: 9px 5px; font-size: 10px; }
  .m-step > span:first-child, .m-step-number { width: 16px; height: 16px; font-size: 9px; }
  .m-stats { gap: 8px; margin: 17px 0; }
  .m-stats--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-stat { padding: 12px 9px; }
  .m-stat > strong, .m-stat > b { font-size: 23px; }
  .m-stat > span, .m-stat > small, .m-stat > label { font-size: 10px; }
  .m-rule { gap: 10px; padding-block: 12px; }
  .m-rule strong { font-size: 12px; }
  .m-rule p { font-size: 12px; }
  .m-session-row { gap: 10px; padding-block: 14px; }
  .m-decision { padding: 13px; }
  .m-method-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .m-method-card { padding: 18px; }
  .m-demo-banner { margin-bottom: 14px; padding: 11px 13px; font-size: 12px; }
  .m-footer { align-items: flex-start; flex-direction: column; gap: 9px; margin-top: 24px; padding-top: 18px; }
  .m-dialog { inset: auto 0 0; width: 100%; max-height: calc(100vh - 18px); max-height: calc(100dvh - 18px - env(safe-area-inset-top, 0px)); margin: 0; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .m-dialog-head { gap: 12px; padding: 20px 18px 16px; }
  .m-dialog-head h2 { font-size: 21px; }
  .m-dialog-body { padding: 20px 18px 24px; }
  .m-dialog-footer { gap: 8px; padding: 13px 18px max(16px, env(safe-area-inset-bottom, 0px)); }
  .m-dialog-footer > .m-btn--primary, .m-dialog-footer > .m-btn.primary { flex: 1 1 100%; }
  .m-dialog-footer > .m-btn:not(.m-btn--primary):not(.primary) { flex: 1; }
  .m-form-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .m-choice-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .m-choice-grid > label { align-items: center; min-height: 50px; padding: 12px 13px; }
}

@media (max-width: 374px) {
  .m-brand { letter-spacing: .035em; }
  .m-user-btn { max-width: 112px; }
  .m-header-actions > #auth-slot { max-width: 112px; }
  .m-intro h1 { font-size: 27px; }
  .m-card { padding: 16px; }
  .m-card-head { flex-wrap: wrap; }
  .m-card-head > .m-status { flex-shrink: 1; }
  .m-step { flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; font-size: 10px; }
  .m-stat > strong, .m-stat > b { font-size: 22px; }
}

@media (min-width: 430px) and (max-width: 639px) {
  .m-shell { width: calc(100% - 40px); }
  .m-header { padding-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .m-app *, .m-app *::before, .m-app *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation: none !important; }
  .m-skeleton::after { content: none; }
}

@media (forced-colors: active) {
  .m-btn, .m-tabs > button, .m-card, .m-choice-grid > label, .m-checklist > label { border-color: ButtonText; }
  .m-status::before { forced-color-adjust: none; }
}
