/* ==========================================================================
   Renaissance V2 — Clean-Room Da Vinci Notebook + Art Deco UI Theme
   Self-hosted SIL OFL 1.1 fonts (/static/fonts/, OFL.txt bundled alongside).
   Zero box-shadow, zero filter/blur, zero backdrop-filter.
   ========================================================================== */

@font-face {
  font-family: "Cinzel";
  src: url("/static/fonts/cinzel.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/static/fonts/source-serif-4-wght.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/ibm-plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("/static/fonts/caveat.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Desk & paper surfaces */
  --desk: #e2d8c0;
  --paper: #fbf8f1;
  --paper-alt: #f3ecdc;
  --parchment: #ede4d0;
  --topbar-bg: #1a150e;
  --topbar-ink: #f4ecda;

  /* Ink & contrast */
  --ink: #1c1710;
  --ink-muted: #3a2f24;
  --link: #24335a;

  /* Art Deco brass & hairlines */
  --gold-dark: #7e6226;
  --gold: #b08d3a;
  --gold-mid: #c9a44c;
  --gold-bright: #d4af5a;
  --gold-hi: #e2c26c;
  --hairline: #c7b897;
  --hairline-strong: #8e7130;
  --amber: #7e5a16;
  --amber-bg: #f4e6c7;

  /* ERP progress colors (Grey / Red / Blue / Green only) */
  --ok-bg: #dfece0;
  --ok-ink: #184a22;
  --warn-bg: #f7e6e4;
  --warn-ink: #7e221d;
  --info-bg: #e1ebf3;
  --info-ink: #173f5f;
  --grey-bg: #e9e2d2;
  --grey-ink: #3a3228;

  /* Typography */
  --font-display: "Cinzel", Georgia, serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Source Serif 4", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--desk);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%22120%22%20viewBox%3D%220%200%20120%20120%22%3E%3Cg%20fill%3D%22%237E6226%22%20opacity%3D%220.065%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2217%22%20r%3D%220.8%22%2F%3E%3Ccircle%20cx%3D%2243%22%20cy%3D%229%22%20r%3D%220.6%22%2F%3E%3Ccircle%20cx%3D%2278%22%20cy%3D%2223%22%20r%3D%220.7%22%2F%3E%3Ccircle%20cx%3D%22104%22%20cy%3D%2214%22%20r%3D%220.6%22%2F%3E%3Ccircle%20cx%3D%2226%22%20cy%3D%2248%22%20r%3D%220.7%22%2F%3E%3Ccircle%20cx%3D%2262%22%20cy%3D%2241%22%20r%3D%220.8%22%2F%3E%3Ccircle%20cx%3D%2295%22%20cy%3D%2256%22%20r%3D%220.6%22%2F%3E%3Ccircle%20cx%3D%2215%22%20cy%3D%2283%22%20r%3D%220.6%22%2F%3E%3Ccircle%20cx%3D%2251%22%20cy%3D%2276%22%20r%3D%220.7%22%2F%3E%3Ccircle%20cx%3D%2288%22%20cy%3D%2289%22%20r%3D%220.8%22%2F%3E%3Ccircle%20cx%3D%22112%22%20cy%3D%22102%22%20r%3D%220.6%22%2F%3E%3Ccircle%20cx%3D%2234%22%20cy%3D%22109%22%20r%3D%220.7%22%2F%3E%3Ccircle%20cx%3D%2271%22%20cy%3D%22112%22%20r%3D%220.6%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22%233A2F24%22%20opacity%3D%220.045%22%3E%3Ccircle%20cx%3D%2221%22%20cy%3D%2231%22%20r%3D%220.6%22%2F%3E%3Ccircle%20cx%3D%2257%22%20cy%3D%2219%22%20r%3D%220.7%22%2F%3E%3Ccircle%20cx%3D%2291%22%20cy%3D%2237%22%20r%3D%220.6%22%2F%3E%3Ccircle%20cx%3D%2238%22%20cy%3D%2264%22%20r%3D%220.6%22%2F%3E%3Ccircle%20cx%3D%2276%22%20cy%3D%2268%22%20r%3D%220.7%22%2F%3E%3Ccircle%20cx%3D%22109%22%20cy%3D%2273%22%20r%3D%220.6%22%2F%3E%3Ccircle%20cx%3D%2229%22%20cy%3D%2294%22%20r%3D%220.7%22%2F%3E%3Ccircle%20cx%3D%2266%22%20cy%3D%2298%22%20r%3D%220.6%22%2F%3E%3Ccircle%20cx%3D%2298%22%20cy%3D%22115%22%20r%3D%220.7%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.48;
  -webkit-text-size-adjust: 100%;
}

.main {
  max-width: 1330px;
  margin: 0 auto;
  padding: 24px 14px 56px;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Top Bar — Dark Obsidian + Brass Art Deco Frieze
   ========================================================================== */
.topbar {
  position: relative;
  background: var(--topbar-bg);
  color: var(--topbar-ink);
  border-bottom: 2px solid var(--gold-mid);
  padding: 0 15px 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2248%22%20height%3D%228%22%20viewBox%3D%220%200%2048%208%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M0%206%20L12%202%20L24%206%20L36%202%20L48%206%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%220.9%22%20opacity%3D%220.72%22%2F%3E%3Ccircle%20cx%3D%2224%22%20cy%3D%226%22%20r%3D%221.1%22%20fill%3D%22%23E2C26C%22%20opacity%3D%220.85%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: repeat-x;
  background-position: left bottom;
}

.brand {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--topbar-ink);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.brand:hover { text-decoration: none; color: var(--gold-hi); }

.brand-mark {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: none;
  outline: none;
  transform: none;
  flex: none;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%20fill%3D%22none%22%3E%20%3Cg%20stroke-linecap%3D%22square%22%3E%20%3Cline%20x1%3D%2232%22%20y1%3D%222%22%20x2%3D%2232%22%20y2%3D%2212%22%20stroke%3D%22%23E2C26C%22%20stroke-width%3D%221.5%22%2F%3E%20%3Cline%20x1%3D%2232%22%20y1%3D%2252%22%20x2%3D%2232%22%20y2%3D%2262%22%20stroke%3D%22%23E2C26C%22%20stroke-width%3D%221.5%22%2F%3E%20%3Cline%20x1%3D%222%22%20y1%3D%2232%22%20x2%3D%2212%22%20y2%3D%2232%22%20stroke%3D%22%23E2C26C%22%20stroke-width%3D%221.5%22%2F%3E%20%3Cline%20x1%3D%2252%22%20y1%3D%2232%22%20x2%3D%2262%22%20y2%3D%2232%22%20stroke%3D%22%23E2C26C%22%20stroke-width%3D%221.5%22%2F%3E%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2210.8%22%20x2%3D%2217.9%22%20y2%3D%2217.9%22%20stroke%3D%22%23D4AF5A%22%20stroke-width%3D%221.35%22%2F%3E%20%3Cline%20x1%3D%2253.2%22%20y1%3D%2210.8%22%20x2%3D%2246.1%22%20y2%3D%2217.9%22%20stroke%3D%22%23D4AF5A%22%20stroke-width%3D%221.35%22%2F%3E%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2253.2%22%20x2%3D%2217.9%22%20y2%3D%2246.1%22%20stroke%3D%22%23D4AF5A%22%20stroke-width%3D%221.35%22%2F%3E%20%3Cline%20x1%3D%2253.2%22%20y1%3D%2253.2%22%20x2%3D%2246.1%22%20y2%3D%2246.1%22%20stroke%3D%22%23D4AF5A%22%20stroke-width%3D%221.35%22%2F%3E%20%3Cline%20x1%3D%2220.5%22%20y1%3D%224.3%22%20x2%3D%2224.3%22%20y2%3D%2213.5%22%20stroke%3D%22%23B08D3A%22%20stroke-width%3D%221.05%22%2F%3E%20%3Cline%20x1%3D%2243.5%22%20y1%3D%224.3%22%20x2%3D%2239.7%22%20y2%3D%2213.5%22%20stroke%3D%22%23B08D3A%22%20stroke-width%3D%221.05%22%2F%3E%20%3Cline%20x1%3D%2259.7%22%20y1%3D%2220.5%22%20x2%3D%2250.5%22%20y2%3D%2224.3%22%20stroke%3D%22%23B08D3A%22%20stroke-width%3D%221.05%22%2F%3E%20%3Cline%20x1%3D%2259.7%22%20y1%3D%2243.5%22%20x2%3D%2250.5%22%20y2%3D%2239.7%22%20stroke%3D%22%23B08D3A%22%20stroke-width%3D%221.05%22%2F%3E%20%3Cline%20x1%3D%2243.5%22%20y1%3D%2259.7%22%20x2%3D%2239.7%22%20y2%3D%2250.5%22%20stroke%3D%22%23B08D3A%22%20stroke-width%3D%221.05%22%2F%3E%20%3Cline%20x1%3D%2220.5%22%20y1%3D%2259.7%22%20x2%3D%2224.3%22%20y2%3D%2250.5%22%20stroke%3D%22%23B08D3A%22%20stroke-width%3D%221.05%22%2F%3E%20%3Cline%20x1%3D%224.3%22%20y1%3D%2243.5%22%20x2%3D%2213.5%22%20y2%3D%2239.7%22%20stroke%3D%22%23B08D3A%22%20stroke-width%3D%221.05%22%2F%3E%20%3Cline%20x1%3D%224.3%22%20y1%3D%2220.5%22%20x2%3D%2213.5%22%20y2%3D%2224.3%22%20stroke%3D%22%23B08D3A%22%20stroke-width%3D%221.05%22%2F%3E%20%3C%2Fg%3E%20%3Cpolygon%20points%3D%2232%2C12%2052%2C32%2032%2C52%2012%2C32%22%20fill%3D%22%231A150E%22%20stroke%3D%22%23D4AF5A%22%20stroke-width%3D%221.5%22%2F%3E%20%3Ccircle%20cx%3D%2232%22%20cy%3D%2232%22%20r%3D%2214.6%22%20fill%3D%22%231A150E%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.2%22%2F%3E%20%3Ccircle%20cx%3D%2232%22%20cy%3D%2232%22%20r%3D%2212.4%22%20fill%3D%22none%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%220.85%22%2F%3E%20%3Cdefs%3E%20%3ClinearGradient%20id%3D%22gR%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%20%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23F7E7B8%22%2F%3E%20%3Cstop%20offset%3D%2255%25%22%20stop-color%3D%22%23D9B356%22%2F%3E%20%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23B88E2E%22%2F%3E%20%3C%2FlinearGradient%3E%20%3C%2Fdefs%3E%20%3Cpath%20d%3D%22M23.8%2024.2%20H33.4%20C37.2%2024.2%2039.4%2026.0%2039.4%2028.7%20C39.4%2031.2%2037.4%2032.7%2034.5%2033.2%20C36.5%2034.8%2037.9%2037.5%2039.2%2038.8%20C39.8%2039.4%2040.5%2039.4%2041.2%2038.9%20L41.5%2039.6%20C40.5%2040.6%2039.1%2040.9%2037.8%2040.4%20C36.3%2039.8%2035.2%2037.5%2033.7%2035.2%20C32.9%2034.0%2032.2%2033.5%2031.1%2033.5%20H29.5%20V38.5%20C29.5%2039.3%2030.0%2039.6%2031.3%2039.7%20V40.3%20H23.8%20V39.7%20C25.1%2039.6%2025.6%2039.3%2025.6%2038.5%20V26.0%20C25.6%2025.2%2025.1%2024.9%2023.8%2024.8%20Z%20M29.5%2025.4%20V32.3%20H32.5%20C34.8%2032.3%2035.9%2031.0%2035.9%2028.8%20C35.9%2026.6%2034.7%2025.4%2032.4%2025.4%20Z%22%20fill%3D%22url%28%23gR%29%22%2F%3E%20%3Cline%20x1%3D%2227.5%22%20y1%3D%2226.2%22%20x2%3D%2227.5%22%20y2%3D%2238.2%22%20stroke%3D%22%231A150E%22%20stroke-width%3D%220.65%22%20opacity%3D%220.65%22%2F%3E%20%3C%2Fsvg%3E");
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  color: #e9dec5;
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 2px solid transparent;
}
.nav a:hover {
  color: var(--gold-hi);
  text-decoration: none;
}
.nav a.active {
  color: var(--gold-hi);
  border-bottom-color: var(--gold-bright);
  font-weight: 600;
}

.userbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: #dfd3b8;
}
.userbar strong { color: var(--topbar-ink); }
.userbar .btn {
  min-height: 38px;
  padding: 0 12px;
  background: #272016;
  color: var(--topbar-ink);
  border: 1px solid var(--gold);
  font-size: 14px;
}
.userbar .btn:hover {
  background: #352b1d;
  border-color: var(--gold-hi);
  text-decoration: none;
}
.userbar .btn-primary {
  background: var(--gold-mid);
  color: var(--ink);
  border-color: var(--gold-hi);
}
.userbar .btn-primary:hover {
  background: var(--gold-hi);
}

/* ==========================================================================
   Headings & Typography
   ========================================================================== */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: 0.05em;
  margin: 0 0 12px;
  font-weight: 700;
}
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }

