:root {
  --nh-ink: #172b45;
  --nh-muted: #667991;
  --nh-line: #dbe4ee;
  --nh-bg: #eef3f8;
  --nh-card: #ffffff;
  --nh-navy: #10263f;
  --nh-teal: #0f9f91;
  --nh-blue: #3979c6;
  --nh-violet: #8064c9;
  --nh-amber: #d98a2b;
  --nh-accent: #e85d2a;
  --nh-accent-dark: #c9471c;
  --nh-radius: 15px;
  --nh-shadow: 0 10px 28px rgba(16, 38, 63, 0.075);
  --red: #b33e36;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  margin: 0;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  background: var(--nh-bg);
}

body {
  height: 100%;
  margin: 0;
  font: 14px/1.45 Inter, "Segoe UI", Arial, sans-serif;
  background: var(--nh-bg);
  color: var(--nh-ink);
  letter-spacing: 0.005em;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea {
  font: inherit;
}

button {
  border: 1px solid #e8e1d8;
  border-radius: 9px;
  padding: 9px 12px;
  background: #f7f3ed;
  color: #202127;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 38, 63, 0.1);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(232, 93, 42, 0.28);
  outline-offset: 2px;
}

button.primary, .tools button.primary {
  background: linear-gradient(135deg, #13aa9c, #087f78);
  color: #fff;
  border-color: #0f9f91;
  box-shadow: 0 4px 12px rgba(15, 159, 145, 0.19);
}

button.primary:hover:not(:disabled), .tools button.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0f988d, #086e69);
}

button.danger {
  background: #fff1ef;
  color: #ad4038;
  border: 1px solid #f1d1cc;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-to-content {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 4000;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: #17181d;
  font-weight: 800;
  box-shadow: 0 5px 24px rgba(0, 0, 0, 0.2);
}

.skip-to-content:focus {
  transform: translateY(0);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(205px, auto) minmax(180px, 1fr) auto;
  grid-template-areas: "brand title tools";
  align-items: center;
  column-gap: clamp(10px, 1.5vw, 22px);
  min-height: 76px;
  padding: 9px clamp(12px, 1.6vw, 22px);
  background: #fffdfa;
  color: #242329;
  border-top: 6px solid #24191b;
  border-bottom: 1px solid #e8e1d8;
  backdrop-filter: saturate(125%) blur(12px);
}

.site-header .brand-lockup {
  grid-area: brand;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header .brand-symbol {
  display: block;
  width: 42px;
  height: 48px;
  flex: 0 0 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.12));
}

.site-header .brand-copy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.site-header .brand-name {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.55px;
  white-space: nowrap;
  color: #242329;
}

.site-header .brand-name span {
  color: #f15b3a;
}

.site-header .brand-rule {
  width: 100%;
  height: 1px;
  background: #e6a18f;
  margin: 3px 0 2px;
}

.site-header .brand-slogan {
  align-self: flex-end;
  text-align: right;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.45px;
  color: #77716d;
  white-space: nowrap;
}

.site-header .header-title {
  grid-area: title;
  justify-self: center;
  align-self: center;
  margin: 0;
  padding: 7px 14px;
  color: #171717;
  background: #fffaf4;
  border: 1px solid rgba(232, 93, 42, 0.16);
  border-left: 4px solid #f28a24;
  border-radius: 9px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.09);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(13px, 1.22vw, 18px);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: 0.25px;
  text-align: center;
  white-space: nowrap;
}

.header-title .title-network { color: #171717; }
.header-title .title-topology { color: #e87516; }

.site-header .tools {
  grid-area: tools;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.site-header .tools button {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 8px;
  background: #fffdfa;
  color: #29262a;
  border: 1px solid #e8ddd7;
}

.site-header .tools button:hover:not(:disabled) {
  border-color: #e85d2a;
}

.site-header .tools #installAppBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 9px;
  color: #e87516;
  background: #fff8f0;
  border: 1px solid #edc49d;
}

.site-header .tools #installAppBtn svg {
  width: 18px;
  height: 18px;
}

/* ===== Main Studio Workspace ===== */
.layout {
  display: grid;
  grid-template-columns: minmax(290px, 330px) minmax(0, 1fr);
  gap: 15px;
  padding: 15px;
  flex: 1 1 auto;
  min-height: 0;
  max-width: 2500px;
  width: 100%;
  margin: 0 auto;
  align-items: stretch;
}

.sidebar, .workspace {
  background: var(--nh-card);
  border: 1px solid var(--nh-line);
  border-radius: var(--nh-radius);
  box-shadow: var(--nh-shadow);
  min-width: 0;
  overflow: hidden;
}

.sidebar {
  max-height: calc(100vh - 145px);
  overflow: auto;
  padding: 16px;
  scrollbar-width: thin;
  scrollbar-color: #c2d0df transparent;
}

.section {
  padding: 0 0 17px;
  margin: 0 0 17px;
  border-bottom: 1px solid #e8eef4;
  scroll-margin-top: 90px;
}

.section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 2px;
}

.section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #193653;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12px;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.section h2::before {
  content: "";
  width: 4px;
  height: 17px;
  border-radius: 3px;
  background: linear-gradient(180deg, #16b4a5, #3979c6);
  box-shadow: 0 0 0 3px rgba(15, 159, 145, 0.09);
}

.muted { color: var(--nh-muted); }
.tiny { font-size: 11px; line-height: 1.45; }

.field {
  display: block;
  margin: 10px 0 0;
}

.field span {
  display: block;
  font-size: 11px;
  font-weight: 750;
  color: #5d7189;
  margin: 0 0 4px;
}

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  font-size: 12px;
  background: #fbfdff;
  color: #20364f;
  border: 1px solid #d5e0eb;
  border-radius: 9px;
  box-shadow: inset 0 1px 2px rgba(16, 38, 63, 0.025);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field input:hover, .field select:hover, .field textarea:hover {
  border-color: #aebfd1;
  background: #fff;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #0f9f91;
  box-shadow: 0 0 0 3px rgba(15, 159, 145, 0.13);
  background: #fff;
  outline: none;
}

.field input[readonly] {
  background: #fff0e8;
  color: #6f3c29;
  border-color: #f0c6b2;
  cursor: not-allowed;
  font-weight: 750;
}

.locked-tag {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #dff5f1;
  color: #087b72;
  font-size: 9px;
  font-weight: 800;
}

.field-hint {
  display: block;
  margin-top: 4px;
  color: #7d7773;
  font-size: 10px;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.button-row button {
  min-height: 36px;
}

.search-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  color: var(--nh-muted);
  font-size: 10px;
}

