/* Monthly management walkthrough: the neutral "fictional system" screens
   (payroll, accounts payable, nursery invoice, email), the walkthrough
   checklist and explore bar. Halo screens use ../shared/portal.css.
   Deliberately plain blue-grey styling so these read as the employer's own
   tools, not as Halo and not as any real product. */
.mw-aw { margin-bottom: 40px; }
.aw-audit { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.aw-audit-list { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--ink-soft); }
.aw-audit-list li span { display: block; font-size: 0.75rem; color: var(--grey); }
.aw-audit-list .is-empty { color: var(--grey); }

.hp.mw-root { container-type: inline-size; }
.mw-ext { height: 100%; overflow-y: auto; background: #eef1f5; }
.hp.mw-root .hp-toast { position: absolute; }

/* Neutral external-system frame */
.xs { min-height: 100%; display: flex; flex-direction: column; font-family: var(--hp-font-ui); color: #1f2a37; }
.xs-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 18px; background: #334155; color: #f1f5f9; }
.xs-app { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; }
.xs-app .hp-i { width: 16px; height: 16px; }
.xs-tag { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); }
.xs-body { flex: 1; padding: 20px 22px 28px; }
.xs-crumb { font-size: 12.5px; color: #475569; margin-bottom: 10px; }
.xs-panel { background: #fff; border: 1px solid #d5dbe3; border-radius: 10px; padding: 20px 22px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.xs-panel > * + * { margin-top: 16px; }
.xs-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.xs-panel-head h4 { font-family: var(--hp-font-ui); font-size: 19px; font-weight: 600; color: #0f172a; }
.xs-badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 6px; background: #e2e8f0; color: #334155; }
.xs-badge.is-green { background: #dcfce7; color: #166534; }
.xs-help { font-size: 13.5px; color: #475569; }
.xs-help strong { color: #0f172a; }
.xs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.xs-form > * + * { margin-top: 14px; }
.xs-label { display: block; font-size: 12.5px; font-weight: 600; color: #334155; margin-bottom: 4px; }
.xs-value { font-size: 16px; font-weight: 600; }
.xs-muted { color: #64748b; font-weight: 400; font-size: 13px; }
.xs-input { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid #94a3b8; border-radius: 6px; font: inherit; font-size: 15px; background: #fff; color: #0f172a; }
.xs-input:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; }
.xs-prefix { position: relative; }
.xs-prefix span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #475569; }
.xs-prefix .xs-input { padding-left: 24px; }
.xs-error { font-size: 13px; color: #b91c1c; }
.xs-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; }
.xs-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 18px; border: 0; border-radius: 6px; background: #1e40af; color: #fff; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.xs-btn:hover { background: #1e3a8a; }
.xs-btn .hp-i { width: 15px; height: 15px; }
.xs-btn.is-halo { background: #6a7a5e; }
.xs-btn.is-halo:hover { background: #5b6a50; }
.xs-link { border: 0; background: none; padding: 6px 4px; font: inherit; font-size: 13.5px; color: #1e40af; text-decoration: underline; cursor: pointer; }
.xs-success { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 8px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; font-size: 14px; }
.xs-success .hp-i { color: #16a34a; width: 20px; height: 20px; }
.xs-success p { font-size: 13px; color: #166534; }
.xs-success-line { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; color: #166534; }
.xs-reminder { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 13.5px; color: #9a3412; }
.xs-reminder .hp-i { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.xs-tabs { display: flex; gap: 4px; border-bottom: 1px solid #d5dbe3; }
.xs-tab { border: 0; background: none; padding: 9px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; font: inherit; font-size: 14px; color: #475569; cursor: pointer; }
.xs-tab.is-on { color: #1e40af; border-bottom-color: #1e40af; font-weight: 600; }
.xs-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.xs-tiles > div { border: 1px solid #d5dbe3; border-radius: 8px; padding: 12px 14px; text-align: center; }
.xs-tiles span { display: block; font-size: 12px; color: #475569; }
.xs-tiles strong { font-size: 19px; font-weight: 600; }
.xs-tablewrap { overflow-x: auto; margin-top: 12px; }
.xs-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.xs-table th { text-align: left; font-size: 12px; font-weight: 600; color: #475569; padding: 8px 10px; background: #f1f5f9; border-bottom: 1px solid #d5dbe3; }
.xs-table td { padding: 10px; border-bottom: 1px solid #e2e8f0; }
.xs-pill { display: inline-flex; gap: 4px; align-items: center; padding: 2px 9px; border-radius: 999px; background: #e2e8f0; color: #334155; font-size: 12px; font-weight: 600; }
.xs-pill.is-green { background: #dcfce7; color: #166534; }
.xs-pill .hp-i { width: 12px; height: 12px; }
.xs-later h5 { font-family: var(--hp-font-ui); font-size: 15px; font-weight: 600; margin-top: 12px; }
.xs-later p { font-size: 14px; color: #334155; margin-top: 6px; }
.xs-ticks { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.xs-ticks li { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.xs-ticks .hp-i { color: #16a34a; width: 15px; height: 15px; }

/* Walkthrough checklist (presenter aid, separate from product UI) */
.mw-check { border: 2px dashed #8f4fae; border-radius: 14px; background: #fdfaff; padding: 14px 16px; margin: 16px 0; }
.mw-check-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.mw-check-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: #f4ebf9; color: #6e3a8c; }
.mw-check-head h5 { font-family: var(--hp-font-ui); font-size: 14.5px; font-weight: 600; color: var(--hp-ink); }
.mw-check-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 16px; margin-bottom: 10px !important; }
.mw-check-item { display: flex; gap: 10px; align-items: center; padding: 6px 4px; font-size: 14px; cursor: pointer; border-radius: 6px; }
.mw-check-item input { width: 18px; height: 18px; accent-color: #3a7049; flex-shrink: 0; }
.mw-check-item.is-on span { color: #3a7049; }
.mw-done { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; color: #3a7049; }
.mw-done .hp-i { width: 17px; height: 17px; }

/* Split: Halo arrangement beside the nursery invoice */
.mw-sheet { padding: 18px 20px 24px; }
.mw-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.mw-side-label { display: flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #6b5d52; margin-bottom: 8px !important; }
.mw-side-label .hp-i { width: 14px; height: 14px; }
.mw-halo-side { background: #fff; border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 16px; padding: 16px; }
.mw-side-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; font-family: var(--hp-font-display); font-size: 18px; }
.mw-side-sub { font-size: 13px; color: #6b5d52; margin: 4px 0 12px !important; }
.hp-stats.is-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hp-stats.is-compact dd { font-size: 16px; }
.mw-invoice { background: #fff; border: 1px solid #d5dbe3; border-radius: 6px; padding: 18px; font-family: var(--hp-font-ui); color: #1f2a37; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06); }
.mw-invoice header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #1f2a37; padding-bottom: 6px; }
.mw-inv-title { font-size: 26px; font-weight: 800; letter-spacing: 0.02em; }
.mw-inv-demo { font-size: 11px; color: #64748b; }
.mw-inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.mw-inv-parties span { display: block; font-size: 12px; color: #475569; }
.mw-inv-parties strong { font-size: 15px; }
.mw-inv-meta { margin: 12px 0 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.mw-inv-meta div { display: flex; gap: 6px; flex-wrap: wrap; }
.mw-inv-meta dt { color: #475569; }
.mw-inv-meta dt::after { content: ":"; }
.mw-inv-meta dd { margin: 0; font-weight: 600; }
.mw-inv-lines { margin-top: 12px; border: 1px solid #d5dbe3; }
.mw-inv-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; font-size: 13px; border-top: 1px solid #e2e8f0; }
.mw-inv-row.is-head { background: #f1f5f9; font-weight: 600; border-top: 0; }
.mw-inv-row.is-total { font-weight: 700; background: #f8fafc; }
.mw-mismatch { display: flex; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 8px; border: 1px solid #fca5a5; background: #fef2f2; color: #991b1b; font-size: 13.5px; }
.mw-mismatch > .hp-i { width: 20px; height: 20px; flex-shrink: 0; color: #dc2626; }
.mw-mismatch dl { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.mw-mismatch dl div { display: flex; gap: 6px; }
.mw-mismatch dd { margin: 0; font-weight: 700; }
.mw-mismatch-actions { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid rgba(0, 0, 0, 0.08); }
.mw-mismatch-actions > * + * { margin-top: 12px; }
.mw-mismatch-actions > p { font-size: 14px; color: #6b5d52; }
.mw-raised { display: flex; gap: 8px; align-items: center; font-size: 13.5px; font-weight: 600; color: #3a7049; }

/* Email */
.mw-mail { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: start; }
.mw-mail-list { display: flex; flex-direction: column; gap: 6px; }
.mw-mail-item { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px solid #d5dbe3; font-size: 13px; }
.mw-mail-item.is-on { border-color: #1e40af; box-shadow: inset 3px 0 0 #1e40af; }
.mw-mail-read > * + * { margin-top: 14px; }
.mw-email { max-width: 520px; background: #fff; border: 1px solid #d5dbe3; border-radius: 12px; padding: 20px 22px; }
.mw-email > * + * { margin-top: 10px; }
.mw-email-brand { text-align: center; font-family: var(--hp-font-display); font-size: 22px; font-weight: 600; color: #5b7a3a; padding-bottom: 8px; border-bottom: 1px solid #eef1f5; }
.mw-email h5 { font-family: var(--hp-font-ui); font-size: 17px; font-weight: 600; }
.mw-email-rows { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.mw-email-rows div { display: grid; grid-template-columns: 160px 1fr; gap: 8px; }
.mw-email-rows dt { color: #64748b; }
.mw-email-rows dd { margin: 0; font-weight: 600; }
.mw-email p { font-size: 13.5px; color: #334155; }
.mw-email-cta { display: inline-block; padding: 8px 16px; border-radius: 999px; background: #9fbf7a; color: #1f2a0f; font-size: 13px; font-weight: 600; }
.mw-email-sign { color: #64748b !important; }
.mw-flows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 520px; }
.mw-flows > div { padding: 10px 12px; border-radius: 10px; background: #f1f5f9; font-size: 13px; color: #334155; }
.mw-flows > div.is-halo { background: #f4ebf9; color: #4a2560; }
.mw-flows strong { display: block; font-size: 13.5px; }

/* Overview */
.mw-intro .mw-tasks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; text-align: left; }
.mw-tasks li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 16px; background: #fff; }
.mw-task-num { position: absolute; top: 12px; right: 14px; font-size: 12px; font-weight: 700; color: #756a60; }
.mw-task-icon { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: #f4ebf9; color: #8f4fae; margin-bottom: 4px; }
.mw-tasks strong { font-size: 15px; font-weight: 600; }
.mw-tasks span:not(.mw-task-num):not(.mw-task-icon) { font-size: 13px; color: #6b5d52; }

/* Explore bar */
.mw-explore { display: flex; flex-direction: column; height: 100%; }
.mw-explore-bar { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px; background: #fff; border-bottom: 1px solid rgba(0, 0, 0, 0.08); flex-shrink: 0; }
.mw-ex-chip { flex-shrink: 0; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(0, 0, 0, 0.14); background: #fff; font: inherit; font-size: 13px; font-weight: 500; color: #4a3f37; cursor: pointer; }
.mw-ex-chip.is-on { background: #2a1f17; border-color: #2a1f17; color: #fff; }
.mw-explore-body { flex: 1; min-height: 0; position: relative; }
.mw-explore-body > .hp-shell { height: 100%; }

.hp.is-guided .xs [data-target]:not(:disabled), .hp.is-guided .mw-check [data-target] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #8f4fae; }

@container hp (max-width: 760px) {
  .mw-split, .mw-mail, .mw-flows, .xs-grid, .mw-intro .mw-tasks { grid-template-columns: 1fr; }
  .xs-tiles { grid-template-columns: 1fr; }
  .xs-body, .mw-sheet { padding: 14px; }
  .mw-email-rows div { grid-template-columns: 1fr; gap: 0; }
  .mw-mail-list { flex-direction: row; overflow-x: auto; }
}
