/* Editorial workspace: presentation only; tool lifecycles remain in app.jsx. */
@media screen {
  body { background: var(--paper); }
  .portal-app { min-height: 100dvh; display: flex; flex-direction: column; background: #fff; }
  .desk-topbar { height: 76px; flex: 0 0 76px; display: flex; align-items: center; gap: 24px; padding: 0 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
  .desk-brand { display: flex; align-items: center; justify-content: center; width: 330px; height: 60px; padding: 0; overflow: hidden; border: 0; background: #fff; cursor: pointer; flex-shrink: 0; }
  .desk-brand .desk-brand-lockup { display: block; width: 400px; height: 135px; max-width: none; object-fit: contain; flex-shrink: 0; }
  .desk-header-actions { margin-left: auto; display: flex; gap: 8px; }
  .desk-icon-button { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border: 1px solid transparent; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; }
  .desk-icon-button:hover { background: var(--paper-soft); color: var(--text); border-color: var(--line); }
  .desk-icon-button svg, .desk-section-title svg, .desk-search svg, .desk-open svg, .desk-recent svg { width: 20px; height: 20px; flex: 0 0 20px; }
  .portal-app .portal-shell { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 0; flex: 1; width: 100%; max-width: none; margin: 0; padding: 0; }
  .desk-sidebar { position: fixed; left: 0; top: 76px; bottom: 0; width: 208px; padding: 28px 0; overflow-y: auto; background: #222425; color: #c8ccce; }
  .desk-sidebar nav { display: grid; gap: 6px; }
  .desk-sidebar a, .desk-sidebar button { display: flex; align-items: center; gap: 14px; padding: 16px 22px; width: 100%; min-height: 56px; border: 0; border-left: 3px solid transparent; color: inherit; background: transparent; text-decoration: none; text-align: left; font-size: 14px; cursor: pointer; line-height: 1.5; }
  .desk-sidebar svg { width: 22px; height: 22px; flex-shrink: 0; }
  .desk-sidebar .desk-sidebar-home { color: #fff; border-left-color: var(--red); background: #303233; font-weight: 650; margin-bottom: 12px; }
  .desk-sidebar button:hover, .desk-sidebar button:focus-visible { background: #303233; color: #fff; }
  .portal-app .portal-main { grid-column: 2; width: 100%; min-width: 0; max-width: 1320px; margin: 0 auto; padding: 42px 48px 0; border: 0; background: transparent; }
  .desk { padding: 0 0 30px; scroll-margin-top: 104px; }
  .desk-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 30px; }
  .desk-greeting { margin: 0 0 9px; color: var(--muted); font-size: 14px; }
  .desk-heading h1 { font-family: var(--font-display) !important; font-size: 42px; font-weight: 700; line-height: 1.3; margin: 0; }
  .desk-date { display: grid; gap: 3px; border-left: 1px solid var(--line-strong); padding-left: 20px; color: var(--muted); font-size: 13px; }
  .desk-date strong { color: var(--text); font-size: 14px; font-weight: 500; }
  .desk-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--line-strong); }
  .desk-section-title { display: flex; align-items: center; gap: 9px; color: var(--muted); }
  .desk-section-title h2 { margin: 0; font-size: 14px; font-weight: 550; }
  .desk-section-title > span { font-size: 12px; padding-left: 4px; }
  .desk-search { display: flex; align-items: center; gap: 10px; height: 40px; width: 286px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: #fff; }
  .desk-search:focus-within { outline: 2px solid var(--red); outline-offset: 2px; }
  .desk-search input { min-width: 0; width: 100%; height: 100%; padding: 0; border: 0 !important; outline: none !important; background: transparent !important; box-shadow: none; font-size: 13px; }
  .desk-search button { border: 0; background: transparent; width: 24px; height: 28px; padding: 0; color: var(--muted); cursor: pointer; }
  .desk-tools { display: grid; gap: 0; }
  .desk-tool { --tool-color: #ad3531; --tool-soft: #fbf1ef; display: grid; grid-template-columns: 24px 68px minmax(0,1fr) 146px; gap: 24px; align-items: center; padding: 25px 12px; min-width: 0; border-bottom: 1px solid var(--line); background: #fff; transition: background 160ms; }
  .desk-tool-payroll-tool { --tool-color: #2e7062; --tool-soft: #eef6f3; }
  .desk-tool-cheque-consistency { --tool-color: #376799; --tool-soft: #eff4fa; }
  .desk-tool-atm-card-expiry-reminder { --tool-color: #8e641b; --tool-soft: #fbf5e9; }
  .desk-tool:hover, .desk-tool:focus-within { background: var(--paper-soft); }
  .desk-tool-index { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .portal-app .desk-artwork { display: grid; place-items: center; width: 68px; height: 68px; flex: 0 0 68px; padding: 0; background: none; border-radius: 8px; }
  .portal-app .desk-artwork img { width: 100%; height: 100%; object-fit: contain; transform: none; filter: none; }
  .desk-tool-copy { min-width: 0; }
  .desk-tool-title > span { display: none; }
  .desk-tool h3 { font-family: var(--font-display) !important; font-size: 27px; font-weight: 700; line-height: 1.4; margin: 0; }
  .desk-tool-description { font-size: 14px; line-height: 1.8; color: var(--muted); margin: 5px 0 7px; }
  .desk-tool-tags { display: flex; flex-wrap: wrap; gap: 0; list-style: none; padding: 0; margin: 0; font-size: 12px; color: var(--muted); }
  .desk-tool-tags li + li::before { content: ""; display: inline-block; width: 1px; height: 10px; margin: 0 12px; background: var(--line-strong); vertical-align: -1px; }
  .desk-tool-bottom { display: flex; flex-direction: column-reverse; gap: 10px; align-items: center; }
  .desk-tool-note { color: var(--muted); font-size: 11px; text-align: center; line-height: 1.5; }
  .desk-open { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 10px 14px; width: 100%; background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; transition: background 160ms, color 160ms; }
  .desk-open:hover, .desk-open:focus-visible { background: var(--red); border-color: var(--red); color: #fff; }
  .desk-recent { display: flex; gap: 24px; align-items: center; margin-top: 24px; }
  .desk-recent h2 { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; margin: 0; }
  .desk-recent > div { display: flex; flex-wrap: wrap; gap: 8px; }
  .desk-recent button { display: flex; align-items: center; gap: 8px; background: var(--paper-soft); color: var(--text); border: 1px solid transparent; border-radius: 4px; padding: 6px 10px; min-height: 36px; font-size: 12px; cursor: pointer; }
  .desk-recent button:hover { border-color: var(--line-strong); color: var(--red); }
  .portal-app .desk-recent-artwork { width: 22px; height: 22px; flex: 0 0 22px; }
  .desk-recent button > svg { width: 14px; height: 14px; }
  .desk-empty { min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
  .desk-empty > svg { width: 32px; height: 32px; color: var(--muted); }
  .desk-empty h3 { font-size: 18px; margin: 16px 0 0; }
  .desk-empty p { color: var(--muted); font-size: 14px; }
  .portal-app .site-record-footer { width: 100%; margin: 0; padding: 20px 0; background: none; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; gap: 8px 18px; }
  .portal-app .site-record-footer a { color: var(--muted); }
  .portal-app[data-density="compact"] .portal-main { padding-top: 26px; }
  .portal-app[data-density="compact"] .desk-tool { padding-block: 16px; }
  .portal-app[data-density="compact"] .desk-heading { margin-bottom: 22px; }
  .app-modal-backdrop { background: rgba(22,24,26,.45); backdrop-filter: blur(3px); padding: 16px; }
  .portal-app .app-modal { width: min(1520px, 100%); height: calc(100dvh - 32px); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 20px 70px rgba(0,0,0,.2); }
  .portal-app .app-modal-head { min-height: 64px; padding: 10px 68px 10px 24px; background: #fff; border-bottom: 1px solid var(--line); justify-content: flex-start; }
  .portal-app .app-modal-title { width: 100%; margin: 0; justify-content: flex-start; text-align: left; gap: 12px; }
  .portal-app .modal-artwork { width: 36px; height: 36px; flex: 0 0 36px; }
  .portal-app .app-modal-title-copy h2 { font-family: var(--font-display) !important; font-size: 22px; line-height: 1.4; margin: 0; }
  .portal-app .app-modal-title-copy p, .portal-app .app-modal-title-copy > span { display: none; }
  .portal-app .app-modal-head .icon-button { width: 36px; height: 36px; right: 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); box-shadow: none; }
  .app-modal-head .icon-button svg { width: 18px; height: 18px; }
  .portal-app .corporate-toolbar { background: #f4f5f6; border-color: var(--line); padding: 16px 28px; }
  .corporate-stage { color: var(--red); font-size: 12px; }
  .corporate-trail strong { font-size: 13px; font-weight: 500; }
  .portal-app .corporate-step-body { padding: 28px; }
  .corporate-step-body .choice-panel-head { padding: 0 0 22px; }
  .portal-app .corporate-step-body :is(.start-selector-head h2, .choice-panel-head h2, .screen-header h1) { font-family: var(--font-display) !important; font-size: 26px; line-height: 1.5; margin-bottom: 8px; }
  .corporate-step-body .screen-copy, .corporate-step-body .choice-panel-head p { font-size: 14px; line-height: 1.75; color: var(--muted); }
  .corporate-step-body .start-selector-section { padding: 0; border: 0; background: none; box-shadow: none; }
  .corporate-step-body .start-selector-section h3 { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
  .portal-app .corporate-step-body .start-choice { min-height: 100px; padding: 18px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; box-shadow: none; }
  .corporate-step-body .start-choice.active { border-color: var(--red); background: var(--red-soft); box-shadow: inset 3px 0 var(--red); }
  .corporate-step-body .start-choice:disabled { background: var(--paper-soft); }
  .portal-app .corporate-step-body .start-choice > span { font-size: 13px; font-weight: 400; line-height: 1.7; }
  .corporate-step-body .choice-card-portal { border-radius: 6px; padding: 18px; border: 1px solid var(--line); background: #fff; box-shadow: none; }
  .corporate-step-body .choice-card-portal:hover { border-color: var(--red); background: var(--red-soft); }
  .corporate-step-body .choice-title { font-size: 16px; }
  .corporate-step-body .choice-desc { font-size: 13px; }
  .corporate-step-body .corporate-progress { border-radius: 4px; background: var(--green-soft); color: var(--green); border-color: #d7e7df; }
  .portal-app .corporate-step-body .corporate-group { border: 0; border-radius: 0; padding: 0; box-shadow: none; background: none; }
  .corporate-group h3 { padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .corporate-step-body .corporate-check { padding: 12px; border-radius: 4px; }
  .corporate-step-body .material-title { font-size: 14px; }
  .portal-app .corporate-step-body .material-note { font-size: 13px; font-weight: 400; line-height: 1.75; }
  .corporate-dialog-footer { background: #fff; border-color: var(--line); }
  .command-palette { border-radius: 8px; border-color: var(--line); }
  .command-result { border-radius: 6px; }
  .brand-easter-egg { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--text); box-shadow: var(--shadow); }
  .brand-easter-copy strong { font-family: var(--font-display); color: var(--text); font-size: 21px; }
  .brand-easter-label { color: var(--red); }
  @media (max-width: 1150px) {
    .portal-app .portal-shell { grid-template-columns: 184px minmax(0,1fr); }
    .desk-sidebar { width: 184px; }
    .desk-sidebar a, .desk-sidebar button { gap: 10px; padding-inline: 16px; font-size: 13px; }
    .portal-app .portal-main { padding: 32px 28px 0; }
    .desk-tool { grid-template-columns: 22px 56px minmax(0,1fr) 126px; gap: 16px; }
    .portal-app .desk-artwork { width: 56px; height: 56px; }
    .desk-tool h3 { font-size: 24px; }
  }
  @media (max-width: 900px) {
    .portal-app .portal-shell { display: block; }
    .desk-sidebar { position: static; width: 100%; padding: 0; overflow-x: auto; }
    .desk-sidebar nav { display: flex; gap: 0; width: max-content; min-width: 100%; }
    .desk-sidebar a, .desk-sidebar button { min-height: 48px; width: auto; white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; padding: 10px 16px; }
    .desk-sidebar .desk-sidebar-home { margin: 0; border-bottom-color: var(--red); }
    .desk-sidebar svg { width: 18px; height: 18px; }
    .desk-heading h1 { font-size: 34px; }
    .desk-recent { align-items: flex-start; }
  }
  @media (max-width: 600px) {
    .desk-topbar { height: 64px; flex-basis: 64px; padding: 0 14px; gap: 6px; }
    .desk-brand { width: 226px; height: 48px; }
    .desk-brand .desk-brand-lockup { width: 277px; height: 93px; }
    .desk-header-actions { gap: 0; }
    .desk-icon-button { width: 34px; height: 38px; }
    .desk-density { display: none; }
    .desk-sidebar { display: none; }
    .portal-app .portal-main { padding: 28px 18px 0; }
    .desk-heading { margin-bottom: 24px; gap: 12px; }
    .desk-heading h1 { font-size: 30px; }
    .desk-greeting { font-size: 13px; }
    .desk-date { padding-left: 12px; font-size: 11px; }
    .desk-date strong { font-size: 12px; }
    .desk-toolbar { flex-wrap: wrap; gap: 12px; }
    .desk-search { width: 100%; }
    .desk-tool { grid-template-columns: 48px minmax(0,1fr); gap: 14px; padding: 22px 0; }
    .desk-tool-index { display: none; }
    .portal-app .desk-artwork { width: 48px; height: 48px; align-self: start; }
    .desk-tool h3 { font-size: 23px; }
    .desk-tool-description { font-size: 13px; line-height: 1.75; }
    .desk-tool-tags { font-size: 11px; }
    .desk-tool-tags li + li::before { margin-inline: 8px; }
    .desk-tool-bottom { grid-column: 2; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
    .desk-open { width: auto; min-width: 120px; min-height: 42px; padding: 8px 12px; background: var(--tool-soft); color: var(--tool-color); border-color: transparent; font-size: 13px; }
    .desk-tool-note { font-size: 10px; text-align: left; }
    .desk-recent { flex-direction: column; gap: 12px; margin-top: 22px; }
    .portal-app .site-record-footer { justify-content: flex-start; align-items: flex-start; text-align: left; }
    .portal-app .app-modal-backdrop { padding: 0; }
    .portal-app .app-modal { width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
    .portal-app .app-modal-head { padding: 10px 62px 10px 16px; min-height: 60px; }
    .portal-app .app-modal-title-copy h2 { font-size: 20px; }
    .portal-app .corporate-step-body { padding: 20px 16px; }
    .portal-app .corporate-toolbar { padding: 12px 16px; }
    .portal-app .corporate-step-body :is(.start-selector-head h2, .choice-panel-head h2, .screen-header h1) { font-size: 23px; }
    .portal-app .corporate-step-body .start-choice > span, .portal-app .corporate-step-body .choice-desc { display: block; font-size: 12px; }
    .portal-app .corporate-step-body .start-choice { min-height: 108px; padding: 14px; }
  }
  @media (max-width: 360px) {
    .desk-brand { width: 196px; }
    .desk-brand .desk-brand-lockup { width: 240px; height: 81px; }
    .desk-date { display: none; }
  }
}