.muted { color: var(--ink-muted); font-size: 14.5px; }
.mono {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Art Deco Cards — Two-Tone Gold Borders & Stepped Corners (Zero Shadows)
   ========================================================================== */
.card {
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M1%2015V4h3V1h11%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.2%22%2F%3E%3Cpath%20d%3D%22M1%2010V1h9%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%221%22%2F%3E%3Cpolygon%20points%3D%226.5%2C4.2%208.8%2C6.5%206.5%2C8.8%204.2%2C6.5%22%20stroke%3D%22%23B88E2B%22%20stroke-width%3D%220.9%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M15%2015V4h-3V1H1%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.2%22%2F%3E%3Cpath%20d%3D%22M15%2010V1H6%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%221%22%2F%3E%3Cpolygon%20points%3D%229.5%2C4.2%2011.8%2C6.5%209.5%2C8.8%207.2%2C6.5%22%20stroke%3D%22%23B88E2B%22%20stroke-width%3D%220.9%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M1%201v11h3v3h11%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.2%22%2F%3E%3Cpath%20d%3D%22M1%206v9h9%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%221%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M15%201v11h-3v3H1%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.2%22%2F%3E%3Cpath%20d%3D%22M15%206v9H6%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%221%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: top 4px left 4px, top 4px right 4px, bottom 4px left 4px, bottom 4px right 4px;
  border: 1.5px solid var(--gold-dark);
  outline: 1px solid var(--gold-mid);
  outline-offset: -4px;
  padding: 20px 16px;
  margin-bottom: 18px;
}

.card h1, .card h2, .card h3 {
  font-family: var(--font-display);
  margin: 0 0 12px;
  font-weight: 700;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 8px;
}

/* ==========================================================================
   Banners & Status Badges (Grey / Red / Blue / Green)
   ========================================================================== */
.banner {
  border: 1.5px solid var(--hairline-strong);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 15px;
}
.banner-grey { background: var(--grey-bg); color: var(--grey-ink); border-color: var(--grey-ink); }
.banner-red { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-ink); }
.banner-blue { background: var(--info-bg); color: var(--info-ink); border-color: var(--info-ink); }
.banner-green { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-ink); }

.badge {
  display: inline-block;
  padding: 2px 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--gold-dark);
  background: var(--paper-alt);
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-done {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border-color: var(--ok-ink);
}

/* ==========================================================================
   Buttons & Inputs (Square / Crisp 2px max, 44px touch, 16px+ font)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--gold-dark);
  border-radius: 2px;
  background: var(--paper-alt);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover {
  background: var(--amber-bg);
  border-color: var(--ink);
  text-decoration: none;
}
.btn-primary {
  background: var(--topbar-bg);
  color: var(--topbar-ink);
  border: 1.5px solid var(--gold-dark);
  outline: 1px solid var(--gold-mid);
  outline-offset: -3px;
}
.btn-primary:hover {
  background: #2c2418;
  color: var(--gold-hi);
}
.btn-danger {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-color: var(--warn-ink);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

label {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  font-size: 16px;
  font-family: var(--font-serif);
  color: var(--ink);
  background: #fffdf8;
  border: 1.5px solid var(--hairline-strong);
  border-radius: 2px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--gold-dark);
  outline-offset: 1px;
  border-color: var(--ink);
}

.field { margin-bottom: 14px; }
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  min-height: 44px;
}
.check-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--gold-dark);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

/* ==========================================================================
   Tables & Collapsible Station Pickers
   ========================================================================== */
.table-wrap { width: 100%; overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th, td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}
th {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--paper-alt);
  color: var(--ink);
  border-top: 1.5px solid var(--gold-dark);
  border-bottom: 2px solid var(--gold-dark);
}

details.pstations {
  border: 1px solid var(--gold-dark);
  background: #fffdf8;
  padding: 4px 10px;
}
details.pstations > summary {
  cursor: pointer;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14.5px;
  list-style: none;
}
details.pstations > summary::-webkit-details-marker { display: none; }
details.pstations > summary::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: none;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2028%2028%22%20fill%3D%22none%22%3E%3Cpolyline%20points%3D%229.5%2C4.5%2012.5%2C4.5%2022.5%2C14%2012.5%2C23.5%209.5%2C23.5%22%20stroke%3D%22%23A88022%22%20stroke-width%3D%221.35%22%20stroke-linejoin%3D%22miter%22%20stroke-linecap%3D%22square%22%2F%3E%3Cpolyline%20points%3D%2211.2%2C7.6%2018.2%2C14%2011.2%2C20.4%22%20stroke%3D%22%23D4AF5A%22%20stroke-width%3D%221.15%22%20stroke-linejoin%3D%22miter%22%20stroke-linecap%3D%22square%22%2F%3E%3Cpolygon%20points%3D%224.5%2C14%208.2%2C10.5%2011.9%2C14%208.2%2C17.5%22%20stroke%3D%22%238E6A1C%22%20stroke-width%3D%221.15%22%20stroke-linejoin%3D%22miter%22%2F%3E%3Cline%20x1%3D%228.2%22%20y1%3D%2214%22%20x2%3D%2215.4%22%20y2%3D%2214%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.0%22%2F%3E%3C%2Fsvg%3E");
  transform: rotate(0deg);
  transition: transform 180ms ease;
}
details.pstations[open] > summary::before {
  transform: rotate(90deg);
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 4px 10px;
  padding: 8px 0 4px;
}
.station-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  margin: 0;
  min-height: 36px;
}

