/* UL 300 Designer platform theme (UI only).
   Visual style matched to the platform's public brand site (computed styles read 2026-11-20):
   header #000000, nav bar #222222, call-to-action red #DC2626 (pill, 9999px radius,
   shadow rgba(220,38,38,.2) 0 4px 6px -1px), accent red #D31B26, link blue #2B5472,
   text #1A1A1A, muted #475569, field #EFEFEF, input border #707070 (3px radius),
   panel #F5F4F5, rule #DDDDDD, card radius 7px, header shadow rgba(0,0,0,.09) 0 3px 6px.
   Hover red #B91C1C is a darker step of #DC2626 (not on the site).
   Font: Poppins (SIL OFL 1.1, bundled locally as Latin subsets; see poppins-OFL.txt).
   The site's heading face (ITC Avant Garde Gothic Bold) is a commercial font and is NOT
   bundled; headings use Poppins 600/700 instead. Nothing is loaded from outside this app.
   The logo is the platform wordmark (brand-logo.png) and favicon (brand-icon.png), served from
   /platform-brand/ (UL300_PLATFORM_BRAND_DIR, default /workspace/data/platform; not in git).
   If a file is missing, the header shows the plain text "UL 300", never a company logo.
   It is never drawn on plans or title blocks; contractor logos come only from each company's own
   profile. Company names stay out of tracked text (privacy rule), so the logo has empty alt text. */