.library {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 6px;
}

.libitem {
  min-height: 92px;
  padding: 10px 7px 9px;
  border-radius: 11px;
  border: 1px solid #dce5ef;
  background: linear-gradient(180deg, #fff, #f7faff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2px 7px rgba(16, 38, 63, 0.035);
}

.libitem:hover, .libitem:focus-visible {
  background: #f0faf9;
  border-color: #74c9c0;
  box-shadow: 0 7px 16px rgba(15, 159, 145, 0.1);
  transform: translateY(-2px);
}

.libitem svg {
  width: 68px;
  height: 38px;
}

.libitem strong {
  color: #253a54;
  font-size: 11px;
  line-height: 1.25;
}

.libitem em {
  color: #c8461d;
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
}

.template-panel {
  background: linear-gradient(145deg, #fffdfa, #fff5ed);
  padding: 14px;
  border-radius: 11px;
}

.template-panel #loadTemplateBtn {
  width: 100%;
  min-height: 40px;
  margin-top: 8px;
}

.project-fields {
  background: linear-gradient(145deg, #f8fbff, #eff7f8);
  border: 1px solid #dce8ef;
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
}

.empty-tip {
  font-size: 11px;
  background: #f4f8fb;
  border-radius: 7px;
  padding: 9px;
  margin-top: 10px;
  color: #53677d;
  line-height: 1.5;
}

.branch-edit-panel {
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #f1c79f;
  border-radius: 10px;
  background: linear-gradient(145deg, #fffaf4, #fff);
}

.branch-edit-panel > strong {
  display: block;
  font-size: 12px;
  color: #8b4b16;
}

.connection-inventory {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  padding: 2px;
  margin-top: 6px;
}

.connection-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px 8px;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border: 1px solid #dce4ee;
  border-radius: 9px;
  background: #fff;
  color: #263449;
}

.connection-row:hover, .connection-row[aria-current="true"] {
  border-color: #e85d2a;
  background: #fff8f4;
}

.connection-row strong { font-size: 11px; line-height: 1.35; }
.connection-row small { font-size: 10px; color: #68778b; }
.connection-row .connection-meta { grid-column: 1 / -1; border-top: 1px solid #edf0f4; padding-top: 5px; }
.connection-row .connection-id { grid-column: 1 / -1; font-size: 9px; color: #e85d2a; font-weight: 800; }

#topologyToolsPanel {
  background: linear-gradient(180deg, #fbfdff, #f6fafc);
  border: 1px solid #e0e9f1;
  border-radius: 12px;
  padding: 12px;
}

/* ===== Canvas Area ===== */
.workspace {
  display: flex;
  flex-direction: column;
  height: clamp(520px, calc(100vh - 145px), 920px);
}

.workhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fff 0%, #f8fbfe 100%);
  border-bottom: 1px solid #e0e8f0;
  flex-wrap: wrap;
}

.workhead > strong {
  color: #183652;
  font-size: 13px;
  font-weight: 850;
}

.sectionHint {
  color: #7b8da1;
  font-size: 10px;
  font-weight: 400;
}

.boardtools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.boardtools button {
  background: #f2f6fa;
  color: #29435d;
  border: 1px solid #dbe5ee;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.boardtools button:hover {
  background: #eaf7f5;
  border-color: #8bd2ca;
  color: #087d75;
}

.legend {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 10px;
  color: #526a82;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.link-legend {
  display: flex;
  align-items: center;
  gap: 7px 13px;
  flex-wrap: wrap;
  color: #526a82;
  background: #f7fafd;
  border: 1px solid #e3ebf2;
  border-radius: 9px;
  padding: 7px 9px;
  font-size: 9px;
  font-weight: 700;
}

.link-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.link-legend i {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 5px;
  background: var(--link-color);
}

#viewport {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  background-color: #f9fbfe;
  background-image: radial-gradient(#d7e2ed 0.9px, transparent 0.9px);
  background-size: 22px 22px;
}

#diagram {
  flex: 0 0 auto;
  display: block;
  margin: 0 auto;
  touch-action: pan-x pan-y;
  user-select: none;
}

.node { cursor: grab; }
.node:active { cursor: grabbing; }
.node > rect:first-child {
  fill: #fff;
  filter: drop-shadow(0 4px 8px rgba(21, 42, 66, 0.1));
}
.node text {
  pointer-events: none;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.edgeGroup { cursor: pointer; }
.edgeLabel {
  font-size: 12px;
  fill: #34465d;
  font-weight: 750;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 5.5px;
  stroke-linejoin: round;
  pointer-events: none;
}

.statusbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  background: #fff;
  border-top: 1px solid #e1e9f0;
  color: #657991;
  padding: 11px 15px;
  font-size: 11px;
  min-height: 40px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a078;
  box-shadow: 0 0 0 3px rgba(22, 160, 120, 0.12);
}

.status-shortcuts {
  font-size: 10px;
  color: #9a8c80;
  white-space: nowrap;
}

.workspace:fullscreen, .workspace.manual-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  width: 100vw !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  background: #fff !important;
}

/* ===== Footer ===== */
.site-footer {
  width: 100%;
  padding: 7px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px 18px;
  flex-wrap: wrap;
  background: linear-gradient(110deg, #19181c 0%, #262228 52%, #19181c 100%);
  border-top: 3px solid #e85d2a;
  color: #f8f4f1;
  font-size: 11px;
}

.site-footer .footer-contact, .site-footer .footer-legal {
  display: flex;
  align-items: center;
  gap: 6px 14px;
  flex-wrap: wrap;
}

.site-footer .footer-contact-item, .site-footer .footer-legal a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ff9776;
  text-decoration: none;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.site-footer .footer-contact-item:hover, .site-footer .footer-legal a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer .footer-icon, .site-footer .footer-legal-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.site-footer .footer-copyright {
  color: #d7ced0;
  font-size: 10px;
  white-space: nowrap;
}

/* ===== Privacy Consent Banner ===== */
.privacy-consent[hidden] {
  display: none !important;
}

.privacy-consent {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 100000;
  width: min(760px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 17px 19px;
  background: #fff;
  border: 1px solid #ead8ca;
  border-radius: 15px;
  box-shadow: 0 18px 55px rgba(27, 22, 19, 0.2);
  color: #172334;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.privacy-consent-copy {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.privacy-consent-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #e8f7f4;
  color: #0f9f8f;
}

.privacy-consent-mark svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.privacy-consent-message strong {
  display: block;
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 4px;
}

.privacy-consent-message p {
  font-size: 12px;
  line-height: 1.55;
  color: #58677a;
  margin: 0;
}

.privacy-consent-message a {
  color: #087f79;
  font-weight: 650;
}

.privacy-consent-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.privacy-btn {
  border-radius: 8px;
  padding: 10px 17px;
  font-size: 12px;
  font-weight: 700;
}

.privacy-btn-decline {
  background: #fff;
  color: #344256;
  border: 1px solid #cbd5e1;
}

.privacy-btn-accept {
  background: #0f8f83;
  color: #fff;
  border: 1px solid #0f8f83;
}

.privacy-consent-dismiss {
  opacity: 0;
  transform: translate(-50%, 14px);
}

/* ===== Info Pages (About, Privacy, Terms) ===== */
html:has(body.info-page) {
  height: auto !important;
  overflow-y: auto !important;
}

body.info-page {
  height: auto !important;
  min-height: 100svh !important;
  overflow-y: auto !important;
  background: #f5f2ed !important;
  color: #26252a !important;
  padding-bottom: 54px !important;
}

body.info-page .site-header .tools {
  display: none !important;
}

.info-page-main {
  width: min(1220px, calc(100% - 44px));
  margin: 28px auto 42px;
}

.info-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: #817a75;
  font-size: 12px;
  font-weight: 650;
}

.info-breadcrumb a, .info-back {
  color: #655d58;
  text-decoration: none;
  font-size: 12px;
  font-weight: 750;
}

.info-back {
  display: inline-flex;
  margin-bottom: 16px;
}

.info-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: 30px;
  padding: clamp(30px, 5vw, 58px);
  background: #202127;
  border-radius: 18px;
  color: #fff;
}

.info-kicker {
  color: #ff986c;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.info-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  color: #fff;
}

.info-lead {
  color: #d7d1cc;
  font-size: 15px;
  line-height: 1.75;
  margin: 0;
}

.info-hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.info-tag {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #e7e0da;
  font-size: 11px;
}

.info-hero-mark {
  width: 160px;
  height: 160px;
  justify-self: center;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
}

.info-hero-mark svg {
  width: 80px;
  height: 80px;
  stroke: #ff9568;
  fill: none;
  stroke-width: 1.4;
}

.info-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 275px;
  gap: 22px;
  align-items: start;
  margin-top: 24px;
}

.info-content, .info-side-card {
  padding: clamp(22px, 3.5vw, 38px);
  border: 1px solid #e7dfd6;
  border-radius: 16px;
  background: #fffdfa;
}

.info-side {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 90px;
}

.info-side-card { padding: 19px; }
.info-side-card h2 {
  font-size: 12px;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.info-side-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.info-side-card li + li { margin-top: 8px; }
.info-side-card a, .info-content a {
  color: #c84f25;
  text-decoration: none;
  font-weight: 700;
}

.info-section + .info-section {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid #eee8e1;
}

.info-section h2 {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  margin: 0 0 12px;
}

.info-section h2 .num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff0e8;
  color: #c94d24;
  font-size: 11px;
}

.info-callout {
  display: flex;
  gap: 12px;
  margin-top: 15px;
  padding: 15px 16px;
  border: 1px solid #f0d9ca;
  border-radius: 11px;
  background: #fff6ef;
}

.info-callout svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke: #d85a2b;
  fill: none;
  stroke-width: 1.8;
}

