/* دليل الألواح — تنسيق متوافق مع gccshams */
.tech-panels-guide {
  --tp-bg: var(--bg);
  --tp-panel: var(--panel);
  --tp-soft: #f1f5f9;
  --tp-border: var(--border);
  --tp-text: var(--text);
  --tp-muted: var(--muted);
  --tp-accent: var(--gold);
  --tp-accent-soft: rgba(180, 134, 0, 0.12);
  --tp-teal: #0f766e;
  --tp-teal-soft: rgba(15, 118, 110, 0.1);
  --tp-red: #dc2626;
  --tp-red-soft: rgba(220, 38, 38, 0.1);
  --tp-good: #15803d;
  --tp-mono: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--tp-text);
  font-size: 16px;
  line-height: 1.85;
}
.tech-panels-guide .num {
  font-family: var(--tp-mono);
  direction: ltr;
  unicode-bidi: embed;
  color: var(--tp-teal);
}
.tech-panels-guide a { color: var(--tp-teal); }

.tech-panels-guide .tp-hero {
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--tp-border);
  margin-bottom: 0;
}
.tech-panels-guide .eyebrow {
  color: var(--tp-accent);
  font-family: var(--tp-mono);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 14px;
  background: var(--tp-accent-soft);
}
.tech-panels-guide .tp-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 10px;
}
.tech-panels-guide .tp-hero h1 em {
  color: var(--tp-accent);
  font-style: normal;
}
.tech-panels-guide .sub {
  color: var(--tp-muted);
  max-width: 760px;
  font-size: 1.02rem;
}
.tech-panels-guide .kw-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.tech-panels-guide .kw-chip {
  background: var(--tp-panel);
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 140px;
  flex: 1;
  box-shadow: var(--shadow);
}
.tech-panels-guide .kw-chip b {
  display: block;
  font-family: var(--tp-mono);
  color: var(--tp-accent);
  font-size: 1.15rem;
  direction: ltr;
  text-align: right;
}
.tech-panels-guide .kw-chip span {
  color: var(--tp-muted);
  font-size: 0.82rem;
}

.tech-panels-guide .tp-toc {
  position: sticky;
  top: 72px;
  z-index: 40;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  margin: 18px 0 8px;
  overflow-x: auto;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.tech-panels-guide .tp-toc .in {
  display: flex;
  gap: 2px;
  padding: 4px 8px;
}
.tech-panels-guide .tp-toc a {
  color: var(--tp-muted);
  text-decoration: none;
  padding: 10px 12px;
  display: inline-block;
  font-size: 0.86rem;
  font-weight: 700;
  border-bottom: 2px solid transparent;
}
.tech-panels-guide .tp-toc a:hover,
.tech-panels-guide .tp-toc a:focus-visible {
  color: var(--tp-accent);
  border-bottom-color: var(--tp-accent);
  outline: none;
}

.tech-panels-guide .tp-body { padding: 0 0 24px; }
.tech-panels-guide .tp-sec {
  padding: 36px 0 12px;
  border-bottom: 1px dashed var(--tp-border);
  scroll-margin-top: 160px;
}
.tech-panels-guide .tp-sec:last-of-type { border-bottom: none; }
.tech-panels-guide .sec-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.tech-panels-guide .sec-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 2px solid var(--accent);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--tp-mono);
  color: var(--tp-accent);
  font-weight: 700;
  background: var(--tp-accent-soft);
}
.tech-panels-guide .sec-head h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 900;
}
.tech-panels-guide .lead {
  color: var(--tp-muted);
  margin-bottom: 16px;
  max-width: 820px;
}
.tech-panels-guide p { margin-bottom: 12px; }
.tech-panels-guide strong { color: var(--tp-accent); font-weight: 800; }

.tech-panels-guide .card {
  background: var(--tp-panel);
  border: 1px solid var(--tp-border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}
.tech-panels-guide .card h3 {
  color: var(--tp-accent);
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 800;
}
.tech-panels-guide .card h4 {
  color: var(--tp-teal);
  font-size: 1rem;
  margin: 12px 0 6px;
  font-weight: 800;
}
.tech-panels-guide .grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tech-panels-guide .grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 820px) {
  .tech-panels-guide .grid2,
  .tech-panels-guide .grid3 { grid-template-columns: 1fr; }
}