/* ==========================================================================
   Kiosk PIN Pad
   ========================================================================== */
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 300px;
  margin: 16px auto;
}
.pin-key {
  min-height: 58px;
  font-size: 22px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--paper-alt);
  border: 1.5px solid var(--gold-dark);
}

/* ==========================================================================
   Solid-Paper Print Frame (Lined Notebook Only When Empty)
   ========================================================================== */
.print-frame {
  aspect-ratio: 11 / 8.5;
  border: 1.5px solid var(--gold-dark);
  outline: 1px solid var(--gold-mid);
  outline-offset: -4px;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 23px,
    rgba(126, 98, 38, 0.18) 24px
  );
  display: flex;
  align-items: center;
  justify-content: center;
}
.print-frame:has(a),
.print-frame:has(img) {
  background-image: none;
  background-color: var(--paper);
}
.print-frame > a {
  flex: 1 1 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Job Queue & Job Tree — A4 Desk & Two-Tone Gold Cards
   ========================================================================== */
.job-row {
  background: transparent;
  border: none;
  outline: none;
  margin-bottom: 14px;
}

.job-head {
  border: 2px solid var(--gold-dark);
  outline: 1.5px solid var(--gold-bright);
  outline-offset: -4px;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px 13px 48px;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M1%2015V4h3V1h11%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.2%22%2F%3E%3Cpath%20d%3D%22M1%2010V1h9%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%221%22%2F%3E%3Cpolygon%20points%3D%226.5%2C4.2%208.8%2C6.5%206.5%2C8.8%204.2%2C6.5%22%20stroke%3D%22%23B88E2B%22%20stroke-width%3D%220.9%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M15%2015V4h-3V1H1%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.2%22%2F%3E%3Cpath%20d%3D%22M15%2010V1H6%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%221%22%2F%3E%3Cpolygon%20points%3D%229.5%2C4.2%2011.8%2C6.5%209.5%2C8.8%207.2%2C6.5%22%20stroke%3D%22%23B88E2B%22%20stroke-width%3D%220.9%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: top 4px left 4px, top 4px right 4px;
  cursor: pointer;
  min-height: 58px;
  font-size: 18px;
}
.job-head:hover {
  background-color: #fffdf8;
}
.job-head::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2028%2028%22%20fill%3D%22none%22%3E%3Cpolyline%20points%3D%229.5%2C4.5%2012.5%2C4.5%2022.5%2C14%2012.5%2C23.5%209.5%2C23.5%22%20stroke%3D%22%23A88022%22%20stroke-width%3D%221.35%22%20stroke-linejoin%3D%22miter%22%20stroke-linecap%3D%22square%22%2F%3E%3Cpolyline%20points%3D%2211.2%2C7.6%2018.2%2C14%2011.2%2C20.4%22%20stroke%3D%22%23D4AF5A%22%20stroke-width%3D%221.15%22%20stroke-linejoin%3D%22miter%22%20stroke-linecap%3D%22square%22%2F%3E%3Cpolygon%20points%3D%224.5%2C14%208.2%2C10.5%2011.9%2C14%208.2%2C17.5%22%20stroke%3D%22%238E6A1C%22%20stroke-width%3D%221.15%22%20stroke-linejoin%3D%22miter%22%2F%3E%3Cline%20x1%3D%228.2%22%20y1%3D%2214%22%20x2%3D%2215.4%22%20y2%3D%2214%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.0%22%2F%3E%3C%2Fsvg%3E");
  transform: rotate(0deg);
  transition: transform 200ms ease;
}
.job-row:has(.job-body:not(.collapsed)) > .job-head {
  background-color: var(--paper-alt);
}
.job-row:has(.job-body:not(.collapsed)) > .job-head::before {
  transform: rotate(90deg);
}

.job-body {
  overflow: clip;
  padding: 6px 0 0 14px;
  background: transparent;
}
.job-body.collapsed { display: none; }

.tree-node {
  background: transparent;
  border: none;
  outline: none;
  margin: 8px 0 0 0;
  padding: 0;
}
.tree-node .tree-node {
  margin: 8px 0 0 0;
}

.tree-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  background: var(--paper);
  border: 1.25px solid var(--gold-dark);
  outline: 1px solid var(--gold-mid);
  outline-offset: -3px;
  padding: 8px 9px;
}
.tree-node .tree-node > .tree-row {
  background: #fffdf8;
  border-width: 1px;
  outline-color: #d7be7c;
  padding: 7px 8px;
}
.tree-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 16.5px;
}
.tree-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stamp-btn {
  min-height: 44px;
  min-width: 72px;
  padding: 0 12px;
  border: 1.5px solid var(--gold-dark);
  border-radius: 2px;
  background: #fffdf8;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.stamp-btn:hover:not(:disabled) {
  background: var(--amber-bg);
}
.stamp-btn.done {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border-color: var(--ok-ink);
}
.stamp-btn.saving {
  opacity: 0.65;
  border-style: dashed;
}
.stamp-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.item-err {
  margin-top: 6px;
  padding: 6px 10px;
  font-size: 14px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-ink);
}

/* ==========================================================================
   Full-Screen Print Viewer Dialog
   ========================================================================== */
dialog.print-dialog {
  width: min(96vw, 1080px);
  max-height: 94vh;
  padding: 0;
  border: 2px solid var(--gold-dark);
  outline: 1.5px solid var(--gold-bright);
  outline-offset: -4px;
  background: var(--paper);
  color: var(--ink);
}
dialog.print-dialog::backdrop {
  background: rgba(26, 21, 14, 0.82);
}
.print-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: var(--topbar-bg);
  color: var(--topbar-ink);
  border-bottom: 2px solid var(--gold-mid);
  flex-wrap: wrap;
}
.print-dialog-body {
  padding: 16px;
  overflow: auto;
  max-height: calc(94vh - 70px);
  text-align: center;
}
.print-dialog-body img {
  width: 100%;
  height: auto;
  aspect-ratio: auto 17 / 11;
  cursor: zoom-in;
}
.print-dialog-body img.zoomed {
  width: auto;
  max-width: none;
  cursor: zoom-out;
}

/* ==========================================================================
   Touch (iPad) & Mobile (<= 640px)
   ========================================================================== */
@media (pointer: coarse) {
  body { font-size: 17px; }
  .job-head { min-height: 60px; font-size: 19px; padding-left: 52px; }
  .job-head::before { width: 28px; height: 28px; margin-top: -14px; }
  .tree-meta { font-size: 17.5px; }
  .btn, .stamp-btn { min-height: 44px; }
}

@media (max-width: 720px) {
  .topbar { padding: 8px 9px 10px; }
  .main { padding: 14px 8px 36px; }
  .card { padding: 16px 10px; }
  .station-grid { grid-template-columns: repeat(2, 1fr); }
  .job-head { padding: 12px 12px 12px 44px; font-size: 17px; }
  .job-body { padding-left: 8px; }
  .tree-row { padding: 8px 8px; }
}

/* Print Drop Box */
.print-drop-zone {
  border: 2px dashed var(--hairline-strong);
  background: var(--parchment);
  padding: 22px 12px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 12px;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.print-drop-zone:hover,
.print-drop-zone:focus-visible,
.print-drop-zone.dragover {
  background: var(--amber-bg);
  border-color: var(--gold-dark);
  outline: none;
}
.print-drop-title {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 4px;
}
.drop-file-list {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.drop-file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--hairline);
  background: var(--parchment);
  font-family: var(--font-mono);
  font-size: 13px;
}
.drop-file-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.drop-file-row .btn {
  flex-shrink: 0;
}

/* Inline Assembly & Part Print Dropdowns */
.tree-toggle {
  cursor: pointer;
  user-select: none;
}
.tree-toggle:hover {
  background: var(--amber-bg);
}
.tree-caret {
  display: inline-block;
  width: 16px;
  text-align: center;
  color: var(--gold-dark);
  font-size: 15px;
  flex-shrink: 0;
}
.tree-body {
  overflow: clip;
  padding: 8px 0 0 14px;
}
.tree-body.collapsed {
  display: none;
}
.tree-print-panel {
  border: 1px solid var(--hairline-strong);
  background: var(--parchment);
  padding: 4px;
  margin-bottom: 10px;
}
.tree-print-img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  border: 1px solid var(--hairline);
  background: #ffffff;
  cursor: zoom-in;
}


/* ==========================================================================
   Job Queue & Dropdown Cards — Calm, Scannable Art Deco Hierarchy
   ========================================================================== */

