/* Merchant home only. The account shell and other workspaces use layout.css. */
.home-page {
  --desk-panel: #141923; --desk-rule: #2a3241; --desk-muted: #b3bccb;
  --desk-gutter: clamp(16px, 2.2vw, 32px);
  container: merchant-desk / inline-size;
  width: 100%; max-width: 2240px; margin: 0 auto;
  padding: 24px var(--desk-gutter) 32px;
}
.desk-heading, .desk-panel-head {display: flex; align-items: center; justify-content: space-between; gap: 16px;}
.desk-heading {margin-bottom: 16px;}
.desk-heading h1 {font-size: var(--font-page-title); font-weight: 600; line-height: 1.25; margin: 0;}
.desk-heading p {font-size: var(--font-body); color: var(--desk-muted); margin: 7px 0 0;}
.desk-status {display: inline-flex; align-items: center; gap: 8px; color: #bfd2ee; font-size: var(--font-meta);}
.desk-status[data-state=idle] {display: none;}
.desk-status::before {content: ""; width: 7px; height: 7px; border-radius: 50%; background: #90b6ff;}
.desk-status small {font-size: inherit;}
.desk-start, .desk-library {display: grid; grid-template-columns: minmax(0,3fr) minmax(0,2fr); gap: 20px;}
.desk-feature {
  isolation: isolate; position: relative; overflow: hidden; display: flex; align-items: center;
  min-height: 248px; border: 1px solid #3a4356; border-radius: 12px;
  background: #1a2330; color: #fff; text-decoration: none;
}
.desk-poster {position: absolute; inset: 0 0 0 auto; width: 64%; height: 100%; object-fit: cover; object-position: 56% 45%; mask-image: linear-gradient(90deg,transparent,#000 20%); z-index: -2;}
.desk-feature::before {content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#1a2330 30%,#1a2330f0 36%,#1a23308c 47%,transparent 63%),linear-gradient(0deg,#0d131b64,transparent 24%);}
.desk-feature-copy {padding: 20px clamp(16px,2cqi,32px); max-width: 56%;}
.desk-kicker {display: inline-flex; align-items: center; gap: 9px; font-size: var(--font-meta); color: #c5d9ff; font-weight: 500;}
.desk-kicker::before {content: ""; width: 17px; height: 2px; background: #9dc1ff;}
.desk-feature h2 {font-size: var(--font-hero); font-weight: 600; letter-spacing: .015em; line-height: 1.2; margin: 10px 0;}
.desk-feature p {font-size: var(--font-body); line-height: 1.65; color: #e3e8ef; margin: 0 0 20px;}
.desk-cta {display: inline-flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 16px; padding: 8px 16px; border-radius: 7px; background: #e2ecff; color: #152237; font-size: var(--font-control); font-weight: 600;}
.desk-feature:hover .desk-cta {background: #fff;}
.desk-caption {position: absolute; right: 14px; bottom: 12px; border-radius: 4px; padding: 3px 7px; background: #111923cb; color: #fafaff; font-size: 11px;}
.desk-tools,.desk-panel {min-width: 0; background: var(--desk-panel); border: 1px solid var(--desk-rule); border-radius: 14px;}
.desk-tools {display: flex; flex-direction: column; padding: 16px 20px 8px;}
.desk-tools h2,.desk-panel-head h2 {font-size: var(--font-section-title); line-height: 1.35; font-weight: 600; margin: 0;}
.desk-tool-list {flex: 1; display: grid; margin-top: 8px;}
.desk-tool {width: 100%; min-height: 48px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 6px 2px; background: transparent; border: none; border-top: 1px solid var(--desk-rule); text-align: left; cursor: pointer; color: var(--text);}
.desk-tool:first-child {border-top: 0;}
.desk-tool-icon {width: 33px; height: 33px; display: grid; place-items: center; border-radius: 8px; background: #212d40; color: #a6c6ff;}
.desk-tool-icon svg {width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round;}
.desk-tool strong,.desk-tool small {display: block;}
.desk-tool strong {font-size: var(--font-card-title); font-weight: 500; line-height: 1.45;}
.desk-tool small {color: var(--desk-muted); font-size: var(--font-meta); line-height: 1.45; margin-top: 2px;}
.desk-chevron {font: 20px/1 sans-serif; color: #abb6c7;}
.desk-tool:hover strong,.desk-text-button:hover {color: #bfd6ff;}
.desk-tool:disabled {cursor: wait; opacity: .72;}
.desk-summary {display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin: 16px 0 12px; color: var(--desk-muted); font-size: var(--font-meta);}
.desk-summary > span {color: #e2e6ef; font-weight: 500; padding-right: 18px; border-right: 1px solid var(--desk-rule);}
.desk-summary strong {font-variant-numeric: tabular-nums; font-size: 16px; color: #e6edf8; font-weight: 600; margin-right: 2px;}
.desk-panel {padding: 12px 20px 16px;}
.desk-panel-head {min-height: 44px; border-bottom: 1px solid var(--desk-rule);}
.desk-text-button {min-height: 44px; min-width: 44px; background: none; border: 0; padding: 2px 0 2px 8px; color: #abc5ef; font-size: var(--font-meta); cursor: pointer;}
.home-page .button {min-height: 44px; min-width: 44px;}
.desk-empty {display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; min-height: 76px; padding-top: 8px;}
.desk-empty-mark {width: 36px; height: 42px; display: grid; place-items: center; background: #1c2534; border: 1px solid #334054; border-radius: 6px; color: #a3bce1; font-size: 18px;}
.desk-empty h3 {font-size: var(--font-card-title); margin: 0; font-weight: 500; line-height: 1.5;}
.desk-empty p,.desk-note {font-size: 13px; color: var(--desk-muted); margin: 5px 0;}
.desk-panel .opportunity-real {display: block; min-height: 0;}
.desk-panel .opportunity-info {padding: 16px 0 0;}
.desk-panel .recent-row:last-child {border-bottom: 0;}
/* Home composition; shared shell and type tokens live in responsive.css. */
@media (min-width: 801px) {
  .home-page {
    --desk-gutter: clamp(24px, 2vw, 48px);
    padding-top: clamp(28px, 2vw, 40px);
    padding-bottom: 48px;
  }
  .desk-heading {margin-bottom: 24px;}
  .desk-start,.desk-library {gap: clamp(20px, 1.3vw, 32px);}
  .desk-feature {min-height: clamp(280px, 18vw, 400px);}
  .desk-feature-copy {padding: 28px clamp(24px, 2cqi, 44px);}
  .desk-feature h2 {margin: 14px 0;}
  .desk-feature p {margin-bottom: 24px;}
  .desk-cta {min-height: 48px; padding: 10px 20px;}
  .desk-caption {font-size: var(--font-meta); padding: 4px 9px;}
  .desk-tools {padding: clamp(20px, 1.25vw, 32px); padding-bottom: 12px;}
  .desk-tool-list {margin-top: 12px;}
  .desk-tool {min-height: 58px; padding-block: 10px; gap: 14px;}
  .desk-tool-icon {width: 40px; height: 40px;}
  .desk-tool-icon svg {width: 20px; height: 20px;}
  .desk-tool small {margin-top: 5px;}
  .desk-summary {margin: 24px 0 20px; gap: 8px 24px;}
  .desk-summary strong {font-size: var(--font-section-title); margin-right: 6px;}
  .desk-panel {padding: 12px clamp(20px, 1.25vw, 32px) 24px;}
  .desk-panel-head {min-height: 56px;}
  .desk-empty {min-height: 136px; gap: 16px; padding-block: 20px 8px;}
  .desk-empty-mark {width: 44px; height: 48px;}
  .desk-empty p,.desk-note,.desk-panel .opportunity-info p {font-size: var(--font-body);}
  .desk-panel .opportunity-info {padding-top: 24px;}
  .desk-panel .opportunity-info p,.desk-panel .judgement {max-width: 72ch;}
  .desk-panel .recent-row h3 {font-size: var(--font-card-title);}
  .desk-panel .recent-row p {font-size: var(--font-meta);}
}
@media (max-width: 800px) {
  .home-page {padding: 16px var(--desk-gutter) 24px;}
}
/* Measure the available workspace, excluding the responsive desktop rail. */
@container merchant-desk (max-width: 49rem) {
  .desk-start {grid-template-columns: minmax(0,1fr); gap: 12px;}
  .desk-library {grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px;}
  .desk-feature {min-height: 196px;}
  .desk-feature-copy {padding: 16px 24px;}
  .desk-feature p {margin: 6px 0 12px;}
  .desk-tools {padding: 12px 16px 4px;}
  .desk-tool-list {grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 16px; margin-top: 4px;}
  .desk-tool {min-height: 56px;}
  .desk-tool:nth-child(2) {border-top: 0;}
  .desk-panel {padding: 8px 16px 12px;}
}
@container merchant-desk (max-width: 34rem) {
  .desk-heading {margin-bottom: 12px; flex-wrap: wrap; gap: 4px;}
  .desk-heading p {margin-top: 4px;}
  .desk-start,.desk-library {grid-template-columns: minmax(0,1fr); gap: 10px;}
  .desk-feature {min-height: 172px;}
  .desk-poster {width: 59%; object-position: 52% 42%;}
  .desk-feature-copy {max-width: 58%; padding: 14px 12px 14px 16px;}
  .desk-feature h2 {margin: 4px 0; font-size: var(--font-hero); line-height: 1.2;}
  .desk-feature p {font-size: 13px; line-height: 1.45; margin: 4px 0 8px;}
  .desk-caption {bottom: 6px; right: 6px; padding: 2px 5px;}
  .desk-tools {padding-inline: 12px;}
  .desk-tool-list {column-gap: 8px;}
  .desk-tool {grid-template-columns: minmax(0,1fr); gap: 0; min-height: 56px; padding: 6px 0;}
  .desk-tool-icon,.desk-chevron {display: none;}
  .desk-tool strong {font-size: var(--font-card-title); text-wrap: balance;}
  .desk-summary {gap: 4px 12px; margin: 12px 0 8px;}
  .desk-summary > span {padding-right: 8px;}
  .desk-panel-head {min-height: 36px;}
  .desk-empty {min-height: 60px; padding-top: 6px;}
  .desk-empty-mark {width: 32px; height: 36px;}
}