.about-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.about-primary-cta, .about-secondary-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.about-primary-cta { background: linear-gradient(120deg, #e85d2a, #f07b45); color: #fff; }
.about-secondary-cta { color: #f7e8df; border: 1px solid rgba(255, 255, 255, 0.25); }

.about-value-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 28px;
}
.about-value-strip > div {
  position: relative;
  padding: 18px 18px 16px 58px;
  border: 1px solid #e9e2dc;
  border-radius: 12px;
  background: #fff;
}
.about-value-icon, .about-feature-symbol {
  position: absolute;
  left: 17px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff0e9;
  color: #c84f25;
  font-weight: 800;
}

.about-steps, .about-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.about-step { padding: 18px; border: 1px solid #ebe4de; border-radius: 11px; background: #fff; }
.about-feature { position: relative; padding: 17px 17px 15px 58px; border: 1px solid #ebe4de; border-radius: 11px; background: #fff; }
.about-contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #f0d6c8;
  border-radius: 12px;
  background: #fff7f2;
}
.about-contact-panel > a {
  padding: 11px 14px;
  border-radius: 8px;
  color: #fff;
  background: #242329;
  text-decoration: none;
}

body.info-page .site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
}

/* ===== Print & Export Styles ===== */
.print-brand-header, .print-brand-footer {
  display: none;
}

@media print {
  @page { size: A3 landscape; margin: 8mm; }
  html, body {
    height: auto !important;
    overflow: visible !important;
    background: #fffdfa !important;
    color: #242329 !important;
    display: block !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .site-header, .site-footer, .sidebar, .workhead, .statusbar, .privacy-consent, .skip-to-content {
    display: none !important;
  }
  .print-brand-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 4mm;
    margin-bottom: 4mm;
    border-bottom: 1px solid #e8e1d8;
  }
  .print-brand-logo img {
    width: 58mm;
    height: 31mm;
    object-fit: contain;
  }
  .print-brand-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
  }
  .layout, .workspace, #viewport {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  #diagram {
    width: 100% !important;
    height: auto !important;
    max-height: 230mm !important;
  }
  .print-brand-footer {
    display: flex !important;
    width: 100%;
    margin-top: 4mm;
    padding: 4mm 5mm;
    background: #201d22;
    border-top: 1.2mm solid #e85d2a;
    color: #ff9776;
  }
  .print-footer-contact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    justify-items: center;
  }
  .print-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 2mm;
    color: #ff9776;
    font-size: 9pt;
    font-weight: 650;
  }
  .print-footer-icon {
    width: 4mm;
    height: 4mm;
    stroke: #ff9776;
    fill: none;
  }
}