.tech-panels-guide .tbl-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  background: var(--tp-panel);
  box-shadow: var(--shadow);
}
.tech-panels-guide table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 640px;
}
.tech-panels-guide th {
  background: var(--tp-soft);
  color: var(--tp-accent);
  font-weight: 800;
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid var(--tp-border);
}
.tech-panels-guide td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--tp-border);
  vertical-align: top;
}
.tech-panels-guide tr:last-child td { border-bottom: none; }
.tech-panels-guide .good { color: var(--tp-good); font-weight: 700; }
.tech-panels-guide .mid { color: var(--tp-accent); font-weight: 700; }
.tech-panels-guide .bad { color: var(--tp-red); font-weight: 700; }

.tech-panels-guide .badge {
  display: inline-block;
  background: var(--tp-soft);
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  color: var(--tp-text);
  margin: 2px;
  font-weight: 700;
}
.tech-panels-guide .badge.s {
  border-color: var(--accent);
  color: var(--tp-accent);
  background: var(--tp-accent-soft);
}
.tech-panels-guide .badge.t {
  border-color: var(--tp-teal);
  color: var(--tp-teal);
  background: var(--tp-teal-soft);
}

.tech-panels-guide .note,
.tech-panels-guide .warn,
.tech-panels-guide .tip {
  padding: 14px 18px;
  border-radius: 12px;
  margin: 16px 0;
  border-right: 4px solid;
}
.tech-panels-guide .note {
  border-color: var(--accent);
  background: var(--tp-accent-soft);
}
.tech-panels-guide .warn {
  border-color: var(--tp-red);
  background: var(--tp-red-soft);
}
.tech-panels-guide .tip {
  border-color: var(--tp-teal);
  background: var(--tp-teal-soft);
}
.tech-panels-guide .note b,
.tech-panels-guide .warn b,
.tech-panels-guide .tip b { font-weight: 800; }

.tech-panels-guide .calc {
  background: var(--tp-panel);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}
.tech-panels-guide .calc h3 {
  color: var(--tp-accent);
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.tech-panels-guide .calc .row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 16px;
}
.tech-panels-guide .calc .fld { flex: 1; min-width: 200px; }
.tech-panels-guide .calc label {
  display: block;
  font-size: 0.88rem;
  color: var(--tp-muted);
  margin-bottom: 6px;
  font-weight: 700;
}
.tech-panels-guide .calc input[type=range] {
  width: 100%;
  accent-color: var(--gold);
}
.tech-panels-guide .calc select {
  width: 100%;
  background: var(--tp-soft);
  color: var(--tp-text);
  border: 1px solid var(--tp-border);
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  font-size: 0.95rem;
}
.tech-panels-guide .calc .val {
  font-family: var(--tp-mono);
  color: var(--tp-accent);
  font-size: 1.02rem;
  direction: ltr;
  display: inline-block;
}
.tech-panels-guide .calc-out {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}
@media (max-width: 720px) {
  .tech-panels-guide .calc-out { grid-template-columns: 1fr; }
}
.tech-panels-guide .calc-box {
  background: var(--tp-soft);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid var(--tp-border);
}
.tech-panels-guide .calc-box .big {
  font-family: var(--tp-mono);
  font-size: 1.5rem;
  font-weight: 700;
  direction: ltr;
}
.tech-panels-guide .calc-box .lbl {
  color: var(--tp-muted);
  font-size: 0.82rem;
  margin-top: 4px;
}
.tech-panels-guide #lossBar {
  height: 12px;
  background: var(--tp-soft);
  border-radius: 7px;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--tp-border);
}
.tech-panels-guide #lossFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--tp-teal), var(--gold), var(--tp-red));
  transition: width .3s;
}