@font-face{font-family:"Poppins";font-style:normal;font-weight:400;font-display:swap;src:url(/static/poppins-400.woff) format("woff")}
@font-face{font-family:"Poppins";font-style:normal;font-weight:500;font-display:swap;src:url(/static/poppins-500.woff) format("woff")}
@font-face{font-family:"Poppins";font-style:normal;font-weight:600;font-display:swap;src:url(/static/poppins-600.woff) format("woff")}
@font-face{font-family:"Poppins";font-style:normal;font-weight:700;font-display:swap;src:url(/static/poppins-700.woff) format("woff")}
:root{
 --hp-black:#000000; --hp-bar:#222222; --hp-red:#DC2626; --hp-red-dark:#B91C1C; --hp-red-accent:#D31B26;
 --hp-blue:#2B5472; --hp-text:#1A1A1A; --hp-muted:#475569; --hp-field:#EFEFEF; --hp-input:#707070;
 --hp-panel:#F5F4F5; --hp-rule:#DDDDDD; --hp-white:#FFFFFF; --hp-green:#1A8A4A;
 --hp-font:"Poppins",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
 --hp-radius:7px; --hp-shadow:0 3px 6px rgba(0,0,0,.09); --hp-tap:44px;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body.hp{font:15px/1.5 var(--hp-font);margin:0;background:var(--hp-panel);color:var(--hp-text)}
body.hp a{color:var(--hp-blue)}
body.hp a:hover{color:var(--hp-red-dark)}
body.hp :focus-visible{outline:3px solid var(--hp-red-accent);outline-offset:2px}
body.hp small,body.hp .muted{color:var(--hp-muted)}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;left:-999px;top:0;background:#fff;color:#000;padding:10px 14px;z-index:100}
.skip:focus{left:8px;top:8px}

/* ---------- header + nav (black bar, #222 nav like the public site) ---------- */
.hp-top{background:var(--hp-black);color:#fff;box-shadow:var(--hp-shadow);position:relative;z-index:20}
.hp-top-in{display:flex;align-items:center;gap:14px;padding:10px 18px;min-height:64px;max-width:1440px;margin:0 auto}
.hp-brand{display:flex;align-items:center;gap:12px;color:#fff !important;text-decoration:none;min-height:var(--hp-tap)}
.hp-brand img{height:24px;width:auto;display:block}
.hp-brand{min-width:0;flex:0 1 auto}
.hp-brand img{flex:0 0 auto}
.hp-brand img[hidden]{display:none}
.hp-brand .hp-wordmark-fallback{flex:0 0 auto;font-weight:700;font-size:22px;letter-spacing:.02em;color:#fff;line-height:1;white-space:nowrap}
.hp-brand .hp-wordmark-fallback[hidden]{display:none}
.hp-brand .app{font-weight:600;font-size:15px;line-height:1.15;border-left:1px solid #555;padding-left:12px;letter-spacing:.01em;min-width:0;display:block}
.hp-brand .app-line{display:flex;align-items:baseline;min-width:0;white-space:nowrap}
.hp-brand .app-name{flex:0 0 auto}
/* signed-in user's own company (from /api/auth/me, set with textContent); ellipsis when long */
.hp-brand .hp-co{display:block;min-width:0;max-width:32ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;color:#fff}
.hp-brand .hp-co[hidden]{display:none}
.hp-brand .hp-co::before{content:"\00B7";padding:0 .45em;color:#BDBDBD}
.hp-brand .app-sub{display:block;font-weight:400;font-size:12px;color:#BDBDBD}
.hp-top .spacer{flex:1}
.hp-who{color:#E5E5E5;font-size:13px;max-width:34ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hp-menu-btn,body.hp .hp-menu-btn{display:none;background:transparent !important;color:#fff !important;border:1px solid #555 !important;border-radius:3px !important;min-height:var(--hp-tap);min-width:var(--hp-tap);padding:0 12px !important;font-weight:600;box-shadow:none !important}
.hp-nav{background:var(--hp-bar)}
.hp-nav ul{list-style:none;margin:0 auto;padding:0 10px;display:flex;flex-wrap:wrap;max-width:1440px}
.hp-nav a{display:flex;align-items:center;min-height:48px;padding:0 16px;color:#fff !important;text-decoration:none;font-weight:600;font-size:13.5px;text-transform:uppercase;letter-spacing:.03em;border-bottom:3px solid transparent}
.hp-nav a:hover{background:#333}
.hp-nav a[aria-current="page"]{border-bottom-color:var(--hp-red)}
.hp-nav .who-m{display:none}
@media (max-width:760px){
 .hp-top-in{padding:8px 12px;min-height:58px;gap:10px}
 .hp-brand img{height:18px}
 .hp-brand .hp-wordmark-fallback{font-size:16px}
 .hp-brand .app{font-size:13px;padding-left:10px}
 .hp-brand .app-sub{display:none}
 /* phone: company drops to a second line under the app name so more of it shows; still one line, ellipsis */
 .hp-brand .app-line{flex-direction:column;align-items:flex-start}
 .hp-brand .hp-co{max-width:100%;font-size:12px;font-weight:500;color:#E5E5E5;margin-top:1px}
 .hp-brand .hp-co::before{content:none}
 .hp-brand .app-name{max-width:100%}
 .hp-who{display:none}
 body.hp .hp-menu-btn{display:inline-flex;align-items:center}
 .hp-nav{display:none}
 .hp-nav.open{display:block}
 .hp-nav ul{flex-direction:column;padding:4px 0}
 .hp-nav a{min-height:48px;border-bottom:1px solid #333;border-left:4px solid transparent}
 .hp-nav a[aria-current="page"]{border-bottom-color:#333;border-left-color:var(--hp-red)}
 .hp-nav .who-m{display:block;color:#ccc;padding:10px 16px;font-size:13px}
 .hp-nav .who-m:empty{display:none}
}

/* ---------- page layout ---------- */
.hp-main{max-width:1100px;margin:22px auto;padding:0 16px}
.hp-main.narrow{max-width:780px}
.hp-page-title{font-weight:700;font-size:26px;line-height:1.2;margin:4px 0 4px}
.hp-page-sub{margin:0 0 18px;color:var(--hp-muted)}
.card{background:#fff;border:1px solid var(--hp-rule);border-radius:var(--hp-radius);box-shadow:var(--hp-shadow);padding:18px 20px;margin:0 0 16px}
.card > h2,.card > h3{font-weight:600;font-size:17px;line-height:1.3;margin:0 0 12px;text-transform:none;letter-spacing:0;color:var(--hp-text)}
.card > h2::after{content:"";display:block;width:36px;height:3px;background:var(--hp-red);border-radius:2px;margin-top:6px}
@media (max-width:760px){.hp-main{margin:14px auto;padding:0 10px}.card{padding:14px}.hp-page-title{font-size:22px}}

/* ---------- forms ---------- */
body.hp label{display:block;margin:10px 0;font-weight:500;font-size:14px}
body.hp input:not([type=checkbox]):not([type=radio]),body.hp select,body.hp textarea{font:inherit;font-size:16px;font-weight:400;color:var(--hp-text);background:#fff;border:1px solid var(--hp-input);border-radius:3px;padding:9px 10px;min-height:var(--hp-tap);max-width:100%}
body.hp label > input:not([type=checkbox]):not([type=radio]),body.hp label > select,body.hp label > textarea{display:block;width:100%;margin-top:4px}
body.hp input[type=file]{padding:8px;background:var(--hp-field);border-style:dashed}
body.hp input[type=checkbox],body.hp input[type=radio]{width:20px;height:20px;accent-color:var(--hp-red);vertical-align:middle;margin:0 6px 0 0}
body.hp input:focus,body.hp select:focus,body.hp textarea:focus{border-color:var(--hp-text);outline:3px solid rgba(220,38,38,.25);outline-offset:0}
body.hp input:user-invalid{border-color:var(--hp-red-dark)}
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:0 16px}
.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px;align-items:center}
.hint{font-size:13px;color:var(--hp-muted);margin:4px 0 0;font-weight:400}

/* ---------- buttons (pill CTA like the public site) ---------- */
body.hp button,body.hp .btn{font:inherit;font-size:15px;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:var(--hp-tap);padding:8px 20px;border-radius:9999px;border:1px solid var(--hp-bar);background:#fff;color:var(--hp-text);cursor:pointer;text-decoration:none;line-height:1.2;white-space:nowrap}
body.hp button:hover,body.hp .btn:hover{background:var(--hp-field);color:var(--hp-text)}
body.hp button.primary,body.hp .btn.primary{background:var(--hp-red);border-color:var(--hp-red);color:#fff;box-shadow:0 4px 6px -1px rgba(220,38,38,.2)}
body.hp button.primary:hover,body.hp .btn.primary:hover{background:var(--hp-red-dark);border-color:var(--hp-red-dark);color:#fff}
body.hp button:disabled{opacity:.55;cursor:not-allowed}
body.hp button.link{border:0;background:none;padding:0 4px;color:var(--hp-blue);text-decoration:underline;min-height:var(--hp-tap);border-radius:3px}

/* ---------- messages + status ---------- */
#msg:empty{display:none}
#msg p,.alert{margin:0 0 14px;padding:12px 14px;border-radius:var(--hp-radius);border:1px solid;background:#fff;font-weight:500}
#msg p.FAIL,.alert.bad{border-color:#F3B4B4;background:#FEF2F2;color:#9B1C1C}
#msg p.ok,.alert.good{border-color:#A7DDBE;background:#F0FBF4;color:#14653A}
.FAIL{color:#B00020} .ok{color:#14653A} .WARN{color:#8A5300} .NEEDS_REVIEW{color:#6A1B9A} .PASS{color:#14653A} .NOT_IMPLEMENTED{color:#666}
.pill{display:inline-block;padding:3px 10px;border-radius:9999px;font-size:12.5px;font-weight:600;line-height:1.5;white-space:nowrap;border:1px solid transparent}
.pill.status-blocked{background:#FEF2F2;color:#9B1C1C;border-color:#F3B4B4}
.pill.status-needs{background:#F5EEFA;color:#5B1784;border-color:#DCC4EC}
.pill.status-draft{background:#F1F1F1;color:#333;border-color:#D4D4D4}
.pill.status-approved{background:#F0FBF4;color:#14653A;border-color:#A7DDBE}
.pill.status-issued{background:#EEF4F9;color:#1E3F57;border-color:#B9CCDB}
.hid{display:none !important}

/* ---------- tables ---------- */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--hp-rule);border-radius:var(--hp-radius)}
body.hp table{width:100%;border-collapse:collapse;font-size:14px}
body.hp th{background:var(--hp-panel);font-weight:600;text-align:left;padding:10px;border-bottom:1px solid var(--hp-rule);white-space:nowrap}
body.hp td{text-align:left;padding:10px;border-top:1px solid #EEE;vertical-align:top}
body.hp tbody tr:hover td{background:#FAFAFA}
@media (max-width:760px){
 .card table:not(.stack){display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
 /* stacked cards: each row becomes a card, each cell shows its column label */
 table.stack,table.stack tbody,table.stack tr,table.stack td{display:block;width:100%}
 table.stack thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
 table.stack tr{border:1px solid var(--hp-rule);border-radius:var(--hp-radius);margin:0 0 12px;background:#fff;box-shadow:var(--hp-shadow);overflow:hidden}
 table.stack td{border:0;border-top:1px solid #F0F0F0;padding:8px 12px;display:flex;gap:12px;justify-content:space-between;text-align:right}
 table.stack td:first-child{border-top:0;background:var(--hp-panel);font-weight:600;text-align:left;display:block}
 table.stack td::before{content:attr(data-label);font-weight:500;color:var(--hp-muted);text-align:left;flex:0 0 40%}
 table.stack td:first-child::before,table.stack td.no-label::before{content:none}
 table.stack td.no-label{display:block;text-align:left}
 .table-wrap.stack-wrap{border:0;overflow:visible}
}
.row-links{display:flex;flex-wrap:wrap;gap:4px 6px;min-width:200px}
.row-links a{display:inline-flex;align-items:center;min-height:36px;padding:2px 10px;border:1px solid var(--hp-rule);border-radius:9999px;text-decoration:none;font-size:13px;font-weight:500;background:#fff}
.row-links a:hover{border-color:var(--hp-red);color:var(--hp-red-dark)}
@media (max-width:760px){.row-links a{min-height:var(--hp-tap);padding:2px 14px}}
pre{background:var(--hp-panel);border:1px solid var(--hp-rule);border-radius:var(--hp-radius);padding:10px;overflow:auto;max-height:420px;font-size:12.5px}