/* ===== Responsive Breakpoints ===== */
@media (max-width: 1180px) {
  body:not(.info-page) .site-header {
    grid-template-columns: minmax(185px, auto) minmax(130px, 1fr);
    grid-template-areas: "brand title" "tools tools";
    row-gap: 8px;
  }
  body:not(.info-page) .site-header .tools {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 900px) {
  body:not(.info-page) {
    height: auto;
    min-height: 100svh;
    overflow-y: auto;
  }
  body:not(.info-page) .layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  body:not(.info-page) .sidebar {
    max-height: none;
    order: 2;
  }
  body:not(.info-page) .workspace {
    height: 70svh;
    min-height: 480px;
    order: 1;
  }
  .info-layout, .info-hero {
    grid-template-columns: 1fr;
  }
  .info-hero-mark { display: none; }
  .info-side { position: static; }
}

@media (max-width: 640px) {
  body:not(.info-page) .site-header {
    grid-template-columns: 1fr;
    grid-template-areas: "brand" "title" "tools";
    justify-items: center;
  }
  body:not(.info-page) .site-header .tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .two, .about-value-strip, .about-steps, .about-feature-grid {
    grid-template-columns: 1fr;
  }
  .privacy-consent {
    flex-direction: column;
    align-items: stretch;
    bottom: 12px;
    padding: 14px;
  }
  .privacy-consent-actions {
    justify-content: flex-end;
  }
}



/* NetworkHub V2.14 — clearer colourful device and action icon system.
   The supplied consolidated stylesheet remains the source of all layout,
   header/footer, responsive and print rules. */
.libitem {
  min-height: 108px;
  padding: 11px 8px 10px;
  border-radius: 12px;
  border: 1px solid #d7e2ec;
  background: linear-gradient(160deg,#ffffff 0%,#f7fbff 100%);
  box-shadow: 0 3px 10px rgba(16,38,63,.045);
  gap: 5px;
}
.libitem svg {
  display: block;
  width: 76px;
  height: 48px;
  margin: 0 auto 2px;
  overflow: visible;
}
.libitem strong { font-size: 11px; color:#1e3650; font-weight:800; }
.libitem em { color:#52718b; font-size:10px; font-weight:700; }
.libitem:hover,.libitem:focus-visible {
  border-color:#69bdb6;
  background:linear-gradient(160deg,#ffffff 0%,#effaf8 100%);
  box-shadow:0 8px 20px rgba(15,159,145,.13);
}
.libitem[aria-pressed="true"],.libitem.is-selected {
  border-color:#0f9f91;
  background:#eaf8f5;
  box-shadow:0 0 0 3px rgba(15,159,145,.12);
}
.sidebar button .nh-action-icon,
.workspace button .nh-action-icon,
.nh-export-btn .nh-action-icon {
  width:20px;height:20px;flex:0 0 20px;display:inline-block;
  padding:3px;border-radius:7px;
  fill:none;stroke:currentColor;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round;
}
.sidebar button[data-icon],.workspace button[data-icon],.nh-export-btn {
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
}
.sidebar button[data-icon],.workspace button[data-icon] { min-height:38px; }
.sidebar button[data-icon="add"],.workspace button[data-icon="add"] {--nh-icon-color:#087f70;--nh-icon-bg:#dff7f1;}
.sidebar button[data-icon="connect"],.workspace button[data-icon="connect"] {--nh-icon-color:#2563eb;--nh-icon-bg:#e5efff;}
.sidebar button[data-icon="unlink"],.workspace button[data-icon="unlink"] {--nh-icon-color:#dc5b48;--nh-icon-bg:#fff0ed;}
.sidebar button[data-icon="apply"],.workspace button[data-icon="apply"] {--nh-icon-color:#16865d;--nh-icon-bg:#e3f7ed;}
.sidebar button[data-icon="duplicate"],.workspace button[data-icon="duplicate"] {--nh-icon-color:#7755c7;--nh-icon-bg:#f0eaff;}
.sidebar button[data-icon="delete"],.workspace button[data-icon="delete"] {--nh-icon-color:#d34d56;--nh-icon-bg:#ffebee;}
.sidebar button[data-icon="arrange"],.workspace button[data-icon="arrange"] {--nh-icon-color:#0e8f9b;--nh-icon-bg:#e1f7f8;}
.sidebar button[data-icon="manual"],.workspace button[data-icon="manual"] {--nh-icon-color:#a66b16;--nh-icon-bg:#fff4dc;}
.sidebar button[data-icon="fit"],.workspace button[data-icon="fit"] {--nh-icon-color:#3269b2;--nh-icon-bg:#e8f0ff;}
.sidebar button[data-icon="search"],.workspace button[data-icon="search"] {--nh-icon-color:#087fba;--nh-icon-bg:#e2f5ff;}
.sidebar button[data-icon="clear"],.workspace button[data-icon="clear"] {--nh-icon-color:#c24b62;--nh-icon-bg:#ffedf1;}
.sidebar button[data-icon="validate"],.workspace button[data-icon="validate"] {--nh-icon-color:#13835b;--nh-icon-bg:#e1f6eb;}
.sidebar button[data-icon="inventory"],.workspace button[data-icon="inventory"] {--nh-icon-color:#7653b9;--nh-icon-bg:#f0eaff;}
.sidebar button[data-icon="branch"],.workspace button[data-icon="branch"] {--nh-icon-color:#c17b19;--nh-icon-bg:#fff4dc;}
.sidebar button[data-icon] .nh-action-icon,
.workspace button[data-icon] .nh-action-icon {
  color:var(--nh-icon-color,#2563eb);
  background:var(--nh-icon-bg,#eaf2ff);
}
.nh-export-btn {
  margin-top:10px;padding:8px 11px;border:1px solid #b9d9d4;
  border-radius:8px;background:#eaf8f5;color:#116e65;
  font-size:12px;font-weight:750;cursor:pointer;
}
.nh-export-btn:hover {background:#dff3ee;}
#topologyToolsOutput table {width:100%;border-collapse:collapse;font-size:11px;}
#topologyToolsOutput th {background:#edf4f8;color:#29445e;text-align:left;font-weight:800;}
#topologyToolsOutput th,#topologyToolsOutput td {padding:7px 8px;border-bottom:1px solid #e6edf3;}
#topologyToolsOutput tr:last-child td {border-bottom:0;}
@media(max-width:640px) {
  .libitem {min-height:100px;}
  .libitem svg {width:68px;height:43px;}
  .sidebar button[data-icon],.workspace button[data-icon] {gap:6px;}
  .sidebar button .nh-action-icon,.workspace button .nh-action-icon {width:18px;height:18px;flex-basis:18px;}
}



/* Preserve the exact V2.13 header/footer colour identity while using the
   consolidated stylesheet for the rest of the workspace. */
.site-header {
  border-bottom: 0 !important;
}
.site-header .brand-lockup { justify-content: flex-start !important; }
.site-header .brand-copy,
.site-header .brand-name,
.site-header .brand-name span,
.site-header .brand-rule { text-align: right !important; }
.site-header .header-title {
  padding: 7px 11px !important;
  border-color: #f2c28f !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.10) !important;
}
.site-header .tools button {
  border-radius: 9px !important;
  letter-spacing: .12px !important;
  border-color: #e8e1d8 !important;
  color: #252329 !important;
}
.site-header .tools button.primary,
.site-header .tools #pdfBtn {
  background: #e85d2a !important;
  color: #fffdfa !important;
  border-color: #e85d2a !important;
  box-shadow: 0 4px 12px rgba(232,93,42,.18) !important;
}
.site-header .tools #installAppBtn {
  box-shadow: 0 2px 6px rgba(35,25,15,.06) !important;
}
.site-footer {
  min-height: 39px !important;
  box-shadow: 0 -3px 12px rgba(25,18,18,.08) !important;
  text-align: center !important;
}
.site-footer .footer-contact { justify-content: flex-start !important; }
.site-footer .footer-contact-item {
  color: #ff9776 !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  letter-spacing: .1px !important;
  justify-content: flex-start !important;
}
.site-footer .footer-copyright {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 12.5px !important;
  letter-spacing: .2px !important;
  text-align: center !important;
}
.site-footer .footer-legal { justify-content: flex-end !important; gap: 6px 12px !important; }
.site-footer .footer-legal a {
  color: #ff9776 !important;
  display: inline-flex !important;
  justify-content: center !important;
  gap: 5px !important;
  min-height: 22px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}
.site-footer .footer-legal-icon { width: 13px !important; height: 13px !important; }
@media (max-width: 600px) {
  body:not(.info-page) .site-footer {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  body:not(.info-page) .site-footer .footer-contact,
  body:not(.info-page) .site-footer .footer-legal { justify-content: center !important; }
}



/* Responsive header/footer geometry retained from the previous live layout. */
.site-footer { min-height: 0 !important; }
.site-footer .footer-contact { width: 440px; max-width: 100%; }
.site-footer .footer-copyright { width: 420px; max-width: 100%; justify-content: center !important; }
.site-footer .footer-legal { width: 324px; max-width: 100%; }
@media (max-width: 1180px) {
  body:not(.info-page) .site-header {
    grid-template-columns: minmax(185px, auto) minmax(130px, 1fr) !important;
    grid-template-areas: "brand title" "tools tools" !important;
    row-gap: 8px !important;
  }
  body:not(.info-page) .site-header .tools {
    display: grid !important;
    grid-template-columns: repeat(4,minmax(0,1fr)) !important;
    width: 100% !important;
  }
  body:not(.info-page) .site-header .tools button {
    min-height: 38px !important;
    padding: 8px 9px !important;
    font-size: 11px !important;
  }
}
@media (max-width: 680px) {
  body:not(.info-page) .site-header { padding: 10px 12px !important; }
  body:not(.info-page) .site-header .header-title {
    font-size: 15px !important;
    padding: 7px 11px !important;
  }
  body:not(.info-page) .site-header .tools {
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  }
  .site-footer { padding: 8px 10px !important; }
  .site-footer .footer-contact-item,
  .site-footer .footer-legal a { font-size: 9px !important; }
  .site-footer .footer-legal { gap: 5px 10px !important; }
}
@media (max-width: 600px) {
  .site-footer { flex-direction: column !important; align-items: center !important; text-align: center !important; }
  .site-footer .footer-contact,
  .site-footer .footer-copyright,
  .site-footer .footer-legal { width: auto !important; max-width: 100% !important; justify-content: center !important; }
}
@media (max-width: 420px) {
  body:not(.info-page) .site-header .tools {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}



/* Preserve the prior responsive header/footer geometry at tablet and phone widths. */
.site-footer .footer-contact,
.site-footer .footer-legal { flex-wrap: nowrap !important; }
.site-footer .footer-contact-item,
.site-footer .footer-legal a { flex: 0 0 auto !important; white-space: nowrap !important; }
@media (max-width: 1180px) {
  body:not(.info-page) .site-header .tools button { min-height: 36px !important; }
}
@media (max-width: 1050px) {
  body:not(.info-page) .site-header .brand-symbol {
    width: 38px !important; height: 44px !important; flex-basis: 38px !important;
  }
  body:not(.info-page) .site-header .brand-name { font-size: 18px !important; }
}
@media (max-width: 640px) {
  body:not(.info-page) .site-header {
    grid-template-columns: 1fr !important;
    grid-template-areas: "brand" "title" "tools" !important;
    justify-items: center !important;
  }
  body:not(.info-page) .site-header .tools { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
}
@media (max-width: 680px) {
  body:not(.info-page) .site-header .tools button { min-height: 38px !important; }
  .site-footer .footer-contact,
  .site-footer .footer-legal { width: auto !important; max-width: 100% !important; }
  .site-footer .footer-contact { gap: 6px 10px !important; }
  .site-footer .footer-legal { gap: 5px 10px !important; }
}
@media (max-width: 600px) {
  .site-footer .footer-contact { flex-wrap: nowrap !important; }
}



/* Final phone breakpoint alignment with the established site chrome. */
@media (max-width: 680px) {
  .site-footer { gap: 6px 10px !important; }
}
@media (max-width: 600px) {
  .site-footer { flex-direction: row !important; align-items: center !important; text-align: center !important; }
}
@media (max-width: 420px) {
  body:not(.info-page) .site-header .tools {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}



/* Restore the original information-page (About / Privacy / Terms) chrome.
   Only site header/footer are targeted; page content keeps the consolidated layout. */
body.info-page .site-header {
  display:grid !important;
  grid-template-columns:minmax(220px,1fr) auto minmax(220px,1fr) !important;
  grid-template-areas:"brand title spacer" !important;
  align-items:center !important;
  gap:16px !important;
  min-height:86px !important;
  padding:10px 18px !important;
  position:sticky !important;
  border-bottom:0 !important;
}
body.info-page .site-header .brand-lockup {
  grid-area:brand !important; grid-column:1 !important; grid-row:1 !important;
  justify-self:start !important; justify-content:flex-start !important;
}
body.info-page .site-header .brand-symbol { width:42px !important;height:48px !important;flex-basis:42px !important; }
body.info-page .site-header .brand-name { font-size:20px !important;line-height:1.08 !important;text-align:right !important; }
body.info-page .site-header .brand-copy { align-items:stretch !important;text-align:right !important; }
body.info-page .site-header .header-title {
  grid-area:title !important;grid-column:2 !important;grid-row:1 !important;
  justify-self:center !important;align-self:center !important;
  padding:0 8px !important;font-size:20px !important;line-height:1.2 !important;letter-spacing:.25px !important;
  border-color:#f2c28f !important;box-shadow:none !important;
}
body.info-page .site-header .tools { display:none !important; }
body.info-page .site-footer {
  display:grid !important;
  grid-template-areas:"contact copyright legal" !important;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;
  grid-template-rows:28px !important;
  align-items:center !important;justify-content:stretch !important;
  gap:8px 16px !important;
  width:100% !important;min-height:42px !important;
  padding:6px 18px !important;
  background:linear-gradient(110deg,#17181d,#252329) !important;
  color:#e9e3de !important;border-top:2px solid #e85d2a !important;
  text-align:center !important;position:fixed !important;left:0 !important;right:0 !important;bottom:0 !important;
}
body.info-page .site-footer .footer-contact {
  grid-area:contact !important;justify-content:flex-start !important;
  width:auto !important;gap:7px 16px !important;flex-wrap:nowrap !important;
}
body.info-page .site-footer .footer-copyright {
  grid-area:copyright !important;display:block !important;width:auto !important;
  color:#ddd6d1 !important;font-size:9px !important;font-weight:500 !important;
  line-height:13.5px !important;letter-spacing:.2px !important;text-align:center !important;
}
body.info-page .site-footer .footer-legal {
  grid-area:legal !important;justify-content:flex-end !important;
  width:auto !important;gap:7px 14px !important;flex-wrap:nowrap !important;
}
body.info-page .site-footer .footer-contact-item,
body.info-page .site-footer .footer-legal a {
  display:inline-flex !important;align-items:center !important;justify-content:flex-start !important;
  gap:5px !important;min-height:18px !important;padding:0 !important;
  color:#ff9b70 !important;font-size:9px !important;font-weight:700 !important;
  line-height:10.8px !important;white-space:nowrap !important;
}
body.info-page .site-footer .footer-icon,
body.info-page .site-footer .footer-legal-icon {
  width:13px !important;height:13px !important;flex:0 0 13px !important;
}
@media (max-width: 1180px) {
  body.info-page .site-header .brand-symbol { width:38px !important;height:44px !important;flex-basis:38px !important; }
  body.info-page .site-header .brand-name { font-size:18px !important; }
  body.info-page .site-header .header-title { font-size:18px !important; }
  body.info-page .site-footer {
    grid-template-areas:"contact copyright" "legal legal" !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-rows:24.5px 24.5px !important;
    gap:5px 16px !important;min-height:68px !important;padding:6px 14px !important;
  }
  body.info-page .site-footer .footer-legal { justify-content:center !important; }
}
@media (max-width: 760px) {
  body.info-page .site-header {
    grid-template-columns:1fr !important;grid-template-areas:"brand" "title" !important;
    grid-template-rows:44px 20px !important;gap:8px !important;
    min-height:86px !important;padding:10px 12px !important;position:relative !important;
    justify-items:center !important;
  }
  body.info-page .site-header .brand-lockup { grid-column:1 !important;grid-row:1 !important;justify-self:center !important; }
  body.info-page .site-header .header-title {
    grid-column:1 !important;grid-row:2 !important;justify-self:center !important;
    font-size:15px !important;line-height:1.2 !important;letter-spacing:1.8px !important;
  }
}
@media (max-width: 420px) {
  body.info-page .site-header { grid-template-rows:44px auto !important; }
  body.info-page .site-header .header-title {
    font-size:11px !important;line-height:1.2 !important;letter-spacing:1.32px !important;
  }
  body.info-page .site-footer {
    grid-template-areas:"contact" "legal" "copyright" !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:64px 18px 13.5px !important;
    gap:5px !important;min-height:108px !important;padding:7px 12px !important;
  }
  body.info-page .site-footer .footer-contact {
    justify-content:center !important;flex-direction:column !important;
    flex-wrap:wrap !important;gap:5px 12px !important;
  }
  body.info-page .site-footer .footer-legal { justify-content:center !important;gap:5px 10px !important; }
}

/* V2.21 privacy notice: clearer, more prominent consent surface. */
.privacy-consent {
  width:min(820px,calc(100vw - 28px));
  padding:20px 22px;
  gap:20px;
  border:1px solid #d7c5b7;
  border-top:4px solid #e85d2a;
  border-radius:18px;
  background:linear-gradient(145deg,#fffdfa 0%,#ffffff 62%,#fff7f1 100%);
  box-shadow:0 24px 70px rgba(23,24,29,.28),0 4px 14px rgba(23,24,29,.10);
}
.privacy-consent-copy { gap:15px; }
.privacy-consent-mark {
  width:46px;height:46px;flex-basis:46px;border-radius:14px;
  background:linear-gradient(145deg,#e4f7f2,#d9edff);color:#087f75;
  box-shadow:inset 0 0 0 1px rgba(8,127,117,.12);
}
.privacy-consent-mark svg {width:26px;height:26px;}
.privacy-consent-eyebrow {
  display:block;margin:0 0 5px;color:#d35425;font-size:9px;
  font-weight:850;letter-spacing:1.15px;
}
.privacy-consent-message strong {font-size:15px;color:#17181d;margin-bottom:5px;}
.privacy-consent-message p {font-size:12px;line-height:1.6;color:#4e5b6b;max-width:590px;}
.privacy-consent-message a {color:#bd4b24;text-decoration:underline;text-underline-offset:2px;}
.privacy-consent-facts {display:flex;flex-wrap:wrap;gap:6px 13px;margin-top:9px;color:#526174;font-size:10px;font-weight:700;}
.privacy-consent-facts span {display:inline-flex;align-items:center;gap:4px;}
.privacy-consent-facts b {color:#168052;font-size:12px;}
.privacy-consent-actions {flex:0 0 auto;gap:8px;}
.privacy-btn {min-height:40px;padding:10px 17px;border-radius:9px;font-size:12px;}
.privacy-btn-decline {background:#fff;color:#344256;border-color:#b9c4d1;}
.privacy-btn-decline:hover {background:#f3f5f8;border-color:#718096;}
.privacy-btn-accept {background:#087f75;border-color:#087f75;box-shadow:0 3px 9px rgba(8,127,117,.18);}
.privacy-btn-accept:hover {background:#066b63;border-color:#066b63;}
@media(max-width:680px) {
 .privacy-consent {left:12px;right:12px;bottom:12px;transform:none;width:auto;display:block;padding:16px;border-radius:16px;}
 .privacy-consent-copy {align-items:flex-start;}
 .privacy-consent-mark {width:40px;height:40px;flex-basis:40px;}
 .privacy-consent-message strong {font-size:14px;}
 .privacy-consent-message p {font-size:11px;}
 .privacy-consent-facts {gap:5px 10px;font-size:9px;}
 .privacy-consent-actions {display:grid;grid-template-columns:1fr 1fr;margin-top:13px;}
 .privacy-btn {width:100%;}
 .privacy-consent-dismiss {transform:translateY(14px);}
}

/* V2.23 final polish: balanced toolbar, centered text composer, responsive canvas. */
.workhead{justify-content:center;gap:10px 16px;padding:13px 16px 12px}
.workhead>strong{width:100%;text-align:center}
.boardtools{width:100%;justify-content:center;align-items:center;gap:7px}
.boardtools button{border-radius:10px;min-height:38px;padding:7px 12px;white-space:nowrap;box-shadow:0 1px 2px rgba(22,42,63,.04)}
#zoomReset{background:#e8f7f4;border-color:#b7e3dc;color:#087d75;font-weight:900;min-width:48px}
#addTextBtn{background:linear-gradient(135deg,#fff1e8,#ffe2d1);border-color:#f3b18f;color:#b94720}
#fitTopBtn{background:#edf4ff;border-color:#c8dcfa;color:#245caa}
#scrollViewBtn{background:#eef8f4;border-color:#c9e7d7;color:#24764e}
#fullScreenBtn{background:#f3efff;border-color:#d9ccff;color:#6845ad}
.legend,.link-legend{justify-content:center;width:100%}
.nh-modal-backdrop{position:fixed;inset:0;z-index:100010;display:grid;place-items:center;padding:18px;background:rgba(15,23,42,.52);backdrop-filter:blur(5px)}
.nh-modal-backdrop[hidden]{display:none!important}
.nh-modal-card{width:min(480px,100%);padding:22px;border:1px solid #dce5ef;border-top:4px solid #e85d2a;border-radius:18px;background:linear-gradient(145deg,#fff 0%,#fffaf6 100%);box-shadow:0 28px 90px rgba(9,20,35,.32);color:#172334}
.nh-modal-heading{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.nh-modal-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#fff0e7;color:#c44d21;font-size:22px;font-weight:900}
.nh-modal-heading strong{display:block;font-size:17px;font-weight:850}.nh-modal-heading p{margin:3px 0 0;color:#718096;font-size:12px}
.nh-modal-card label{display:block;margin-bottom:7px;font-size:12px;font-weight:800;color:#33465d}
.nh-modal-card textarea{width:100%;min-height:112px;resize:vertical;border:1.5px solid #cbd8e6;border-radius:11px;padding:12px;background:#fff;color:#172334;font:600 14px/1.55 inherit;outline:none}
.nh-modal-card textarea:focus{border-color:#e85d2a;box-shadow:0 0 0 3px rgba(232,93,42,.13)}
.nh-modal-hint{margin-top:7px;color:#758398;font-size:11px}
.nh-modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}
.nh-modal-actions button{min-height:40px;padding:9px 15px;border-radius:9px;font-size:12px;font-weight:800}
#cancelTextComposer{border:1px solid #d5dee8;background:#fff;color:#40536a}
#confirmTextComposer{border:1px solid #d94f24;background:#e85d2a;color:#fff;box-shadow:0 4px 10px rgba(232,93,42,.18)}
/* Centered privacy consent dialog with a clear dimmed backdrop. */
body:has(#privacyConsent:not([hidden]))::before{content:"";position:fixed;inset:0;z-index:99998;background:rgba(15,23,42,.48);backdrop-filter:blur(4px)}
.privacy-consent{left:50%;top:50%;bottom:auto;transform:translate(-50%,-50%);width:min(760px,calc(100vw - 32px));display:block;padding:24px 26px;border-top:5px solid #e85d2a;border-radius:20px}
.privacy-consent-copy{align-items:flex-start}.privacy-consent-mark{width:48px;height:48px;flex-basis:48px}
.privacy-consent-message strong{font-size:17px}.privacy-consent-message p{font-size:13px;line-height:1.65;max-width:none}
.privacy-consent-facts{font-size:11px;gap:8px 16px;margin-top:12px}
.privacy-consent-actions{justify-content:flex-end;margin-top:18px;padding-top:14px;border-top:1px solid #eee4dc}
.privacy-consent-dismiss{transform:translate(-50%,-46%)}
@media(max-width:760px){.workhead{padding:10px;gap:9px}.workhead>strong{font-size:12px}.sectionHint{display:block;margin-top:2px}.boardtools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.boardtools button{width:100%;min-width:0;min-height:40px;padding:7px 5px;font-size:11px}.legend,.link-legend{gap:7px 10px;font-size:9px}.privacy-consent{left:50%;top:50%;bottom:auto;transform:translate(-50%,-50%);width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;padding:17px;border-radius:16px}.privacy-consent-copy{gap:10px}.privacy-consent-mark{width:38px;height:38px;flex-basis:38px}.privacy-consent-message strong{font-size:14px}.privacy-consent-message p{font-size:11px}.privacy-consent-facts{font-size:9px}.privacy-consent-actions{display:grid;grid-template-columns:1fr 1fr;margin-top:12px}.privacy-btn{width:100%}.nh-modal-card{padding:17px}.nh-modal-actions{display:grid;grid-template-columns:1fr 1fr}.nh-modal-actions button{padding:8px 5px}}
@media(max-width:420px){.boardtools{grid-template-columns:repeat(2,minmax(0,1fr))}.legend{justify-content:flex-start}.link-legend{justify-content:flex-start}.privacy-consent-copy{display:block}.privacy-consent-mark{margin-bottom:9px}}

/* V2.24 — canvas header hierarchy, single-row legends, and true mobile layout. */
.workhead{
  display:grid !important;
  grid-template-columns:minmax(180px,1fr) auto;
  grid-template-areas:"heading tools" "legend linklegend";
  align-items:center;
  justify-content:stretch;
  gap:10px 16px;
  padding:12px 14px;
}
.workhead>strong{
  grid-area:heading;
  width:auto !important;
  text-align:left !important;
  min-width:0;
  line-height:1.45;
}
.workhead>.boardtools{
  grid-area:tools;
  width:auto !important;
  justify-content:flex-end !important;
  flex-wrap:wrap;
  min-width:0;
}
.workhead>.legend{
  grid-area:legend;
  width:auto !important;
  justify-content:flex-start !important;
  align-items:center;
  min-width:0;
}
.workhead>.link-legend{
  grid-area:linklegend;
  width:auto !important;
  justify-content:flex-end !important;
  align-items:center;
  min-width:0;
  padding:7px 10px;
}
.boardtools button{min-height:36px;border-radius:9px;white-space:nowrap}

/* Privacy consent is a centered, accessible choice dialog rather than a bottom banner. */
.privacy-consent{
  position:fixed !important;
  left:50% !important;
  top:50% !important;
  right:auto !important;
  bottom:auto !important;
  transform:translate(-50%,-50%) !important;
  width:min(720px,calc(100vw - 36px)) !important;
  display:flex;
  align-items:flex-start;
  z-index:100100 !important;
}
.privacy-consent::before{
  content:"";
  position:fixed;
  inset:-100vmax;
  z-index:-1;
  background:rgba(13,24,39,.58);
  backdrop-filter:blur(4px);
}
.privacy-consent-dismiss{opacity:0;transform:translate(-50%,calc(-50% + 14px)) !important}

@media(max-width:900px){
  .workhead{grid-template-columns:minmax(0,1fr) auto;gap:9px 10px}
  .workhead>.legend{flex-wrap:wrap}
  .workhead>.link-legend{flex-wrap:wrap}
  body:not(.info-page) .workspace{min-width:0;width:100%}
  .statusbar{gap:8px;flex-wrap:wrap}
}
@media(max-width:640px){
  html,body{max-width:100%;overflow-x:hidden}
  body:not(.info-page){height:auto;min-height:100svh;overflow-y:auto}
  body:not(.info-page) .layout{width:100%;max-width:100%;padding:8px;gap:10px}
  body:not(.info-page) .workspace{height:68svh;min-height:430px;max-height:none;border-radius:13px}
  .workhead{
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:"heading" "tools" "legend" "linklegend";
    padding:10px;
    gap:9px;
  }
  .workhead>strong{font-size:12px;overflow-wrap:anywhere}
  .sectionHint{display:inline}
  .workhead>.boardtools{display:flex;justify-content:flex-start !important;gap:6px;width:100% !important}
  .boardtools button{flex:1 1 auto;min-width:0;padding:7px 8px;font-size:11px;white-space:normal}
  .workhead>.legend,.workhead>.link-legend{width:100% !important;justify-content:flex-start !important;gap:7px 10px;font-size:9px}
  .workhead>.link-legend{padding:7px 8px}
  .link-legend span{white-space:nowrap}
  #viewport{min-height:0;touch-action:pan-x pan-y}
  .statusbar{align-items:flex-start;padding:9px 10px;font-size:10px}
  .status-shortcuts{display:none}
  .privacy-consent{
    display:block !important;
    width:calc(100vw - 28px) !important;
    max-height:calc(100svh - 32px);
    overflow-y:auto;
    padding:16px !important;
    border-radius:16px !important;
  }
  .privacy-consent-copy{gap:10px}
  .privacy-consent-message p{font-size:11px;line-height:1.5}
  .privacy-consent-facts{display:grid;grid-template-columns:1fr 1fr;gap:6px;font-size:9px}
  .privacy-consent-actions{display:grid;grid-template-columns:1fr 1fr;margin-top:14px;width:100%}
  .privacy-btn{width:100%;min-height:42px}
  .info-page-main{width:calc(100% - 28px);margin:18px auto 30px}
  .info-hero{padding:24px 20px;border-radius:14px}
  .info-hero h1{font-size:clamp(28px,8vw,40px)}
  .info-lead{font-size:13px}
  .info-layout{grid-template-columns:minmax(0,1fr);gap:14px}
  body.info-page .site-footer{position:static}
}
@media(max-width:380px){
  .boardtools button{font-size:10px;padding:7px 6px}
  .privacy-consent-facts{grid-template-columns:1fr}
}

/* V2.25 privacy consent: true modal overlay with a crisp, opaque dialog. */
.privacy-consent:not([hidden]) {
  position: fixed !important;
  inset: 50% auto auto 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 100000 !important;
  width: min(720px, calc(100vw - 36px)) !important;
  max-height: min(86vh, 620px) !important;
  overflow: auto !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 22px !important;
  padding: 24px 26px !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #172334 !important;
  border: 1px solid #d8e1eb !important;
  border-top: 5px solid #e85d2a !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 80px rgba(8, 18, 32, .32) !important;
  opacity: 1 !important;
  filter: none !important;
  isolation: isolate;
}
.privacy-consent:not([hidden])::before {
  content: "";
  position: fixed;
  inset: -100vmax;
  z-index: -1;
  background: rgba(13, 24, 39, .66);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}
.privacy-consent-copy { flex: 1 1 auto; min-width: 0; }
.privacy-consent-message strong { color: #172334 !important; }
.privacy-consent-message p { color: #46566a !important; }
.privacy-consent-facts { color: #46566a !important; }
.privacy-consent-actions { flex: 0 0 auto; align-self: center; }
.privacy-consent-dismiss { opacity: 0 !important; transform: translate(-50%, calc(-50% + 12px)) !important; }
@media (max-width: 680px) {
  .privacy-consent:not([hidden]) {
    inset: auto 12px 12px 12px !important;
    transform: none !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(82svh, 640px) !important;
    display: block !important;
    padding: 18px !important;
    border-radius: 16px !important;
  }
  .privacy-consent-copy { gap: 11px !important; }
  .privacy-consent-message p { font-size: 12px !important; }
  .privacy-consent-actions { display: grid !important; grid-template-columns: 1fr 1fr !important; margin-top: 16px !important; }
  .privacy-consent-dismiss { transform: translateY(12px) !important; }
}

/* V2.26 — keep the design canvas visible on phones without requiring full screen. */
@media (max-width: 900px) {
  body:not(.info-page) .workspace {
    display: flex !important;
    flex-direction: column !important;
    height: 76svh !important;
    min-height: 560px !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  body:not(.info-page) #viewport {
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 380px !important;
    max-height: none !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  body:not(.info-page) #diagram {
    display: block !important;
    flex: 0 0 auto !important;
    min-width: 320px;
    min-height: 240px;
  }
  body:not(.info-page) .workhead,
  body:not(.info-page) .statusbar {
    flex: 0 0 auto !important;
  }
}
@media (max-width: 640px) {
  body:not(.info-page) .workspace {
    height: 78svh !important;
    min-height: 580px !important;
  }
  body:not(.info-page) #viewport {
    min-height: 400px !important;
  }
}
@media (max-width: 380px) {
  body:not(.info-page) .workspace { min-height: 560px !important; }
  body:not(.info-page) #viewport { min-height: 380px !important; }
}
