/* Approved blue direction. Presentation only; session concealment and [hidden]
   remain owned by the existing identity / pending-operation controllers. */
/* The single V2 token source (v2/styles.css :root). It is re-asserted on the shell
   body because older layers still redefine tokens on body and .precision. */
:root, body.precision.h3d-blue {
  --blue:#1a80b6; --blue-dark:#105378; --blue-bright:#03a9f4; --blue-soft:#e8f4fb;
  --bg:#f3f6f8; --ink:#172b3b; --muted:#617483; --line:#dce5eb; --surface:#fff;
  --danger:#b44343; --warning:#916219; --success:#206a94; --surface-2:#edf3f7; --accent-ink:#fff;
  --radius:10px; --radius-control:6px; --shadow:0 6px 24px #15364d07;
  --font-sans:'Avenir Next',Avenir,'Segoe UI',Arial,sans-serif; --font-mono:'SFMono-Regular',Consolas,monospace;
  /* Legacy names still read by older layers. They only alias the V2 tokens. */
  --accent:var(--blue); --accent-dark:var(--blue-dark); --reference-blue:var(--blue);
  --soft:var(--blue-soft); --paper:var(--bg); --font:var(--font-sans);
}
body.precision.h3d-blue { background:var(--bg); color:var(--ink); }
/* The V2 customer header is white; old charcoal-header link colors do not apply. */
body.precision.h3d-blue.public-shell .customer-header .customer-navigation a { color:var(--muted); }
body.precision.h3d-blue.public-shell .customer-header .customer-navigation a:is([aria-current="page"],:hover,:focus-visible) { color:var(--blue-dark); }
/* Focus ring keeps the darker V2 blue: #03a9f4 is below 3:1 against white. */
.h3d-blue :is(a,button,input,select,textarea,summary):focus-visible { outline:3px solid var(--blue); outline-offset:3px; }
/* First focus stop on every page; it must stay above the sticky rail and the drawer. */
body.h3d-blue .skip { top:-100px; left:20px; z-index:100; padding:15px; background:var(--blue-dark); color:#fff; border-radius:var(--radius-control); }
body.h3d-blue .skip:focus { top:5px; outline-color:#fff; box-shadow:0 0 0 6px var(--blue-dark); }
body.h3d-blue .brand { letter-spacing:-.045em; color:var(--ink); gap:10px; }
body.h3d-blue .brand>span::after { content:none; }
body.h3d-blue .h3d-brand-mark { display:inline-flex; align-items:baseline; justify-content:center; width:36px; height:38px; padding-top:5px; background:#03a9f4; border-radius:7px; color:#073c5b; font-size:25px; font-weight:750; line-height:1; flex:none; }
.h3d-brand-mark sup { position:relative; top:-.35em; font-size:13px; margin-left:1px; }
body.h3d-blue .button { background:var(--blue-dark); border-color:var(--blue-dark); border-radius:var(--radius-control); }
body.h3d-blue .button.secondary { background:#fff; color:var(--ink); border-color:var(--line); }
body.h3d-blue .button:disabled { opacity:.5; cursor:not-allowed; }
body.h3d-blue :is(.panel,.bench-section,.web-card,.finance-card,.production-card,.shipping-card,.communication-card) { border-color:var(--line); border-radius:10px; }
body.h3d-blue .precision-help-menu summary { color:var(--muted); }
.h3d-blue .h3d-tools { position:relative; margin:0; padding:0; border:0; }
.h3d-blue .h3d-tools>summary { display:flex; align-items:center; gap:7px; padding:10px 12px; min-height:44px; cursor:pointer; font-size:12px; font-weight:600; list-style:none; }
.h3d-blue .h3d-tools>summary::-webkit-details-marker { display:none; }
.h3d-blue .h3d-tools-panel { min-width:220px; padding:8px; border:1px solid var(--line); border-radius:9px; background:#fff; box-shadow:0 12px 32px #1934481a; }
body.h3d-blue .h3d-tools-panel a { display:flex; align-items:center; gap:8px; min-height:44px; padding:10px 12px; font-size:12px; color:var(--ink); text-decoration:none; border-radius:6px; }
body.h3d-blue .h3d-tools-panel a[aria-current=page] { background:var(--blue-soft); color:var(--blue-dark); }
/* V2 workspace geometry. Public and authentication headers retain their own layout.
   Use inherit, never visible: identity concealment on .app-frame is authoritative. */
body.precision.h3d-blue:is(.admin-shell,.customer-shell) .app-frame { display:grid; grid-template-columns:252px minmax(0,1fr); gap:0; padding:0; margin:0; max-width:none; min-height:100dvh; align-items:start; }
body.precision.h3d-blue:is(.admin-shell,.customer-shell) .page-background { min-width:0; padding:0; background:var(--bg); }
body.precision.h3d-blue:is(.admin-shell,.customer-shell) #main { width:100%; max-width:none; margin:0; padding:34px 32px 58px; }
body.precision.h3d-blue:is(.admin-shell,.customer-shell) #main>.h3d-customer { padding-top:0; padding-bottom:0; }
body.precision.h3d-blue:is(.admin-shell,.customer-shell) .admin-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:nowrap; gap:16px; margin:0; width:100%; padding:15px 32px; min-height:75px; background:#fff; border:0; border-bottom:1px solid var(--line); border-radius:0; }
body.precision.h3d-blue .precision-breadcrumb { display:flex; align-items:center; gap:14px; min-width:0; color:var(--muted); font-size:12px; }
body.precision.h3d-blue .precision-breadcrumb strong { font-weight:600; color:var(--ink); min-width:0; overflow-wrap:anywhere; font-size:12px; }
body.precision.h3d-blue .precision-breadcrumb>.h3d-workspace-role { display:inline; font-size:11px; white-space:nowrap; }
body.precision.h3d-blue .precision-breadcrumb>.h3d-workspace-divider { display:inline; color:#beced9; }
body.precision.h3d-blue .precision-topbar-right { display:flex; align-items:center; gap:14px; flex:none; }
body.precision.h3d-blue .precision-toolbar-action { display:inline-flex; gap:7px; align-items:center; color:#fff; font-size:12px; }
body.precision.h3d-blue .precision-icon { width:19px; height:19px; flex:none; vertical-align:middle; }
body.precision.h3d-blue .precision-avatar { display:inline-grid; place-items:center; width:35px; height:35px; flex:none; border-radius:50%; background:#d9effa; color:var(--blue-dark); font-size:11px; font-weight:650; }
body.precision.h3d-blue .precision-avatar.dark { background:var(--blue-dark); color:#fff; }
body.precision.h3d-blue .client-review-notice { background:#edf6fc; border-color:#c6e2f0; }
body.precision.h3d-blue .precision-help-menu[open] { z-index:91; }
body.precision.h3d-blue:is(.admin-shell,.customer-shell) .site-footer { width:calc(100% - 64px); max-width:1326px; margin:0 auto; padding:23px 0 28px; }
body.precision.h3d-blue:is(.admin-shell,.customer-shell) .page-background>.client-review-notice { margin:12px 32px 0; }
body.precision.h3d-blue:is(.admin-shell,.customer-shell) :is(#admin-sidebar,#customer-sidebar) { position:sticky; inset:0 auto auto 0; top:0; z-index:60; align-self:start; width:100%; height:100dvh; max-height:100dvh; min-height:0; display:flex; flex-direction:column; align-items:stretch; gap:0; padding:0; overflow:hidden; border:0; border-radius:0; background:var(--blue-dark); color:#fff; box-shadow:inset -1px 0 #ffffff12; transform:none; visibility:inherit; }
body.precision.h3d-blue .admin-sidebar .sidebar-brand { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0; padding:30px 24px 28px; min-height:0; flex:none; }
body.precision.h3d-blue .admin-sidebar .sidebar-brand .brand { color:#fff; font-size:24px; gap:11px; }
body.precision.h3d-blue .admin-sidebar .h3d-brand-mark { background:#fff; color:var(--blue-dark); }
body.precision.h3d-blue .admin-sidebar .brand .brand-sub { display:block; color:#bedbe9; font-size:9px; font-weight:500; letter-spacing:.6px; margin-top:4px; }
body.precision.h3d-blue .admin-sidebar .h3d-sidebar-scroll { flex:1 1 auto; min-height:0; padding:0 14px 20px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#71a6c3 transparent; }
body.precision.h3d-blue .admin-sidebar .h3d-sidebar-caption { margin:0 14px 12px; font-family:inherit; font-size:9px; font-weight:700; letter-spacing:1.8px; text-transform:uppercase; color:#afd0e3; }
body.precision.h3d-blue .admin-sidebar .h3d-context-caption { margin-top:30px; }
body.precision.h3d-blue :is(#admin-sidebar,#customer-sidebar) :is(.precision-navigation,.customer-navigation) { display:grid; grid-template-columns:minmax(0,1fr); align-items:stretch; gap:4px; flex:none; width:100%; padding:0; margin:0; border:0; background:none; }
body.precision.h3d-blue :is(#admin-sidebar,#customer-sidebar) nav a { display:flex; align-items:center; gap:12px; min-height:45px; padding:11px 14px; border:0; border-radius:7px; font-size:12px; font-weight:500; line-height:1.4; color:#e2eef6; background:transparent; text-decoration:none; white-space:normal; box-shadow:none; transition:background .16s,color .16s; }
body.precision.h3d-blue :is(#admin-sidebar,#customer-sidebar) nav a>span:not(.work-nav-count) { min-width:0; width:auto; flex:1; font-size:inherit; text-align:left; }
body.precision.h3d-blue :is(#admin-sidebar,#customer-sidebar) nav a>.precision-icon { width:19px; height:19px; color:#a8cfe4; flex:none; }
body.precision.h3d-blue :is(#admin-sidebar,#customer-sidebar) nav a:is(.is-active,[aria-current=page]) { background:#fff; color:var(--blue-dark); box-shadow:0 3px 12px #00274013; font-weight:700; }
body.precision.h3d-blue :is(#admin-sidebar,#customer-sidebar) nav a:is(.is-active,[aria-current=page])>.precision-icon { color:var(--blue); }
/* V2 marks every current rail link with the dot, including the customer account group. */
body.precision.h3d-blue :is(#admin-sidebar .h3d-primary-navigation,#customer-sidebar nav) a:is(.is-active,[aria-current=page])::after { content:""; width:5px; height:5px; border-radius:50%; background:var(--blue); flex:none; }
body.precision.h3d-blue :is(#admin-sidebar,#customer-sidebar) .h3d-context-navigation a { min-height:40px; font-size:11px; }
body.precision.h3d-blue :is(#admin-sidebar,#customer-sidebar) .h3d-context-navigation .h3d-nav-child { margin-left:16px; border-left:1px solid #ffffff38; padding-left:15px; border-radius:0 7px 7px 0; }
body.precision.h3d-blue :is(#admin-sidebar,#customer-sidebar) .work-nav-count { margin-left:auto; background:#e8f4fb; color:var(--blue-dark); font-size:10px; border:0; flex:none; }
body.precision.h3d-blue .admin-sidebar .h3d-account-menu { padding:0; margin:30px 0 0; border:0; }
body.precision.h3d-blue .admin-sidebar .h3d-account-menu>summary { display:flex; align-items:center; justify-content:space-between; min-height:44px; cursor:pointer; list-style:none; margin-bottom:4px; }
body.precision.h3d-blue .h3d-account-menu>summary::-webkit-details-marker { display:none; }
body.precision.h3d-blue .h3d-account-menu>summary>.precision-icon { width:14px; height:14px; }
body.precision.h3d-blue .h3d-account-menu[open]>summary>.precision-icon { transform:rotate(90deg); }
body.precision.h3d-blue:is(.admin-shell,.customer-shell) .sidebar-bottom { flex:none; max-width:none; display:block; border-top:1px solid #ffffff22; padding:20px 20px 23px; margin:0; background:#0c47680d; color:#fff; }
body.precision.h3d-blue .admin-sidebar .precision-profile { display:flex; align-items:center; gap:10px; padding:5px 3px; border:0; text-decoration:none; min-width:0; }
body.precision.h3d-blue .admin-sidebar .precision-profile>:is(div,span:not(.precision-avatar)) { flex:1; min-width:0; overflow-wrap:anywhere; }
body.precision.h3d-blue .admin-sidebar .sidebar-bottom strong { display:block; font-size:11px; font-weight:600; color:#fff; line-height:1.5; }
body.precision.h3d-blue .admin-sidebar .sidebar-bottom :is(small,.internal-role-labels) { display:block; margin-top:2px; color:#b9d5e6; font-size:10px; line-height:1.5; }
body.precision.h3d-blue .admin-sidebar .sidebar-bottom :is(.sidebar-link,.sidebar-logout) { display:flex; align-items:center; gap:10px; color:#bedbe9; min-height:40px; border:0; background:transparent; padding:3px; font-size:10px; text-decoration:none; }
body.precision.h3d-blue .admin-sidebar .sidebar-link { margin:8px 0 0; }
body.precision.h3d-blue .admin-sidebar .sidebar-logout { flex:none; width:40px; margin:0; justify-content:center; }
body.precision.h3d-blue .admin-sidebar #logout-message { color:#fff; }
body.precision.h3d-blue .admin-sidebar :focus-visible { outline-color:#a6e0ff; outline-offset:2px; }
body.precision.h3d-blue:is(.admin-shell,.customer-shell) :is(#menu-toggle,#menu-close) { display:none; }
body.precision.h3d-blue:is(.admin-shell,.customer-shell) [hidden] { display:none!important; }
@media(min-width:1051px) {
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) .menu-backdrop { display:none; }
}
@media(max-width:1050px) {
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) .app-frame { grid-template-columns:minmax(0,1fr); }
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) :is(#admin-sidebar,#customer-sidebar) { position:fixed; inset:0 auto 0 0; width:min(300px,calc(100vw - 44px)); height:100dvh; max-height:100dvh; z-index:90; transform:translateX(-100%); visibility:hidden; transition:transform .2s ease; }
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) :is(#admin-sidebar,#customer-sidebar).is-open { transform:translateX(0); visibility:inherit; box-shadow:18px 0 50px #102b4433; }
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) .menu-backdrop { position:fixed; inset:0; z-index:80; background:#102b447a; backdrop-filter:none; }
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) :is(#menu-toggle,#menu-close) { display:inline-flex; align-items:center; justify-content:center; flex:none; min-width:40px; width:40px; min-height:40px; padding:0; border-radius:7px; }
  body.precision.h3d-blue .admin-sidebar #menu-close { color:#fff; border:0; background:transparent; }
  body.precision.h3d-blue .admin-sidebar .sidebar-brand { padding:22px 20px 27px; }
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) .admin-toolbar { min-height:70px; padding:12px 22px; }
  body.precision.h3d-blue .precision-breadcrumb { gap:10px; }
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) #main { padding:28px 22px 44px; }
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) .site-footer { width:calc(100% - 44px); }
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) .page-background>.client-review-notice { margin-inline:22px; }
  body.precision.h3d-blue :is(#admin-sidebar,#customer-sidebar) .h3d-context-navigation a { min-height:44px; }
}
/* A visible rail reduces the usable workspace width on smaller notebooks. */
@media(min-width:1051px) and (max-width:1250px) {
  body.h3d-blue.customer-shell .h3d-customer :is(.h3d-cart-layout,.calculator-workspace,.customer-profile-grid,.customer-order-grid,.confirmation-grid) { display:flex; flex-direction:column; gap:22px; }
  body.h3d-blue.customer-shell .h3d-customer :is(.h3d-cart-layout,.calculator-workspace,.customer-profile-grid,.customer-order-grid)>* { width:100%; max-width:none; }
  body.h3d-blue.customer-shell .h3d-customer :is(.h3d-quote-summary,.calculator-workspace .summary) { position:static; }
  body.h3d-blue.customer-shell .h3d-customer .customer-order-grid .customer-decision-card { order:-1; }
  body.h3d-blue.customer-shell .h3d-customer .portfolio-models { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.h3d-blue.admin-shell #main :is(.precision-order-layout,.precision-job-layout,.h3d-cart-layout,#production-workspace .production-grid,#shipping-workspace .production-grid) { grid-template-columns:minmax(0,1fr); }
  body.h3d-blue.admin-shell #main :is(.precision-order-aside,.precision-job-aside,.h3d-cart-aside) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; position:static; }
  body.h3d-blue.admin-shell #main .precision-launch { grid-template-columns:minmax(0,1fr); }
  body.h3d-blue.admin-shell #main .h3d-next-step { align-items:flex-start; flex-wrap:wrap; }
}
@media(max-width:600px) {
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) .admin-toolbar { min-height:65px; padding:9px 15px; gap:10px; flex-wrap:wrap; }
  body.precision.h3d-blue .precision-breadcrumb { gap:7px; }
  body.precision.h3d-blue .precision-breadcrumb>:is(.h3d-workspace-role,.h3d-workspace-divider) { display:none; }
  body.precision.h3d-blue .precision-topbar-right { gap:8px; margin-left:auto; }
  body.precision.h3d-blue .precision-toolbar-action { min-width:40px; min-height:40px; padding:8px; justify-content:center; }
  body.precision.h3d-blue .precision-toolbar-action .h3d-action-label { display:none; }
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) #main { padding:25px 15px 36px; }
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) .site-footer { width:calc(100% - 30px); }
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) .page-background>.client-review-notice { margin-inline:15px; }
  body.h3d-blue .product-public-header .product-public-actions { gap:8px; }
}
@media(hover:hover) {
  body.h3d-blue .button:hover { background:#176e9b; border-color:#176e9b; }
  body.h3d-blue .button.secondary:hover { background:var(--blue-soft); border-color:#bbdcec; color:var(--ink); }
  body.h3d-blue :is(.precision-navigation,.precision-customer-sidebar .customer-navigation,.h3d-tools-panel) a:hover { background:var(--blue-soft); color:var(--blue-dark); }
}
@media(hover:hover) {
  body.precision.h3d-blue :is(#admin-sidebar,#customer-sidebar) nav a:hover { background:#ffffff10; color:#fff; }
  body.precision.h3d-blue :is(#admin-sidebar,#customer-sidebar) nav a:is(.is-active,[aria-current=page]):hover { background:#fff; color:var(--blue-dark); }
  body.precision.h3d-blue .admin-sidebar .sidebar-bottom :is(a,button):hover { color:#fff; background:#ffffff10; }
}
@media(prefers-reduced-motion:reduce) {
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) :is(#admin-sidebar,#customer-sidebar),
  body.precision.h3d-blue :is(#admin-sidebar,#customer-sidebar) nav a { transition:none; }
}
@media print {
  body.h3d-blue :is(.admin-sidebar,.admin-toolbar,.product-public-header,.site-footer) { display:none!important; }
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) .page-background { padding:0; }
  body.precision.h3d-blue:is(.admin-shell,.customer-shell) .app-frame { display:block; }
}

/* Keep long model names, references and labels inside their V2 workspace.
   Wrap content rather than clipping the page or hiding commercial data. */
body.precision.h3d-blue:is(.admin-shell,.customer-shell) #main {
  min-width:0; overflow-wrap:anywhere;
}
body.precision.h3d-blue:is(.admin-shell,.customer-shell) #main :is(.button,.text-button,.text-link) {
  min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere;
}
body.precision.h3d-blue:is(.admin-shell,.customer-shell) #main :is(.detail-list,.metrics,.summary-line) > * {
  min-width:0;
}
body.precision.h3d-blue:is(.admin-shell,.customer-shell) #main :is(dt,dd) {
  min-width:0; overflow-wrap:anywhere;
}
/* The persistent 252px rail leaves a narrower calculator on laptops. */
@media(min-width:1051px) and (max-width:1250px) {
  body.precision.h3d-blue.admin-shell #main .calculator-grid { grid-template-columns:minmax(0,1fr); }
  body.precision.h3d-blue.admin-shell #main .calculator-grid .calculator-main { position:static; }
}
