/* Atelier 14.0 — editorial engineering workspace.
   Screen presentation only. Original print styles and operational controls remain intact. */
@media screen {
  :root {
    color-scheme:light; --bg:#f4f3ef; --panel:#fff; --panel2:#eeefed;
    --text:#202a32; --muted:#56636c; --border:#d4d9d8;
    --accent:#284d60; --green:#35634d; --amber:#805322; --red:#913f3e;
    --ink-line:#e2e5e3; --ink-strong:#aebbbf; --ink-focus:#285b76;
    --ink-selected:#e5edf0; --ink-control:#f9faf8;
    --ink-radius:7px; --ink-card:9px;
    font-family:Inter,"Segoe UI",system-ui,-apple-system,Arial,sans-serif;
    font-synthesis:none; line-height:1.5; font-weight:400;
    font-variant-numeric:tabular-nums; color:var(--text); background:var(--bg);
  }
  body,.workspace,.app-shell,.auth-screen,.app-shell .workspace,.workspace>.main {
    background:var(--bg); background-image:none;
  }
  .app-shell .sidebar,.app-shell .topbar { background:#fcfcfa; border-color:var(--border); }
  .sidebar { padding:28px 19px 22px; gap:32px; }
  .sidebar .brand,.auth-panel .brand { gap:10px; }
  .sidebar .brand-mark,.auth-panel .brand-mark {
    width:38px;height:36px;flex:0 0 38px; border-radius:5px;
    background:#29483e; border:1px solid #234137; color:#f5f4e9; box-shadow:none;
  }
  .sidebar .brand strong,.auth-panel .brand strong { color:var(--text); font-size:15px; font-weight:700; letter-spacing:-.035em; }
  .sidebar .brand small,.auth-panel .brand small { color:var(--muted); font-size:10px; letter-spacing:.01em; }
  .nav-link { display:flex; align-items:center; padding:10px 11px; min-height:44px; gap:9px; border:1px solid transparent; font-weight:600; }
  .nav-link.active { color:#29483e;background:#e8eeea;border-color:#d9e1dc; }
  .nav-link:hover { background:#eff1ed;color:var(--text); }
  .nav-icon { font-size:17px; margin:0; color:#3f6455; line-height:1; }
  .sidebar .pcb-field { opacity:.16; filter:grayscale(1); background-size:contain; }
  .sidebar>.sidebar-bottom { background:#fcfcfa; padding:16px 0 0; border-color:var(--ink-line); }
  .sidebar-info { font-size:11px; font-weight:600; }
  .sidebar-bottom p { font-size:11px; line-height:1.6; margin-bottom:0; }
  .topbar { height:64px; min-height:58px; padding-inline:34px; }
  .crumb { font-size:12px; letter-spacing:0; }
  .role-pill,.role-pill.viewer { background:#e9eeec; color:#3b5650; border-color:#d5ded9; font-size:11px; border-radius:5px; font-weight:600; }
  .user-email { font-size:12px; }
  .text-button { color:var(--accent); font-weight:600; }
  .main { padding-top:32px; }
  .page-heading { align-items:center; gap:20px; }
  .page-heading>div:first-child>.eyebrow { display:block; margin-bottom:9px; }
  .eyebrow { font-size:10px; line-height:1.4; letter-spacing:.105em; font-weight:650; color:#60717a; }
  .page-heading h1,.detail-hero h2,.auth-welcome h1 { font-family:inherit; font-weight:680; letter-spacing:-.045em; color:var(--text); }
  .page-heading h1 { font-size:clamp(26px,2.4vw,34px); line-height:1.15; margin:0 0 8px; }
  .heading-dot { color:var(--accent); }
  .page-heading p,.section-heading p,.overview-hint,.floor-note,.detail-section-head p { color:var(--muted); font-size:13px; line-height:1.6; }
  .heading-actions { gap:8px; }
  .btn,.icon-button,.detail-tab { font-weight:600; letter-spacing:0; border-radius:var(--ink-radius); }
  .btn { min-height:40px; padding:9px 13px; }
  .btn-light,.btn-plain,.icon-button { background:#fbfcfa; border-color:var(--border); color:#344750; box-shadow:0 1px 1px #202a3206; }
  .btn-light:hover:not(:disabled),.btn-plain:hover:not(:disabled),.icon-button:hover { background:#e8eeed; color:#29483e; border-color:#a9b9b6; }
  .btn-primary,.auth-form .btn-primary { background:#29483e;color:#fff;border-color:#29483e; }
  .btn-primary:hover:not(:disabled),.auth-form .btn-primary:hover:not(:disabled) { background:#1e382f;border-color:#1e382f; }
  .btn-primary:disabled { background:#e4e9e5; color:#596961; border-color:#d1d9d4; }
  :focus-visible { outline:2px solid var(--ink-focus); outline-offset:3px; }
  .insight-strip.metrics { margin-top:24px; margin-bottom:22px; background:#fff;border:1px solid var(--border);border-radius:var(--ink-card);box-shadow:0 2px 5px #202a3205; }
  .insight-mini { padding:14px 16px; gap:5px; background:#fff; border-color:var(--ink-line); }
  .insight-mini strong { font-size:25px; font-weight:680; line-height:1.15; letter-spacing:-.045em; }
  .insight-mini>span { font-size:11px; font-weight:600; color:var(--muted); }
  .insight-mini small { font-size:11px; line-height:1.45; color:var(--muted); }
  .section-heading { margin-top:28px; margin-bottom:14px; }
  .section-heading h2,.detail-section-head h2,.insight-facade h3 { font-family:inherit;font-weight:670; letter-spacing:-.025em; font-size:19px; color:var(--text); }
  .counter,.building-deadline { border:1px solid #dce1df; background:#f4f5f2; color:#4b5d65; border-radius:5px; font-size:10px; font-weight:600; padding:3px 6px; }
  /* Card footprint and elevation viewport are intentionally unchanged. */
  .buildings-grid { gap:14px; align-items:stretch; }
  .building-card { --card-pad:16px; padding:var(--card-pad); gap:8px; border:1px solid #d4d9d8; border-radius:var(--ink-card); background:#fff; box-shadow:0 2px 4px #24313a08; }
  .building-illustration { height:132px; margin:calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 4px; background:#f0f1ef; border-bottom:1px solid #dce2e0; }
  .building-illustration > svg { display:block; width:100%; height:100%; }
  .building-card .building-top { align-items:center; justify-content:space-between; gap:6px; }
  .building-project { color:#66747b; font-size:10px; font-weight:650; letter-spacing:.055em; }
  .building-number { color:var(--text); font-family:inherit;font-weight:670;font-size:23px;line-height:1.25;letter-spacing:-.04em; }
  .building-bottom { align-items:center; gap:8px; margin-top:auto; font-size:11px; }
  .building-count { color:var(--muted); font-size:11px; }
  .building-chevron { color:#29483e; font-size:12px; font-weight:650; }
  .insight-card-line { border-color:var(--ink-line); color:var(--accent); }
  .building-card:hover,.building-card.selected { background:#fff;border-color:#8b9d9c;filter:none;box-shadow:0 5px 15px #24313a12; }
  .detail-hero,.detail-work-card,.insight-facade-left,.insight-facade-detail,.floor-scroll,.task-dialog,.metric,.work-list { background:#fff;color:var(--text);border:1px solid var(--border);border-radius:var(--ink-card);box-shadow:0 2px 6px #24313a06; }
  .detail-hero { padding:24px; }
  .detail-hero h2 { font-size:29px; margin:5px 0 7px; }
  .detail-hero .eyebrow,.detail-hero p,.detail-stat span,.detail-hero .handover-date { color:var(--muted); }
  .detail-statistics { border-color:var(--ink-line); margin-top:18px; padding-top:17px; }
  .detail-stat strong { color:var(--text);font-size:26px;font-weight:680; letter-spacing:-.035em; }
  .detail-tabs,.detail-tabs:not(.school-only) { border-color:var(--border); background:#e9ece9; border-radius:var(--ink-radius); padding:4px; gap:4px; }
  .detail-tab { color:#475a63; background:transparent; border:1px solid transparent; }
  .detail-tab.active,.insight-mode .btn[aria-pressed=true] { background:#fff; border-color:#c4d0cd; color:#29483e; box-shadow:0 1px 3px #202a320a; }
  .detail-tab:hover { background:#f7f8f5;color:#29483e; }
  .detail-work-card { padding:17px; }
  .detail-work-card.draft { background:#f9faf7; border-style:dashed; }
  .detail-work-name { font-size:14px;font-weight:650; }
  .detail-group-title { font-size:14px;font-weight:650; }
  .floor-scroll { padding:0; scrollbar-color:#aab9bb #ecefed; }
  .floor-table { border-spacing:3px; }
  .floor-table th,.floor-table tfoot :is(td,th),.floor-table tbody tr:last-child th { background:#e9eeed; color:#344951; }
  .floor-cell,.floor-pair,.floor-mark { border-radius:4px; }
  .floor-pair { background:#f4f5f3; }
  .status.done,.fs-done { background:#e0eee4; color:#285c42; }
  .status.active,.fs-active { background:#f5e9d4; color:#805322; }
  .status.none,.fs-none { background:#f5e3e0; color:#913f3e; }
  .status.unknown,.fs-unknown { background:#e7ecee; color:#51636e; }
  .fs-na { background:#f0f1ee; color:#58645f; }
  .insight-facade-left,.insight-facade-detail { padding:16px; }
  .cutaway-building { background:#f1f3f0; border-color:#d6ddda; border-radius:5px; }
  .cutaway-level[aria-pressed=true] { background:#e2ebed; }
  .cutaway-level[aria-pressed=true] .cutaway-module { outline-color:var(--accent); }
  .auth-screen { background:#f3f2ee; }
  .auth-panel { background:transparent; padding:42px 34px; max-width:470px; }
  .auth-welcome { margin-top:56px; }
  .auth-welcome h1 { font-size:36px; line-height:1.15; margin:12px 0; }
  .auth-welcome p { color:var(--muted); max-width:330px; }
  .auth-form { margin-top:26px; gap:9px; }
  .auth-form input,.dialog-body :is(input:not([type=checkbox]):not([type=radio]),select,textarea),.floor-section-select,.toolbar select,.search { border:1px solid #b9c4c5; border-radius:var(--ink-radius); background:#fff;color:var(--text); }
  .auth-form input:focus,.dialog-body :is(input,select,textarea):focus,.floor-section-select:focus,.toolbar select:focus,.search:focus-within { border-color:var(--ink-focus);box-shadow:0 0 0 2px #285b7614; }
  .auth-form label,.dialog-body label { color:#40535c;font-weight:600; }
  .auth-art { min-height:100vh; padding:4vw; background:#e4e8e5; border-left:1px solid #d6ddda; }
  .auth-art svg { max-width:690px; width:100%; height:auto; }
  .dialog-head,.dialog-body,.dialog-actions { background:#fff;border-color:var(--ink-line);color:var(--text); }
  .dialog-actions { background:#f7f8f5; }
  .task-dialog { box-shadow:0 20px 55px #172c3829; }
  .task-dialog::backdrop { background:#1c2d38a0; }
  .data-message,.voice-scope { border-color:#d6dfdd;background:#edf2ef;color:#3d5654; }
  .footer { border-color:var(--ink-line);color:var(--muted);font-size:11px; }
}
@media screen and (min-width:761px) {
  .app-shell .sidebar { border-right:1px solid var(--border); }
  .app-shell .topbar { border-bottom:1px solid var(--border); }
}
@media screen and (max-width:760px) {
  .sidebar { padding:12px 16px; }
  .topbar { height:auto;min-height:0;padding:10px 16px;gap:8px; }
  .main { padding:18px 12px 22px; }
  .page-heading { align-items:flex-start;gap:12px; }
  .page-heading h1 { font-size:26px; }
  .heading-actions .btn { min-height:44px;padding:8px 10px; }
  .insight-mini { padding:11px 10px; }
  .insight-mini strong { font-size:21px; }
  .building-card { --card-pad:13px; }
  .building-illustration { height:114px; }
  .building-number { font-size:21px; }
  .building-project,.building-deadline,.building-count { overflow-wrap:anywhere; }
  .detail-hero { padding:18px 15px; }
  .detail-hero h2 { font-size:25px; }
  .detail-stat strong { font-size:22px; }
  .detail-tab,.floor-bar .btn,.dialog-actions .btn,.voice-edit-row .btn { min-height:44px; }
  .insight-facade-left,.insight-facade-detail { padding:10px; }
  .auth-panel { padding:32px 22px; }
  .auth-welcome h1 { font-size:31px; }
  .auth-form input { font-size:16px; }
}
@media screen and (max-width:420px) {
  .building-card .building-top { flex-wrap:wrap; }
  .building-bottom { align-items:flex-start; }
  .building-chevron { white-space:nowrap; }
}
@media (prefers-reduced-motion:reduce) {
  .building-card,.btn,.detail-tab { transition:none!important;transform:none!important; }
}

/* 14.1 — Signal layer. The existing PCB routes and travelling pulses return,
   isolated from readable work surfaces. No artificial loading delay. */
@media screen {
  .app-shell .workspace {
    background-color:var(--bg);
    background-image:linear-gradient(rgb(244 243 239 / 54%),rgb(244 243 239 / 54%)),url('/circuit-signal.svg?v=14.1');
    background-size:auto,640px 400px;
    background-position:center,center top;
    background-repeat:no-repeat,repeat;
  }
  .workspace>.main { background:transparent; }
  .auth-screen {
    background-color:var(--bg);
    background-image:linear-gradient(rgb(244 243 239 / 24%),rgb(244 243 239 / 24%)),url('/circuit-signal.svg?v=14.1');
    background-size:auto,640px 400px;
    background-repeat:no-repeat,repeat;
    background-position:center,center;
  }
  .auth-panel {
    background:radial-gradient(ellipse at center,#f4f3ef 57%,#f4f3ef00 78%);
  }
  .boot-screen {
    min-height:100vh;min-height:100dvh;position:relative;isolation:isolate;overflow:hidden;
    background:var(--bg);color:var(--text);padding:24px;
  }
  .boot-screen::before {
    content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
    background:url('/circuit-signal.svg?v=14.1') center / 640px 400px repeat;
    opacity:.92;
  }
  .boot-screen::after {
    content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
    background:radial-gradient(ellipse 300px 190px at center,#f4f3ef 52%,#f4f3efb8 73%,#f4f3ef00 100%);
  }
  .boot-center { display:grid;justify-items:center;gap:24px;max-width:100%; }
  .boot-center .brand { gap:12px;color:var(--text); }
  .boot-center .brand-mark { width:42px;height:40px;flex:0 0 42px;border-radius:5px;background:#29483e;border:1px solid #234137;color:#f5f4e9;box-shadow:none; }
  .boot-center .brand strong { color:var(--text);font-weight:700;font-size:18px;letter-spacing:-.035em; }
  .boot-center .brand small { color:var(--muted);font-size:11px;letter-spacing:.01em; }
  .boot-loading { display:flex;align-items:center;gap:10px; }
  .boot-loading p { margin:0;font-size:12px;color:var(--muted); }
  .boot-loading .spinner { width:19px;height:19px;border:2px solid #ccd6d1;border-top-color:#346751; }
}
@media screen and (max-width:760px) {
  .app-shell .workspace { background-image:linear-gradient(rgb(244 243 239 / 62%),rgb(244 243 239 / 62%)),url('/circuit-signal.svg?v=14.1');background-size:auto,480px 300px; }
  .auth-screen { background-size:auto,480px 300px; }
  .boot-screen::before { background-size:480px 300px; }
}
@media screen and (prefers-reduced-motion:reduce) {
  .app-shell .workspace { background-image:linear-gradient(rgb(244 243 239 / 54%),rgb(244 243 239 / 54%)),url('/circuit.svg?v=13.2'); }
  .auth-screen { background-image:linear-gradient(rgb(244 243 239 / 24%),rgb(244 243 239 / 24%)),url('/circuit.svg?v=13.2'); }
  .boot-screen::before { background-image:url('/circuit.svg?v=13.2'); }
  .boot-loading .spinner { animation:none; }
}

/* 14.2 — one continuous workspace with a compact, branded header. */
@media screen {
  .app-shell { display:block; }
  .app-shell .workspace { min-height:100vh; min-height:100dvh; }
  .app-shell .topbar {
    height:auto; min-height:64px; padding:0; display:block;
    background:rgba(252,252,250,.94); border-bottom:1px solid var(--border);
  }
  .topbar-inner {
    max-width:1290px; min-height:64px; padding:10px 42px; margin-inline:auto;
    display:flex; align-items:center; justify-content:space-between; gap:24px;
  }
  .topbar-left { display:flex; align-items:center; gap:24px; min-width:0; }
  .header-brand {
    background:none; border:0; padding:0; margin:0; text-align:left;
    color:var(--text); gap:10px; flex-shrink:0; border-radius:5px;
  }
  .header-brand .brand-mark {
    width:38px; height:36px; flex:0 0 38px; border-radius:5px;
    background:#29483e; border:1px solid #234137; color:#f5f4e9; box-shadow:none;
  }
  .header-brand .brand-copy { display:block; }
  .header-brand strong { color:var(--text); font-size:15px; font-weight:700; letter-spacing:-.035em; line-height:1.35; }
  .header-brand small { color:var(--muted); font-size:10px; letter-spacing:.01em; line-height:1.45; }
  .topbar .crumb { border-left:1px solid var(--border); padding-left:24px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .topbar .crumb strong { font-weight:550; color:var(--muted); }
  .topbar-right { flex-shrink:0; gap:14px; }
  .topbar-right .text-button { min-height:36px; padding:6px 0 6px 8px; }
  .workspace>.main { background:transparent; }
  .building-illustration { height:132px; }
}
@media screen and (min-width:761px) and (max-width:1050px) {
  .topbar-inner { padding-inline:26px; gap:16px; }
  .topbar-left { gap:15px; }
  .topbar .crumb { padding-left:15px; }
  .topbar-right { gap:9px; }
  .topbar-right .user-email { max-width:150px; }
}
@media screen and (max-width:760px) {
  .app-shell .topbar { min-height:0; }
  .topbar-inner { padding:11px 12px 10px; min-height:0; flex-wrap:wrap; gap:10px; }
  .topbar-left { width:100%; justify-content:space-between; gap:12px; }
  .topbar .crumb { padding-left:12px; font-size:11px; }
  .topbar-right { flex-shrink:1; width:100%; gap:8px; justify-content:flex-start; border-top:1px solid var(--ink-line); padding-top:8px; }
  .topbar-right .user-email { flex:1; max-width:none; min-width:0; }
  .topbar-right .text-button { min-height:32px; margin-left:auto; }
  .building-illustration { height:114px; }
}
@media screen and (max-width:350px) {
  .topbar-left { flex-wrap:wrap; }
  .topbar .crumb { padding-left:0; border-left:0; }
}
