/* Autonomyware Solutions: Electronics & Chip Design only. Loaded after solutions.css on /solutions/electronics-and-chip-design.
   Shared tokens, frames and blocks live in solutions.css; this file holds what is this page's alone.
   Character: the page reads like a board. Line work, mono type and the page tint (muted PCB green) only, no new
   interactive colour: traces and pads on the hero, the pipeline as pads on one net, square pads for status, fiducials
   on the 3D stages, and our own board drawings on the theme's panel. */

/* ---- Tokens: the colours of our board drawings, matched to assets/solutions/ecad/*-light.svg and *-dark.svg ---- */
.sol-theme-electronics-and-chip-design {
  --ecad-top: #C25A2C;        /* top copper (F.Cu) */
  --ecad-bottom: #3E72A6;     /* bottom copper (B.Cu) */
  --ecad-pad: #B4832C;
  --ecad-via: #5E646C;
  --ecad-soft: #5E646C;       /* outlines, ratlines, mounting holes */
  --ecad-power: #B88B3B; --ecad-usb: #5C8098; --ecad-sensing: #4F8A69;
  --ecad-controller: #7175B0; --ecad-indicators: #C8704C; --ecad-connectors: #6B7078;
  --ecad-pin: color-mix(in srgb, var(--sol-tint) 42%, transparent);
}
:root[data-theme="dark"] .sol-theme-electronics-and-chip-design {
  --ecad-top: #E58552; --ecad-bottom: #76A3D8; --ecad-pad: #E2B866; --ecad-via: #C9CDD2; --ecad-soft: #B4B6BA;
  --ecad-power: #DDB66F; --ecad-usb: #94B8CE; --ecad-sensing: #86C3A0;
  --ecad-controller: #A9ADE0; --ecad-indicators: #E8936F; --ecad-connectors: #B4B6BA;
  --ecad-pin: color-mix(in srgb, var(--sol-tint) 60%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sol-theme-electronics-and-chip-design {
    --ecad-top: #E58552; --ecad-bottom: #76A3D8; --ecad-pad: #E2B866; --ecad-via: #C9CDD2; --ecad-soft: #B4B6BA;
    --ecad-power: #DDB66F; --ecad-usb: #94B8CE; --ecad-sensing: #86C3A0;
    --ecad-controller: #A9ADE0; --ecad-indicators: #E8936F; --ecad-connectors: #B4B6BA;
    --ecad-pin: color-mix(in srgb, var(--sol-tint) 60%, transparent);
  }
}

/* ---- Hero: routed copper in the tint. 45° bends, a three-trace bus, vias as rings and one small IC footprint,
   on a tile wide enough not to read as a pattern. It fades towards the copy so the headline stays clean. ---- */
.sol-theme-electronics-and-chip-design {
  --sol-motif:
    radial-gradient(55% 65% at 80% 30%, var(--sol-tint-wash), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='320' viewBox='0 0 480 320'%3E%3Cg fill='none' stroke='%234F8A69' stroke-opacity='.34' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 36H158l34 34H330M0 46H154l34 34H310M0 56H150l34 34H290M431 36H480M443 46H480M455 56H480M420 320V236l-40-40V126M430 320V232l-40-40V156M0 200H54l14 14V246M92 284V300l14 14H196'/%3E%3Crect x='58' y='250' width='48' height='28' rx='2'/%3E%3Ccircle cx='335' cy='70' r='5'/%3E%3Ccircle cx='315' cy='80' r='5'/%3E%3Ccircle cx='295' cy='90' r='5'/%3E%3Ccircle cx='380' cy='121' r='5'/%3E%3Ccircle cx='390' cy='151' r='5'/%3E%3Ccircle cx='201' cy='314' r='5'/%3E%3Ccircle cx='426' cy='36' r='5'/%3E%3Ccircle cx='438' cy='46' r='5'/%3E%3Ccircle cx='450' cy='56' r='5'/%3E%3C/g%3E%3Cg fill='%234F8A69' fill-opacity='.34'%3E%3Cpath d='M66 243h4v7h-4zM78 243h4v7h-4zM90 243h4v7h-4zM66 278h4v7h-4zM78 278h4v7h-4zM90 278h4v7h-4z'/%3E%3C/g%3E%3C/svg%3E") 0 24px / 480px 320px repeat;
}
.sol-theme-electronics-and-chip-design .sol-hero::before {
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent), linear-gradient(90deg, rgba(0, 0, 0, .28) 0, rgba(0, 0, 0, .28) 36%, #000 64%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, #000 55%, transparent), linear-gradient(90deg, rgba(0, 0, 0, .28) 0, rgba(0, 0, 0, .28) 36%, #000 64%);
  mask-composite: intersect;
}
/* The product window as a package: a row of leads down each side, in the tint. */
.sol-theme-electronics-and-chip-design .sol-hero-media::after {
  content: ""; position: absolute; z-index: -1; top: 18%; bottom: 18%; left: -12px; right: -12px; pointer-events: none;
  background:
    repeating-linear-gradient(180deg, var(--ecad-pin) 0 2px, transparent 2px 14px) left top / 12px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--ecad-pin) 0 2px, transparent 2px 14px) right top / 12px 100% no-repeat;
}
.sol-theme-electronics-and-chip-design .sol-chips li { border-radius: var(--radius-sm); }

