/* Team Feedback to Board Report: the parts the shared tl- classes don't cover. Tokens only, so dark mode follows. */

.tf-sample { margin: 0 0 24px; max-width: none; }
#leadForm { scroll-margin-top: 84px; }
.tf-step-h { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-stretch: 112%; margin-bottom: 0.6rem; outline: none; }
.tf-step > .fig { margin-bottom: 0.4rem; }
.tl-results h2[tabindex], .tf-board h2 { outline: none; }
.tl-intro .text-btn { padding: 0; font-size: inherit; color: var(--ink); }
.tf-step > .tl-go { margin-top: 32px; }

/* Rating rows: label on the left, 1 to 5 on the right; stacked on narrow screens. */
.tf-scales { display: grid; gap: 4px; max-width: 860px; }
.tf-scale-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 20px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tf-scale-row:last-child { border-bottom: 0; }
.tf-scale-label { font-size: 0.95rem; }
.tl-seg.tf-scale { flex-wrap: nowrap; gap: 4px; }
.tl-seg.tf-scale button { min-width: 46px; justify-content: center; padding: 0.4rem 0.6rem; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tl-seg.tf-scale button::before { display: none; }
.tl-seg.tf-scale button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Step 2: the panel */
.tf-team { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tf-member { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); }
.tf-member.is-waiting { background: none; border-style: dashed; }
.tf-member.is-you { border-color: var(--accent); }
.tf-member-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tf-member-top b { font-family: var(--mono); font-weight: 500; }
.tf-member-top span:not(.tl-badge) { color: var(--muted); font-size: 0.92rem; }
.tf-member-top .tl-badge { margin-left: auto; }
.tf-member-line { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.tf-code { font-family: var(--mono); font-size: 0.85rem; padding: 1px 6px; background: var(--accent-tint); color: var(--ink); }

.tf-own { margin-top: 24px; }
.tf-own > summary { cursor: pointer; width: fit-content; font-weight: 600; padding: 6px 0; }
.tf-own > summary span { color: var(--muted); font-weight: 400; }
.tf-own > .tl-form { margin-top: 12px; }
.tf-texts { display: grid; gap: 14px; max-width: 720px; }
.tf-texts textarea {
  width: 100%;
  min-height: 64px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  resize: vertical;
}
.tf-texts textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.tf-own-actions { margin-top: 8px; }
.tf-status { margin-top: 12px; font-size: 0.93rem; color: var(--ink); max-width: 72ch; }
.tf-status:empty { display: none; }

/* Step 3: bars. The fill is the team's average; the upright marker is the lead's guess. */
.tf-bar { position: relative; display: block; height: 8px; background: var(--track); }
.tf-bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.tf-bar s { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; background: var(--ink); text-decoration: none; }

.tf-rates { list-style: none; display: grid; gap: 16px; max-width: 860px; }
.tf-rate-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.tf-rate-head b { font-family: var(--mono); font-weight: 500; font-size: 1.05rem; }
.tf-rate-meta { margin-top: 8px; color: var(--muted); font-size: 0.88rem; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }

.tf-who { list-style: none; border-top: 1px solid var(--line-strong); max-width: 860px; }
.tf-who li { display: grid; grid-template-columns: 4rem minmax(0, 1fr) 7rem minmax(0, 1.3fr); gap: 4px 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.tf-who b { font-family: var(--mono); font-weight: 500; }
.tf-who-role, .tf-who-state { color: var(--muted); }
.tf-rule { font-size: 0.88rem; }
.tf-rule.quote { color: var(--accent); }
.tf-rule.noquote { color: var(--ink); font-weight: 600; }
.tf-rule.noquote::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border: 1.5px solid currentColor; transform: rotate(45deg) translateY(-1px); }

.tf-asks { list-style: none; display: grid; gap: 10px; max-width: 860px; }
.tf-asks li { display: grid; grid-template-columns: minmax(0, 1fr) 140px 3.6rem; align-items: center; gap: 6px 16px; font-size: 0.93rem; }
.tf-asks li:not(.is-backed) .tf-bar i { background: var(--line-strong); }
.tf-asks b { font-family: var(--mono); font-weight: 500; text-align: right; white-space: nowrap; }
.tf-ask-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.tf-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tf-tags .tl-badge { font-size: 0.66rem; padding: 1px 6px; }

.tf-compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tf-col { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--line-strong); }
.tf-col:nth-child(2) { border-top-color: var(--muted); }
.tf-col:nth-child(3) { border-top-color: var(--accent); }
.tf-col h3 { font-size: 1.05rem; font-stretch: 106%; margin-bottom: 0.8rem; }
.tf-col ul { list-style: none; display: grid; gap: 10px; }
.tf-col li { display: grid; gap: 2px; font-size: 0.92rem; line-height: 1.45; }
.tf-col li span { color: var(--muted); }
.tf-none { color: var(--muted); font-size: 0.92rem; }

.tf-q { font-size: 1.05rem; font-stretch: 106%; margin: 1.6rem 0 0.7rem; }
.tf-written > .tf-q:first-child { margin-top: 0; }
.tf-quotes, .tf-bquotes { list-style: none; display: grid; gap: 12px; max-width: 80ch; }
.tf-quotes blockquote, .tf-bquotes blockquote { margin: 0; padding-left: 14px; border-left: 3px solid var(--accent); }
.tf-by { margin-top: 4px; padding-left: 17px; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em; color: var(--muted); }
.tf-held { margin-top: 10px; font-size: 0.88rem; color: var(--muted); font-style: italic; }
.tf-written .tl-aside { margin-top: 24px; }

/* Step 4: the board summary */
.tf-step-fig { margin-bottom: 12px; }
.tf-board { padding: clamp(20px, 3.5vw, 40px); }
.tf-board h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.tf-board-meta { margin-top: 0.5rem; color: var(--muted); font-size: 0.93rem; }
.tf-bh { margin: 1.8rem 0 0.7rem; font-family: var(--mono); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-stretch: 100%; }
.tf-findings { max-width: 90ch; }
.tf-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.tf-blist { list-style: none; display: grid; gap: 8px; border-top: 1px solid var(--line-strong); padding-top: 10px; }
.tf-blist li { display: grid; gap: 1px; font-size: 0.93rem; line-height: 1.5; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tf-blist li span { color: var(--muted); }
.tf-open { counter-reset: oq; }
.tf-open li { counter-increment: oq; grid-template-columns: 2rem minmax(0, 1fr); }
.tf-open li::before { content: 'Q' counter(oq); font-family: var(--mono); color: var(--accent); font-size: 0.85rem; padding-top: 1px; }
.tf-protect { margin-top: 8px; font-size: 0.88rem; color: var(--muted); }
.tf-bquotes { border-top: 1px solid var(--line-strong); padding-top: 12px; }
.tf-bquotes p { font-size: 0.95rem; }
.tf-board-foot { margin-top: 1.8rem; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; line-height: 1.55; }

@media (prefers-reduced-motion: no-preference) {
  .tf-step:not([hidden]) { animation: tl-rise 0.45s ease both; }
  .tf-bar i { animation: bar-grow 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}

@media (max-width: 900px) {
  .tf-team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tf-compare { grid-template-columns: minmax(0, 1fr); }
  .tf-who li { grid-template-columns: 4rem minmax(0, 1fr) 7rem; }
  .tf-who .tf-rule { grid-column: 2 / -1; }
}
@media (max-width: 700px) {
  .tf-scale-row { grid-template-columns: minmax(0, 1fr); }
  .tf-grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .tf-team { grid-template-columns: minmax(0, 1fr); }
  .tl-seg.tf-scale { flex-direction: row; }
  .tl-seg.tf-scale button { width: auto; flex: 1 1 0; min-width: 0; }
  .tf-asks li { grid-template-columns: minmax(0, 1fr) 3.4rem; }
  .tf-asks .tf-bar { grid-column: 1 / -1; grid-row: 2; }
  .tf-who li { grid-template-columns: 3.4rem minmax(0, 1fr) auto; }
  .tf-who-state { font-size: 0.85rem; }
  .tf-who .tf-rule { grid-column: 2 / -1; }
  .tl-actions .btn { flex: 1 1 100%; }
}

/* Save as PDF: the board summary only, on the light print palette from /styles.css. */
@media print {
  /* The light print palette again, at the same weight as the dark-mode rule in /styles.css, so a visitor whose
     system is set to dark still prints dark ink on white. */
  :root:not([data-theme="light"]), :root[data-theme="dark"] {
    --paper: #FFFFFF; --surface: #FFFFFF; --ink: #121A20; --muted: #4A535B; --line: #D9D3C7;
    --line-strong: #B9B2A4; --accent: #156082; --on-accent: #FFFFFF; --accent-tint: #E2ECEF; --track: #ECE8DF;
    color-scheme: light;
  }
  .tl-head, .tf-sample, #step2, #step3, .tf-step-fig, .tl-disclaimer { display: none !important; }
  .tf-step { animation: none !important; }
  #step4 { margin-top: 0; }
  .tf-board { padding: 0; background: none; }
  .tf-board.frame::before { display: none; }
  .tf-board > .fig { font-size: 7.5pt; margin-bottom: 2px; }
  .tf-board h2 { font-size: 14pt; }
  .tf-board-meta { font-size: 8.5pt; margin-top: 2px; }
  .tf-bh { font-size: 7.5pt; margin: 8px 0 3px; }
  .tf-findings li { padding: 2px 0; }
  .tf-findings b { font-size: 9.5pt; line-height: 1.3; }
  .tf-findings p { font-size: 8.5pt; line-height: 1.35; }
  .tf-grid2 { grid-template-columns: 1fr 1fr; gap: 0 8mm; }
  .tf-blist { gap: 3px; padding-top: 4px; }
  .tf-blist li { font-size: 8.5pt; line-height: 1.3; padding-bottom: 2px; break-inside: avoid; }
  .tf-protect { font-size: 8pt; margin-top: 3px; }
  .tf-bquotes { gap: 4px; padding-top: 4px; }
  .tf-bquotes p { font-size: 8.5pt; line-height: 1.35; }
  .tf-by { font-size: 7pt; margin-top: 1px; }
  .tf-board-foot { font-size: 7.5pt; margin-top: 8px; padding-top: 5px; }
}
