/*
  iCon signal demo: [icon_signals] and [icon_modules] (functions/icon-demo.php),
  2026-10-19, from the tdt3 front page (tdt3/assets/home.css). Loaded only on
  pages that use the shortcodes. Everything is scoped to .icd; sizes follow
  the width of the block it sits in (container queries), not the window, so
  it fits a product page column, a guide or a phone.
  Dark "hardware" objects on the light page. Module colours are the border
  colours of the module front panels (identity colours, not the site colour).
*/
.icd {
  --icd-obj: #1b2631;
  --icd-obj-2: #233243;
  --icd-obj-rule: #33475a;
  --icd-obj-soft: #aebbc7;
  --icd-obj-text: #ebf0f4;
  --icd-ink: #1d2026;
  --icd-ink-soft: #4f5562;
  --icd-rule: #d6d9de;
  --icd-display: industry, "Saira Semi Condensed", "Arial Narrow", sans-serif;
  /* module colours, lightened for the dark objects */
  --m-ix7: #84c7bb;
  --m-iv2: #c4dc6f;
  --m-il24: #ef8486;
  --m-im9: #72b2e8;
  /* the same, darkened for text on the light page */
  --mk-ix7: #2c8576;
  --mk-iv2: #6b8a12;
  --mk-il24: #a9363a;
  --mk-im9: #1f68a6;
  container-type: inline-size;
  clear: both;
  color: var(--icd-ink);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  margin: 32px 0;
  text-align: left;
}
.icd *, .icd *::before, .icd *::after { box-sizing: border-box; }
.icd img { border: 0; box-shadow: none; display: block; float: none; height: auto; margin: 0; max-width: 100%; }
.icd button { -webkit-appearance: none; appearance: none; letter-spacing: normal; text-transform: none; }
.icd :focus-visible { outline: 3px solid var(--tdt-accent, #e67b26); outline-offset: 3px; border-radius: 2px; }

/* ---------- [icon_signals] ---------- */
.icd-screen {
  background: var(--icd-obj); border-radius: 10px; color: var(--icd-obj-text);
  margin: 0; padding: 18px 24px 16px;
}
.icd-bar {
  align-items: baseline; border-bottom: 1px solid var(--icd-obj-rule); display: flex; gap: 16px;
  justify-content: space-between; padding-bottom: 12px; font: 500 15px/1.3 var(--icd-display);
}
.icd-bar b { color: var(--icd-obj-text); font-size: 17px; font-weight: 600; }
.icd-bar-r { align-items: baseline; color: var(--icd-obj-soft); display: flex; gap: 14px; }
.icd-replay {
  background: transparent; border: 1px solid #8193a5; border-radius: 3px; color: var(--icd-obj-text);
  cursor: pointer; font: 500 14px/1 var(--icd-display); padding: 5px 10px;
}
.icd-replay:hover { background: var(--icd-obj-text); border-color: var(--icd-obj-text); color: var(--icd-ink); }
.icd-grid { display: grid; grid-template-columns: 132px minmax(0, 1fr); }
.icd-ch {
  border-bottom: 1px solid #263646; display: flex; flex-direction: column; gap: 1px; grid-column: 1;
  justify-content: center; line-height: 1.15; padding-right: 14px; font-family: var(--icd-display);
}
.icd-ch b { color: var(--icd-obj-text); font-size: 16px; font-weight: 600; }
.icd-ch span { color: var(--icd-obj-soft); font-size: 14px; font-weight: 500; }
.icd-ch i { background: currentColor; border-radius: 2px; display: inline-block; height: 3px; margin-bottom: 6px; width: 18px; }
.icd-plot { border-bottom: 1px solid #263646; grid-column: 2; position: relative; }
.icd-plot svg { display: block; height: 100%; overflow: visible; width: 100%; }
.icd-head, .icd-axis, .icd-axis-l { border-bottom: 0; }
.icd-plot.icd-head { height: 40px; }
.icd-p-photometry { height: 84px; }
.icd-p-video { height: 64px; }
.icd-p-ttl { height: 60px; }
.icd-p-sound { height: 52px; }
.icd-plot.icd-axis { height: 30px; }
.icd-axis-l { color: var(--icd-obj-soft); font-size: 14px; font-weight: 500; justify-content: flex-start; padding-top: 7px; }
.icd-tick {
  color: var(--icd-obj-soft); font: 500 14px/1 var(--icd-display); font-variant-numeric: tabular-nums;
  position: absolute; top: 7px; transform: translateX(-50%);
}
.icd-tick:first-child { transform: none; }
.icd-tick:last-child { transform: translateX(-100%); }
.icd-overlay { grid-column: 2; grid-row: 1 / 7; pointer-events: none; position: relative; }
.icd-gridline { background: rgba(174, 187, 199, .10); bottom: 30px; position: absolute; top: 40px; width: 1px; }
.icd-cue { background: rgba(114, 178, 232, .10); bottom: 30px; position: absolute; top: 40px; }
.icd-mark { border-left: 1.5px dashed #dfe6ec; bottom: 24px; position: absolute; top: 30px; width: 0; }
.icd-mark-label {
  background: var(--icd-obj); border: 1px solid #dfe6ec; border-radius: 2px; color: var(--icd-obj-text);
  font: 600 14px/1.2 var(--icd-display); font-variant-numeric: tabular-nums; padding: 2px 8px;
  position: absolute; top: 8px; transform: translateX(-50%); white-space: nowrap;
}
.icd-ev { color: var(--icd-obj-soft); font: 500 13px/1 var(--icd-display); position: absolute; top: 2px; white-space: nowrap; }
.icd-ev.lane1 { top: 9px; }
.icd-ev.lane2 { top: 37px; }
.icd-sweep { background: var(--icd-obj-text); bottom: 30px; left: 0; opacity: 0; position: absolute; top: 40px; width: 2px; }
/* Drawn when it scrolls into view (.is-on, icon-demo.js); still for
   visitors who ask for less motion */
@media (prefers-reduced-motion: no-preference) {
  .icd-signals .icd-trace { clip-path: inset(0 100% 0 0); }
  .icd-signals .icd-mark, .icd-signals .icd-mark-label, .icd-signals .icd-ev { opacity: 0; }
  .icd-signals.is-on .icd-trace { animation: icd-draw 2.4s cubic-bezier(.35, .1, .25, 1) .4s forwards; }
  .icd-signals.is-on .icd-sweep { animation: icd-sweep 2.4s cubic-bezier(.35, .1, .25, 1) .4s forwards; }
  .icd-signals.is-on .icd-mark, .icd-signals.is-on .icd-mark-label, .icd-signals.is-on .icd-ev { animation: icd-appear .5s ease 2.7s forwards; }
}
@media (prefers-reduced-motion: reduce) {
  .icd-replay { display: none; }
  .icd * { animation: none !important; transition: none !important; }
}
@keyframes icd-draw { to { clip-path: inset(0 0 0 0); } }
@keyframes icd-sweep { 0% { left: 0; opacity: .7; } 96% { opacity: .7; } 100% { left: 100%; opacity: 0; } }
@keyframes icd-appear { to { opacity: 1; } }

/* ---------- [icon_modules] ---------- */
.icd-rack { align-items: start; display: grid; gap: 40px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.icd-console { background: var(--icd-obj); border-radius: 10px; color: var(--icd-obj-text); padding: 12px; }
.icd-console-top { color: var(--icd-obj-soft); display: flex; justify-content: space-between; padding: 4px 8px 12px; font: 500 14px/1 var(--icd-display); }
.icd-status { align-items: center; display: flex; gap: 8px; }
.icd-status::after { background: #e0564a; border-radius: 50%; content: ""; height: 9px; width: 9px; }
.icd .icd-slot {
  align-items: center; background: transparent; border: 1px solid transparent; border-radius: 4px;
  color: var(--icd-obj-text); cursor: pointer; display: grid; font: inherit; gap: 14px;
  grid-template-columns: 112px minmax(0, 1fr); margin: 0 0 6px; padding: 8px 10px 8px 14px;
  position: relative; text-align: left; transition: background-color .15s ease, border-color .15s ease; width: 100%;
}
.icd .icd-slot:last-child { margin-bottom: 0; }
.icd .icd-slot:hover { background: var(--icd-obj-2); }
.icd .icd-slot[aria-selected="true"] { background: #2c3e52; border-color: var(--slot-color); }
.icd-slot-id { display: flex; flex-direction: column; line-height: 1.15; font-family: var(--icd-display); }
.icd-slot-id b { font-size: 20px; font-weight: 600; }
.icd-slot-id b::before { background: var(--slot-color); border-radius: 2px; content: ""; display: inline-block; height: 10px; margin-right: 8px; vertical-align: 2px; width: 10px; }
.icd-slot-id span { color: var(--icd-obj-soft); font-size: 14px; font-weight: 500; }
.icd .icd-panel-img { border-radius: 2px; opacity: .8; transition: opacity .15s ease; width: 100%; }
.icd .icd-slot:hover .icd-panel-img, .icd .icd-slot[aria-selected="true"] .icd-panel-img { opacity: 1; }
.icd .icd-hint { color: var(--icd-ink-soft); font-size: 15px; margin: 12px 0 0; }
.icd-detail { border-top: 3px solid var(--slot-ink); padding-top: 20px; }
.icd-detail[hidden] { display: none; }
.icd-code { color: var(--slot-ink); font: 600 16px/1 var(--icd-display); margin-bottom: 8px; }
.icd .icd-detail h3 { color: var(--icd-ink); font: 600 27px/1.2 var(--icd-display); letter-spacing: 0; margin: 0 0 12px; text-transform: none; }
.icd .icd-detail p { color: var(--icd-ink-soft); font-size: 17px; line-height: 1.55; margin: 0 0 16px; }
.icd-produces { border-top: 1px solid var(--icd-rule); margin: 20px 0; padding-top: 14px; }
.icd-lbl { font: 500 15px/1.3 var(--icd-display); margin-bottom: 10px; }
.icd-mini { background: var(--icd-obj); border-radius: 4px; height: 64px; padding: 6px 10px; }
.icd-mini svg { display: block; height: 100%; width: 100%; }
.icd .icd-link { color: var(--tdt-accent-text, #9a4f12); font-weight: 600; text-underline-offset: 3px; }

/* ---------- narrow blocks (tablet column, phone) ---------- */
@container (max-width: 760px) {
  .icd-rack { gap: 28px; grid-template-columns: 1fr; }
}
@container (max-width: 560px) {
  .icd-screen { border-radius: 8px; padding: 14px 12px 12px; }
  .icd-bar { flex-direction: column; gap: 4px; }
  .icd-grid { grid-template-columns: 90px minmax(0, 1fr); }
  .icd-ch { padding-right: 8px; }
  .icd-ch b { font-size: 14px; overflow-wrap: normal; word-break: normal; }
  .icd-ch span { font-size: 13px; }
  .icd-p-photometry { height: 72px; }
  .icd-p-video, .icd-p-ttl { height: 56px; }
  .icd-p-sound { height: 46px; }
  .icd-plot.icd-head { height: 46px; }
  .icd-gridline, .icd-cue, .icd-sweep { top: 46px; }
  .icd-mark { top: 36px; }
  .icd-mark-label { font-size: 13px; line-height: 1.15; padding: 2px 6px; text-align: center; top: 4px; white-space: normal; width: 128px; }
  .icd-tick { font-size: 13px; }
  .icd-tick.odd { display: none; }
  .icd-ev { font-size: 12px; }
  .icd-frames { opacity: .45; }
  .icd .icd-slot { gap: 8px; grid-template-columns: 1fr; padding: 10px; }
  .icd-console { padding: 8px; }
  .icd .icd-detail h3 { font-size: 23px; }
  .icd .icd-detail p { font-size: 16px; }
}