/* ---- Numbers are tabular everywhere a board is described. ---- */
.sol-theme-electronics-and-chip-design :is(.sol-tab, .sol-board, .sol-facts, .sol-checks, .sol-release, .ecad-draw-stats, .ecad-legend) { font-variant-numeric: tabular-nums; }

/* ---- Pipeline: nine pads on one net. A trace runs into each stage's pad from the one before it; it is routed (solid)
   up to the open stage and still a ratline (dashed) after it. The open stage's pad is teal, like every selection. ---- */
.ecad-pipe .sol-pipe-tabs { --pipe-gap: 14px; gap: 10px var(--pipe-gap); }
.ecad-pipe .sol-tab { position: relative; border-radius: var(--radius-sm); padding: 10px 12px 12px; }
.ecad-pipe .sol-pipe-num { display: inline-flex; align-items: center; gap: 8px; line-height: 16px; }
.ecad-pipe .sol-pipe-num::before {
  content: ""; flex: none; width: 9px; height: 9px; box-sizing: border-box; border-radius: 1px;
  border: 1.5px solid var(--sol-tint); background: transparent;
}
.ecad-pipe .sol-tab::before {
  content: ""; position: absolute; top: 18px; left: calc(-1px - var(--pipe-gap)); width: calc(var(--pipe-gap) + 13px);
  border-top: 1.5px dashed color-mix(in srgb, var(--sol-tint) 55%, transparent); pointer-events: none;
}
.ecad-pipe .sol-tab:first-child::before { content: none; }
.ecad-pipe .sol-tab:is([aria-selected="true"], :has(~ .sol-tab[aria-selected="true"]))::before { border-top: 2px solid var(--sol-tint); top: 17.5px; }
.ecad-pipe .sol-tab:has(~ .sol-tab[aria-selected="true"]) .sol-pipe-num::before { background: var(--sol-tint); }
.ecad-pipe .sol-tab[aria-selected="true"] .sol-pipe-num::before { background: var(--teal); border-color: var(--teal); }
.ecad-pipe .sol-pipe-name { letter-spacing: -0.005em; }

/* Stage facts: mono drafting labels in the tint, values with tabular figures. */
.sol-theme-electronics-and-chip-design .sol-facts b { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--sol-tint-ink); }
.sol-theme-electronics-and-chip-design .sol-facts li { gap: 4px; }

/* Schematic sheets are paper; in dark they are dimmed a touch so they don't glare. */
.sol-theme-electronics-and-chip-design .sol-thumbs img { border-radius: var(--radius-sm); }
:root[data-theme="dark"] .sol-theme-electronics-and-chip-design :is(.sol-media--sheet img, .sol-thumbs img) { filter: brightness(.9); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sol-theme-electronics-and-chip-design :is(.sol-media--sheet img, .sol-thumbs img) { filter: brightness(.9); }
}

/* ---- Mock app panels (specification, checks, release): a report table. Square pads for status, values in mono. ---- */
.sol-theme-electronics-and-chip-design :is(.sol-checks, .sol-release) li { grid-template-columns: 10px minmax(0, 0.85fr) minmax(0, 1.45fr); padding: 8px 0; }
.sol-theme-electronics-and-chip-design :is(.sol-checks, .sol-release) li i { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0; line-height: 1.5; }
.sol-theme-electronics-and-chip-design :is(.sol-checks, .sol-release) :is(.ok, .warn) { width: 8px; height: 8px; border-radius: 1px; transform: translateY(-1px); }
.sol-theme-electronics-and-chip-design .sol-checks-head b { letter-spacing: -0.005em; }
.sol-theme-electronics-and-chip-design .sol-pill { border-radius: var(--radius-sm); }
@media (max-width: 560px) {
  .sol-theme-electronics-and-chip-design :is(.sol-checks, .sol-release) li { grid-template-columns: 10px minmax(0, 1fr); row-gap: 2px; }
  .sol-theme-electronics-and-chip-design .sol-facts b { font-size: 11px; }
}


/* ---- Our own board drawings (e-sketch, routed copper): drawn on the theme's panel over a faint placement grid,
   one SVG variant per theme, the legend and figures beneath as text (readable at any width, and themed). ---- */