.tech-panels-guide .ds {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  margin: 20px 0;
}
@media (max-width: 880px) {
  .tech-panels-guide .ds { grid-template-columns: 1fr; }
}
.tech-panels-guide .ds-sheet {
  background: #fff;
  color: var(--tp-text);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--tp-border);
  box-shadow: var(--shadow);
}
.tech-panels-guide .ds-sheet .ds-head {
  background: #0f172a;
  color: #fff;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 800;
}
.tech-panels-guide .ds-sheet .ds-head .model {
  font-family: var(--tp-mono);
  font-size: 0.8rem;
  color: var(--accent);
  direction: ltr;
}
.tech-panels-guide .ds-group-title {
  background: var(--tp-soft);
  padding: 7px 18px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--tp-muted);
}
.tech-panels-guide .ds-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--tp-border);
  font-size: 0.9rem;
  transition: background .15s;
}
.tech-panels-guide .ds-row:hover { background: #f8fafc; }
.tech-panels-guide .ds-row.active {
  background: var(--tp-accent-soft);
  border-right: 4px solid var(--gold);
}
.tech-panels-guide .ds-row .k { font-weight: 700; }
.tech-panels-guide .ds-row .v {
  font-family: var(--tp-mono);
  direction: ltr;
  color: var(--tp-teal);
  white-space: nowrap;
}
.tech-panels-guide .ds-exp {
  background: var(--tp-panel);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 20px;
  position: sticky;
  top: 140px;
  align-self: start;
  min-height: 200px;
  box-shadow: var(--shadow);
}
.tech-panels-guide .ds-exp h4 {
  color: var(--tp-accent);
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.tech-panels-guide .ds-exp .en {
  font-family: var(--tp-mono);
  font-size: 0.78rem;
  color: var(--tp-teal);
  direction: ltr;
  text-align: left;
  margin-bottom: 10px;
}
.tech-panels-guide .ds-exp p { font-size: 0.92rem; color: var(--tp-text); }
.tech-panels-guide .ds-exp .kw {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--tp-border);
  font-size: 0.88rem;
}
.tech-panels-guide .ds-exp .kw b { color: var(--tp-accent); }

.tech-panels-guide ul.clean { list-style: none; padding: 0; }
.tech-panels-guide ul.clean li {
  padding: 8px 0 8px 0;
  padding-right: 26px;
  position: relative;
  border-bottom: 1px dashed var(--tp-border);
}
.tech-panels-guide ul.clean li:last-child { border-bottom: none; }
.tech-panels-guide ul.clean li::before {
  content: "◆";
  color: var(--tp-accent);
  position: absolute;
  right: 0;
  font-size: 0.7rem;
  top: 12px;
}
.tech-panels-guide ol.steps { counter-reset: s; list-style: none; }
.tech-panels-guide ol.steps li {
  counter-increment: s;
  position: relative;
  padding: 10px 46px 10px 0;
  border-bottom: 1px dashed var(--tp-border);
}
.tech-panels-guide ol.steps li::before {
  content: counter(s);
  position: absolute;
  right: 0;
  top: 10px;
  width: 30px;
  height: 30px;
  background: var(--tp-accent-soft);
  border: 1px solid var(--accent);
  color: var(--tp-accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--tp-mono);
  font-size: 0.85rem;
}

.tech-panels-guide .check {
  background: var(--tp-panel);
  border: 1px solid var(--tp-border);
  border-radius: var(--radius);
  padding: 6px 22px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}
.tech-panels-guide .check label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px dashed var(--tp-border);
  cursor: pointer;
  font-size: 0.95rem;
}
.tech-panels-guide .check label:last-child { border-bottom: none; }
.tech-panels-guide .check input {
  margin-top: 6px;
  accent-color: var(--gold);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.tech-panels-guide .check input:checked + span {
  color: var(--tp-muted);
  text-decoration: line-through;
}
.tech-panels-guide .tp-foot {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--tp-border);
  color: var(--tp-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* aliases used by inline JS colors */
.tech-panels-guide {
  --red: var(--tp-red);
  --sun: var(--tp-accent);
  --teal: var(--tp-teal);
  --muted: var(--tp-muted);
}
