/* 瑞昕 · shared screen theme. Palette from miniprogram/pages/home/home.wxss.
   Keep report/print styling and functional status colours in their own stylesheets. */
@media screen {
  :root[data-ui] {
    --sg-paper: #faf7f2;
    --sg-surface: #fffdf9;
    --sg-tint: #f0e9df;
    --sg-ink: #2e302a;
    --sg-muted: #746d62;
    --sg-line: #e2d9cc;
    --sg-brand: #c61024;
    --sg-brand-dark: #a3081b;
    --sg-pine: #303b33;
    --sg-gold: #c4a786;
    --paper: var(--sg-paper); --bg: var(--sg-paper);
    --ink: var(--sg-ink); --muted: var(--sg-muted); --line: var(--sg-line);
    --accent: var(--sg-brand); --brand: var(--sg-brand); --brand-dark: var(--sg-brand-dark);
    --soft: var(--sg-tint); --forest: var(--sg-pine); --dark: var(--sg-pine);
    --wine: var(--sg-brand); --gold: var(--sg-gold); --panel: var(--sg-surface);
    --ui-bg: var(--sg-paper); --ui-surface: var(--sg-surface);
    --ui-surface-soft: #f7f2ea; --ui-surface-tint: var(--sg-tint);
    --ui-sidebar: var(--sg-pine); --ui-sidebar-soft: #3e4b40;
    --ui-text: var(--sg-ink); --ui-muted: var(--sg-muted);
    --ui-line: var(--sg-line); --ui-line-strong: #d1c5b5;
    --ui-copper: var(--sg-brand); --ui-copper-dark: var(--sg-brand-dark);
    --ui-copper-soft: #f6ebe0;
    background: var(--sg-paper);
  }
  [data-ui] body {
    color: var(--sg-ink); background: var(--sg-paper);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  [data-ui] ::selection { background: #e9d2bd; color: #2e302a; }
  [data-ui] :is(button,a,input,select,textarea):focus-visible { outline: 2px solid var(--sg-brand); outline-offset: 4px; }
  [data-ui] :is(input,textarea,select) { accent-color: var(--sg-brand); }
  [data-ui] :is(a,button) { transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s; }

  /* Public site — editorial scale, warm surfaces and quiet architectural lines. */
  [data-ui="site"] body > header { height: 92px; padding-inline: 5%; gap: 28px; background: var(--sg-paper); }
  [data-ui="site"] .brand strong { color: var(--sg-brand); font-size: 25px; font-weight: 650; letter-spacing: 3px; }
  [data-ui="site"] .brand strong span { color: var(--sg-ink); font-size: 9px; letter-spacing: 5px; margin-top: 7px; }
  [data-ui="site"] .brand small { color: var(--sg-muted); border-color: var(--sg-line); font-size: 11px; }
  [data-ui="site"] nav { font-size: 14px; gap: 28px; }
  [data-ui="site"] .header-actions { gap: 20px; color: var(--sg-brand); }
  [data-ui="site"] .staff-entry { font-size: 13px; }
  [data-ui="site"] :is(.tool-entry,.nav-cta) { padding: 13px 21px; font-size: 13px; font-weight: 500; border-radius: 3px; border-color: #c6b399; }
  [data-ui="site"] .tool-entry { color: var(--sg-ink); }
  [data-ui="site"] .nav-cta { color: #fffaf2; background: var(--sg-brand); border-color: var(--sg-brand); }
  [data-ui="site"] .nav-cta:hover { background: var(--sg-brand-dark); }
  [data-ui="site"] .tool-entry:hover { background: var(--sg-tint); }
  [data-ui="site"] .hero { height: calc(100svh - 92px); min-height: 620px; max-height: 920px; }
  [data-ui="site"] .hero-image { object-position: 50% 55%; }
  [data-ui="site"] .hero-shade { background: linear-gradient(90deg,rgba(22,27,22,.35),rgba(22,27,22,.08) 48%,transparent 70%),linear-gradient(0deg,rgba(22,27,22,.40),transparent 22%); }
  [data-ui="site"] .hero-copy { padding: clamp(88px,10vh,125px) 8% 120px; }
  [data-ui="site"] .hero .eyebrow { color: #ebd6bd; font-size: 11px; letter-spacing: .26em; margin-bottom: 32px; }
  [data-ui="site"] .hero h1 { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif; font-size: clamp(48px,5.1vw,76px); font-weight: 400; line-height: 1.38; letter-spacing: .045em; margin-bottom: 28px; }
  [data-ui="site"] .hero-description { font-size: 14px; font-weight: 400; line-height: 2.2; color: #f0e9df; letter-spacing: .08em; }
  [data-ui="site"] .button { border-radius: 3px; font-weight: 500; padding: 17px 24px; gap: 48px; }
  [data-ui="site"] .hero .button { margin-top: 28px; background: #faf7f2; color: var(--sg-pine); }
  [data-ui="site"] .hero-bottom { bottom: 28px; left: 8%; right: 8%; padding-top: 20px; border-top: 1px solid #ffffff38; color: #f0e9df; font-size: 10px; letter-spacing: .1em; }
  [data-ui="site"] .hero-bottom small { font-size: 10px; }
  [data-ui="site"] .eyebrow { color: var(--sg-brand); letter-spacing: .2em; }
  [data-ui="site"] .section { padding-top: 90px; }
  [data-ui="site"] h2 { font-size: clamp(30px,3vw,43px); letter-spacing: .01em; font-weight: 450; }
  [data-ui="site"] .section-head { margin-bottom: 32px; }
  [data-ui="site"] .tabs { border-bottom: 1px solid var(--sg-line); gap: 28px; }
  [data-ui="site"] .tabs button { padding: 16px 0; border: 0; border-bottom: 2px solid transparent; font-size: 19px; }
  [data-ui="site"] .tabs button[aria-selected="true"] { color: var(--sg-brand); background: transparent; border-color: var(--sg-brand); }
  [data-ui="site"] .service-panel { background: var(--sg-tint); border-radius: 6px; overflow: hidden; }
  [data-ui="site"] .service-copy h3 { font-size: 34px; font-weight: 450; }
  [data-ui="site"] .inspiration-picture { border-radius: 6px; overflow: hidden; }
  [data-ui="site"] .inspiration-picture span { background: #303b33e8; border: 1px solid #ffffff42; border-radius: 3px; }
  [data-ui="site"] .inspiration-caption .image-credit { font-size: 12px; color: var(--sg-brand); text-align: right; }
  [data-ui="site"] .service-panel figcaption { right: 16px; bottom: 16px; background: #273129bd; padding: 7px 10px; border-radius: 3px; text-shadow: none; }
  [data-ui="site"] .page-intro { background: var(--sg-tint); padding-block: 66px 52px; border-bottom: 1px solid var(--sg-line); }
  [data-ui="site"] .page-intro h1 { font-size: clamp(38px,4vw,58px); font-weight: 450; line-height: 1.35; letter-spacing: .015em; }
  [data-ui="site"] .workspace-card { background: var(--sg-surface); border-color: var(--sg-line); border-radius: 6px; padding: 32px; }
  [data-ui="site"] .workspace-card:hover { border-color: #b68d69; box-shadow: 0 12px 30px #303b3309; }
  [data-ui="site"] .workspace-card h2 { font-size: 24px; margin-top: 30px; }
  [data-ui="site"] .workspace-card small { color: var(--sg-brand); }
  [data-ui="site"] :is(.workspace-identity button,.record-row button) { color: var(--sg-brand); border-color: #cfbba5; border-radius: 3px; }
  [data-ui="site"] .auth-panel form { padding: 32px; background: var(--sg-surface); border: 1px solid var(--sg-line); border-radius: 6px; }
  [data-ui="site"] .contact-section { background: var(--sg-tint); }
  [data-ui="site"] footer { border-top: 1px solid var(--sg-line); background: var(--sg-paper); }
  [data-ui="site"] footer b { color: var(--sg-brand); font-weight: 600; }
  [data-ui="site"] .mini-code img { border-radius: 6px; border: 1px solid var(--sg-line); padding: 5px; }

  /* Customer workspace — a calm project archive with one clear action colour. */
  [data-ui="clients"] .topbar { height: 76px; background: var(--sg-pine); border-bottom: 1px solid #c4a78666; }
  [data-ui="clients"] .topbar i { color: #d2af8a; }
  [data-ui="clients"] .topbar #staffName { color: #e1e4da; }
  [data-ui="clients"] .workspace { padding-top: 56px; }
  [data-ui="clients"] .intro { padding-bottom: 30px; margin-bottom: 30px; border-bottom: 1px solid var(--sg-line); }
  [data-ui="clients"] .intro h1 { font-size: clamp(28px,3.3vw,43px); letter-spacing: .005em; font-weight: 550; line-height: 1.4; margin-bottom: 12px; }
  [data-ui="clients"] .intro p:last-child { font-size: 14px; max-width: 640px; color: var(--sg-muted); line-height: 1.9; }
  [data-ui="clients"] .eyebrow { color: var(--sg-brand); font-size: 10px; letter-spacing: .18em; font-weight: 600; }
  [data-ui="clients"] .primary { background: var(--sg-brand); border-radius: 5px; font-weight: 550; box-shadow: none; font-size: 14px; padding: 14px 22px; }
  [data-ui="clients"] .primary:hover { background: var(--sg-brand-dark); }
  [data-ui="clients"] .quiet { background: var(--sg-surface); border-color: var(--sg-line); border-radius: 5px; font-weight: 500; font-size: 14px; }
  [data-ui="clients"] .browser { border-radius: 8px; border-color: var(--sg-line); background: var(--sg-surface); box-shadow: 0 10px 32px #303b3305; }
  [data-ui="clients"] .customer-column { background: #f3eee6; border-color: var(--sg-line); }
  [data-ui="clients"] .column-heading h2 { font-size: 22px; font-weight: 550; }
  [data-ui="clients"] .search { border-color: var(--sg-line); border-radius: 5px; }
  [data-ui="clients"] .customer-card { border-radius: 5px; border-color: var(--sg-line); background: var(--sg-surface); padding: 20px 18px; }
  [data-ui="clients"] .customer-card strong { font-size: 17px; font-weight: 550; }
  [data-ui="clients"] .customer-card.active { background: var(--sg-pine); border-color: var(--sg-pine); box-shadow: inset 3px 0 0 #cfad87; }
  [data-ui="clients"] .customer-card.active :is(span,em) { color: #e0d3bf; }
  [data-ui="clients"] .detail-heading h2 { font-size: 28px; font-weight: 550; }
  [data-ui="clients"] .plan-card { border-color: var(--sg-line); border-radius: 6px; padding: 26px 24px; }
  [data-ui="clients"] .plan-card:hover { background: #faf7f2; border-color: #c5a88a; }
  [data-ui="clients"] .plan-card h3 { font-size: 19px; font-weight: 550; }
  [data-ui="clients"] .plan-card .tag { color: var(--sg-brand); background: #f2e7da; border-radius: 3px; font-weight: 500; }
  [data-ui="clients"] .plan-card a { color: var(--sg-brand); border-color: #c6a587; border-radius: 4px; font-size: 14px; font-weight: 550; }
  [data-ui="clients"] .plan-card a:hover { background: var(--sg-brand); color: white; }
  [data-ui="clients"] :is(.create-panel,.new-plan-form) { border-color: var(--sg-line); background: var(--sg-surface); border-radius: 6px; }

  /* Design configurator — retain the water/electric/air/network semantic colours. */
  [data-ui="design"] :is(.sidebar,.admin-sidebar) { background: var(--sg-pine); }
  [data-ui="design"] :is(.sidebar,.admin-sidebar) .brand-mark { border-color: #c4a78666; color: #efdfc9; background: #ffffff08; border-radius: 8px; }
  [data-ui="design"] :is(.sidebar,.admin-sidebar) .brand .eyebrow { color: #dbba97; }
  [data-ui="design"] .step.active { background: var(--sg-brand); box-shadow: none; }
  [data-ui="design"] :is(.panel,.compact-panel,.product-picker) { border-color: var(--sg-line); box-shadow: 0 4px 18px #303b3304; }
  [data-ui="design"] .option-card { border-color: var(--sg-line); }
  [data-ui="design"] .option-card.option-card-active { border-color: var(--sg-brand); box-shadow: 0 0 0 1px var(--sg-brand); background: #fcf4ea; }
  [data-ui="design"] .product-stage { background: linear-gradient(145deg,#faf8f4,#eee8de) !important; }

  /* Field inspection / acceptance / smart home share the same brand surfaces. */
  [data-ui="inspection"] .hero { background: var(--sg-tint); border-color: var(--sg-line); border-radius: 8px; padding-block: 36px; }
  [data-ui="inspection"] .hero h1 { font-weight: 550; font-size: clamp(28px,3vw,40px); line-height: 1.3; }
  [data-ui="inspection"] .brand i { background: var(--sg-brand); border-radius: 6px; }
  [data-ui="inspection"] :is(.panel,.field,.flow div) { border-radius: 7px; }
  [data-ui="inspection"] .btn { border-radius: 5px; font-weight: 550; }
  [data-ui="inspection"] .panel { background: var(--sg-surface); }
  [data-ui="acceptance"] .top { background: var(--sg-paper); }
  [data-ui="acceptance"] .hero { background: var(--sg-pine); padding-block: 44px; }
  [data-ui="acceptance"] .hero h1 { font-size: clamp(32px,4vw,48px); font-weight: 500; letter-spacing: .02em; line-height: 1.3; }
  [data-ui="acceptance"] .hero .eyebrow { color: #ddbd97; }
  [data-ui="acceptance"] .hero p { color: #e2e1d7; }
  [data-ui="acceptance"] :is(.card,.btn,.tool-tabs button) { border-radius: 6px; }
  [data-ui="acceptance"] .stage.active { background: var(--sg-tint); box-shadow: inset 2px 0 var(--sg-brand); }
  [data-ui="acceptance"] :is(.quick-standards h3,.criterion strong) { color: var(--sg-brand); }
  [data-ui="smart"] .topbar,
  [data-ui="smart"] body:has(#projectEditorView:not(.hidden)) .topbar { background: var(--sg-pine); border-color: #c4a78655; box-shadow: none; }
  [data-ui="smart"] .topbar #accountMeta { color: #d5d9ce; }
  [data-ui="smart"] .topbar nav button { background: #3e4b40; border-color: #ffffff25; color: #f0e9df; box-shadow: none; }
  [data-ui="smart"] .topbar nav .tab.active,
  [data-ui="smart"] body:has(#projectEditorView:not(.hidden)) .topbar nav .tab.active { background: var(--sg-brand); border-color: var(--sg-brand); color: white; box-shadow: none; }
  [data-ui="smart"] .primary { background: var(--sg-brand); border-color: var(--sg-brand); color: white; box-shadow: none; }
  [data-ui="smart"] .primary:hover { background: var(--sg-brand-dark); border-color: var(--sg-brand-dark); color: white; box-shadow: none; }
  [data-ui="smart"] #projectEditorView { --editor-charcoal: var(--sg-pine); --editor-charcoal-soft: #3e4b40; --editor-copper: var(--sg-brand); --editor-surface: var(--sg-paper); }
  [data-ui="smart"] .login-shell { background: var(--sg-pine); }
  [data-ui="smart"] .hero { background: var(--sg-pine); border-radius: 8px; }
  [data-ui="smart"] .hero h1 { font-weight: 550; }
  [data-ui="smart"] .hero-card { border-radius: 6px; }
  [data-ui="smart"] .tab.active { background: var(--sg-tint); border-color: #cbb79f; }
  [data-ui="smart"] .project-manager { background: var(--sg-paper); }
  [data-ui="smart"] .project-table th { background: var(--sg-tint); color: var(--sg-muted); }
  [data-ui="smart"] .project-table td { border-color: var(--sg-line); color: var(--sg-ink); }
  [data-ui="smart"] .project-table tbody tr:hover { background: #faf7f2; }
  [data-ui="smart"] :is(button,input,textarea,select,.panel) { border-radius: 6px; }
  [data-ui="smart"] label { color: var(--sg-ink); }
  [data-ui="smart"] .project-detail-hero { background: var(--sg-pine); border-radius: 8px; box-shadow: 0 12px 32px #303b3310; }
  [data-ui="smart"] :is(.detail-marker-device,.current-drawing-bar strong,.current-drawing-bar b,.quote-section-bar span,.quote-step strong,.scene-feature-grid b,.control-method-list i,.quote-product-image > div,.quote-fee-summary strong) { color: var(--sg-brand); }
  [data-ui="smart"] :is(.page-number,.device-thumb,.control-method-list i,.quote-product-image > div,.quote-section-bar span) { background: var(--sg-tint); border-color: #cfbba5; }
  [data-ui="smart"] .research-results { border-color: #cfbba5; background: #faf7f2; }
  [data-ui="smart"] .marker-copy { background: var(--sg-brand); box-shadow: 0 4px 12px #c6102430; }
  [data-ui="smart"] .quote-fee-summary .grand-total { border-color: var(--sg-brand); background: #f6ebe0; }
  [data-ui="smart"] .quote-fee-note { border-left-color: var(--sg-brand); background: var(--sg-tint); }
  [data-ui="smart"] #projectEditorView .project-toolbar button.primary { background: var(--sg-brand); border-color: var(--sg-brand); box-shadow: none; }
  [data-ui="smart"] #projectEditorView .project-toolbar button.primary:hover { background: var(--sg-brand-dark); border-color: var(--sg-brand-dark); box-shadow: none; }
}
@media screen and (max-width:1150px) {
  [data-ui="site"] body > header { gap: 16px; padding-inline: 3%; }
  [data-ui="site"] nav { gap: 18px; font-size: 13px; }
  [data-ui="site"] .header-actions { gap: 14px; }
  [data-ui="site"] :is(.nav-cta,.tool-entry) { padding: 12px 15px; }
}
@media screen and (max-width:800px) {
  [data-ui="site"] body > header { height: 78px; padding-inline: 18px; gap: 12px; }
  [data-ui="site"] .brand strong { font-size: 18px; letter-spacing: 1px; }
  [data-ui="site"] .brand strong span { font-size: 7px; letter-spacing: 3px; }
  [data-ui="site"] .header-actions { gap: 8px; }
  [data-ui="site"] :is(.nav-cta,.tool-entry) { padding: 10px 12px; font-size: 11px; }
  [data-ui="site"] nav { gap: 0; }
  [data-ui="site"] .hero { height: 690px; min-height: 0; }
  [data-ui="site"] .hero-copy { padding: 80px 26px 110px; }
  [data-ui="site"] .hero-image { object-position: 64% center; }
  [data-ui="site"] .hero-shade { background: linear-gradient(180deg,rgba(22,27,22,.48),rgba(22,27,22,.18) 54%,rgba(22,27,22,.45)); }
  [data-ui="site"] .inspiration-caption .image-credit { text-align: left; margin-top: 20px; }
  [data-ui="site"] .hero h1 { font-size: clamp(40px,10.8vw,56px); line-height: 1.48; letter-spacing: .015em; }
  [data-ui="site"] .hero .eyebrow { font-size: 9px; letter-spacing: .18em; margin-bottom: 25px; }
  [data-ui="site"] .hero-description { font-size: 12px; }
  [data-ui="site"] .hero-bottom { left: 26px; right: 26px; gap: 12px; font-size: 9px; }
  [data-ui="site"] .hero-bottom small { font-size: 9px; line-height: 1.7; }
  [data-ui="site"] .section { padding-top: 60px; }
  [data-ui="site"] .tabs { gap: 20px; }
  [data-ui="site"] .tabs button { font-size: 17px; }
  [data-ui="site"] .service-copy h3 { font-size: 30px; }
  [data-ui="site"] .page-intro { padding-block: 44px 36px; }
  [data-ui="site"] .auth-panel form { padding: 24px; }
  [data-ui="clients"] .workspace { padding-top: 32px; }
  [data-ui="clients"] .intro { padding-bottom: 24px; gap: 22px; }
  [data-ui="clients"] .intro h1 { font-size: 28px; }
  [data-ui="clients"] .intro > .primary { width: 100%; }
  [data-ui="clients"] .plan-card { padding: 22px 18px; }
}
@media screen and (prefers-reduced-motion:reduce) {
  [data-ui] :is(a,button) { transition: none; }
}

.brand>img{object-fit:contain;width:36px;height:36px}.brand{display:inline-flex;align-items:center;gap:8px}.button,.nav-cta,.tool-entry{--accent:#cf1024}@media(max-width:760px){#navigation.open{display:flex;flex-direction:column;position:absolute;top:100%;left:0;right:0;background:white;padding:20px}}