/* UX Team Formations — tool-specific styles, Golden Hour. Scoped under .tf.
   Shared chrome (intro, .res-seg tabs, .res-ul lists, .res-dialog) comes from
   resources.css; only what's particular to this tool lives here. Golden Hour
   rules: honey/--teal is structural only (diagram strokes, dots, rules), never
   text; --clay is the text-safe accent; --brick is secondary/con emphasis. */

/* ---------- one card: tabs → stage (definition + diagram) → shaded pros/cons ---------- */
.tf-card {
  margin-top: clamp(28px, 4vw, 40px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  container-type: inline-size;
}
.tf-tabbar { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.tf-seg { max-width: 100%; }

.tf-stage[hidden] { display: none; }

/* ---------- model head ---------- */
.tf-head { position: relative; padding: 22px 24px 18px; border-bottom: 1px solid var(--border); }
.tf-share {
  position: absolute; top: 20px; right: 24px; margin: 0; text-align: right;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); line-height: 1.2;
}
.tf-share-num {
  display: block; font-family: var(--font-serif); font-size: 22px; font-weight: 400;
  letter-spacing: -0.01em; text-transform: none; color: var(--clay);
}
.tf-tag {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--clay);
  margin: 0 0 8px; display: inline-flex; align-items: center; gap: 8px;
}
.tf-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--honey); }
.tf-model-title {
  font-family: var(--font-display); font-weight: 600; font-size: 22px;
  letter-spacing: -0.01em; color: var(--ink); margin: 0 0 8px;
}
.tf-def { font-family: var(--font-serif); font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }
.tf-fit {
  font-family: var(--font-serif); font-size: 13.5px; line-height: 1.5; color: var(--muted);
  margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--border);
}
.tf-fit strong { font-family: var(--font-display); color: var(--clay); font-weight: 600; }

/* ---------- diagram (a button — click / keyboard to enlarge) ---------- */
.tf-diagram {
  display: block; width: 100%; appearance: none; background: transparent; border: 0;
  padding: 16px 16px 10px; cursor: zoom-in; position: relative;
}
.tf-diagram svg { width: 100%; max-width: 760px; height: auto; display: block; margin: 0 auto; }
.tf-diagram-zoom {
  position: absolute; right: 18px; bottom: 12px; display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); opacity: 0; transition: opacity 0.18s ease; pointer-events: none;
}
.tf-diagram:hover .tf-diagram-zoom,
.tf-diagram:focus-visible .tf-diagram-zoom { opacity: 1; }
.tf-diagram:focus-visible { outline: 2px solid var(--clay); outline-offset: -2px; border-radius: 12px; }

/* ---------- diagram parts (also used by the enlarge dialog, which lives inside .tf) ---------- */
.tf .fig { fill: currentColor; }
.tf .fig-ux { color: var(--clay); }
.tf .fig-pm { color: var(--ink); }
.tf .fig-dev { color: var(--muted); }
.tf .fig-other { color: color-mix(in srgb, var(--muted) 42%, var(--paper)); }
.tf .d-frame { fill: none; stroke: var(--border); stroke-width: 1.4; }
.tf .d-bracket { fill: none; stroke: var(--border); stroke-width: 1.3; }
.tf .d-dash { fill: none; stroke: var(--honey); stroke-width: 1.4; stroke-dasharray: 3 4; opacity: 0.9; }
.tf .d-tree { fill: none; stroke: var(--honey); stroke-width: 1.4; }
.tf .d-title { font-family: var(--font-display); font-weight: 600; font-size: 13px; fill: var(--ink); }
.tf .d-rl { font-family: var(--font-display); font-weight: 500; font-size: 12.5px; fill: var(--muted); }
.tf .v2-home {
  fill: color-mix(in srgb, var(--honey) 10%, var(--card));
  stroke: color-mix(in srgb, var(--honey) 40%, var(--border)); stroke-width: 1.4;
}
.tf .v2-hometag {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; fill: var(--clay);
}
.tf .v2-assign { fill: none; stroke: var(--honey); stroke-width: 1.5; stroke-dasharray: 3 4; opacity: 0.9; }
.tf .v2-arrowfill { fill: var(--honey); }

