/* ============================================================
   TNT — instrument.css
   Instrument detail pages: unit header · compound KPI cards ·
   process steps · accuracy chips · unit photo · CTA
   ============================================================ */

/* ---------- UNIT HEADER ---------- */
.inst-hero {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(70px, 9vw, 130px)) var(--gutter) 0;
}
.inst-id {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 16.5px;
  letter-spacing: 0.3em;
  color: var(--silver-dim);
}
.inst-id .led {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: pulse 2.4s ease-in-out infinite;
}
.inst-name {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.02em;
  margin: 30px 0 14px;
}
.inst-name em {
  font-style: normal;
  color: var(--gold);
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.3);
}
.inst-type {
  font-family: var(--font-mono);
  font-size: 19px;
  letter-spacing: 0.3em;
  color: var(--gold-2);
}
.inst-role {
  margin-top: 22px;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  color: var(--silver);
  max-width: 58ch;
}

/* KPI stat strip — reuse .stats grid look, page-local variant */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-soft);
  margin-top: clamp(44px, 5vw, 60px);
  background: var(--panel);
}
.kpi-stat {
  padding: 26px 24px;
  border-left: 1px solid var(--line-soft);
}
.kpi-stat:first-child { border-left: 0; }
.kpi-stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.kpi-stat b i { font-style: normal; font-size: 0.55em; color: var(--silver-dim); }
.kpi-stat span {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 15.5px;
  letter-spacing: 0.26em;
  color: var(--silver-dim);
}

/* ---------- COMPOUND KPI CARDS ---------- */
.cmpd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.cmpd-card {
  position: relative;
  padding: 26px 22px 22px;
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.28), rgba(16, 16, 16, 0.55));
  border: 1px solid var(--line-soft);
  border-top: 1px solid rgba(192, 198, 206, 0.22);
  min-height: 190px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.45s var(--ease-out),
              transform 0.45s var(--ease-out),
              box-shadow 0.45s var(--ease-out);
}
.cmpd-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-line);
  box-shadow: 0 16px 40px rgba(3, 7, 15, 0.5), 0 0 26px rgba(212, 175, 55, 0.07);
}
.cmpd-sym {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.cmpd-card h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}
.cmpd-card p {
  font-size: 19px;
  color: var(--silver);
  line-height: 1.5;
}
.cmpd-lod {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed rgba(192, 198, 206, 0.16);
  font-family: var(--font-mono);
  font-size: 15.5px;
  letter-spacing: 0.2em;
  color: var(--gold-2);
}

/* ---------- PROCESS ---------- */
.proc-list { counter-reset: step; }
.proc-step {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-soft);
}
.proc-step:first-child { border-top: 1px solid var(--line-soft); }
.proc-num {
  font-family: var(--font-mono);
  font-size: 16.5px;
  letter-spacing: 0.22em;
  color: var(--gold);
  padding-top: 4px;
}
.proc-num::before {
  content: "";
  display: block;
  width: 30px; height: 1px;
  background: var(--gold-line);
  margin-bottom: 12px;
}
.proc-step h3 {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}
.proc-step p {
  font-size: 20px;
  color: var(--silver);
  max-width: 74ch;
  line-height: 1.6;
}

/* accuracy chips */
.acc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.acc-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--gold-line);
  background: rgba(212, 175, 55, 0.05);
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.18em;
  color: var(--white);
}
.acc-chip::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}
.acc-chip b { color: var(--gold); font-weight: 500; }

/* ---------- UNIT PHOTO ---------- */
.inst-photo {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  aspect-ratio: 16 / 8.2;
  background: var(--panel);
}
.inst-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 45%;
  filter: saturate(0.75) brightness(0.88) contrast(1.03);
  transition: filter 0.7s var(--ease-out), transform 1.4s var(--ease-out);
}
.inst-photo:hover img { filter: saturate(0.92) brightness(0.98) contrast(1.04); transform: scale(1.025); }
.inst-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.18) 0%, transparent 40%, rgba(6, 6, 6, 0.82) 100%);
  pointer-events: none;
}
.inst-photo figcaption {
  position: absolute;
  left: 16px; bottom: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 15.5px;
  letter-spacing: 0.22em;
  color: var(--silver);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(6, 6, 6, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-soft);
  padding: 9px 15px;
}
.inst-photo figcaption span {
  color: var(--gold);
  padding-right: 12px;
  border-right: 1px solid var(--gold-line);
}
.photo-note {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  letter-spacing: 0.18em;
  color: var(--silver-dim);
}

/* nav current-page marker */
.nav-links a.is-here { color: var(--white); }
.nav-links a.is-here::after { transform: scaleX(1); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1180px) {
  .cmpd-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .kpi-stat:nth-child(odd) { border-left: 0; }
  .kpi-stat:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .cmpd-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .proc-step { grid-template-columns: 56px 1fr; gap: 14px; padding: 18px 0; }
  .cmpd-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .inst-photo { aspect-ratio: 4 / 3; }
  .inst-hero { padding-top: calc(var(--nav-h) + 40px); }
  .inst-id { font-size: 10.5px; letter-spacing: 0.2em; gap: 10px; }
  .inst-name { font-size: clamp(1.8rem, 8vw, 2.4rem); margin: 18px 0 8px; }
  .inst-type { font-size: 11px; letter-spacing: 0.16em; }
  .inst-role { font-size: 0.98rem; margin-top: 14px; }
  .kpi-strip { margin-top: 32px; }
  .kpi-stat { padding: 13px 10px; }
  .kpi-stat b { font-size: 1.25rem; }
  .kpi-stat span { font-size: 9.5px; letter-spacing: 0.16em; margin-top: 5px; }
  .inst-sec { padding-top: 56px; }
  .cmpd-card { padding: 14px 12px 12px; min-height: 0; }
  .cmpd-sym { font-size: 1.3rem; margin-bottom: 9px; }
  .cmpd-card h3 { font-size: 13.5px; margin-bottom: 5px; }
  .cmpd-card p { font-size: 12px; line-height: 1.45; }
  .cmpd-lod { font-size: 10px; padding-top: 10px; letter-spacing: 0.12em; }
  .proc-num { font-size: 11px; }
  .proc-num::before { width: 22px; margin-bottom: 8px; }
  .proc-step h3 { font-size: 14.5px; margin-bottom: 5px; }
  .proc-step p { font-size: 13px; line-height: 1.55; }
  .acc-row { margin-top: 22px; gap: 8px; }
  .acc-chip { font-size: 10.5px; padding: 9px 11px; letter-spacing: 0.12em; gap: 8px; }
  .inst-photo { aspect-ratio: auto; display: flex; flex-direction: column; }
  .inst-photo img { height: auto; aspect-ratio: 4 / 3; }
  .inst-photo::after { display: none; }
  .inst-photo figcaption {
    position: static;
    font-size: 10.5px; padding: 8px 12px; letter-spacing: 0.12em;
    white-space: nowrap; overflow: hidden;
    border: 0; border-top: 1px solid var(--line-soft);
    background: var(--navy-950);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .photo-note { font-size: 10.5px; }
}
