/* Circuit Edge design system. Shared by the lab, editorial and legacy pages. */
.ce-site,
.ce-site.light {
  --brand-blue: #2563eb;
  --brand-blue-dark: #194ab7;
  --brand-navy: #102443;
  --brand-orange: #ea7b24;
  --brand-orange-dark: #9f440d;
  --brand-orange-light: #f89d56;
  --brand-blue-tint: #eaf1ff;
  --brand-orange-tint: #fff4eb;
  --bg: #f5f8ff;
  --surface: #fff;
  --panel: var(--brand-blue-tint);
  --text: var(--brand-navy);
  --muted: #485c79;
  --line: #d7e3fb;
  --gold: var(--brand-blue-dark);
  --copper: var(--brand-blue);
  --blue: var(--brand-blue);
  --ink: var(--brand-navy);
  --accent: var(--brand-orange);
  --content: 1248px;
  --gutter: clamp(16px, 3.2vw, 44px);
  color-scheme: light;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

.ce-site [hidden] { display: none !important; }
.ce-site a:focus-visible,
.ce-site button:focus-visible,
.ce-site input:focus-visible,
.ce-site select:focus-visible,
.ce-site textarea:focus-visible,
.ce-site summary:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 3px; }
.ce-site h1, .ce-site h2, .ce-site h3 { color: var(--text); }
.ce-site h1 { font-size: clamp(2rem, 4.4vw, 3.65rem); line-height: 1.08; letter-spacing: -.05em; text-wrap: balance; }
.ce-site h2 { letter-spacing: -.035em; line-height: 1.24; }
.ce-site .eyebrow, .ce-label, .ce-site .section-kicker {
  font: 650 .72rem/1.5 "JetBrains Mono", Consolas, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-blue-dark);
}
.ce-site .intro { color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.ce-site .skip:focus { position: absolute; z-index: 100; padding: 8px 14px; background: white; color: var(--brand-navy); }
.ce-site .ce-header { position: relative; background: #fff; border: 0; border-bottom: 1px solid var(--line); }
.ce-nav-inner {
  max-width: var(--content);
  margin: auto;
  padding: 13px var(--gutter);
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ce-site .ce-brand { display: inline-flex; flex: none; }
.ce-brand img { display: block; width: 188px; height: auto; }
.ce-site .ce-nav { display: flex; flex-wrap: wrap; gap: clamp(14px, 2.2vw, 30px); align-items: center; }
.ce-site .ce-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 650;
  color: #30415b;
}
.ce-site .ce-nav a:hover, .ce-site .ce-nav a[aria-current] { color: var(--brand-blue-dark); text-decoration: underline; text-underline-offset: .4em; }
.ce-site .ce-nav .ce-nav-cta {
  gap: 9px;
  padding: 0 16px;
  background: var(--brand-blue);
  color: white;
  border-radius: 7px;
  text-decoration: none;
}
.ce-site .ce-nav .ce-nav-cta:hover { background: var(--brand-blue-dark); }
.ce-nav-cta span { color: var(--brand-orange-light); }
.ce-menu { display: none; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 8px 12px; cursor: pointer; min-height: 44px; }
.ce-menu span { margin-left: 4px; }

.ce-site:not(.ce-legacy) main {
  max-width: var(--content);
  margin: auto;
  padding: 32px var(--gutter) clamp(56px, 8vw, 100px);
  min-height: 62vh;
}
.ce-site.ce-home main { padding-top: clamp(18px, 3vw, 36px); }
.ce-site .ce-footer {
  background: var(--ink);
  color: #b7c5d9;
  padding: 43px var(--gutter) 22px;
  border: 0;
  font-size: .9rem;
}
.ce-footer-inner {
  max-width: calc(var(--content) - 2 * var(--gutter));
  margin: auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 26px;
}
.ce-site .ce-footer h2 { margin: 0 0 10px; font-size: .9rem; color: #fff; letter-spacing: 0; }
.ce-site .ce-footer a { display: block; margin-bottom: 6px; width: fit-content; color: inherit; text-decoration: none; }
.ce-site .ce-footer a:hover { color: #fff; text-decoration: underline; }
.ce-site .ce-footer .ce-footer-brand { font-size: 1.16rem; color: #fff; font-weight: 750; }
.ce-footer p { margin: 8px 0 0; }
.ce-footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  border-top: 1px solid #344256;
  padding-top: 16px;
  font-size: .82rem;
}
.ce-footer-bottom span { margin-right: auto; }

.ce-home-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  align-items: stretch;
  overflow: hidden;
  isolation: isolate;
  border-radius: 18px;
  background: linear-gradient(110deg, #173d8e, var(--ink) 54%);
  color: white;
}
.ce-hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: clamp(25px, 4.3vw, 58px);
  padding-right: 12px;
}
.ce-home-hero .ce-label { color: #c9d7ed; display: flex; align-items: center; gap: 9px; }
.ce-label i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #ea7b242b; }
.ce-site .ce-home-hero h1 { color: #fff; font-size: clamp(2.5rem, 5.4vw, 4.8rem); margin: 18px 0; line-height: 1; text-wrap: initial; }
.ce-directory .ce-home-hero h1 { font-size: clamp(2.35rem, 4.7vw, 4rem); }
.ce-home-hero h1 em { font-style: normal; color: var(--brand-orange-light); }
.ce-home-hero p { color: #cedaeb; margin: 0; max-width: 43ch; font-size: clamp(.94rem, 1.4vw, 1.08rem); }
.ce-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.ce-site .ce-button { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 14px; border: 1px solid transparent; border-radius: 7px; font-weight: 700; font-size: .84rem; text-decoration: none; }
.ce-site .ce-button-primary { color: var(--brand-navy); background: var(--accent); }
.ce-site .ce-button-primary:hover { background: var(--brand-orange-light); }
.ce-site .ce-button-outline { color: #fff; border-color: #65748a; }
.ce-site .ce-button-outline:hover { background: #293c57; }
.ce-board { position: relative; min-width: 0; min-height: 310px; margin: 0; }
.ce-board img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
.ce-board::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ink), transparent 32%), linear-gradient(0deg, #102443e8, transparent 34%);
  pointer-events: none;
}
.ce-board figcaption {
  position: absolute;
  z-index: 1;
  right: 24px;
  bottom: 19px;
  left: 16%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #ecf3ff;
  font: 650 .67rem Consolas, monospace;
  letter-spacing: .12em;
}
.ce-paths {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.ce-site .ce-path {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: var(--text);
}
.ce-path .ce-label { padding: 4px 6px; border-radius: 4px; background: var(--brand-blue-tint); letter-spacing: 0; }
.ce-path-text strong, .ce-path-text span { display: block; }
.ce-path-text span { color: var(--muted); font-size: .84rem; line-height: 1.45; }
.ce-path-arrow { color: var(--brand-orange-dark); }
.ce-site .ce-path:hover { border-color: var(--brand-blue); }
.ce-workspaces { margin-top: clamp(36px, 6vw, 72px); scroll-margin-top: 18px; }
.ce-workspaces-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.ce-workspaces-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin: 6px 0; }
.ce-workspaces-head p { margin: 0; color: var(--muted); }
.ce-site .home-search { width: min(100%, 300px); margin: 0; }
.ce-site .home-search input { font-size: .9rem; min-height: 46px; background: #fff; border-color: #b8c8de; }
.ce-site.ce-home .calculator-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.ce-site.ce-home .calc-button {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 104px;
  padding: 15px;
  border-radius: 10px;
  animation: none;
}
.ce-site.ce-home .calc-button:hover { transform: translateY(-2px); border-color: var(--brand-blue); }
.ce-site.ce-home .calc-name { font-size: .98rem; color: var(--text); }
.ce-site.ce-home .calc-description { max-width: none; font-size: .83rem; color: var(--muted); margin-top: 4px; }
.ce-site.ce-home .tool-symbol { grid-column: auto; grid-row: auto; width: 46px; height: 46px; background: var(--brand-blue-tint); color: var(--brand-blue-dark); }
.ce-site.ce-home .calc-copy, .ce-site.ce-home .calc-arrow { grid-column: auto; grid-row: auto; }
.ce-site.ce-home .calc-arrow { color: var(--brand-orange-dark); }
.ce-site.ce-home .materials-entry { grid-column: auto; background: var(--brand-orange-tint); }
.ce-site.ce-home .stackup-entry { background: var(--brand-blue-tint) !important; }
.ce-site .home-bottom { margin-top: 23px; padding-block: 15px; }
.ce-site .home-extra-links { flex-wrap: wrap; }
.ce-site .home-bottom p, .ce-site .home-extra-links, .ce-site .home-resources { font-size: .84rem; }

.ce-site .breadcrumbs { flex-wrap: wrap; margin: 0 0 16px; font-size: .83rem; gap: 6px 12px; }
.ce-site .breadcrumbs a, .ce-site .crumb a { text-decoration: underline; text-underline-offset: .2em; }
.ce-site .hero, .ce-page-title {
  padding: clamp(20px, 4vw, 42px);
  margin-bottom: 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at 98% 0%, #e2ecff, transparent 65%), #fff;
}
.ce-site .hero h1, .ce-page-title h1 { text-wrap: initial; margin: 9px 0 12px; }
.ce-page-title .editorial-byline, .ce-site .hero .intro, .ce-page-title .intro { margin-bottom: 0; }
.ce-site .meta { flex-wrap: wrap; gap: 6px 18px; margin-top: 15px; }
.ce-site .card { border-color: var(--line); background: #fff; border-radius: 11px; }
.ce-site .cardhead { background: var(--bg); }
.ce-site .cardhead h2 { font-size: 1.1rem; }
.ce-site .workspace { grid-template-columns: minmax(0, .85fr) minmax(0, 1.45fr); }
.ce-site .workspace > *, .ce-site .material-workspace > *, .ce-site .stack-workspace > *, .ce-site .metric { min-width: 0; }
.ce-site .number:focus-within { border-color: var(--brand-blue); box-shadow: inset 0 0 0 1px var(--brand-blue); }
.ce-site .field label { font-size: .87rem; }
.ce-site .metric span, .ce-site .note, .ce-site .result-main p { font-size: .83rem; }
.ce-site .metric strong, .ce-site .big { overflow-wrap: anywhere; }
.ce-site .result-main { background: var(--brand-blue-tint); }
.ce-site .error, .ce-site .status.danger { color: #a22319; }
.ce-site .btn {
  min-height: 43px;
  font-size: .86rem;
  font-weight: 650;
  border-radius: 7px;
  white-space: normal;
  text-decoration: none;
}
.ce-site .btn.primary, .ce-site .btn-copper, .ce-site .btn-red { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.ce-site .btn.primary:hover, .ce-site .btn-copper:hover, .ce-site .btn-red:hover { background: var(--brand-blue-dark); }
.ce-site .btn.primary::after { display: none; }
.ce-site .toolcard { min-width: 0; }
.ce-site .toolcard:hover { border-color: var(--brand-blue); color: var(--text); }
.ce-site .toolcard h2 { font-size: 1.16rem; }
.ce-site .toolcard p { font-size: .92rem; }
.ce-site .toolcard .arrow { font-size: .84rem; color: var(--brand-orange-dark); }
.ce-library-search { display: flex; justify-content: flex-end; margin: 14px 0; }
.ce-site .article, .ce-site .owned-article {
  max-width: 76ch;
  margin: clamp(28px, 5vw, 60px) auto 0;
  color: var(--muted);
  line-height: 1.77;
  overflow-wrap: anywhere;
}
.ce-site .owned-article h2, .ce-site .article h2 { margin: 1.75em 0 .55em; }
.ce-site .owned-article h2:first-child, .ce-site .article h2:first-child { margin-top: 0; }
.ce-site .desk-note { color: var(--text); padding: 20px; border-left-color: var(--brand-orange); background: var(--brand-orange-tint); font-size: .97rem; }
.ce-site .desk-note p:last-child { margin-bottom: 0; }
.ce-site .concept-figure figcaption { font-size: .83rem; }
.ce-site .article a, .ce-site .owned-article a:not(.btn) { text-decoration: underline; text-underline-offset: .17em; color: var(--brand-blue-dark); }
.ce-site .article .btn.primary { color: white; }

.ce-feature { display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; border-radius: 13px; background: linear-gradient(110deg, #173d8e, var(--ink) 62%); color: white; }
.ce-feature > div { padding: clamp(21px, 4vw, 48px); }
.ce-site .ce-feature h1 { color: #fff; text-wrap: initial; }
.ce-feature .intro, .ce-feature .eyebrow { color: #c8daef; }
.ce-feature img { width: 100%; height: 100%; min-height: 240px; max-height: 435px; object-fit: cover; }
.ce-feature .btn.primary { color: var(--brand-navy); background: var(--accent); border-color: var(--accent); box-shadow: none; }
.ce-feature .btn.primary:hover { color: var(--brand-navy); background: var(--brand-orange-light); }
.ce-site.ce-company .owned-article:has(> section) { max-width: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ce-company .owned-article > section { background: white; border: 1px solid var(--line); border-radius: 10px; padding: clamp(18px, 3vw, 30px); }
.ce-company .owned-article > h2, .ce-company .owned-article > p { grid-column: 1 / -1; }
.ce-company .owned-article > section p:last-child { margin-bottom: 0; }

.ce-legacy .phero {
  padding: clamp(24px, 5vw, 60px) 0;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 90% 0%, #e2ecff, transparent 70%), #fff;
}
.ce-legacy .phero h1 { font-size: clamp(2.15rem, 5vw, 3.8rem); max-width: 21ch; margin-block: 12px; }
.ce-legacy .phero .lead { color: var(--muted); }
.ce-legacy .calculator-shell, .ce-legacy .enq, .ce-legacy .side {
  background: #fff;
  border-color: var(--line);
  border-radius: 11px;
}
.ce-legacy .enq { padding: clamp(15px, 3vw, 28px); }
.ce-legacy .enq fieldset { min-width: 0; }
.ce-legacy .enq .chips { display: flex; flex-wrap: wrap; }
.ce-legacy .estimate-card { top: 18px; background: var(--ink); }
.ce-legacy .estimate-card h3 { color: #fff; }
.ce-legacy .quote-paper { border: 1px solid var(--line); border-radius: 12px; overflow-wrap: anywhere; }
.ce-legacy .quote-page { padding: 30px var(--gutter) 50px; background: var(--bg); }
.ce-legacy .quote-actions .btn:not(.btn-red) { color: var(--text); background: #fff; }
.ce-site.ce-thanks main { padding: clamp(35px, 7vw, 90px) var(--gutter); min-height: 55vh; }
.ce-thanks main a { color: var(--brand-blue-dark); text-decoration: underline; }
.ce-legacy:has(.mbar) { padding-bottom: 0; }
.ce-legacy .mbar, .ce-legacy .wafab { display: none; }

@media (max-width: 900px) {
  .ce-nav-inner { flex-wrap: wrap; min-height: 69px; }
  .ce-site .ce-nav { flex-basis: 100%; padding: 8px 0 0; border-top: 1px solid var(--line); }
  .ce-menu-ready .ce-menu { display: inline-block; }
  .ce-menu-ready .ce-nav:not(.ce-nav-open) { display: none; }
  .ce-site.ce-home .calculator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ce-paths { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 720px) {
  .ce-site .ce-nav { align-items: stretch; flex-direction: column; gap: 1px; }
  .ce-site .ce-nav a { padding: 0 8px; }
  .ce-site .ce-nav .ce-nav-cta { width: fit-content; margin-top: 6px; }
  .ce-home-hero, .ce-feature { grid-template-columns: 1fr; }
  .ce-hero-copy { padding-right: 25px; }
  .ce-board { min-height: 170px; }
  .ce-board::after { background: linear-gradient(var(--ink), transparent 32%), linear-gradient(0deg, #102443c9, transparent 34%); }
  .ce-board figcaption { left: 20px; }
  .ce-workspaces-head { align-items: start; flex-direction: column; }
  .ce-feature img { min-height: 170px; max-height: 210px; }
  .ce-site .workspace, .ce-site.ce-company .owned-article:has(> section) { grid-template-columns: minmax(0, 1fr); }
  .ce-site .toolbar { margin-bottom: 12px; }
  .ce-site .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ce-site .grid, .ce-site .article-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ce-footer-inner { grid-template-columns: 1fr 1fr; }
  .ce-footer-inner > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .ce-site.ce-home .calculator-grid, .ce-site .grid, .ce-site .article-index { grid-template-columns: minmax(0, 1fr); }
  .ce-site.ce-home .calc-button { min-height: 85px; }
  .ce-site .inputs, .ce-site .results, .ce-site .cardhead { padding: 15px; }
  .ce-site .actions { padding-inline: 15px; }
  .ce-site .stack-workspace .cardhead { padding: 0 0 14px; }
  .ce-site .toolcard { min-height: 0; }
  .ce-site .toolcard h2 { margin-top: 8px; }
  .ce-site .hero, .ce-page-title { padding: 19px; }
  .ce-site .stack-metrics strong { overflow-wrap: anywhere; }
  .ce-legacy .quote-table td, .ce-legacy .quote-table th { padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .ce-site *, .ce-site *::before, .ce-site *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
}
@media print {
  .ce-site .ce-header, .ce-site .ce-footer, .ce-site .skip { display: none !important; }
  .ce-site, .ce-site .quote-page { background: #fff; padding: 0; }
  .ce-site .quote-paper { border: 0; }
}