/* Compact Print Drop Box (4-column desktop form, clean brass drop mat) */
#print-drop-box {
  padding: 16px 20px;
  margin-bottom: 18px;
}
#print-drop-box h2 {
  font-size: 16px;
  border-bottom: none;
  padding-bottom: 0;
}
#print-drop-box .print-drop-zone {
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1.5px dashed var(--gold-dark);
  background: var(--paper-alt);
}
#print-drop-form.grid-2 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
}
#print-drop-form .field {
  margin-bottom: 2px;
}
#print-drop-form label {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
@media (max-width: 960px) {
  #print-drop-form.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  #print-drop-form.grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Collapsible "New Job without prints" details card */
details.card > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  min-height: 32px;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: none;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2028%2028%22%20fill%3D%22none%22%3E%3Cpolyline%20points%3D%229.5%2C4.5%2012.5%2C4.5%2022.5%2C14%2012.5%2C23.5%209.5%2C23.5%22%20stroke%3D%22%23A88022%22%20stroke-width%3D%221.35%22%20stroke-linejoin%3D%22miter%22%20stroke-linecap%3D%22square%22%2F%3E%3Cpolyline%20points%3D%2211.2%2C7.6%2018.2%2C14%2011.2%2C20.4%22%20stroke%3D%22%23D4AF5A%22%20stroke-width%3D%221.15%22%20stroke-linejoin%3D%22miter%22%20stroke-linecap%3D%22square%22%2F%3E%3Cpolygon%20points%3D%224.5%2C14%208.2%2C10.5%2011.9%2C14%208.2%2C17.5%22%20stroke%3D%22%238E6A1C%22%20stroke-width%3D%221.15%22%20stroke-linejoin%3D%22miter%22%2F%3E%3Cline%20x1%3D%228.2%22%20y1%3D%2214%22%20x2%3D%2215.4%22%20y2%3D%2214%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.0%22%2F%3E%3C%2Fsvg%3E");
  transform: rotate(0deg);
  transition: transform 180ms ease;
}
details.card[open] > summary::before {
  transform: rotate(90deg);
}

/* LEVEL 1 — Job Row (Hero Card: two-tone gold frame + stepped corners) */
.job-row {
  background: transparent;
  border: none;
  outline: none;
  margin-bottom: 14px;
}
.job-head {
  border: 1.5px solid var(--gold-dark);
  outline: 1px solid var(--gold-bright);
  outline-offset: -4px;
  padding: 12px 16px 12px 48px;
  min-height: 58px;
  font-size: 17.5px;
}
.job-head .badge {
  border-color: var(--hairline-strong);
  background: var(--paper-alt);
  font-size: 12px;
}
.job-head .badge-done {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border-color: var(--ok-ink);
}
.job-head .btn {
  min-height: 38px;
  padding: 0 13px;
  font-size: 14.5px;
}

.job-body {
  overflow: clip;
  padding: 8px 0 2px 18px;
  background: transparent;
}

/* LEVEL 2 — Assembly Row (Single crisp border + brass left bar, NO double outline) */
.tree-node {
  background: transparent;
  border: none;
  outline: none;
  margin: 0 0 8px 0;
  padding: 0;
}
.tree-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  min-height: 48px;
  background: var(--paper);
  border: 1px solid var(--hairline-strong);
  border-left: 3.5px solid var(--gold);
  outline: none;
  padding: 7px 12px;
}
.tree-toggle:hover {
  background: #fffdf8;
  border-color: var(--gold-dark);
}
.tree-node.open > .tree-row {
  background: var(--paper-alt);
  border-color: var(--gold-dark);
}

/* Replace plain ASCII caret with the Art Deco brass dropdown arrow */
.tree-caret {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  font-size: 0;
  line-height: 0;
  color: transparent;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2028%2028%22%20fill%3D%22none%22%3E%3Cpolyline%20points%3D%229.5%2C4.5%2012.5%2C4.5%2022.5%2C14%2012.5%2C23.5%209.5%2C23.5%22%20stroke%3D%22%23A88022%22%20stroke-width%3D%221.35%22%20stroke-linejoin%3D%22miter%22%20stroke-linecap%3D%22square%22%2F%3E%3Cpolyline%20points%3D%2211.2%2C7.6%2018.2%2C14%2011.2%2C20.4%22%20stroke%3D%22%23D4AF5A%22%20stroke-width%3D%221.15%22%20stroke-linejoin%3D%22miter%22%20stroke-linecap%3D%22square%22%2F%3E%3Cpolygon%20points%3D%224.5%2C14%208.2%2C10.5%2011.9%2C14%208.2%2C17.5%22%20stroke%3D%22%238E6A1C%22%20stroke-width%3D%221.15%22%20stroke-linejoin%3D%22miter%22%2F%3E%3Cline%20x1%3D%228.2%22%20y1%3D%2214%22%20x2%3D%2215.4%22%20y2%3D%2214%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.0%22%2F%3E%3C%2Fsvg%3E");
  transform: rotate(0deg);
  transition: transform 180ms ease;
}
.tree-node.open > .tree-row .tree-caret {
  transform: rotate(90deg);
}

/* Calm, scannable row metadata — no badge soup */
.tree-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 15.5px;
  min-width: 0;
}
.tree-meta .badge {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--gold-dark);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
}
/* Station tag gets a quiet hairline pill */
.tree-meta .badge.tree-station {
  background: var(--parchment);
  color: var(--ink-muted);
  border: 1px solid var(--hairline);
  padding: 1px 7px;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.tree-meta strong {
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.tree-meta .muted {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-muted);
}

/* LEVEL 3 — Part Rows (Quiet Drafting Ledger — no stacked box-in-box!) */
.tree-node .tree-node {
  margin: 0;
}
.tree-children {
  border: 1px solid var(--hairline);
  background: #fffdf8;
}
.tree-node .tree-node > .tree-row {
  background: #fffdf8;
  border: none;
  border-bottom: 1px solid #e3d8be;
  border-left: 2px solid transparent;
  outline: none;
  padding: 6px 10px;
  min-height: 44px;
}
.tree-node .tree-node:last-child > .tree-row {
  border-bottom: none;
}
.tree-node .tree-node > .tree-row.tree-toggle:hover {
  background: var(--paper-alt);
  border-left-color: var(--gold);
}
.tree-node .tree-node.open > .tree-row {
  background: var(--paper-alt);
  border-left-color: var(--gold-dark);
  border-bottom: 1px solid var(--hairline);
}

/* Segmented Stamp Controls (Fit | Fab | QC and - | +1) */
.tree-actions {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.tree-actions .badge {
  white-space: nowrap;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  padding: 4px 10px 4px 4px;
  letter-spacing: 0.02em;
}
.tree-actions .badge.badge-done {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border: 1px solid var(--ok-ink);
  padding: 3px 8px;
  margin-right: 8px;
}

.stamp-btn {
  min-height: 40px;
  min-width: 58px;
  padding: 0 11px;
  border: 1px solid var(--hairline-strong);
  border-radius: 0;
  background: #fffdf8;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  margin-left: -1px;
}
.stamp-btn:first-of-type {
  margin-left: 0;
}
.stamp-btn[data-op="part-dec"],
.stamp-btn[data-op="part-inc"] {
  min-width: 44px;
  padding: 0 10px;
}
.stamp-btn:hover:not(:disabled) {
  background: var(--amber-bg);
  position: relative;
  z-index: 1;
}
.stamp-btn.done {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border-color: var(--ok-ink);
  position: relative;
  z-index: 1;
}

/* Expanded Assembly Body & Drafting Print Plate */
.tree-body {
  overflow: clip;
  padding: 10px 0 6px 18px;
}
.tree-body-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  gap: 14px;
  align-items: start;
}
.tree-body-split > .tree-print-panel {
  margin-bottom: 0;
  position: static;
}
.tree-body-split > .tree-children {
  min-width: 0;
}
/* Nested levels stack print over children so deep rows keep full width */
.tree-children .tree-body-split {
  grid-template-columns: 1fr;
}
.tree-print-panel {
  border: 1.5px solid var(--gold-dark);
  background: var(--paper);
  padding: 6px;
  margin-bottom: 8px;
}
.tree-print-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto 17 / 11; /* a print's box is sized before it loads, so it never pops in */
  border: 1px solid var(--hairline);
  background: #ffffff;
  cursor: zoom-in;
}

@media (pointer: coarse) {
  .stamp-btn { min-height: 44px; }
  .job-head .btn { min-height: 44px; }
}
@media (max-width: 720px) {
  .job-body { padding-left: 8px; }
  .tree-body { padding-left: 8px; }
  .tree-row { padding: 8px 10px; }
  .tree-actions { width: 100%; justify-content: flex-end; margin-top: 2px; }
  .tree-actions:has([data-op="part-dec"]) { width: auto; margin-left: auto; }
}

/* Align leaf part rows (no .tree-caret) with expandable rows via subtle brass diamond bullet */
.tree-node .tree-node > .tree-row:not(.tree-toggle) .tree-meta::before {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 7px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  flex: none;
}

@media (max-width: 820px) {
  .tree-body-split {
    grid-template-columns: 1fr;
  }
}

