/* Lenmory C1: a workspace built around paper, ink and the screen's six colours. */
:root {
  --navy: #1b2922;
  --ink: #1b2922;
  --muted: #65736a;
  --line: #d8d4c7;
  --paper: #f5f2e9;
  --teal: #286f55;
  --teal-dark: #1e5943;
  --teal-soft: #e3eee3;
  --amber: #815920;
  --amber-soft: #f5e9c9;
  --red: #a84840;
  --red-soft: #f8e8e1;
}
html { scroll-behavior: auto; scroll-padding-top: 96px; }
body { background: #f5f2e9; background-image: linear-gradient(#ffffff35 1px, transparent 1px); background-size: 100% 42px; color: var(--ink); font-size: 14px; }
:focus-visible { outline-color: #d59541; }
.app-shell { display: block; min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 30; width: 100%; height: 76px; min-height: 0; flex: none; padding: 0 max(28px,calc((100vw - 1360px)/2 + 36px)); flex-direction: row; align-items: center; background: #1b2922; border-bottom: 4px solid transparent; border-image: linear-gradient(90deg,#ece7d9 0 16.6%,#242c26 16.6% 33.2%,#c94f45 33.2% 49.8%,#e4b94d 49.8% 66.4%,#466ca0 66.4% 83%,#36795d 83%) 1; }
.brand { padding: 0; gap: 11px; flex: 0 0 auto; }
.brand-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 3px; background: #faf5e8; color: #19281f; box-shadow: 3px 3px 0 #d9b46c; }
.brand strong { font-size: 18px; }
.brand small { color: #c9d4c4; font-size: 10px; letter-spacing: .08em; }
.side-nav { display: flex; align-items: center; gap: 1px; margin: 0 0 0 48px; }
.nav-link { border-radius: 0; color: #c5d1c7; font-size: 13px; padding: 15px 13px; }
.nav-link:hover { background: #ffffff13; color: #fff; }
.nav-link.active { background: #f7f1df; color: #19281f; box-shadow: inset 0 -4px 0 #e3b653; }
.topbar-caption { display: none; }
.main-content { width: min(100%,1360px); min-width: 0; margin: 0 auto; padding: 43px 36px 90px; }
.workspace-active .main-content { padding-top: 43px; }
.page-header { align-items: center; margin-bottom: 31px; padding: 0 0 26px; border-bottom: 1px solid #ccc9bd; }
.eyebrow { margin-bottom: 10px; color: #277357; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
h1 { margin-bottom: 9px; font-size: clamp(32px,3.8vw,50px); line-height: 1.08; letter-spacing: -.055em; }
h2 { font-size: 25px; letter-spacing: -.045em; }
.page-subtitle { color: #5c6b60; font-size: 14px; }
.header-actions { gap: 8px; justify-content: flex-end; }
#accountName { color: #607267; font-size: 11px; margin-right: 5px; }
.connection-badge { border-radius: 3px; border: 1px solid #b9d7c2; padding: 7px 10px; }
.connection-badge.warning { border-color: #e7c995; }
.button { border-radius: 4px; min-height: 39px; padding: 8px 13px; font-size: 12px; }
.button-primary { background: #286f55; }
.button-primary:hover:not(:disabled) { background: #1e5943; }
.button-quiet { border-color: #cfcfc2; color: #294e3b; background: #fffdf6; }
.button-quiet:hover:not(:disabled) { background: #f1f5eb; border-color: #90ad95; }
.button-danger { background: #fffdf6; }
.section-block { margin-bottom: 25px; scroll-margin-top: 100px; }
.section-heading { margin-bottom: 20px; }
.section-meta { color: #758076; font-size: 11px; }
.section-description { color: #5e6c60; font-size: 13px; line-height: 1.65; }
.app-view { animation: page-enter .2s ease-out; }
@keyframes page-enter { from { opacity: .6; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Home: device on the left, trustworthy last-known state on the right. */
#home { display: grid; grid-template-columns: minmax(0,1.03fr) minmax(0,.97fr); gap: 24px; align-items: stretch; }
#home:not(.has-gateway) .gateway-panel { grid-column: 1/-1; min-height: 330px; }
.gateway-panel { position: relative; min-width: 0; min-height: 500px; margin: 0; padding: 32px; background: #e9cb89; color: #1d2a21; border: 2px solid #1b2922; border-radius: 5px; box-shadow: 7px 7px 0 #20352a; overflow: hidden; }
.gateway-panel::before { content: ""; position: absolute; width: 260px; height: 260px; right: -110px; top: -120px; border: 1px solid #1b29222c; border-radius: 50%; box-shadow: 0 0 0 34px #ffffff16,0 0 0 67px #1b29220c; }
.gateway-panel .section-heading { position: relative; z-index: 2; align-items: flex-start; }
.gateway-panel .eyebrow { color: #665029; }
.gateway-panel h2 { color: #1a2a20; font-size: 30px; }
.gateway-intro { max-width: 360px; margin: 9px 0 0; color: #555138; font-size: 13px; line-height: 1.55; }
.gateway-panel .button-primary { background: #1d3025; border: 1px solid #1d3025; color: #fffaf0; }
.gateway-panel .button-primary:hover { background: #345441; }
.gateway-picker { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 9px; max-width: 590px; }
.gateway-picker label { grid-column: 1/-1; color: #4d5138; font-size: 11px; }
.gateway-picker select { min-width: 0; width: 100%; min-height: 47px; padding: 10px 13px; border: 2px solid #1c3024; border-radius: 3px; background: #fffdf3; color: #182a1f; font-weight: 700; }
.gateway-picker .button { min-height: 47px; background: #ffffff7d; border: 1px solid #1c30245c; color: #243b2c; }
.gateway-picker .button-danger { color: #8f3931; }
.gateway-picker .button:hover { background: #fffdf0; }
.claim-help,.gateway-details { position: relative; z-index: 2; max-width: 265px; margin-top: 17px; color: #394934; font-size: 11px; }
.claim-help summary,.gateway-details summary { cursor: pointer; width: max-content; max-width: 100%; font-weight: 700; }
.claim-help p,.gateway-details p { margin: 8px 0 0; line-height: 1.55; overflow-wrap: anywhere; }
.gateway-details { margin-top: 9px; }
.gateway-panel .section-meta { color: #4e5a42; }
.binding-code { position: relative; z-index: 2; max-width: 375px; border: 1px solid #1b2922; border-radius: 3px; background: #fff9e7; }
.binding-code span,.binding-code small { color: #4d654f; }
.gateway-art { position: absolute; z-index: 1; width: 190px; height: auto; right: 19px; bottom: -24px; transform: rotate(8deg); filter: drop-shadow(7px 9px 0 #1b292238); pointer-events: none; }
.gateway-art-caption { position: absolute; z-index: 2; right: 35px; bottom: 205px; padding: 3px 6px; border: 1px solid #8b8060; background: #fff5db; color: #5d5b41; font-size: 10px; transform: rotate(8deg); }
#overview { min-width: 0; margin: 0; padding: 30px; border: 2px solid #1d3025; border-radius: 5px; background: #fffdf5; box-shadow: 7px 7px 0 #d7d2c4; }
#overview .section-heading { align-items: flex-start; }
#overview h2 { font-size: 30px; }
#overview .section-meta { white-space: nowrap; }
.metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 22px; }
.metric-card { min-width: 0; min-height: 153px; padding: 16px 0; border: 0; border-top: 1px solid #d7d7c9; border-radius: 0; background: transparent; box-shadow: none; }
.metric-label { color: #556958; font-size: 12px; font-weight: 800; }
.metric-card strong { margin-top: 16px; color: #1e3528; font-size: clamp(22px,2vw,29px); line-height: 1.15; }
.metric-card small { color: #748074; font-size: 10px; line-height: 1.45; }
.metric-card:nth-child(1) strong { color: #a34c3c; }
.metric-card:nth-child(3) strong { color: #315e91; }
.raw-state { margin-top: 8px; border: 0; border-top: 1px solid #d7d7c9; border-radius: 0; background: transparent; }
.raw-state summary { padding: 13px 0 5px; color: #315f48; }
.raw-state pre { padding: 9px 0; }
.data-hint { margin: 9px 0 0; color: #7e8576; line-height: 1.55; }
.feature-section { grid-column: 1/-1; margin: 21px 0 0; padding-top: 27px; border-top: 2px solid #1d3025; }
.feature-section h2 { font-size: 31px; }
.feature-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.feature-card { position: relative; display: flex; align-items: stretch; min-width: 0; min-height: 226px; padding: 29px 25px 24px 30px; border: 2px solid #1c2b21; border-radius: 5px; background: #dce9da; color: #17291e; text-decoration: none; box-shadow: 5px 5px 0 #26392d; transition: transform .16s,box-shadow .16s; }
.feature-card:nth-child(2) { background: #f2dfbe; }
.feature-card:nth-child(3) { background: #dce8e8; }
.feature-card:nth-child(4) { background: #ebe5d5; }
.feature-card:hover { transform: translate(-3px,-3px); box-shadow: 8px 8px 0 #26392d; }
.feature-card::before { content: attr(data-number); position: absolute; top: 17px; left: 29px; color: #345542; font: 700 11px ui-monospace,SFMono-Regular,monospace; }
.feature-copy { display: flex; flex-direction: column; align-items: flex-start; flex: 1 1 58%; min-width: 0; position: relative; z-index: 1; }
.feature-copy strong { margin-top: 27px; font-size: 24px; letter-spacing: -.045em; }
.feature-copy small { max-width: 250px; margin-top: 10px; color: #425647; font-size: 12px; line-height: 1.55; }
.feature-copy em { width: min(100%,215px); display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 16px; border-top: 1px solid #7387757a; color: #1d3d2a; font-size: 12px; font-weight: 800; font-style: normal; }
.feature-copy em span { font-size: 20px; }
.feature-art { flex: 0 0 42%; display: grid; place-items: center; align-self: center; }
.feature-art svg { display: block; width: min(100%,200px); height: auto; filter: drop-shadow(4px 5px 0 #1b29221e); }

/* A compact control centre stays available throughout the workspace. */
.task-center { position: fixed; z-index: 40; top: 10px; right: max(24px,calc((100vw - 1360px)/2 + 36px)); width: 268px; overflow: hidden; border: 1px solid #b8c2b4; border-radius: 4px; background: #fffdf4; box-shadow: 5px 5px 0 #101d17a8; }
.task-center.expanded { width: min(420px,calc(100vw - 24px)); }
.task-center-toggle { display: flex; gap: 9px; align-items: center; width: 100%; min-height: 51px; padding: 8px 10px; border: 0; color: #1d3024; background: #fffdf4; text-align: left; }
.task-center-toggle:hover { background: #f0f2e7; }
.task-center-icon { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 2px; background: #1d4935; color: #fff; }
.task-center-icon svg { width: 19px; height: 19px; }
.task-center-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.task-center-copy strong { font-size: 12px; }
.task-center-copy small { color: #64766a; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-center-count { min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 4px; border-radius: 50%; background: #c35347; color: white; font-size: 10px; font-weight: 800; }
.task-center-chevron { color: #557262; font-size: 17px; transition: transform .15s; }
.task-center-toggle[aria-expanded="true"] .task-center-chevron { transform: rotate(180deg); }
.task-center-panel { max-height: min(76vh,680px); padding: 18px; overflow: auto; border-top: 3px solid #286f55; background: #fffdf4; }
.task-center-heading { display: flex; justify-content: space-between; align-items: center; }
.task-center-heading h2 { font-size: 19px; }
.task-filters { display: flex; gap: 4px; margin: 16px 0 12px; padding: 3px; background: #eeeede; border-radius: 3px; }
.task-filter { flex: 1; min-height: 30px; border: 0; border-radius: 2px; background: transparent; color: #65766a; font-size: 11px; font-weight: 700; }
.task-filter.active { background: #fffdf4; color: #244d38; box-shadow: 0 1px 3px #1b29221c; }
.task-list { display: grid; gap: 7px; }
.task-item { padding: 12px; border: 1px solid #d9dfd3; border-radius: 3px; background: #fff; }
.task-item.failed { border-color: #e4bdb4; background: #fff7f2; }
.task-item-top,.task-item-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.task-kind { font-size: 12px; color: #263d2d; }
.task-detail { margin: 7px 0 9px; color: #617064; font-size: 11px; line-height: 1.5; }
.task-item-foot { color: #8b968b; font-size: 10px; }
.task-item-foot .button { min-height: 25px; padding: 3px 5px; font-size: 10px; }
.task-empty { padding: 28px 10px; color: #7d897f; font-size: 12px; text-align: center; }
.task-center-help { margin: 12px 0 0; color: #829084; font-size: 10px; line-height: 1.5; }

/* Functional pages keep the same editorial rhythm. */
.view-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 20px; }
.back-link { color: #285f45; font-size: 12px; font-weight: 800; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.target-chip { padding: 8px 11px; border: 1px solid #9fb7a4; border-radius: 3px; background: #e7efe0; color: #31533b; font-size: 11px; font-weight: 700; }
.card-panel { padding: 29px; border: 1px solid #d6d3c8; border-radius: 5px; background: #fffdf6; box-shadow: 4px 4px 0 #e2ddce; }
.gateway-panel.card-panel { padding: 32px; border: 2px solid #1b2922; background: #f0dcaa; box-shadow: 7px 7px 0 #20352a; }
.two-column { grid-template-columns: minmax(0,1.5fr) minmax(260px,.72fr); gap: 20px; }
.upload-area { min-height: 280px; border: 2px dashed #607a63; border-radius: 4px; background: #f2f5ec; background-image: radial-gradient(#a9bca636 1px,transparent 1px); background-size: 14px 14px; }
.upload-area:hover { background-color: #e8f1e4; }
.upload-symbol { width: 45px; height: 45px; border-radius: 3px; background: #286f55; color: #fff; line-height: 43px; }
.upload-prompt strong { font-size: 15px; }
.help-panel { background: #f1e7cf; border-color: #ded1af; }
.workflow-list li { border-bottom-color: #d9c9a5; }
.workflow-list li > span { color: #865f29; }
.help-panel .inline-note { background: #fff7e4; color: #72562e; }
.display-intro h2 { margin-bottom: 8px; font-size: 33px; }
.display-intro .section-description { margin: 0; }
.plan-overview { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 22px 25px; border: 2px solid #1d3025; border-left: 8px solid #d8a947; border-radius: 4px; background: #23382c; color: #fffaf0; }
.plan-overview .eyebrow { color: #e5c47a; }
.plan-overview h3 { margin: 0 0 7px; color: #c1d6c1; font-size: 12px; }
.plan-overview p { margin: 0 0 6px; font-size: 25px; font-weight: 800; }
.plan-overview small { color: #c9d8c8; line-height: 1.5; }
.plan-badge { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #bccbb9; border-radius: 3px; color: #e5edda; font-size: 11px; font-weight: 800; }
.plan-badge.running { background: #e8bf60; border-color: #e8bf60; color: #243b2b; }
.plan-side { flex: 0 0 auto; display: grid; justify-items: end; align-content: space-between; gap: 24px; }
.plan-choice { display: flex; align-items: center; gap: 8px; }
.plan-choice span { padding: 9px 12px; border: 1px solid #718575; border-radius: 3px; color: #b4cbb7; font-size: 11px; font-weight: 800; }
.plan-choice b { color: #d9b561; font-size: 11px; }
.plan-overview[data-mode="almanac"] [data-plan="almanac"],.plan-overview[data-mode="editor"] [data-plan="editor"] { border-color: #e8bf60; background: #e8bf60; color: #223b29; }
.display-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0 0 18px; }
.display-tab { display: grid; gap: 5px; padding: 15px 17px; border: 1px solid #aab9a9; border-radius: 3px; background: #fffdf6; color: #344d38; font-size: 13px; font-weight: 800; text-align: left; }
.display-tab span { color: #728271; font-size: 10px; font-weight: 500; }
.display-tab.active { border-color: #1d3025; background: #e9c77a; color: #1d3025; box-shadow: inset 0 -3px 0 #1d3025; }
.display-tab.active span { color: #57583d; }
.plan-notice { padding: 12px 14px; border: 1px solid #ddba73; border-radius: 3px; background: #fff0c8; color: #6d542b; font-size: 12px; line-height: 1.55; }
.screen-topbar { display: grid; gap: 0; align-items: stretch; margin: 22px 0 18px; padding: 0 20px; border: 1px solid #d3decf; border-radius: 4px; background: #edf2e7; }
.screen-template-main { display: grid; grid-template-columns: minmax(175px,.75fr) minmax(175px,1fr); gap: 15px; padding: 20px 0; }
.screen-topbar label { min-width: 0; color: #45604b; }
.screen-topbar input,.screen-topbar select { width: 100%; min-height: 41px; background: #fffdf6; }
.screen-topbar #screenName { width: 100%; }
.screen-template-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px 0; border-top: 1px solid #d2ddcc; }
.screen-template-quick strong { margin-right: 8px; color: #486951; font-size: 12px; }
.screen-template-quick .button { min-height: 34px; padding: 7px 12px; }
.screen-template-manage { padding: 12px 0; border-top: 1px solid #d2ddcc; }
.screen-template-manage summary { color: #53735c; font-size: 12px; font-weight: 700; cursor: pointer; }
.screen-template-manage > div { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; margin-top: 13px; }
.screen-template-manage label { min-width: 190px; }
.screen-toolbox,.screen-inspector { padding: 15px; border-color: #d5ddcf; border-radius: 4px; background: #f1f4eb; }
.screen-toolbox h3,.screen-inspector h3 { color: #315842; font-size: 12px; }
.screen-toolbox .button { min-height: 35px; border-color: #d6e0d2; background: #fffdf6; }
.screen-stage { padding: 18px; border: 1px solid #d4ded2; border-radius: 4px; background: #e8eee9; background-image: radial-gradient(#b8cabd 1px,transparent 1px); background-size: 14px 14px; }
.screen-canvas { border-color: #aebcad; box-shadow: 0 16px 27px #1b29222b; }
.screen-actions { padding: 16px 18px; border: 1px solid #d5e1d0; border-radius: 4px; background: #edf2e7; }
.screen-schedule-panel { margin-top: 26px; padding-top: 24px; }
.slots-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 19px; }
.slot-card { display: grid; grid-template-columns: minmax(120px,40%) minmax(0,1fr); grid-template-rows: auto 1fr auto; gap: 12px 16px; min-width: 0; min-height: 265px; padding: 18px; border: 1px solid #cbd6c9; border-radius: 4px; background: #f5f6ed; }
.slot-top { grid-column: 1/-1; padding-bottom: 9px; border-bottom: 1px solid #d5ded2; }
.slot-number { color: #285f46; font-size: 12px; }
.slot-position { color: #6a786b; }
.slot-photo { grid-column: 1; grid-row: 2/4; align-self: stretch; width: 100%; height: 191px; margin: 0; padding: 5px; border: 3px solid #fffdf6; border-radius: 2px; background: #e2e8de; box-shadow: 3px 4px 0 #d2d7ca; }
.slot-photo.empty { align-content: center; gap: 4px; border: 2px dashed #a3b7a3; background: #edf1e8; box-shadow: none; }
.slot-photo.empty::before { content: "+"; color: #779079; font-size: 34px; font-weight: 300; line-height: 1; }
.slot-photo img { object-fit: contain; }
.slot-image-id,.slot-photo + .slot-image-id { grid-column: 2; grid-row: 2; align-self: start; margin: 9px 0 0; color: #3d4f41; }
.slot-actions { grid-column: 2; grid-row: 3; align-self: end; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin: 0; padding: 0; }
.slot-actions .button { min-height: 38px; }
.empty-state { border: 1px dashed #a4b9a7; border-radius: 3px; background: #f2f5ed; color: #6f806f; }
.settings-form { display: block; }
.settings-form[hidden],.setting-option[hidden] { display: none; }
.setting-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.settings-form .setting-option { display: grid; grid-template-columns: 1fr; align-content: start; gap: 9px; min-width: 0; min-height: 199px; padding: 19px; border: 1px solid #d8decf; border-radius: 4px; background: #f4f5ec; color: #294838; }
.settings-form .setting-option[hidden] { display: none; }
.setting-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 3px; background: #e0ecdf; color: #327355; font-size: 22px; }
.setting-icon.light-icon { background: #f5e6c3; color: #9a6a2a; }
.setting-option strong { font-size: 17px; }
.setting-option small { color: #697c6c; font-size: 12px; line-height: 1.5; }
.setting-option select { width: 100%; max-width: 310px; margin-top: 7px; }
.settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 19px; }
.settings-footer p { margin: 0; color: #708075; font-size: 12px; line-height: 1.5; }
.status-pill { border-radius: 3px; }
.login-panel { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr); gap: 0; min-height: 450px; overflow: hidden; padding: 0; border: 2px solid #1d3025; border-radius: 5px; background: #fffdf6; box-shadow: 7px 7px 0 #d8d2c4; }
.login-intro { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 450px; padding: 32px 39px 0; overflow: hidden; background: #223b2c; color: #fff9e9; }
.login-intro::after { position: absolute; right: -60px; bottom: -93px; width: 270px; height: 270px; border: 1px solid #c4d8b543; border-radius: 50%; content: ""; }
.login-icon { flex: 0 0 auto; width: 51px; height: 51px; border-radius: 3px; background: #e5cb8c; color: #1d3025; font-size: 18px; font-weight: 800; }
.login-copy { position: relative; z-index: 1; max-width: 450px; margin-top: 23px; }
.login-copy .eyebrow { color: #e8c676; }
.login-copy h2 { margin-bottom: 9px; color: #fff9e9; font-size: clamp(26px,3vw,38px); }
.login-copy p:last-child { color: #d0ddcb; font-size: 13px; line-height: 1.7; }
.login-art { z-index: 1; width: min(330px,82%); height: auto; margin: auto 7% -8px auto; filter: drop-shadow(10px 13px 0 #101e16a8); }
.login-form { grid-column: 2; align-content: center; padding: 39px; }
.login-form input { min-height: 45px; border-radius: 3px; background: #fff; }
.login-form .button { min-height: 43px; border-radius: 3px; }
.rename-dialog,.crop-dialog,.image-preview-dialog { border: 2px solid #1d3025; border-radius: 5px; background: #fffdf6; }
.toast { z-index: 60; border-radius: 4px; }

@media (max-width: 1180px) {
  .side-nav { margin-left: 24px; }
  .nav-link { padding: 14px 9px; }
  #home { grid-template-columns: 1fr; }
  .gateway-panel { min-height: 340px; }
  .feature-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .screen-editor { grid-template-columns: 125px minmax(230px,1fr); }
  .screen-inspector { grid-column: 1/-1; grid-template-columns: minmax(0,1fr) minmax(0,2fr); }
}
@media (max-width: 900px) {
  .sidebar { width: 100%; height: auto; min-height: 106px; flex-basis: auto; padding: 11px 20px; flex-wrap: wrap; }
  .brand { width: 100%; }
  .brand strong,.brand small { display: block; }
  .side-nav { display: flex; width: 100%; gap: 2px; margin: 8px 0 0; overflow-x: auto; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 7px 10px; white-space: nowrap; font-size: 11px; }
  .task-center { top: 116px; right: 20px; }
  .main-content,.workspace-active .main-content { padding: 91px 24px 65px; }
  .two-column { grid-template-columns: 1fr; }
  .slots-grid { grid-template-columns: 1fr; }
  .gateway-art { width: 155px; opacity: .24; }
  .gateway-art-caption { display: none; }
  .login-form { grid-column: 2; }
}
@media (max-width: 650px) {
  .sidebar { position: sticky; width: 100%; min-height: 104px; padding: 11px 15px; }
  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
  .side-nav { width: 100%; margin-top: 8px; }
  .nav-link { padding: 8px 8px; }
  .main-content,.workspace-active .main-content { padding: 75px 16px 54px; }
  .page-header { display: block; padding-bottom: 21px; margin-bottom: 23px; }
  .header-actions { justify-content: flex-start; margin-top: 16px; }
  h1 { font-size: 34px; }
  #home { gap: 16px; }
  .gateway-panel { min-height: 450px; padding: 22px; }
  .gateway-panel .section-heading { align-items: flex-start; gap: 8px; }
  .gateway-panel h2 { font-size: 24px; }
  .gateway-picker { grid-template-columns: 1fr 1fr; }
  .gateway-picker select { grid-column: 1/-1; }
  .gateway-art { width: 132px; right: 12px; bottom: -8px; }
  .gateway-art { opacity: 1; }
  .gateway-art-caption { display: block; right: 15px; bottom: 145px; font-size: 9px; }
  .claim-help,.gateway-details { max-width: 175px; }
  #overview { padding: 21px; }
  #overview .section-heading { flex-direction: column; align-items: flex-start; gap: 5px; }
  .metric-grid { gap: 0 12px; }
  .metric-card { min-height: 130px; }
  .metric-card strong { font-size: 20px; }
  .feature-grid { grid-template-columns: 1fr; gap: 15px; }
  .feature-card { min-height: 194px; padding: 24px 17px 18px 20px; }
  .feature-card::before { left: 20px; top: 13px; }
  .feature-copy strong { margin-top: 21px; font-size: 22px; }
  .feature-copy small { font-size: 11px; }
  .feature-art { flex-basis: 40%; }
  .task-center { top: 116px; right: 12px; width: 52px; }
  .task-center:not(.expanded) .task-center-toggle { width: 52px; min-height: 50px; justify-content: center; padding: 7px; }
  .task-center:not(.expanded) .task-center-copy,.task-center:not(.expanded) .task-center-chevron { display: none; }
  .task-center:not(.expanded) .task-center-count { position: absolute; top: 1px; right: 1px; min-width: 17px; height: 17px; font-size: 9px; }
  .task-center.expanded { width: calc(100vw - 24px); }
  .task-center-panel { max-height: 66vh; }
  .view-heading { align-items: flex-start; flex-direction: column; }
  .card-panel { padding: 21px; }
  .gateway-panel.card-panel { padding: 22px; }
  .display-intro h2 { font-size: 26px; }
  .plan-overview { padding: 17px; }
  .plan-overview { flex-direction: column; }
  .plan-side { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .plan-choice { gap: 4px; }
  .plan-choice span { padding: 6px 7px; font-size: 10px; }
  .plan-overview p { font-size: 20px; }
  .display-tab { padding: 11px; }
  .screen-topbar { padding: 0 14px; }
  .screen-template-main { grid-template-columns: 1fr; }
  .screen-template-quick strong { width: 100%; }
  .screen-editor { grid-template-columns: 1fr; }
  .screen-toolbox { display: flex; flex-wrap: wrap; }
  .screen-toolbox h3 { width: 100%; }
  .screen-inspector { grid-column: auto; grid-template-columns: minmax(0,1fr); }
  .slot-card { grid-template-columns: minmax(110px,42%) minmax(0,1fr); gap: 9px; padding: 12px; }
  .slot-photo { height: 173px; }
  #slots .section-heading { flex-direction: column; align-items: flex-start; }
  #slots .section-actions { justify-content: flex-start; }
  .setting-grid { grid-template-columns: 1fr; }
  #settings .section-heading { flex-direction: column; align-items: flex-start; }
  .settings-footer { align-items: stretch; flex-direction: column; }
  .settings-form .setting-option { min-height: 0; }
  .login-panel { grid-template-columns: 1fr; min-height: 0; padding: 0; }
  .login-intro { min-height: 345px; padding: 24px 24px 0; }
  .login-copy { margin-top: 12px; }
  .login-copy h2 { font-size: 26px; }
  .login-art { width: 170px; margin-right: 0; }
  .login-form { grid-column: 1; padding: 25px 23px 27px; }
}
@media (prefers-reduced-motion: reduce) { .app-view { animation: none; } }