.sol-media.ecad-draw { aspect-ratio: auto; background: var(--sol-panel); color: var(--sol-panel-ink); }
.ecad-draw-canvas {
  --ecad-grid: color-mix(in srgb, var(--sol-panel-line) 70%, transparent);
  padding: clamp(10px, 2.2vw, 24px);
  background:
    linear-gradient(var(--ecad-grid) 1px, transparent 1px) -1px -1px / 20px 20px,
    linear-gradient(90deg, var(--ecad-grid) 1px, transparent 1px) -1px -1px / 20px 20px;
}
.sol-media .ecad-draw-img { width: 100%; height: auto; aspect-ratio: 1588 / 1328; object-fit: contain; }
.ecad-draw-img--dark { display: none !important; }
:root[data-theme="dark"] .ecad-draw-img--light { display: none !important; }
:root[data-theme="dark"] .ecad-draw-img--dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ecad-draw-img--light { display: none !important; }
  :root:not([data-theme="light"]) .ecad-draw-img--dark { display: block !important; }
}
.ecad-draw-foot { display: grid; gap: 8px; padding: 12px clamp(12px, 2.2vw, 24px) 14px; border-top: 1px solid var(--sol-panel-line); }
.ecad-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; line-height: 1.4; color: var(--sol-panel-soft); }
.ecad-legend li { display: inline-flex; align-items: center; gap: 7px; }
.ecad-draw-stats { margin: 0; font-family: var(--font-mono); font-size: 11px; line-height: 1.5; letter-spacing: .02em; color: var(--sol-panel-soft); }
.ecad-key { flex: none; display: inline-block; box-sizing: border-box; width: 14px; height: 10px; }
.ecad-key--top, .ecad-key--bottom { height: 3px; border-radius: 2px; background: var(--ecad-top); }
.ecad-key--bottom { background: var(--ecad-bottom); }
.ecad-key--pad { width: 10px; height: 10px; border-radius: 50%; background: var(--ecad-pad); }
.ecad-key--via { width: 10px; height: 10px; border-radius: 50%; border: 3px solid var(--ecad-via); }
.ecad-key--drill, .ecad-key--mount { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ecad-via); }
.ecad-key--mount { border-color: var(--ecad-soft); }
.ecad-key--pour { border-radius: 2px; border: 1px solid color-mix(in srgb, var(--sol-tint) 75%, transparent); background: color-mix(in srgb, var(--sol-tint) 22%, transparent); }
.ecad-key--ratline { height: 0; border-top: 1px solid var(--ecad-soft); }
.ecad-key--power, .ecad-key--usb, .ecad-key--sensing, .ecad-key--controller, .ecad-key--indicators, .ecad-key--connectors {
  --k: var(--ecad-power); border-radius: 1px; border: 1.5px solid var(--k); background: color-mix(in srgb, var(--k) 22%, transparent);
}
.ecad-key--usb { --k: var(--ecad-usb); }
.ecad-key--sensing { --k: var(--ecad-sensing); }
.ecad-key--controller { --k: var(--ecad-controller); }
.ecad-key--indicators { --k: var(--ecad-indicators); }
.ecad-key--connectors { --k: var(--ecad-connectors); }

/* ---- 3D stages: two fiducials, the marks a pick-and-place camera aligns a board by, in opposite corners. ---- */
.sol-theme-electronics-and-chip-design :is(.sol-boards-stage, .sol-media--model) { position: relative; }
.sol-theme-electronics-and-chip-design .sol-boards-stage::before,
.sol-theme-electronics-and-chip-design .sol-boards-caption::before,
.sol-theme-electronics-and-chip-design .sol-media--model::before,
.sol-theme-electronics-and-chip-design .sol-media--model::after {
  content: ""; position: absolute; z-index: 1; width: 16px; height: 16px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(79, 138, 105, .55) 0 3px, transparent 3.5px);
  border: 1px solid rgba(79, 138, 105, .45);
}
.sol-theme-electronics-and-chip-design :is(.sol-boards-stage, .sol-media--model)::before { left: 14px; top: 14px; }
.sol-theme-electronics-and-chip-design .sol-media--model::after { right: 14px; bottom: 14px; }
/* The switcher's caption sits below its stage and the top-right corner holds the viewer's pause button, so its second
   fiducial hangs from the caption's top edge into the stage's bottom-right corner, 14px in like the others (18px with its
   border, plus the caption's 1px top border). */
.sol-theme-electronics-and-chip-design .sol-boards-caption { position: relative; }
.sol-theme-electronics-and-chip-design .sol-boards-caption::before { right: 14px; top: -33px; }

/* 3D board list: specs as silkscreen tags. */
.sol-theme-electronics-and-chip-design .sol-board-specs i { border-radius: 2px; }

/* ---- Feature rows: the app screenshot sits in a window, and bullets are vias. ---- */
.ecad-rows .sol-row:nth-child(even) > .sol-win { order: 2; }
.sol-theme-electronics-and-chip-design .sol-row li::before {
  top: 0.48em; left: 1px; width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%;
  background: transparent; border: 2.5px solid var(--sol-tint);
}
@media (max-width: 860px) {
  .ecad-rows .sol-row:nth-child(even) > .sol-win { order: 0; }
}

/* ---- Responsive: when the tabs wrap to two rows of five, the sixth stage starts a new row with no trace into it. ---- */
@media (max-width: 1080px) and (min-width: 861px) {
  .ecad-pipe .sol-tab:nth-child(5n + 1)::before { content: none; }
}
@media (max-width: 860px) {
  .ecad-pipe .sol-pipe-tabs { grid-auto-columns: 124px; }
}