/* Compact themed Art Deco quantity stepper: [ - ] [ 2 / 6 ] [ + ] via CSS order (approved by Cesar) */
.tree-actions:has([data-op="part-dec"]) {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--gold-dark);
  outline: 1px solid var(--gold-bright);
  outline-offset: -3px;
  background: #fffdf8;
  padding: 1px;
}
.tree-actions:has([data-op="part-dec"]) [data-op="part-dec"] {
  order: 1;
  width: 32px;
  min-width: 32px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  margin: 0;
  border: none;
  border-right: 1px solid var(--gold-mid);
  font-size: 0;
  color: transparent;
  background: var(--paper-alt) center / 28px 26px no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2030%22%20fill%3D%22none%22%3E%20%3Cpath%20d%3D%22M3%207.5%20V3%20H7.5%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%220.85%22%2F%3E%20%3Cpath%20d%3D%22M29%207.5%20V3%20H24.5%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%220.85%22%2F%3E%20%3Cpath%20d%3D%22M3%2022.5%20V27%20H7.5%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%220.85%22%2F%3E%20%3Cpath%20d%3D%22M29%2022.5%20V27%20H24.5%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%220.85%22%2F%3E%20%3Cline%20x1%3D%229%22%20y1%3D%2215%22%20x2%3D%2223%22%20y2%3D%2215%22%20stroke%3D%22%231C1710%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22square%22%2F%3E%20%3Cpolygon%20points%3D%225.5%2C15%208%2C12.8%2010.5%2C15%208%2C17.2%22%20fill%3D%22%23B08D3A%22%2F%3E%20%3Cpolygon%20points%3D%2221.5%2C15%2024%2C12.8%2026.5%2C15%2024%2C17.2%22%20fill%3D%22%23B08D3A%22%2F%3E%20%3C%2Fsvg%3E");
}
.tree-actions:has([data-op="part-dec"]) .badge {
  order: 2;
  min-height: 30px;
  min-width: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  margin: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.tree-actions:has([data-op="part-dec"]) .badge.badge-done {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border: none;
  margin: 0;
  padding: 0 8px;
}
.tree-actions:has([data-op="part-dec"]) [data-op="part-inc"] {
  order: 3;
  width: 32px;
  min-width: 32px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  margin: 0;
  border: none;
  border-left: 1px solid var(--gold-mid);
  font-size: 0;
  color: transparent;
  background: var(--paper-alt) center / 28px 26px no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2030%22%20fill%3D%22none%22%3E%20%3Cpath%20d%3D%22M3%207.5%20V3%20H7.5%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%220.85%22%2F%3E%20%3Cpath%20d%3D%22M29%207.5%20V3%20H24.5%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%220.85%22%2F%3E%20%3Cpath%20d%3D%22M3%2022.5%20V27%20H7.5%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%220.85%22%2F%3E%20%3Cpath%20d%3D%22M29%2022.5%20V27%20H24.5%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%220.85%22%2F%3E%20%3Cline%20x1%3D%2216%22%20y1%3D%227.8%22%20x2%3D%2216%22%20y2%3D%2222.2%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22square%22%2F%3E%20%3Cline%20x1%3D%228.8%22%20y1%3D%2215%22%20x2%3D%2223.2%22%20y2%3D%2215%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22square%22%2F%3E%20%3Cpolygon%20points%3D%2216%2C5.8%2017.7%2C7.5%2016%2C9.2%2014.3%2C7.5%22%20fill%3D%22%23C9A44C%22%2F%3E%20%3Cpolygon%20points%3D%2216%2C20.8%2017.7%2C22.5%2016%2C24.2%2014.3%2C22.5%22%20fill%3D%22%23C9A44C%22%2F%3E%20%3Cpolygon%20points%3D%226.8%2C15%208.5%2C13.3%2010.2%2C15%208.5%2C16.7%22%20fill%3D%22%23C9A44C%22%2F%3E%20%3Cpolygon%20points%3D%2221.8%2C15%2023.5%2C13.3%2025.2%2C15%2023.5%2C16.7%22%20fill%3D%22%23C9A44C%22%2F%3E%20%3Cpolygon%20points%3D%2216%2C13%2018%2C15%2016%2C17%2014%2C15%22%20fill%3D%22%231C1710%22%2F%3E%20%3C%2Fsvg%3E");
}
.tree-actions:has([data-op="part-dec"]) [data-op="part-inc"].done {
  background: var(--ok-bg) center / 28px 26px no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2030%22%20fill%3D%22none%22%3E%20%3Cpath%20d%3D%22M3%207.5%20V3%20H7.5%22%20stroke%3D%22%235B9B67%22%20stroke-width%3D%220.85%22%2F%3E%20%3Cpath%20d%3D%22M29%207.5%20V3%20H24.5%22%20stroke%3D%22%235B9B67%22%20stroke-width%3D%220.85%22%2F%3E%20%3Cpath%20d%3D%22M3%2022.5%20V27%20H7.5%22%20stroke%3D%22%235B9B67%22%20stroke-width%3D%220.85%22%2F%3E%20%3Cpath%20d%3D%22M29%2022.5%20V27%20H24.5%22%20stroke%3D%22%235B9B67%22%20stroke-width%3D%220.85%22%2F%3E%20%3Cline%20x1%3D%2216%22%20y1%3D%227.8%22%20x2%3D%2216%22%20y2%3D%2222.2%22%20stroke%3D%22%23184A22%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22square%22%2F%3E%20%3Cline%20x1%3D%228.8%22%20y1%3D%2215%22%20x2%3D%2223.2%22%20y2%3D%2215%22%20stroke%3D%22%23184A22%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22square%22%2F%3E%20%3Cpolygon%20points%3D%2216%2C5.8%2017.7%2C7.5%2016%2C9.2%2014.3%2C7.5%22%20fill%3D%22%235B9B67%22%2F%3E%20%3Cpolygon%20points%3D%2216%2C20.8%2017.7%2C22.5%2016%2C24.2%2014.3%2C22.5%22%20fill%3D%22%235B9B67%22%2F%3E%20%3Cpolygon%20points%3D%226.8%2C15%208.5%2C13.3%2010.2%2C15%208.5%2C16.7%22%20fill%3D%22%235B9B67%22%2F%3E%20%3Cpolygon%20points%3D%2221.8%2C15%2023.5%2C13.3%2025.2%2C15%2023.5%2C16.7%22%20fill%3D%22%235B9B67%22%2F%3E%20%3Cpolygon%20points%3D%2216%2C13%2018%2C15%2016%2C17%2014%2C15%22%20fill%3D%22%23184A22%22%2F%3E%20%3C%2Fsvg%3E");
  border-left-color: #9ec4a5;
}
.tree-actions:has([data-op="part-dec"]) .stamp-btn:hover:not(:disabled) {
  background-color: var(--amber-bg);
}
.tree-actions:has([data-op="part-dec"]) .stamp-btn:disabled {
  opacity: 0.38;
}
@media (pointer: coarse) {
  .tree-actions:has([data-op="part-dec"]) [data-op="part-dec"],
  .tree-actions:has([data-op="part-dec"]) [data-op="part-inc"] {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    background-size: 32px 30px;
  }
  .tree-actions:has([data-op="part-dec"]) .badge {
    min-height: 38px;
    min-width: 66px;
  }
}

/* ==========================================================================
   Tiered Art Deco Ornament Hierarchy (Job -> Assembly -> Part)
   ========================================================================== */

/* LEVEL 1 — Job Header: all 4 stepped corners + top-center gold diamond keystone */
.job-head {
  background-image:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M1%2015V4h3V1h11%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.2%22%2F%3E%3Cpath%20d%3D%22M1%2010V1h9%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%221%22%2F%3E%3Cpolygon%20points%3D%226.5%2C4.2%208.8%2C6.5%206.5%2C8.8%204.2%2C6.5%22%20stroke%3D%22%23B88E2B%22%20stroke-width%3D%220.9%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M15%2015V4h-3V1H1%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.2%22%2F%3E%3Cpath%20d%3D%22M15%2010V1H6%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%221%22%2F%3E%3Cpolygon%20points%3D%229.5%2C4.2%2011.8%2C6.5%209.5%2C8.8%207.2%2C6.5%22%20stroke%3D%22%23B88E2B%22%20stroke-width%3D%220.9%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M1%201v11h3v3h11%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.2%22%2F%3E%3Cpath%20d%3D%22M1%206v9h9%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%221%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M15%201v11h-3v3H1%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.2%22%2F%3E%3Cpath%20d%3D%22M15%206v9H6%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%221%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2248%22%20height%3D%2210%22%20viewBox%3D%220%200%2048%2010%22%20fill%3D%22none%22%3E%3Cline%20x1%3D%220%22%20y1%3D%225%22%20x2%3D%2217%22%20y2%3D%225%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%220.9%22%2F%3E%3Cline%20x1%3D%2231%22%20y1%3D%225%22%20x2%3D%2248%22%20y2%3D%225%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%220.9%22%2F%3E%3Cpolygon%20points%3D%2224%2C1.2%2028%2C5%2024%2C8.8%2020%2C5%22%20fill%3D%22%23E2C26C%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%220.9%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position:
    top 4px left 4px,
    top 4px right 4px,
    bottom 4px left 4px,
    bottom 4px right 4px,
    top 0px center;
}

/* LEVEL 2 — Assembly Row (closed, hover, and open): double-hairline frame, 4 stepped corner brackets, brass bar + diamond rail accent, subtle top-center pip */
.tree-node > .tree-row,
.tree-node.open > .tree-row {
  border: 1px solid var(--gold-dark);
  border-left: 4px solid var(--gold);
  outline: 1px solid #dfc993;
  outline-offset: -4px;
  box-shadow: none;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M1%2013V4h3V1h9%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.1%22%2F%3E%3Cpath%20d%3D%22M1%209V1h8%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%220.9%22%2F%3E%3Crect%20x%3D%224.5%22%20y%3D%224.5%22%20width%3D%222.2%22%20height%3D%222.2%22%20transform%3D%22rotate%2845%205.6%205.6%29%22%20fill%3D%22%23C9A44C%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M13%2013V4h-3V1H1%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.1%22%2F%3E%3Cpath%20d%3D%22M13%209V1H5%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%220.9%22%2F%3E%3Crect%20x%3D%227.3%22%20y%3D%224.5%22%20width%3D%222.2%22%20height%3D%222.2%22%20transform%3D%22rotate%2845%208.4%205.6%29%22%20fill%3D%22%23C9A44C%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M1%201v9h3v3h9%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.1%22%2F%3E%3Cpath%20d%3D%22M1%205v8h8%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%220.9%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M13%201v9h-3v3H1%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221.1%22%2F%3E%3Cpath%20d%3D%22M13%205v8H5%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%220.9%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2232%22%20viewBox%3D%220%200%2010%2032%22%20fill%3D%22none%22%3E%3Cline%20x1%3D%224%22%20y1%3D%222%22%20x2%3D%224%22%20y2%3D%2212%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221%22%2F%3E%3Cpolygon%20points%3D%224%2C13%207%2C16%204%2C19%201%2C16%22%20fill%3D%22%23E2C26C%22%20stroke%3D%22%237E6226%22%20stroke-width%3D%220.9%22%2F%3E%3Cline%20x1%3D%224%22%20y1%3D%2220%22%20x2%3D%224%22%20y2%3D%2230%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2232%22%20height%3D%228%22%20viewBox%3D%220%200%2032%208%22%20fill%3D%22none%22%3E%3Cline%20x1%3D%220%22%20y1%3D%224%22%20x2%3D%2211%22%20y2%3D%224%22%20stroke%3D%22%23D4AF5A%22%20stroke-width%3D%220.85%22%2F%3E%3Cline%20x1%3D%2221%22%20y1%3D%224%22%20x2%3D%2232%22%20y2%3D%224%22%20stroke%3D%22%23D4AF5A%22%20stroke-width%3D%220.85%22%2F%3E%3Cpolygon%20points%3D%2216%2C1.2%2019%2C4%2016%2C6.8%2013%2C4%22%20fill%3D%22%23FBF8F1%22%20stroke%3D%22%239B7A2C%22%20stroke-width%3D%220.9%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position:
    top 3px left 5px,
    top 3px right 3px,
    bottom 3px left 5px,
    bottom 3px right 3px,
    left 4px center,
    top 0px center;
  padding: 9px 16px 9px 22px;
}
.tree-node.open > .tree-row {
  background-color: var(--paper-alt);
}
.tree-node > .tree-row.tree-toggle:hover {
  background-color: #fffdf8;
}

/* LEVEL 3 — Part Ledger Container & Individual Part Rows */
.tree-children {
  border: 1px solid var(--gold-dark);
  outline: 1px solid #e1ce9c;
  outline-offset: -3px;
  background-color: #fffdf8;
  background-image:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2010%2010%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M1%209V1h8%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221%22%2F%3E%3Ccircle%20cx%3D%223.2%22%20cy%3D%223.2%22%20r%3D%220.9%22%20fill%3D%22%23B08D3A%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2010%2010%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M9%209V1H1%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221%22%2F%3E%3Ccircle%20cx%3D%226.8%22%20cy%3D%223.2%22%20r%3D%220.9%22%20fill%3D%22%23B08D3A%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2010%2010%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M1%201v8h8%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221%22%2F%3E%3Ccircle%20cx%3D%223.2%22%20cy%3D%226.8%22%20r%3D%220.9%22%20fill%3D%22%23B08D3A%22%2F%3E%3C%2Fsvg%3E"),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2010%2010%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M9%201v8H1%22%20stroke%3D%22%23C9A44C%22%20stroke-width%3D%221%22%2F%3E%3Ccircle%20cx%3D%226.8%22%20cy%3D%226.8%22%20r%3D%220.9%22%20fill%3D%22%23B08D3A%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position:
    top 3px left 3px,
    top 3px right 3px,
    bottom 3px left 3px,
    bottom 3px right 3px;
  padding: 4px 6px;
}
.tree-node .tree-node > .tree-row,
.tree-node .tree-node.open > .tree-row {
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%3E%3Cline%20x1%3D%224%22%20y1%3D%222%22%20x2%3D%224%22%20y2%3D%229%22%20stroke%3D%22%23D4AF5A%22%20stroke-width%3D%220.8%22%2F%3E%3Cpolygon%20points%3D%224%2C10%206%2C12%204%2C14%202%2C12%22%20fill%3D%22none%22%20stroke%3D%22%23B08D3A%22%20stroke-width%3D%220.85%22%2F%3E%3Cline%20x1%3D%224%22%20y1%3D%2215%22%20x2%3D%224%22%20y2%3D%2222%22%20stroke%3D%22%23D4AF5A%22%20stroke-width%3D%220.8%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: left 2px center;
  border: none;
  border-bottom: 1px solid #e5d9bc;
  border-left: none;
  outline: none;
  padding: 6px 10px 6px 14px;
  min-height: 44px;
}
.tree-node .tree-node:last-child > .tree-row {
  border-bottom: none;
}
.tree-node .tree-node > .tree-row.tree-toggle:hover {
  background-color: var(--paper-alt);
}
.tree-node .tree-node.open > .tree-row {
  background-color: var(--paper-alt);
  border-bottom: 1px solid var(--gold-mid);
}

/* Station time bars (M5). Neutral palette tokens; Designer may restyle. */
.tbar { display: flex; height: 14px; width: 100%; background: var(--paper-alt); border: 1px solid var(--hairline); }
.tbar-seg { display: inline-block; height: 100%; min-width: 2px; }
/* Station hues: nine distinct pigments, none of the status green/red. Designer may retune. */
.tbar-0 { background: #8a5a2b; }
.tbar-1 { background: #2f4a7a; }
.tbar-2 { background: #c79a2e; }
.tbar-3 { background: #3f7f78; }
.tbar-4 { background: #6b3f6e; }
.tbar-5 { background: #7a8a3a; }
.tbar-6 { background: #5a6b80; }
.tbar-7 { background: #b56a7a; }
.tbar-8 { background: #2b2a26; }
.touch-form input[type="time"], .touch-form input[type="number"] { min-height: 44px; }
.touch-form .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; }
.touch-form .chip input { width: 20px; height: 20px; }

/* Nest viewer (CNC): sheet tiles per job and material group, true-shape sheet drawing */
.nest-job + .nest-job { margin-top: 18px; }
.nest-group { margin-top: 10px; }
.nest-group-head { font-weight: 600; color: var(--ink-muted); border-bottom: 1px solid var(--hairline); padding-bottom: 4px; margin-bottom: 8px; }
.nest-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.nest-tile { border: 1px solid var(--hairline-strong); background: var(--paper); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.nest-tile-pic { display: block; }
.nest-svg { display: block; width: 100%; height: auto; }
.nest-thumb { max-height: 150px; }
.nest-plate { fill: var(--paper-alt); stroke: var(--ink); }
.nest-part { fill: var(--parchment); stroke: var(--ink); }
.nest-tile-pic:hover .nest-part { fill: var(--gold-hi); }
.nest-mark { fill: var(--ink); font-family: var(--font-mono); pointer-events: none; }
.nest-stage { margin: 12px 0; border: 1px solid var(--hairline-strong); background: var(--paper); padding: 8px; }
.nest-stage .nest-svg { max-height: 75vh; }
.nest-stage .nest-part:hover { fill: var(--gold-hi); }
/* Nest editor */
.nest-tools { align-items: center; flex-wrap: wrap; }
.nest-margin-pick { display: inline-flex; gap: 6px; align-items: center; }
.nest-edit-svg { touch-action: none; user-select: none; }
.nest-edit-svg .nest-part { cursor: grab; }
.nest-margin { fill: none; stroke: var(--ink-muted); stroke-width: 0.12; stroke-dasharray: 1 1; pointer-events: none; }
.nest-part.is-sel { fill: var(--gold-hi); stroke-width: 0.3; }
.nest-part.is-bad { fill: var(--warn-bg); stroke: var(--warn-ink); }
.nest-tray { display: flex; flex-wrap: wrap; gap: 8px; }

/* Round 2 (Cesar B8-B13) */
/* Reserve the scrollbar's space so the header never shifts when a page starts to scroll */
html { scrollbar-gutter: stable; }
/* Job code sits a few spaces after the job name */
.job-head .title-gap { margin-left: 1.25em; }
/* Every part (and part group) is its own small bordered card, not a line in one shared box */
.tree-children {
  border: none;
  outline: none;
  background: transparent;
  background-image: none;
  padding: 0;
}
.tree-node .tree-node { margin: 0 0 6px 0; }
.tree-node .tree-node > .tree-row,
.tree-node .tree-node.open > .tree-row,
.tree-node .tree-node:last-child > .tree-row {
  background-color: #fffdf8;
  border: 1px solid var(--gold-dark);
}
.tree-node .tree-node.open > .tree-row { background-color: var(--paper-alt); }
/* Top-level rows (assemblies and Ship Loose) share one height, with or without stamp buttons */
[data-job-tree] > .tree-node > .tree-row { min-height: 60px; }
@media (pointer: coarse) {
  [data-job-tree] > .tree-node > .tree-row { min-height: 64px; }
}
/* Phone: stamp buttons always take their own line on top rows, and Ship Loose keeps that line empty, so every top row is the same height */
@media (max-width: 720px) {
  [data-job-tree] > .tree-node > .tree-row > .tree-actions { flex-basis: 100%; height: 46px; }
  [data-job-tree] > .tree-node > .tree-row > .tree-actions .stamp-btn { height: 100%; min-height: 0; }
  [data-job-tree] > .tree-node > .tree-row > .tree-meta { min-height: 28px; align-items: center; }
}

/* Margin gear sketch (V2 redraw, original). Inked on the paper at the bottom-right of the page: it scrolls with the page, behind the cards. */
body { position: relative; min-height: 100vh; min-height: 100dvh; }
body::after {
  content: "";
  position: absolute;
  right: 60px;
  /* Held at a fixed spot from the page top (bottom of the first screen), so opening a dropdown never moves it */
  top: calc(100vh - 380px);
  top: calc(100svh - 380px);
  width: 520px;
  height: 380px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22520%22 height=%22640%22 viewBox=%220 0 520 640%22%3E%3Cg fill=%22none%22 stroke=%22%233A2F24%22 stroke-linejoin=%22round%22 stroke-linecap=%22round%22%3E%3Cpath d=%22M336.2,338.5 L347.2,354.1 L342.0,359.7 L325.6,349.7 L319.2,355.5 L327.4,372.8 L321.2,377.5 L306.9,364.8 L299.5,369.4 L304.6,387.9 L297.7,391.4 L285.8,376.4 L277.7,379.7 L279.5,398.7 L272.2,401.0 L263.0,384.2 L254.5,386.0 L252.9,405.1 L245.3,406.0 L239.2,387.9 L230.5,388.2 L225.6,406.7 L218.0,406.3 L215.1,387.4 L206.5,386.2 L198.5,403.5 L191.0,401.8 L191.4,382.7 L183.2,380.0 L172.3,395.7 L165.2,392.7 L169.0,374.0 L161.3,369.9 L147.9,383.5 L141.4,379.3 L148.4,361.5 L141.5,356.2 L125.9,367.2 L120.3,362.0 L130.3,345.6 L124.5,339.2 L107.2,347.4 L102.5,341.2 L115.2,326.9 L110.6,319.5 L92.1,324.6 L88.6,317.7 L103.6,305.8 L100.3,297.7 L81.3,299.5 L79.0,292.2 L95.8,283.0 L94.0,274.5 L74.9,272.9 L74.0,265.3 L92.1,259.2 L91.8,250.5 L73.3,245.6 L73.7,238.0 L92.6,235.1 L93.8,226.5 L76.5,218.5 L78.2,211.0 L97.3,211.4 L100.0,203.2 L84.3,192.3 L87.3,185.2 L106.0,189.0 L110.1,181.3 L96.5,167.9 L100.7,161.4 L118.5,168.4 L123.8,161.5 L112.8,145.9 L118.0,140.3 L134.4,150.3 L140.8,144.5 L132.6,127.2 L138.8,122.5 L153.1,135.2 L160.5,130.6 L155.4,112.1 L162.3,108.6 L174.2,123.6 L182.3,120.3 L180.5,101.3 L187.8,99.0 L197.0,115.8 L205.5,114.0 L207.1,94.9 L214.7,94.0 L220.8,112.1 L229.5,111.8 L234.4,93.3 L242.0,93.7 L244.9,112.6 L253.5,113.8 L261.5,96.5 L269.0,98.2 L268.6,117.3 L276.8,120.0 L287.7,104.3 L294.8,107.3 L291.0,126.0 L298.7,130.1 L312.1,116.5 L318.6,120.7 L311.6,138.5 L318.5,143.8 L334.1,132.8 L339.7,138.0 L329.7,154.4 L335.5,160.8 L352.8,152.6 L357.5,158.8 L344.8,173.1 L349.4,180.5 L367.9,175.4 L371.4,182.3 L356.4,194.2 L359.7,202.3 L378.7,200.5 L381.0,207.8 L364.2,217.0 L366.0,225.5 L385.1,227.1 L386.0,234.7 L367.9,240.8 L368.2,249.5 L386.7,254.4 L386.3,262.0 L367.4,264.9 L366.2,273.5 L383.5,281.5 L381.8,289.0 L362.7,288.6 L360.0,296.8 L375.7,307.7 L372.7,314.8 L354.0,311.0 L349.9,318.7 L363.5,332.1 L359.3,338.6 L341.5,331.6 Z%22 stroke-width=%221.1%22/%3E%3Ccircle cx=%22230%22 cy=%22250%22 r=%22120.4%22 stroke-width=%220.88%22/%3E%3Ccircle cx=%22230%22 cy=%22250%22 r=%2229.7%22 stroke-width=%220.88%22/%3E%3Ccircle cx=%22230%22 cy=%22250%22 r=%2211.9%22 stroke-width=%220.77%22/%3E%3Cline x1=%22247.5%22 y1=%22274.0%22 x2=%22295.0%22 y2=%22351.3%22 stroke-width=%220.88%22/%3E%3Cline x1=%22241.8%22 y1=%22277.2%22 x2=%22284.5%22 y2=%22357.3%22 stroke-width=%220.88%22/%3E%3Cline x1=%22218.0%22 y1=%22277.2%22 x2=%22174.7%22 y2=%22356.9%22 stroke-width=%220.88%22/%3E%3Cline x1=%22212.3%22 y1=%22273.9%22 x2=%22164.3%22 y2=%22350.9%22 stroke-width=%220.88%22/%3E%3Cline x1=%22200.5%22 y1=%22253.2%22 x2=%22109.8%22 y2=%22255.6%22 stroke-width=%220.88%22/%3E%3Cline x1=%22200.5%22 y1=%22246.6%22 x2=%22109.8%22 y2=%22243.6%22 stroke-width=%220.88%22/%3E%3Cline x1=%22212.5%22 y1=%22226.0%22 x2=%22165.0%22 y2=%22148.7%22 stroke-width=%220.88%22/%3E%3Cline x1=%22218.2%22 y1=%22222.8%22 x2=%22175.5%22 y2=%22142.7%22 stroke-width=%220.88%22/%3E%3Cline x1=%22242.0%22 y1=%22222.8%22 x2=%22285.3%22 y2=%22143.1%22 stroke-width=%220.88%22/%3E%3Cline x1=%22247.7%22 y1=%22226.1%22 x2=%22295.7%22 y2=%22149.1%22 stroke-width=%220.88%22/%3E%3Cline x1=%22259.5%22 y1=%22246.8%22 x2=%22350.2%22 y2=%22244.4%22 stroke-width=%220.88%22/%3E%3Cline x1=%22259.5%22 y1=%22253.4%22 x2=%22350.2%22 y2=%22256.4%22 stroke-width=%220.88%22/%3E%3Cpath d=%22M456.5,392.0 L473.9,399.8 L471.7,407.7 L452.8,405.4 L449.2,412.4 L462.3,426.4 L457.3,432.8 L440.6,423.4 L434.7,428.6 L441.4,446.4 L434.3,450.5 L422.5,435.4 L415.0,437.9 L414.4,457.0 L406.3,458.0 L401.2,439.6 L393.3,439.0 L385.5,456.4 L377.6,454.2 L379.9,435.3 L372.9,431.7 L358.9,444.8 L352.5,439.8 L361.9,423.1 L356.7,417.2 L338.9,423.9 L334.8,416.8 L349.9,405.0 L347.4,397.5 L328.3,397.0 L327.3,388.9 L345.7,383.7 L346.3,375.8 L328.9,368.0 L331.1,360.1 L350.0,362.4 L353.6,355.4 L340.5,341.5 L345.5,335.0 L362.2,344.4 L368.1,339.2 L361.4,321.4 L368.5,317.4 L380.3,332.4 L387.8,329.9 L388.3,310.8 L396.4,309.8 L401.6,328.2 L409.5,328.8 L417.3,311.4 L425.2,313.6 L422.9,332.5 L429.9,336.1 L443.8,323.0 L450.3,328.0 L440.9,344.7 L446.1,350.6 L463.9,343.9 L467.9,351.0 L452.9,362.8 L455.4,370.3 L474.5,370.9 L475.5,379.0 L457.1,384.1 Z%22 stroke-width=%221.0%22/%3E%3Ccircle cx=%22401.392338909462%22 cy=%22383.9063708833307%22 r=%2247.8%22 stroke-width=%220.80%22/%3E%3Ccircle cx=%22401.392338909462%22 cy=%22383.9063708833307%22 r=%2213.2%22 stroke-width=%220.80%22/%3E%3Ccircle cx=%22401.392338909462%22 cy=%22383.9063708833307%22 r=%225.3%22 stroke-width=%220.70%22/%3E%3Cline x1=%22413.2%22 y1=%22389.8%22 x2=%22442.8%22 y2=%22407.7%22 stroke-width=%220.80%22/%3E%3Cline x1=%22411.6%22 y1=%22392.2%22 x2=%22440.2%22 y2=%22411.7%22 stroke-width=%220.80%22/%3E%3Cline x1=%22395.5%22 y1=%22395.7%22 x2=%22377.6%22 y2=%22425.3%22 stroke-width=%220.80%22/%3E%3Cline x1=%22393.1%22 y1=%22394.2%22 x2=%22373.6%22 y2=%22422.8%22 stroke-width=%220.80%22/%3E%3Cline x1=%22389.6%22 y1=%22378.0%22 x2=%22360.0%22 y2=%22360.1%22 stroke-width=%220.80%22/%3E%3Cline x1=%22391.1%22 y1=%22375.6%22 x2=%22362.5%22 y2=%22356.1%22 stroke-width=%220.80%22/%3E%3Cline x1=%22407.3%22 y1=%22372.1%22 x2=%22425.2%22 y2=%22342.5%22 stroke-width=%220.80%22/%3E%3Cline x1=%22409.7%22 y1=%22373.7%22 x2=%22429.2%22 y2=%22345.1%22 stroke-width=%220.80%22/%3E%3Cpath d=%22M380.6,481.3 L398.8,486.9 L397.1,495.4 L378.1,493.4 L374.6,499.5 L386.1,514.7 L379.7,520.6 L365.5,507.8 L359.1,510.7 L359.4,529.8 L350.8,530.7 L346.9,512.1 L340.0,510.7 L329.1,526.3 L321.5,522.0 L329.3,504.6 L324.6,499.4 L306.5,505.6 L302.9,497.7 L319.5,488.1 L318.7,481.2 L300.5,475.6 L302.2,467.1 L321.2,469.1 L324.6,463.0 L313.2,447.8 L319.6,441.9 L333.8,454.7 L340.1,451.8 L339.8,432.7 L348.5,431.8 L352.4,450.4 L359.2,451.8 L370.2,436.2 L377.8,440.5 L370.0,457.9 L374.7,463.1 L392.7,456.9 L396.3,464.9 L379.8,474.4 Z%22 stroke-width=%220.9%22/%3E%3Ccircle cx=%22349.63309911231755%22 cy=%22481.25134299602735%22 r=%2226.0%22 stroke-width=%220.72%22/%3E%3Ccircle cx=%22349.63309911231755%22 cy=%22481.25134299602735%22 r=%228.2%22 stroke-width=%220.72%22/%3E%3Ccircle cx=%22349.63309911231755%22 cy=%22481.25134299602735%22 r=%223.3%22 stroke-width=%220.63%22/%3E%3Cline x1=%22357.3%22 y1=%22484.4%22 x2=%22373.0%22 y2=%22492.6%22 stroke-width=%220.72%22/%3E%3Cline x1=%22356.4%22 y1=%22486.0%22 x2=%22371.8%22 y2=%22494.9%22 stroke-width=%220.72%22/%3E%3Cline x1=%22343.1%22 y1=%22486.3%22 x2=%22328.1%22 y2=%22495.8%22 stroke-width=%220.72%22/%3E%3Cline x1=%22342.1%22 y1=%22484.7%22 x2=%22326.8%22 y2=%22493.6%22 stroke-width=%220.72%22/%3E%3Cline x1=%22348.6%22 y1=%22473.1%22 x2=%22347.8%22 y2=%22455.3%22 stroke-width=%220.72%22/%3E%3Cline x1=%22350.4%22 y1=%22473.0%22 x2=%22350.4%22 y2=%22455.3%22 stroke-width=%220.72%22/%3E%3Cg stroke-width=%220.6%22 opacity=%220.8%22%3E%3Cline x1=%2229.5%22 y1=%22250.0%22 x2=%22430.5%22 y2=%22250.0%22/%3E%3Cline x1=%22230.0%22 y1=%2249.5%22 x2=%22230.0%22 y2=%22450.5%22/%3E%3Cline x1=%22312.3%22 y1=%22383.9%22 x2=%22490.5%22 y2=%22383.9%22/%3E%3Cline x1=%22401.4%22 y1=%22294.8%22 x2=%22401.4%22 y2=%22473.0%22/%3E%3Cline x1=%22293.9%22 y1=%22481.3%22 x2=%22405.3%22 y2=%22481.3%22/%3E%3Cline x1=%22349.6%22 y1=%22425.6%22 x2=%22349.6%22 y2=%22536.9%22/%3E%3Cline x1=%22230%22 y1=%22250%22 x2=%22401.4%22 y2=%22383.9%22/%3E%3Cline x1=%22401.4%22 y1=%22383.9%22 x2=%22349.6%22 y2=%22481.3%22/%3E%3Ccircle cx=%22230%22 cy=%22250%22 r=%22148.5%22 stroke-dasharray=%226 4%22/%3E%3Ccircle cx=%22401.4%22 cy=%22383.9%22 r=%2266%22 stroke-dasharray=%225 4%22/%3E%3Ccircle cx=%22230%22 cy=%22250%22 r=%22190.5%22/%3E%3Cpath d=%22M290,250 A60,60 0 0 1 277.3,286.9%22/%3E%3Cline x1=%22420.5%22 y1=%22250.0%22 x2=%22429.5%22 y2=%22250.0%22/%3E%3Cline x1=%22414.0%22 y1=%22299.3%22 x2=%22418.8%22 y2=%22300.6%22/%3E%3Cline x1=%22395.0%22 y1=%22345.2%22 x2=%22399.3%22 y2=%22347.8%22/%3E%3Cline x1=%22364.7%22 y1=%22384.7%22 x2=%22368.2%22 y2=%22388.2%22/%3E%3Cline x1=%22325.2%22 y1=%22415.0%22 x2=%22327.8%22 y2=%22419.3%22/%3E%3Cline x1=%22279.3%22 y1=%22434.0%22 x2=%22280.6%22 y2=%22438.8%22/%3E%3Cline x1=%22230.0%22 y1=%22440.5%22 x2=%22230.0%22 y2=%22449.5%22/%3E%3Cline x1=%22180.7%22 y1=%22434.0%22 x2=%22179.4%22 y2=%22438.8%22/%3E%3Cline x1=%22134.8%22 y1=%22415.0%22 x2=%22132.3%22 y2=%22419.3%22/%3E%3Cline x1=%2295.3%22 y1=%22384.7%22 x2=%2291.8%22 y2=%22388.2%22/%3E%3Cline x1=%2265.0%22 y1=%22345.2%22 x2=%2260.7%22 y2=%22347.8%22/%3E%3Cline x1=%2246.0%22 y1=%22299.3%22 x2=%2241.2%22 y2=%22300.6%22/%3E%3Cline x1=%2239.5%22 y1=%22250.0%22 x2=%2230.5%22 y2=%22250.0%22/%3E%3Cline x1=%2246.0%22 y1=%22200.7%22 x2=%2241.2%22 y2=%22199.4%22/%3E%3Cline x1=%2265.0%22 y1=%22154.8%22 x2=%2260.7%22 y2=%22152.2%22/%3E%3Cline x1=%2295.3%22 y1=%22115.3%22 x2=%2291.8%22 y2=%22111.8%22/%3E%3Cline x1=%22134.7%22 y1=%2285.0%22 x2=%22132.2%22 y2=%2280.7%22/%3E%3Cline x1=%22180.7%22 y1=%2266.0%22 x2=%22179.4%22 y2=%2261.2%22/%3E%3Cline x1=%22230.0%22 y1=%2259.5%22 x2=%22230.0%22 y2=%2250.5%22/%3E%3Cline x1=%22279.3%22 y1=%2266.0%22 x2=%22280.6%22 y2=%2261.2%22/%3E%3Cline x1=%22325.2%22 y1=%2285.0%22 x2=%22327.8%22 y2=%2280.7%22/%3E%3Cline x1=%22364.7%22 y1=%22115.3%22 x2=%22368.2%22 y2=%22111.8%22/%3E%3Cline x1=%22395.0%22 y1=%22154.7%22 x2=%22399.3%22 y2=%22152.2%22/%3E%3Cline x1=%22414.0%22 y1=%22200.7%22 x2=%22418.8%22 y2=%22199.4%22/%3E%3Cline x1=%2281.5%22 y1=%2260%22 x2=%22378.5%22 y2=%2260%22/%3E%3Cline x1=%2281.5%22 y1=%2252%22 x2=%2281.5%22 y2=%22210%22/%3E%3Cline x1=%22378.5%22 y1=%2252%22 x2=%22378.5%22 y2=%22210%22/%3E%3Cpath d=%22M91.5,56 L81.5,60 L91.5,64%22/%3E%3Cpath d=%22M368.5,56 L378.5,60 L368.5,64%22/%3E%3Cline x1=%22150%22 y1=%22592%22 x2=%22370%22 y2=%22592%22/%3E%3Cline x1=%22150%22 y1=%22592%22 x2=%22150%22 y2=%22582%22/%3E%3Cline x1=%22170%22 y1=%22592%22 x2=%22170%22 y2=%22587%22/%3E%3Cline x1=%22190%22 y1=%22592%22 x2=%22190%22 y2=%22587%22/%3E%3Cline x1=%22210%22 y1=%22592%22 x2=%22210%22 y2=%22587%22/%3E%3Cline x1=%22230%22 y1=%22592%22 x2=%22230%22 y2=%22587%22/%3E%3Cline x1=%22250%22 y1=%22592%22 x2=%22250%22 y2=%22582%22/%3E%3Cline x1=%22270%22 y1=%22592%22 x2=%22270%22 y2=%22587%22/%3E%3Cline x1=%22290%22 y1=%22592%22 x2=%22290%22 y2=%22587%22/%3E%3Cline x1=%22310%22 y1=%22592%22 x2=%22310%22 y2=%22587%22/%3E%3Cline x1=%22330%22 y1=%22592%22 x2=%22330%22 y2=%22587%22/%3E%3Cline x1=%22350%22 y1=%22592%22 x2=%22350%22 y2=%22582%22/%3E%3Cline x1=%22370%22 y1=%22592%22 x2=%22370%22 y2=%22587%22/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") no-repeat center top / 520px auto;
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}
.topbar, .main { position: relative; z-index: 1; }
@media (max-width: 1100px) {
  body::after { top: calc(100vh - 320px); top: calc(100svh - 320px); width: 260px; height: 320px; right: 0; background-size: 300px auto; background-position: left top; opacity: 0.14; }
}
