/* Shared visual language: local assets, accessible controls, mobile first. */
:root { color-scheme: light; --ink: #173c34; --muted: #5e716b; --accent: #146c56; --line: #dce5dc; --paper: #f5f6ef; --white: #fff; --gold: #f0d477; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: var(--accent); text-underline-offset: .22em; }
a, button, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #a55706; outline-offset: 4px; }
svg.icon { width: 24px; height: 24px; flex: 0 0 auto; vertical-align: middle; }
.skip { position: absolute; left: 1rem; top: -5rem; padding: .8rem; background: white; z-index: 5; }
.skip:focus { top: .5rem; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 96px; padding: 1.25rem max(1.5rem, calc((100% - 1160px) / 2)); background: var(--white); border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: .7rem; align-items: center; font-size: 1.28rem; font-weight: 750; color: var(--ink); text-decoration: none; letter-spacing: -.025em; }
.brand-caption { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--ink); color: var(--gold); }
.mark svg.icon { width: 30px; height: 30px; }
.header-nav { display: flex; align-items: center; gap: 1rem; }
.header-nav a { text-decoration: none; font-weight: 650; padding: .75rem .4rem; }
.header-nav form { margin: 0; }
.header-note { color: var(--muted); font-size: .85rem; }
main { max-width: 1160px; margin: auto; padding: 2.5rem 1.5rem 4rem; min-height: calc(100dvh - 180px); }
h1 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.09; letter-spacing: -.045em; margin: .75rem 0 1.2rem; overflow-wrap: anywhere; }
h2 { font-size: 1.45rem; line-height: 1.25; letter-spacing: -.025em; margin: 0 0 1rem; }
h3 { font-size: 1.13rem; line-height: 1.35; margin: .65rem 0; }
h2, h3, dd, summary { overflow-wrap: anywhere; }
p { margin: 0 0 1rem; }
em { font-style: normal; color: var(--accent); }
.eyebrow, .step-kicker { display: block; font-size: .72rem; font-weight: 750; letter-spacing: .095em; text-transform: uppercase; color: var(--muted); }
.intro { color: var(--muted); font-size: 1.06rem; max-width: 620px; margin-bottom: 2rem; }
.muted, .help, .hint { color: var(--muted); }
.help { font-size: .85rem; margin: .5rem 0; }
.hint { font-size: .86rem; margin-top: 1.5rem; }
.panel, .card { border: 1px solid var(--line); border-radius: 24px; background: var(--white); padding: 1.65rem; }
.panel > p:last-child { margin-bottom: 0; }
.card { display: block; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cards, .project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.tile-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: #eef3e9; color: var(--accent); }
.company-card > .tile-icon { margin-bottom: 1rem; }
.form-panel > .tile-icon { margin-bottom: 1.25rem; }
.form-actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.cancel-link { padding: .75rem 0; }
.card-label { color: var(--muted); font-size: .75rem; }
.link-label { font-weight: 650; }
button, .button { display: inline-flex; gap: .6rem; align-items: center; justify-content: center; min-height: 50px; padding: .8rem 1.25rem; border: 1px solid var(--accent); border-radius: 14px; background: var(--accent); color: white; font: inherit; font-weight: 650; text-decoration: none; text-align: center; cursor: pointer; }
button:hover, .button:hover { background: #105741; }
.secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.secondary:hover { background: #eef3e9; }
.quiet { background: transparent; color: var(--muted); border-color: transparent; padding: .65rem .5rem; }
.quiet:hover { background: #eef3e9; }
.wide { width: 100%; }
.back { display: inline-flex; align-items: center; min-height: 48px; text-decoration: none; font-size: .9rem; }
.small-link { font-size: .83rem; padding: .75rem 0; }
.subtle-link { display: inline-block; font-size: .9rem; font-weight: 600; padding: .75rem 0; min-height: 48px; }
.workspace-line, .section-heading, .project-heading, .card-top, .card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.workspace-line { margin-bottom: 1.25rem; flex-wrap: wrap; }
.workspace-name { font-size: .85rem; font-weight: 650; overflow-wrap: anywhere; }
.status-dot { display: inline-block; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; margin-right: .5rem; }
.dashboard-hero { position: relative; display: flex; justify-content: space-between; align-items: center; overflow: hidden; padding: 2.75rem 3rem; background: #123e35; color: white; border-radius: 28px; }
.dashboard-hero h1 { font-size: clamp(2.3rem, 4vw, 3.5rem); }
.dashboard-hero p { color: #d2e1d7; }
.dashboard-hero .eyebrow { color: var(--gold); }
.hero-button { color: var(--ink); background: var(--gold); border-color: var(--gold); margin-top: .5rem; }
.hero-button:hover { background: #f7df93; }
.hero-art { position: relative; width: 290px; height: 220px; flex-shrink: 0; }
.orbit { position: absolute; inset: 0; border: 1px solid #437266; border-radius: 50%; transform: rotate(-25deg); }
.orbit::before { content: ""; position: absolute; inset: 22px -22px; border: 1px solid #437266; border-radius: 50%; }
.house-tile, .camera-tile { position: absolute; display: grid; place-items: center; border-radius: 28px; }
.house-tile { top: 35px; left: 62px; width: 135px; height: 135px; background: #e7edde; color: var(--ink); transform: rotate(-9deg); box-shadow: 0 20px 30px #08292070; }
.house-tile svg.icon { width: 72px; height: 72px; }
.camera-tile { bottom: 5px; right: 20px; width: 78px; height: 78px; background: var(--gold); color: var(--ink); transform: rotate(10deg); }
.camera-tile svg.icon { width: 38px; height: 38px; }
.section-heading { margin: 2rem 0 1.25rem; }
.panel .section-heading { margin-top: 0; }
.section-heading h2 { margin: .35rem 0 0; }
.counter, .badge { color: var(--muted); font-size: .75rem; background: #f2f5ee; border: 1px solid var(--line); padding: .4rem .7rem; border-radius: 20px; white-space: nowrap; }
.project-card h3 { margin-top: 1.3rem; font-size: 1.25rem; }
.project-card .muted { font-size: .88rem; min-height: 2.8rem; }
.card-bottom { padding-top: 1rem; border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted); }
.round-arrow { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #eff4e9; color: var(--accent); }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 2.5rem; }
.empty-state h2 { margin-top: 1rem; }
.empty-state p { max-width: 450px; margin: 0 auto 1.5rem; color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.5rem; }
.project-heading { align-items: flex-start; margin: 1rem 0 2rem; }
.project-heading h1 { font-size: clamp(2rem, 4vw, 3rem); }
.project-heading .button { flex-shrink: 0; }
.project-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.project-side h2 { margin-top: 1rem; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.photo-card { min-width: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.photo-thumb { display: block; background: #edf1e9; height: 160px; }
.photo-thumb img { width: 100%; height: 100%; object-fit: contain; }
.photo-card-body { padding: 1rem; }
.photo-card-body h3 { margin-top: 0; }
.photo-empty { grid-column: 1 / -1; color: var(--muted); padding: 2rem 1rem; text-align: center; border: 1px dashed var(--line); border-radius: 16px; }
.soft-note { border-radius: 14px; background: #f4f6ef; color: var(--muted); padding: 1rem; font-size: .88rem; margin: 1.2rem 0; }
.history { margin-top: 1.4rem; }
summary { cursor: pointer; padding: .75rem 0; min-height: 48px; font-weight: 600; }
.history > summary { padding: 0; display: list-item; font-size: 1rem; }
.history > summary .muted { display: block; font-size: .85rem; font-weight: 400; margin: .4rem 0 0 1.2rem; }
.history-entry { padding: 1.25rem 0; border-top: 1px solid var(--line); }
dl { margin: 1rem 0; }
dt { font-size: .8rem; color: var(--muted); margin-top: .75rem; }
dd { margin: .15rem 0 .75rem; }
.form-layout, .narrow { max-width: 680px; margin: auto; }
.field { margin: 0 0 1.25rem; }
label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .9rem; }
input, select, textarea { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 50px; border: 1px solid #9aaea3; border-radius: 12px; background: white; color: var(--ink); padding: .75rem .9rem; font: inherit; }
input[type="radio"] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.radio-choices label { display: flex; gap: .8rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; min-height: 62px; margin-bottom: .65rem; cursor: pointer; }
.radio-choices label:has(input:checked) { border-color: var(--accent); background: #eff6ee; }
input[type="file"] { padding: .6rem; font-size: .85rem; background: white; }
input::file-selector-button { background: #edf4e9; color: var(--ink); border: 0; border-radius: 8px; padding: .7rem; margin-right: .6rem; cursor: pointer; }
.flow-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: 2rem; }
.flow-progress span { font-size: .76rem; color: var(--muted); border-top: 3px solid var(--line); padding-top: .6rem; }
.flow-progress [aria-current] { color: var(--accent); font-weight: 700; border-color: var(--accent); }
.step-kicker { color: var(--accent); margin-bottom: .6rem; }
.flow-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.flow-actions [data-next] { margin-left: auto; }
.safety-note { display: flex; gap: .85rem; background: #f8f4e5; padding: 1.1rem; border: 1px solid #e9e0c3; border-radius: 15px; margin: 1.25rem 0; font-size: .87rem; }
.safety-note p { margin: .4rem 0 0; }
.upload-zone { padding: 1.5rem; border: 1px dashed #94b59e; border-radius: 18px; background: #f7faf3; text-align: center; }
.upload-zone .tile-icon { margin-bottom: 1rem; }
.upload-zone .field { margin-bottom: .5rem; }
.optional-fields { border: 1px solid var(--line); border-radius: 15px; padding: .2rem 1rem; margin: 1.2rem 0; }
.optional-fields[open] { padding-bottom: .5rem; }
.flow-summary { padding: .2rem 1.25rem; border: 1px solid var(--line); border-radius: 16px; background: #f8faf5; }
fieldset { min-width: 0; }
.fact-field { border: 0; padding: 0; margin: 0 0 1rem; }
.fact-field > legend { font-weight: 650; font-size: .9rem; margin-bottom: .4rem; }
.fact-field > .field > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.fact-field .field { margin-bottom: .3rem; }
.fact-options summary { font-size: .78rem; font-weight: 500; color: var(--muted); }
.fact-options[open] { padding-bottom: .5rem; }
.address-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1rem; }
.address-grid .fact-field:first-child { grid-column: 1 / -1; }
.errorlist, .alert { list-style: none; border-left: 3px solid #a12b20; padding: .85rem 1rem; background: #fff1eb; color: #842b21; font-size: .9rem; border-radius: 0 10px 10px 0; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 4rem; align-items: center; padding: 2rem 0; }
.welcome h1 { font-size: clamp(2.4rem, 4vw, 3.8rem); }
.login-panel { padding: 2.5rem; box-shadow: 0 16px 45px #193d3410; }
.large-title { font-size: 2rem; margin: .75rem 0; }
.scene { position: relative; height: 230px; overflow: hidden; border-radius: 24px; background: #e4ecd9; margin-top: 2rem; }
.scene-grid { position: absolute; inset: 25px -10px -40px; background: repeating-linear-gradient(0deg, transparent 0 35px, #bdceb7 35px 36px), repeating-linear-gradient(90deg, transparent 0 35px, #bdceb7 35px 36px); transform: perspective(350px) rotateX(45deg); opacity: .5; }
.sun { position: absolute; right: 30px; top: 25px; width: 100px; height: 100px; background: var(--gold); border-radius: 50%; }
.scene-card { position: absolute; inset: 65px 45px auto 25px; display: flex; align-items: center; gap: 1rem; padding: 1.2rem; background: white; border-radius: 18px; box-shadow: 0 12px 30px #193d3420; transform: rotate(-3deg); font-size: .8rem; }
.scene-card strong { display: block; margin-top: .25rem; font-size: 1rem; }
.scene-symbol { display: grid; place-items: center; width: 50px; height: 50px; background: var(--ink); color: var(--gold); border-radius: 13px; flex-shrink: 0; }
.scene-tag { position: absolute; bottom: 30px; right: 25px; display: flex; gap: .5rem; align-items: center; background: var(--ink); color: white; padding: .7rem 1rem; border-radius: 14px; font-size: .8rem; }
.welcome-note { display: flex; align-items: center; gap: .6rem; font-size: .83rem; color: var(--muted); margin-top: 1.4rem; }
footer { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding: 1.5rem max(1.5rem, calc((100% - 1160px) / 2)); color: var(--muted); font-size: .75rem; }
.footer-brand { font-weight: 700; }
.photo-preview { margin: 0 0 1.5rem; }
.photo-preview img { display: block; max-width: 100%; height: auto; max-height: 75dvh; object-fit: contain; border-radius: 18px; background: white; }
.photo-preview figcaption { font-size: .85rem; color: var(--muted); margin-top: .75rem; }
@media (max-width: 900px) {
  .login-layout { gap: 2rem; }
  .login-panel { padding: 1.75rem; }
  .cards, .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-art { width: 230px; }
  .dashboard-hero { padding: 2.25rem; }
}
@media (max-width: 620px) {
  .header { padding: 1rem; min-height: 80px; gap: .5rem; }
  .brand { font-size: 1.04rem; gap: .5rem; }
  .mark { width: 38px; height: 38px; border-radius: 12px; }
  .brand-caption { font-size: .62rem; }
  .header-nav { gap: .35rem; font-size: .8rem; }
  .header-note { display: none; }
  main { padding: 1.5rem 1rem 3rem; }
  .dashboard-hero { padding: 1.75rem; border-radius: 23px; }
  .dashboard-hero h1 { font-size: 2.4rem; }
  .hero-art, .desktop-only { display: none; }
  .hero-button { width: 100%; }
  .cards, .project-grid, .project-layout, .login-layout { grid-template-columns: minmax(0, 1fr); }
  .login-layout { padding-top: .5rem; gap: 1rem; }
  .welcome h1 { font-size: 2.5rem; }
  .welcome .intro { font-size: .94rem; margin-bottom: 1rem; }
  .scene, .welcome-note { display: none; }
  .login-panel { padding: 1.5rem; }
  .panel, .card { padding: 1.25rem; border-radius: 20px; }
  .project-heading { display: block; }
  .project-heading .button { margin-top: .4rem; }
  .project-heading h1 { font-size: 2.2rem; }
  .photo-grid { gap: .75rem; }
  .photo-thumb { height: 125px; }
  .photo-card-body { padding: .75rem; }
  .photo-card-body h3 { font-size: 1rem; }
  .flow-progress { gap: .4rem; }
  .flow-progress span { font-size: .7rem; }
  .address-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .upload-zone { padding: 1rem; }
  footer { display: block; padding: 1.25rem 1rem; }
  .footer-brand { display: block; margin-bottom: .3rem; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }

.capture-guide { display: flex; gap: 1.2rem; align-items: center; padding: 1.25rem; border: 1px solid var(--line); border-radius: 18px; background: #f7faf3; margin: 1rem 0; }
.capture-guide p { margin: .5rem 0 0; font-size: .9rem; }
.cabinet-example { flex: 0 0 100px; padding: 8px; border: 1px dashed var(--accent); border-radius: 8px; }
.cabinet-outline { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; height: 145px; border: 3px solid #497364; background: #edf2e8; padding: 8px; border-radius: 5px; }
.cabinet-meter { border: 1px solid #90a99a; background: white; border-radius: 3px; }
.cabinet-meter::after { content: ""; display: block; height: 20px; margin: 15px 5px; background: #416354; border-radius: 3px; }
.cabinet-lower { grid-column: 1 / -1; border: 2px solid #8fa694; border-radius: 3px; background: repeating-linear-gradient(90deg, #d1dfcb 0 8px, #ecf2e8 8px 14px); }
.safety-stop { border: 1px solid #e4c690; background: #fff5df; border-radius: 16px; padding: 1.25rem; margin: 1.25rem 0; }
@media (max-width: 480px) { .capture-guide { align-items: flex-start; gap: .8rem; padding: 1rem; } .cabinet-example { flex-basis: 65px; padding: 5px; } .cabinet-outline { height: 100px; padding: 4px; gap: 4px; } .cabinet-meter::after { margin: 8px 3px; height: 15px; } }


.safety-inline { color: #704514; border-left: 3px solid #d1ae63; padding-left: .85rem; font-size: .85rem; }
.photo-flow .optional-fields { margin: .75rem 0; }
@media (max-width: 620px) { .dashboard-hero h1 { font-size: 2rem; } .dashboard-hero { padding: 1.5rem; } .dashboard-hero p { font-size: .93rem; } }
