/* DNode Platform UI Standard v6.0
   Global rules for current and future DNode tools.
   Black global header. Yellow tool navigation. No tool-level admin links.
*/
:root{
  --dn-page:#F4F7FA;
  --dn-black:#000000;
  --dn-black-2:#111111;
  --dn-yellow:#FFD966;
  --dn-yellow-line:#E0B94D;
  --dn-accent:#2563EB;
  --dn-ink:#111827;
  --dn-muted:#64748B;
  --dn-line:#CBD5E1;
  --dn-soft:#F0F6FF;
  --dn-soft-blue:#DCEAFF;
  --dn-soft-blue-line:#BFD1EC;
  --dn-danger:#B42318;
  --dn-shadow:0 2px 10px rgba(15,23,42,.08);
  --dn-radius:6px;
  --dn-card-radius:9px;
  --dn-header-h:64px;
}
html,body{background:var(--dn-page);color:var(--dn-ink);font-family:"Segoe UI",Inter,Arial,sans-serif}
[hidden]{display:none!important}

/* ---------- GLOBAL DNODE SHELL ---------- */
.dnode-shell,.app-header,.topbar{
  height:var(--dn-header-h)!important;
  min-height:var(--dn-header-h)!important;
  background:var(--dn-black)!important;
  color:#fff!important;
  display:flex;
  align-items:center;
  padding:0 16px!important;
  gap:14px;
  position:sticky;
  top:0;
  z-index:100;
  box-shadow:0 1px 5px rgba(0,0,0,.28)!important;
}
.dnode-brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
  color:#fff;
  text-decoration:none;
  font-weight:800;
  flex:0 0 auto;
}
.dnode-brand:hover{color:#fff}
.dnode-mark,.brand-mark,.mark{
  width:38px!important;
  height:38px!important;
  display:grid!important;
  place-items:center!important;
  background:#E9EEF2!important;
  color:#17212B!important;
  border-radius:8px!important;
  font-weight:900!important;
  letter-spacing:.3px;
}
.dnode-brand-copy{display:flex;flex-direction:column;line-height:1.05}
.dnode-brand-copy b{font-size:15px}
.dnode-brand-copy small{font-size:11px;color:#C7D0D8;margin-top:4px;font-weight:500}
.dnode-global-nav,.main-nav{display:flex;align-items:stretch;gap:3px;min-width:0;flex:1}
.dnode-nav-link,.main-nav button{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  min-height:38px;
  padding:8px 11px!important;
  color:#F5F5F5!important;
  background:transparent!important;
  border:0!important;
  border-radius:5px!important;
  text-decoration:none;
  cursor:pointer;
  font-weight:650!important;
  white-space:nowrap;
}
.dnode-nav-link:hover,.main-nav button:hover{background:#1E1E1E!important;color:#fff!important}
.dnode-nav-link.active,.main-nav button.active{
  background:#171717!important;
  color:#FFFFFF!important;
  box-shadow:inset 0 -2px 0 #93B4DE!important;
}
.dnode-icon,.nav-icon{width:16px!important;height:16px!important;flex:0 0 16px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dnode-apps-suite-icon{stroke-width:1.55!important}
.dnode-shell-spacer{flex:1}
.dnode-account{position:relative;margin-left:auto;flex:0 0 auto}
.dnode-account-button{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:6px 10px;
  background:transparent;
  color:#fff;
  border:1px solid rgba(255,255,255,.38);
  border-radius:5px;
  cursor:pointer;
  font-weight:650;
}
.dnode-account-button:hover,.dnode-account-button[aria-expanded="true"]{background:#1E1E1E;border-color:rgba(255,255,255,.62)}
.dnode-account-menu{
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  width:210px;
  background:#fff;
  color:var(--dn-ink);
  border:1px solid #CBD5E1;
  border-radius:7px;
  box-shadow:0 10px 28px rgba(0,0,0,.18);
  padding:6px;
  z-index:150;
}
.dnode-account-menu[hidden]{display:none!important}
.dnode-account-identity{padding:8px 10px 9px;border-bottom:1px solid #E5E7EB;margin-bottom:5px;font-size:12px;color:#475569;overflow-wrap:anywhere}
.dnode-account-menu a,.dnode-account-menu button{
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:4px;
  background:#fff;
  color:#111827;
  text-decoration:none;
  text-align:left;
  cursor:pointer;
  font:inherit;
  font-weight:600;
}
.dnode-account-menu a:hover,.dnode-account-menu button:hover{background:#F3F4F6}

/* Yellow row is always tool/local navigation, never global account/navigation. */
.yellowbar,.subtabs{
  background:var(--dn-yellow)!important;
  border-color:var(--dn-yellow-line)!important;
  box-shadow:0 2px 5px rgba(15,23,42,.08)!important;
}
.yellowbar{min-height:44px!important;padding:0 16px!important;font-weight:800!important}
.subtabs{top:var(--dn-header-h)!important}
.subtabs button{color:#111!important;background:transparent!important;border-color:transparent!important}
.subtabs button:hover:not(:disabled){background:rgba(0,0,0,.07)!important;color:#111!important}
.subtabs button.active{background:#111!important;border-color:#111!important;color:#fff!important;box-shadow:none!important}

/* Buttons */
.primary,.dn-btn-primary,.header-action,#runDesign,#runOpt,#generateReportTab,.btn{
  background:#111827!important;border:1px solid #111827!important;color:#fff!important;border-radius:var(--dn-radius)!important;font-weight:750!important;
}
.primary:hover,.dn-btn-primary:hover,.header-action:hover,#runDesign:hover,#runOpt:hover,#generateReportTab:hover,.btn:hover{background:#000!important;border-color:#000!important;color:#fff!important}
.secondary,.dn-btn-secondary,.btn.secondary{background:#fff!important;border:1px solid #94A3B8!important;color:#111827!important;border-radius:var(--dn-radius)!important;font-weight:700!important}
.secondary:hover,.dn-btn-secondary:hover,.btn.secondary:hover{background:#F3F4F6!important;border-color:#64748B!important;color:#111827!important}

/* Reusable cards */
.dn-card{background:#fff;border:1px solid var(--dn-line);border-radius:var(--dn-card-radius);box-shadow:var(--dn-shadow);overflow:hidden}
.dn-card-head,.admin-card-head{background:var(--dn-soft-blue)!important;border-color:var(--dn-soft-blue-line)!important}
.dn-card-body{padding:16px}
.dn-muted{color:var(--dn-muted)}

/* ---------- HUB TOOL CARDS ---------- */
.dnode-tools-main{padding:26px clamp(16px,3vw,42px) 46px}
.dnode-tool-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:18px;max-width:1180px}
.dnode-tool-card{
  min-height:150px;
  background:var(--dn-soft-blue);
  border:1px solid var(--dn-soft-blue-line);
  border-radius:10px;
  box-shadow:var(--dn-shadow);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
  color:#111827;
  text-decoration:none;
  padding:22px;
  transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease;
}
.dnode-tool-card:hover{transform:translateY(-2px);border-color:#8FB4E8;box-shadow:0 8px 22px rgba(15,23,42,.10)}
.dnode-tool-card-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:10px;background:#fff;color:#111827;border:1px solid rgba(37,99,235,.10)}
.dnode-tool-card-icon svg{width:29px;height:29px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dnode-tool-card-name{font-size:17px;font-weight:800;text-align:center}
.dnode-empty{color:#64748B;padding:18px 0}

/* ---------- ACCOUNT PAGE ---------- */
.dnode-account-page{max-width:540px;margin:38px auto;padding:0 16px}
.dnode-account-card{background:#fff;border:1px solid #CBD5E1;border-radius:9px;box-shadow:var(--dn-shadow);padding:22px}
.dnode-account-card h1{margin:0 0 20px;font-size:22px}
.dnode-account-card label{display:block;margin:13px 0;font-size:12px;font-weight:700;color:#334155}
.dnode-account-card input{width:100%;margin-top:6px;padding:9px 10px;border:1px solid #94A3B8;border-radius:5px;min-height:38px}
.dnode-account-card .actions{display:flex;gap:8px;justify-content:flex-end;margin-top:18px}

/* Tool-local legacy account controls are intentionally suppressed by v2 shell. */
.account-area,.account-name-wrap,.account-logout{display:none!important}

@media(max-width:760px){
  .dnode-shell,.app-header,.topbar{padding:0 10px!important;gap:8px}
  .dnode-brand-copy small{display:none}
  .dnode-global-nav,.main-nav{overflow-x:auto}
  .dnode-nav-link,.main-nav button{padding:7px 9px!important}
  .dnode-tools-main{padding:18px 12px 34px}
  .dnode-tool-grid{grid-template-columns:1fr 1fr;gap:10px}
  .dnode-tool-card{min-height:130px;padding:14px}
}
@media(max-width:470px){.dnode-tool-grid{grid-template-columns:1fr}}


/* ---------- GLOBAL PROJECTS ---------- */
.dnode-projects-main{
  width:100%;max-width:none;box-sizing:border-box;margin:0;
  min-height:calc(100vh - var(--dn-header-h));
  padding:0 clamp(26px,3.2vw,54px) 52px;
  background:radial-gradient(circle at 74% 8%,rgba(181,207,238,.18),transparent 31%),linear-gradient(180deg,#FBFDFF 0%,#F4F8FC 48%,#F7FAFD 100%);
}
.dnode-projects-toolbar{
  min-height:120px;display:flex;align-items:center;justify-content:space-between;gap:18px;
  margin-bottom:20px;border-bottom:1px solid rgba(148,163,184,.12);
}
.dnode-projects-toolbar h1{margin:0;font-size:34px;line-height:1.08;letter-spacing:-.8px;color:#0F172A;font-weight:800}
.dnode-projects-toolbar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.dnode-project-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(315px,365px));gap:16px;justify-content:start}
.dnode-project-card{
  display:block;background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(238,246,255,.96));
  border:1px solid rgba(191,209,232,.82);border-radius:13px;
  box-shadow:0 8px 24px rgba(45,72,105,.08);padding:19px;color:var(--dn-ink);text-decoration:none;transition:.15s ease;
}
.dnode-project-card:hover{transform:translateY(-2px);border-color:#9EBDE3;box-shadow:0 14px 32px rgba(45,72,105,.13)}
.dnode-project-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.dnode-project-card h2{font-size:18px;margin:0;color:#111827;font-weight:800;overflow-wrap:anywhere}
.dnode-project-card-arrow{font-size:22px;line-height:1;color:#475569}
.dnode-project-meta{display:flex;gap:16px;flex-wrap:wrap;margin-top:20px;color:#64748B;font-size:12px}
.dnode-project-empty{background:#fff;border:1px dashed #B8C4D2;border-radius:10px;padding:34px;text-align:center;color:#64748B}
.dnode-project-empty b{display:block;color:#1F2937;margin-bottom:7px}
.dnode-project-back{display:inline-flex;align-items:center;gap:5px;color:#334155;text-decoration:none;font-weight:700;font-size:13px;margin-bottom:14px}
.dnode-project-back:hover{color:#000}
.dnode-project-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}
.dnode-project-title-row h1{margin:0;font-size:32px;line-height:1.1;letter-spacing:-.6px;color:#0F172A;font-weight:800;overflow-wrap:anywhere}
.dnode-project-title-row .dn-muted{font-size:12px;margin-top:6px}
.dnode-calculation-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.dnode-calculation-card{
  background:#fff;border:1px solid #CBD5E1;border-radius:9px;box-shadow:var(--dn-shadow);padding:16px;
  display:flex;flex-direction:column;gap:14px;min-height:154px;
}
.dnode-calculation-card-top{display:flex;align-items:flex-start;gap:12px}
.dnode-calculation-icon{width:42px;height:42px;border-radius:8px;background:var(--dn-soft-blue);border:1px solid var(--dn-soft-blue-line);display:grid;place-items:center;flex:0 0 auto}
.dnode-calculation-icon svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dnode-calculation-copy{min-width:0;flex:1}
.dnode-calculation-name{font-weight:800;font-size:15px;overflow-wrap:anywhere}
.dnode-calculation-app{color:#64748B;font-size:12px;margin-top:4px}
.dnode-calculation-actions{display:flex;gap:7px;margin-top:auto;justify-content:flex-end}
.dnode-calculation-actions a,.dnode-calculation-actions button{font-size:12px;padding:6px 9px}
.dnode-project-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 12px}
.dnode-project-section-head h2{font-size:16px;margin:0}
.dnode-project-archived-badge{display:inline-flex;align-items:center;border:1px solid #F0B429;background:#FFF7D6;color:#7A5A00;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800}
.dnode-dialog{border:0;border-radius:10px;padding:0;box-shadow:0 22px 60px rgba(0,0,0,.28);width:min(520px,calc(100vw - 28px))}
.dnode-dialog::backdrop{background:rgba(15,23,42,.45)}
.dnode-dialog-card{background:#fff}
.dnode-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 17px;border-bottom:1px solid #E5E7EB}
.dnode-dialog-head h2{margin:0;font-size:17px}
.dnode-dialog-close{border:0;background:transparent;font-size:22px;line-height:1;cursor:pointer;color:#64748B;padding:2px 4px}
.dnode-dialog-body{padding:17px}
.dnode-dialog-body label{display:block;font-size:12px;font-weight:750;color:#334155;margin-bottom:12px}
.dnode-dialog-body input,.dnode-dialog-body select{width:100%;box-sizing:border-box;margin-top:6px;min-height:38px;padding:8px 9px;border:1px solid #94A3B8;border-radius:5px;background:#fff}
.dnode-dialog-actions{display:flex;justify-content:flex-end;gap:8px;padding:0 17px 17px}
.dnode-app-picker{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:8px}
.dnode-app-choice{display:flex;align-items:center;gap:10px;border:1px solid #CBD5E1;border-radius:8px;background:#fff;padding:11px;cursor:pointer;text-align:left;font-weight:750}
.dnode-app-choice:hover,.dnode-app-choice.selected{border-color:#7CA7E0;background:var(--dn-soft-blue)}
.dnode-app-choice svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Projects toolbar stays visually light and uses the full working width. */
.dnode-projects-toolbar .btn,.dnode-projects-toolbar .secondary,.dnode-projects-toolbar .dnode-project-filter,
.dnode-project-title-row .btn,.dnode-project-title-row .secondary{
  min-height:36px!important;height:36px;padding:6px 11px!important;line-height:1!important;font-size:13px!important;
}

.dnode-project-filter{border:1px solid #94A3B8;background:#fff;border-radius:5px;padding:7px 9px;font-weight:700;color:#334155;cursor:pointer}
.dnode-project-filter.active{background:#111827;color:#fff;border-color:#111827}
.dnode-project-toast{position:fixed;right:18px;bottom:18px;background:#111827;color:#fff;border-radius:6px;padding:10px 13px;box-shadow:0 8px 30px rgba(0,0,0,.2);z-index:300;font-size:12px}
.dnode-project-toast[hidden]{display:none!important}
@media(max-width:700px){
  .dnode-projects-main{padding:0 12px 36px}.dnode-projects-toolbar{min-height:100px}.dnode-projects-toolbar h1{font-size:28px}.dnode-project-list,.dnode-calculation-grid{grid-template-columns:1fr}
  .dnode-project-title-row{flex-direction:column}.dnode-project-title-row .dnode-projects-toolbar-actions{width:100%}
  .dnode-app-picker{grid-template-columns:1fr}
}


/* ---------- PROJECT-AWARE APP CONTEXT ---------- */
.dnode-project-mode{
  display:flex;align-items:center;gap:8px;min-width:0;margin-left:auto;
  padding-left:8px;border-left:1px solid rgba(255,255,255,.18);
}
.dnode-project-mode[hidden]{display:none!important}
.dnode-project-mode-back{
  display:inline-flex;align-items:center;gap:4px;max-width:180px;color:#E5E7EB;text-decoration:none;
  font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.dnode-project-mode-back span{overflow:hidden;text-overflow:ellipsis}
.dnode-project-mode-back:hover{color:#fff}
.dnode-project-mode-name{
  max-width:180px;color:#fff;font-size:12px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.dnode-project-save-state{font-size:11px;font-weight:700;white-space:nowrap;color:#CBD5E1}
.dnode-project-save-state.saved{color:#86EFAC}
.dnode-project-save-state.dirty{color:#FCD34D}
.dnode-project-save-state.saving{color:#CBD5E1}
.dnode-project-save-state.error{color:#FCA5A5;max-width:230px;overflow:hidden;text-overflow:ellipsis}
.dnode-project-mode-button,.dnode-project-mode-save{
  min-height:32px;padding:5px 9px;border-radius:5px;font:inherit;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap;
}
.dnode-project-mode-button{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.42)}
.dnode-project-mode-save{background:#fff;color:#111827;border:1px solid #fff}
.dnode-project-mode-save:hover{background:#F3F4F6}
.dnode-project-mode-button:hover{background:#1E1E1E}
.dnode-project-mode-save:disabled,.dnode-project-mode-button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:1050px){.dnode-project-mode-name{display:none}.dnode-project-mode-back{max-width:130px}.dnode-project-save-state.error{max-width:140px}}
@media(max-width:820px){.dnode-project-save-state{display:none}.dnode-project-mode-back span{display:none}.dnode-project-mode{gap:5px}}


/* ---------- APPLICATIONS LANDING PAGE ---------- */
.dnode-tools-main{
  min-height:calc(100vh - var(--dn-header-h));
  box-sizing:border-box;
  padding:0!important;
  background:
    radial-gradient(circle at 74% 8%,rgba(181,207,238,.22),transparent 31%),
    linear-gradient(180deg,#FBFDFF 0%,#F4F8FC 48%,#F7FAFD 100%);
}
.dnode-tools-main .loginwrap{padding:34px clamp(16px,3vw,42px)}
.dnode-tools-main #notice:not(:empty){padding:18px clamp(20px,3vw,38px) 0}
.dnode-applications-page{padding:0 clamp(26px,3.2vw,54px) 52px;overflow:hidden}
.dnode-applications-hero{
  min-height:150px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  position:relative;
  border-bottom:1px solid rgba(148,163,184,.12);
  margin-bottom:20px;
}
.dnode-applications-copy{position:relative;z-index:2;flex:0 0 auto}
.dnode-applications-copy h1{margin:0 0 5px;font-size:34px;line-height:1.08;letter-spacing:-.8px;color:#0F172A;font-weight:800}
.dnode-applications-copy p{margin:0;color:#667A98;font-size:15px;font-weight:500}
.dnode-applications-art{position:absolute;right:-2px;top:0;width:min(61vw,860px);height:150px;overflow:hidden;pointer-events:none;opacity:1;display:flex;align-items:center;justify-content:flex-end}
.dnode-hero-frame{position:absolute;right:150px;top:0;width:720px!important;height:150px!important;opacity:.56}
.hero-frame-lines{fill:none;stroke:#AFC2D9;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;opacity:.52}
.dnode-hero-signature{position:absolute;right:4px;top:28px;height:94px;display:flex;align-items:stretch;gap:16px}
.dnode-hero-signature-bar{display:block;width:4px;border-radius:3px;background:#F4C542;box-shadow:0 0 0 1px rgba(244,197,66,.08)}
.dnode-hero-signature-copy{display:flex;align-items:center;color:#5D7193;font-size:17px;line-height:1.35;font-weight:500;letter-spacing:.1px;white-space:nowrap}
.dnode-application-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(390px,475px));
  gap:20px;
  justify-content:start;
  align-items:stretch;
}
.dnode-application-card{
  min-height:180px;
  box-sizing:border-box;
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:18px;
  padding:20px 20px 18px;
  border:1px solid rgba(191,209,232,.72);
  border-radius:13px;
  background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(241,247,254,.94));
  box-shadow:0 8px 24px rgba(45,72,105,.08);
  color:#0F172A;
  text-decoration:none;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.dnode-application-card:hover{transform:translateY(-2px);border-color:#9EBDE3;box-shadow:0 14px 32px rgba(45,72,105,.13)}
.dnode-application-top{display:flex;align-items:flex-start;gap:18px;position:relative;z-index:2;max-width:78%}
.dnode-application-icon{
  width:74px;height:74px;flex:0 0 74px;
  display:grid;place-items:center;
  border-radius:12px;
  background:linear-gradient(145deg,#E7F0FF,#CFE2FF);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.62);
  color:#142033;
}
.dnode-app-tone-wind .dnode-application-icon{background:linear-gradient(145deg,#DDF8ED,#C6F1E3)}
.dnode-application-icon svg{width:43px;height:43px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.dnode-purlin-profile-mark{font-size:23px;font-weight:850;letter-spacing:-1px;line-height:1;color:#111827;font-family:"Segoe UI",Arial,sans-serif}
.dnode-application-copyblock{display:flex;flex-direction:column;gap:6px;padding-top:6px;min-width:0}
.dnode-application-name{font-size:21px;font-weight:800;letter-spacing:-.3px;color:#111827}
.dnode-application-description{font-size:13.5px;line-height:1.38;color:#5F7698;max-width:265px}
.dnode-application-footer{display:flex;align-items:center;justify-content:space-between;position:relative;z-index:2}
.dnode-standard-pill{display:inline-flex;align-items:center;min-height:26px;padding:0 13px;border-radius:999px;background:#E2EEFF;color:#2C75C9;font-size:11px;font-weight:800}
.dnode-app-tone-wind .dnode-standard-pill{background:#DDF6ED;color:#269C79}
.dnode-application-arrow{width:38px;height:38px;border-radius:999px;background:rgba(255,255,255,.92);border:1px solid rgba(191,209,232,.65);display:grid;place-items:center;box-shadow:0 4px 12px rgba(45,72,105,.09);color:#314866;transition:transform .15s ease}
.dnode-application-card:hover .dnode-application-arrow{transform:translateX(2px)}
.dnode-application-arrow svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dnode-application-art{position:absolute;right:-10px;top:5px;width:235px;height:150px;opacity:.18;pointer-events:none}
.dnode-application-art svg{width:100%;height:100%}
.dnode-application-art g{fill:none;stroke:#7E9EC4;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.dnode-application-art .purlin-art-lines{stroke-width:2.6}
.dnode-app-tone-wind .dnode-application-art{opacity:.22}
.dnode-app-tone-wind .dnode-application-art g{stroke:#69C7A9;stroke-width:5}

/* Small reusable C/Z mark used in Projects and future app pickers. */
.dnode-calculation-icon .dnode-purlin-profile-mark,.dnode-app-choice .dnode-purlin-profile-mark{font-size:11px;letter-spacing:-.5px;font-weight:900}

@media(max-width:980px){
  .dnode-applications-art{width:58vw;opacity:.42}
  .dnode-application-grid{grid-template-columns:repeat(auto-fit,minmax(330px,1fr))}
}
@media(max-width:700px){
  .dnode-applications-page{padding:0 12px 34px}
  .dnode-applications-hero{min-height:105px;margin-bottom:14px}
  .dnode-applications-copy h1{font-size:28px}
  .dnode-applications-art{right:-130px;width:620px;opacity:.24}
  .dnode-hero-signature{display:none}
  .dnode-hero-frame{right:0}
  .dnode-application-grid{grid-template-columns:1fr;gap:12px}
  .dnode-application-card{min-height:166px;padding:16px}
  .dnode-application-top{max-width:82%;gap:13px}
  .dnode-application-icon{width:60px;height:60px;flex-basis:60px}
  .dnode-application-icon svg{width:36px;height:36px}.dnode-purlin-profile-mark{font-size:20px}
  .dnode-application-name{font-size:19px}
}
.purlin-cz-svg text{fill:currentColor;stroke:none;font-family:"Segoe UI",Arial,sans-serif;font-size:8px;font-weight:900;letter-spacing:-.35px}

/* v5 detail spacing: list view gets its hero height from the toolbar. */
#projectDetailView{padding-top:28px}
@media(max-width:700px){#projectDetailView{padding-top:18px}}

/* ---------- PLATFORM FINALISATION v1 ---------- */
.dnode-page-subtitle{margin:5px 0 0;color:#667a98;font-size:14px;font-weight:500}
.dnode-segment{display:flex;border:1px solid #c8d5e5;border-radius:7px;overflow:hidden;background:#fff}
.dnode-segment .dnode-project-filter{border:0;border-radius:0;min-height:34px!important;height:34px!important;padding:6px 11px!important}
.dnode-segment .dnode-project-filter+.dnode-project-filter{border-left:1px solid #c8d5e5}
.dnode-compact-primary{min-height:34px!important;height:34px!important;padding:6px 11px!important;font-size:13px!important}
.dnode-project-detail-head{padding-top:25px}
.dnode-title-with-badge{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.dnode-project-title-copy{min-width:0}
.dnode-project-section-head>div{display:flex;align-items:center;gap:8px}
.dnode-count-badge{display:inline-grid;place-items:center;min-width:24px;height:22px;padding:0 7px;border-radius:999px;background:#e8f0fb;color:#4d6788;font-size:11px;font-weight:800}
.dnode-reorder-hint{font-size:11px;color:#94a3b8;font-weight:600}
.dnode-calculation-grid{grid-template-columns:repeat(auto-fill,minmax(300px,360px));justify-content:start}
.dnode-calculation-card{position:relative;min-height:142px;border-radius:12px;box-shadow:0 7px 22px rgba(45,72,105,.06);transition:border-color .14s ease,box-shadow .14s ease,transform .14s ease}
.dnode-calculation-card:hover{border-color:#b4c9e2;box-shadow:0 10px 26px rgba(45,72,105,.10)}
.dnode-calculation-card.dragging{opacity:.5;transform:scale(.985)}
.dnode-calculation-card.drag-over{border-color:#6f9dd4;box-shadow:0 0 0 2px rgba(111,157,212,.15)}
.dnode-calculation-card-top{align-items:center}
.dnode-drag-handle{width:22px;min-width:22px;height:40px;border:0;background:transparent;color:#a2afbf;font-size:17px;letter-spacing:-3px;cursor:grab;padding:0}
.dnode-drag-handle:active{cursor:grabbing}.dnode-drag-handle:disabled{visibility:hidden}
.dnode-calculation-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;padding-top:3px}
.dnode-calc-updated{font-size:11px;color:#8795a8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dnode-open-calc{min-height:31px!important;height:31px!important;padding:5px 12px!important;font-size:12px!important}
.dnode-calc-menu-wrap{position:relative;margin-left:auto;align-self:flex-start}
.dnode-calc-menu-button{width:32px;height:32px;border:1px solid transparent;border-radius:7px;background:transparent;color:#64748b;font-weight:900;letter-spacing:1px;cursor:pointer}
.dnode-calc-menu-button:hover,.dnode-calc-menu-button[aria-expanded="true"]{background:#f0f5fb;border-color:#d6e1ed;color:#1f2937}
.dnode-calc-menu{position:absolute;right:0;top:36px;z-index:30;width:150px;padding:5px;background:#fff;border:1px solid #d4dde8;border-radius:8px;box-shadow:0 12px 34px rgba(15,23,42,.16)}
.dnode-calc-menu button{display:block;width:100%;text-align:left;border:0;background:transparent;border-radius:5px;padding:8px 9px;color:#334155;font:inherit;font-size:12px;font-weight:650;cursor:pointer}
.dnode-calc-menu button:hover:not(:disabled){background:#eff5fb;color:#0f172a}.dnode-calc-menu button:disabled{opacity:.4;cursor:default}
.dnode-calc-menu button.danger{color:#b42318}.dnode-calc-menu button.danger:hover{background:#fff0ef}
.dnode-menu-separator{height:1px;background:#edf1f5;margin:4px 2px}
.dnode-archived-calculations{margin-top:26px;padding-top:10px;border-top:1px solid rgba(148,163,184,.18)}
.dnode-archived-toggle{display:flex;align-items:center;gap:8px;border:0;background:transparent;padding:8px 0;color:#506278;font-weight:750;cursor:pointer}
.dnode-archived-toggle .dnode-chevron{transition:transform .14s ease}.dnode-archived-toggle[aria-expanded="true"] .dnode-chevron{transform:rotate(180deg)}
.dnode-archived-grid{margin-top:8px}
.dnode-calculation-card-archived{background:rgba(248,250,252,.8);box-shadow:none;border-style:dashed}
.dnode-mini-badge{padding:3px 7px;border-radius:999px;background:#eef2f6;color:#6b7788;font-size:10px;font-weight:800}
.dnode-archived-actions{display:flex;gap:6px}.danger-outline{color:#b42318!important;border-color:#e8b4af!important}.danger-outline:hover{background:#fff1f0!important}
.dnode-project-empty-wide{grid-column:1/-1;min-height:200px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;background:rgba(255,255,255,.72)}
.dnode-project-empty-wide b{margin:0}.dnode-project-empty-wide span{max-width:430px}.dnode-empty-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#eaf2fc;color:#5f7d9e;font-size:20px;font-weight:700;margin-bottom:3px}.dnode-empty-action{margin-top:8px}
.dnode-project-toast[data-type="error"]{background:#8f1d16}

/* Make project controls calmer and consistent with Applications. */
.dnode-projects-toolbar{min-height:126px;margin-bottom:20px}
.dnode-project-list{grid-template-columns:repeat(auto-fill,minmax(315px,365px));gap:16px}
.dnode-project-card{min-height:112px}

@media(max-width:850px){
  .dnode-projects-toolbar{align-items:flex-start;flex-direction:column;justify-content:center;padding:22px 0;min-height:128px}
  .dnode-projects-toolbar-actions{width:100%}
  .dnode-projects-toolbar-actions .dnode-segment{flex:1}
  .dnode-projects-toolbar-actions .dnode-segment button{flex:1}
  .dnode-project-title-row{flex-direction:column;align-items:stretch}
  .dnode-project-title-row .dnode-projects-toolbar-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .dnode-project-title-row .dnode-projects-toolbar-actions #addCalculationBtn{grid-column:1/-1}
  .dnode-calculation-grid{grid-template-columns:1fr}
  .dnode-reorder-hint{display:none}
}
@media(max-width:560px){
  .dnode-shell,.app-header,.topbar{height:56px!important;min-height:56px!important;padding:0 7px!important}
  .dnode-mark{width:34px!important;height:34px!important;border-radius:7px!important}.dnode-brand-copy{display:none}
  .dnode-global-nav{gap:1px!important}.dnode-nav-link{font-size:12px!important;padding:7px 8px!important;gap:5px!important}.dnode-nav-link .dnode-icon{width:14px!important;height:14px!important}
  .dnode-account-button{padding:7px 8px!important}.dnode-account-button>span:nth-of-type(1){display:none}
  .dnode-projects-main{padding:0 10px 30px}.dnode-projects-toolbar h1,.dnode-project-title-row h1{font-size:27px}
  .dnode-project-list{grid-template-columns:1fr}.dnode-project-card{padding:16px}
  .dnode-calculation-card{padding:13px}.dnode-calculation-icon{width:38px;height:38px}.dnode-calculation-name{font-size:14px}
  .dnode-calc-updated{max-width:55%}.dnode-dialog{width:calc(100vw - 18px)}
}

/* ---------- DEPLOYMENT A: PLATFORM FOUNDATION ---------- */
button:disabled,.btn:disabled,.secondary:disabled{opacity:.48!important;cursor:not-allowed!important;transform:none!important}
.dnode-project-card-address{margin-top:5px;color:#72839a;font-size:12px;line-height:1.35;max-width:275px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dnode-project-meta-strong{font-weight:800;color:#445b78}
.dnode-project-card-updated{margin-top:10px;padding-top:10px;border-top:1px solid rgba(148,163,184,.15);font-size:11px;color:#93a0b1}
.dnode-project-card-archived{background:rgba(248,250,252,.82);border-style:dashed;box-shadow:none}
.dnode-project-action-row{justify-content:flex-end}

.dnode-project-details-card{
  margin:21px 0 28px;background:rgba(255,255,255,.88);border:1px solid #d6e2ef;border-radius:12px;
  box-shadow:0 7px 22px rgba(45,72,105,.05);overflow:hidden;
}
.dnode-project-details-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 18px;border-bottom:1px solid #e7eef6;background:linear-gradient(180deg,#fbfdff,#f7fbff)}
.dnode-project-details-head h2{margin:0;font-size:15px;color:#172033;font-weight:800}.dnode-project-details-head p{margin:3px 0 0;color:#7a8ca3;font-size:11px}
.dnode-text-button{border:0;background:transparent;color:#2d65a8;padding:6px 8px;border-radius:5px;font-weight:750;cursor:pointer}.dnode-text-button:hover:not(:disabled){background:#edf5ff}.dnode-text-button:disabled{opacity:.4;cursor:not-allowed}
.dnode-project-details-grid{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:0;margin:0;padding:4px 18px 13px}
.dnode-project-details-grid>div{min-width:0;padding:13px 18px 8px 0}.dnode-project-details-grid dt{font-size:10px;text-transform:uppercase;letter-spacing:.45px;color:#8a99ab;font-weight:800;margin-bottom:4px}.dnode-project-details-grid dd{margin:0;color:#26364b;font-size:13px;font-weight:650;overflow-wrap:anywhere}
.dnode-project-detail-address{grid-column:span 3;border-top:1px solid #edf2f7;margin-top:2px;padding-top:12px!important}
.dnode-calc-version{color:#8493a5;font-weight:500}

.dnode-dialog-wide{width:min(720px,calc(100vw - 28px))!important;max-width:720px!important}
.dnode-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px}.dnode-form-span-2{grid-column:1/-1}
.dnode-dialog-body label{display:block;font-size:12px;font-weight:700;color:#334155}.dnode-dialog-body input,.dnode-dialog-body textarea{box-sizing:border-box;width:100%;margin-top:6px;padding:9px 10px;border:1px solid #aebccc;border-radius:6px;background:#fff;color:#111827;min-height:38px;font:inherit;font-size:13px}.dnode-dialog-body input:focus,.dnode-dialog-body textarea:focus{outline:2px solid rgba(37,99,235,.14);border-color:#6c96c7}
.dnode-form-note{margin:13px 0 0;color:#7a899c;font-size:11px;line-height:1.45}

/* Account settings */
.dnode-yellowbar-label{display:flex;align-items:center}
.dnode-account-settings-page{max-width:900px;margin:0 auto;padding:34px 18px 54px}
.dnode-account-heading{margin-bottom:20px}.dnode-account-heading h1{margin:0;color:#0f172a;font-size:30px;letter-spacing:-.5px}.dnode-account-heading p{margin:5px 0 0;color:#718198;font-size:13px}
.dnode-settings-card{background:#fff;border:1px solid #d2ddea;border-radius:11px;box-shadow:0 6px 20px rgba(45,72,105,.06);padding:0 21px 21px;margin-bottom:18px;overflow:hidden}
.dnode-settings-card-head{margin:0 -21px 18px;padding:16px 21px;border-bottom:1px solid #e8eef5;background:linear-gradient(180deg,#fbfdff,#f7fbff)}
.dnode-settings-card-head h2{margin:0;font-size:17px;color:#172033}.dnode-settings-card-head p{margin:4px 0 0;font-size:11px;color:#7a899c}
.dnode-settings-label,.dnode-account-password-grid label{display:block;font-size:12px;color:#334155;font-weight:750}
.dnode-settings-input,.dnode-account-password-grid input{box-sizing:border-box;width:100%;margin-top:7px;min-height:40px;border:1px solid #aebccc;border-radius:6px;padding:9px 10px;background:#fff;color:#111827;font:inherit}.dnode-settings-input:focus,.dnode-account-password-grid input:focus{outline:2px solid rgba(37,99,235,.14);border-color:#6c96c7}
.dnode-template-input{font-family:Consolas,"SFMono-Regular",monospace;font-size:12.5px}
.dnode-token-help{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:11px}.dnode-token-help>span{font-size:11px;color:#7a899c;font-weight:700}.dnode-token-list{display:flex;flex-wrap:wrap;gap:5px}
.dnode-token{border:1px solid #cad9ea;background:#f5f9fe;color:#486888;border-radius:999px;padding:4px 8px;font-size:10px;font-family:Consolas,"SFMono-Regular",monospace;cursor:pointer}.dnode-token:hover{background:#eaf3fd;border-color:#aac3df}
.dnode-filename-preview{margin-top:15px;padding:11px 13px;border:1px solid #d9e4ef;border-radius:7px;background:#f8fbfe;display:grid;gap:4px}.dnode-filename-preview span{font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:#8b9aac;font-weight:800}.dnode-filename-preview strong{font-size:12px;color:#354b65;overflow-wrap:anywhere;font-family:Consolas,"SFMono-Regular",monospace;font-weight:600}
.dnode-settings-note{margin:11px 0 0;color:#7a899c;font-size:11px;line-height:1.45}.dnode-settings-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:17px}.dnode-inline-success{margin-top:10px;color:#19704f;font-size:12px;font-weight:700}
.dnode-account-password-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}

/* Consistent project loading/error state spacing */
.dnode-project-empty .secondary,.dnode-project-empty .btn{min-height:34px!important;height:34px!important;padding:6px 12px!important;font-size:12px!important}

@media(max-width:1000px){
  .dnode-project-details-grid{grid-template-columns:repeat(2,minmax(140px,1fr))}.dnode-project-detail-address{grid-column:span 2}
  .dnode-project-action-row{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.dnode-project-action-row #addCalculationBtn{grid-column:span 2}
}
@media(max-width:720px){
  .dnode-project-details-grid{grid-template-columns:1fr 1fr;padding-left:14px;padding-right:14px}.dnode-project-details-grid>div{padding-right:12px}.dnode-project-detail-address{grid-column:1/-1}
  .dnode-form-grid{grid-template-columns:1fr}.dnode-form-span-2{grid-column:auto}.dnode-dialog-wide{width:calc(100vw - 16px)!important}
  .dnode-account-settings-page{padding:25px 11px 38px}.dnode-account-heading h1{font-size:26px}.dnode-account-password-grid{grid-template-columns:1fr}.dnode-settings-actions{flex-wrap:wrap}.dnode-settings-actions button{flex:1;min-width:145px}
}
@media(max-width:560px){
  .dnode-project-action-row{grid-template-columns:1fr 1fr!important}.dnode-project-action-row #addCalculationBtn{grid-column:1/-1}.dnode-project-action-row #deleteProjectBtn{grid-column:auto}
  .dnode-project-details-grid{grid-template-columns:1fr}.dnode-project-detail-address{grid-column:auto}.dnode-project-details-grid>div{border-bottom:1px solid #f0f3f7;padding:11px 0}.dnode-project-details-grid>div:last-child{border-bottom:0}
  .dnode-settings-card{padding-left:15px;padding-right:15px}.dnode-settings-card-head{margin-left:-15px;margin-right:-15px;padding-left:15px;padding-right:15px}.dnode-token-help{align-items:flex-start;flex-direction:column;gap:7px}
}