/* ---------- shaded detail zone (pros / cons) ---------- */
.tf-detail {
  padding: clamp(18px, 2.4vw, 28px) 24px clamp(22px, 2.6vw, 30px);
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--paper-2) 55%, var(--card));
}
.tf-pc-lens {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 2px;
}
.tf-pc h3 {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; margin: 18px 0 10px;
}
.tf-pc h3.tf-up { color: var(--clay); }
.tf-pc h3.tf-down { color: var(--brick); }
@container (min-width: 520px) {
  .tf-pc .res-ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
}

/* ---------- comparison section ---------- */
.tf-compare .res-section-head { margin-top: 6px; }
.tf-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 20px 0 14px; }
.tf-cl {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.tf-cl i { width: 11px; height: 11px; display: inline-block; }
.tf-cl i.c { background: var(--honey); border-radius: 50%; }
.tf-cl i.h { background: var(--clay); width: 9px; height: 9px; transform: rotate(45deg); }
.tf-cl i.d { background: var(--brick); width: 10px; height: 10px; border-radius: 2px; }
.tf-axis {
  margin-left: auto; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}

.tf-dim { border-top: 1px solid var(--hair); }
.tf-dim:first-of-type { border-top: 0; }
.tf-dim-row {
  display: flex; align-items: center; gap: 16px; width: 100%;
  appearance: none; background: transparent; border: 0; margin: 0; padding: 12px 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.tf-dim-label { flex: 0 0 38%; font-family: var(--font-display); font-weight: 500; font-size: 14px; color: var(--ink); }
.tf-chev { flex: 0 0 auto; color: var(--muted); display: inline-flex; transition: transform 0.22s ease; }
.tf-dim.open .tf-chev { transform: rotate(180deg); }
.tf-track {
  position: relative; flex: 1; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--hair), var(--border));
}
.tf-dot {
  position: absolute; top: 50%; width: 15px; height: 15px; border-radius: 50%;
  transform: translate(-50%, -50%); border: 2.5px solid var(--card);
  box-shadow: 0 1px 3px rgba(22, 20, 18, 0.22);
}
.tf-dot-c { background: var(--honey); }
.tf-dot-h { background: var(--clay); width: 12px; height: 12px; border-radius: 2px; transform: translate(-50%, -50%) rotate(45deg); }
.tf-dot-d { background: var(--brick); width: 13px; height: 13px; border-radius: 2.5px; }
.tf-dim-note {
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height 0.28s ease, opacity 0.2s ease, margin 0.28s ease;
  font-family: var(--font-serif); font-size: 13.5px; color: var(--muted); line-height: 1.55;
  margin: 0 0 0 calc(38% + 16px);
}
.tf-dim.open .tf-dim-note { max-height: 260px; opacity: 1; margin-top: 10px; }

/* ---------- enlarge dialog (shared .res-dialog chrome; tool-specific bits here) ---------- */
.tf-dialog-title {
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  letter-spacing: -0.01em; color: var(--ink); margin: 0 44px 16px 0;
}
.tf-dialog-figure svg { width: 100%; height: auto; display: block; }

/* ---------- responsive ---------- */
@media (max-width: 620px) {
  .tf-seg { display: flex; width: 100%; }
  .tf-seg button { flex: 1; padding: 8px 8px; }
}
@media (max-width: 760px) {
  .tf-dim-row { flex-wrap: wrap; }
  .tf-dim-label { flex: 0 0 100%; margin-bottom: 8px; }
  .tf-dim-note { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .tf-chev, .tf-dim-note, .tf-diagram-zoom { transition: none; }
}
