/* ess-team-project.css — shared styles for every ESS team-project page.
   Token-only colours (studio-tokens.css); the page sits in a .light-band. */
/* Same 320px clamp as the Project Library: the shared footer template
   lays out at 349px, so a page with no viz stylesheet clamps itself. */
html, body { max-width: 100%; overflow-x: clip; }

.ess-lede { max-width: 780px; margin: 0 auto 1.75rem; text-align: center; color: var(--ink-2); font-size: 1.03rem; line-height: 1.75; }
.ess-section { margin: 2.75rem 0; }
.back-row { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin: 0 0 1.5rem; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-mono); font-size: .78rem; color: var(--accent); border: 1px solid var(--line-strong); border-radius: 8px; padding: .45rem .9rem; text-decoration: none; background: var(--surface); }
.back-link:hover { border-color: var(--accent); }

.tp-scope { overflow-wrap: anywhere; }
.tp-scope p, .tp-scope li, .tp-scope td, .tp-scope th { overflow-wrap: break-word; }
.tp-scope a:focus-visible, .tp-scope [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.tp-section { scroll-margin-top: 90px; }

.tp-dq { border: 1px solid var(--line-strong); border-left: 4px solid var(--accent); background: var(--accent-tint); border-radius: 10px; padding: .9rem 1.1rem; margin: 0 0 1.2rem; }
.tp-dq-k { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.tp-dq-v { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.4; color: var(--ink); margin: .3rem 0 0; }
.tp-panel { margin: 1rem 0; min-width: 0; }
.tp-panel p, .tp-lens { color: var(--ink-2); line-height: 1.7; margin: 0 0 .6rem; }
.tp-panel p:last-child { margin-bottom: 0; }
.tp-sub-h { font-family: var(--font-heading); font-weight: 700; font-size: .82rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 1.3rem 0 .6rem; }
.panel .tp-sub-h:first-child { margin-top: 0; }
.tp-list { margin: 0 0 .4rem; padding-left: 1.25rem; color: var(--ink-2); line-height: 1.65; }
.tp-list li { margin: .3rem 0; }
.tp-note { color: var(--ink-2); font-size: .93rem; line-height: 1.65; margin: 1rem 0 0; }
.tp-link { color: var(--accent); }

.tp-team-grid { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tp-team-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .tp-team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tp-team-card { display: flex; flex-direction: column; gap: .3rem; height: 100%; min-height: 44px; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; text-decoration: none; transition: border-color .15s, transform .15s; }
.tp-team-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tp-team-n { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tp-team-name { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.tp-team-q { color: var(--ink-2); font-size: .9rem; line-height: 1.55; }

.tp-card-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1.25rem; }
@media (min-width: 760px) { .tp-card-grid { grid-template-columns: 1fr 1fr; } }
.tp-card-grid > * { min-width: 0; margin: 0; }
.tp-card-h { font-family: var(--font-display); font-size: 1.12rem; color: var(--ink); margin: .5rem 0 .5rem; line-height: 1.35; }
.tp-role p, .tp-product p { color: var(--ink-2); line-height: 1.65; margin: 0; }
.tp-handoff { margin-top: .6rem !important; font-size: .9rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.tp-tag { display: inline-block; font-family: var(--font-mono); font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); background: var(--accent-tint); border: 1px solid var(--line-strong); border-radius: 999px; padding: .3rem .7rem; }
.tp-tag--alt { color: var(--ink); background: var(--recessed); }

.tp-days { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .9rem; }
@media (min-width: 900px) { #tp-timeline .tp-days { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tp-day { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; }
.tp-day p { color: var(--ink-2); line-height: 1.65; margin: 0 0 .5rem; }
.tp-day-head { display: flex; flex-wrap: wrap; gap: .3rem .7rem; align-items: baseline; }
.tp-day-n { font-family: var(--font-mono); font-size: .76rem; font-weight: 700; color: var(--accent); }
.tp-day-date { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
.tp-day-title { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); margin: .35rem 0 .3rem; }
.tp-day-goal { font-style: italic; }
.tp-checkpoint { margin: .6rem 0 0 !important; padding: .55rem .75rem; background: var(--recessed); border-radius: 8px; font-size: .9rem; }
.tp-checkpoint strong { color: var(--ink); }

.tp-team { margin: 2rem 0; padding: 1.4rem; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 16px; box-shadow: var(--arch-shadow-sm); scroll-margin-top: 90px; min-width: 0; }
.tp-team .panel { background: var(--recessed); box-shadow: none; }
.tp-eyebrow { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0; }
.tp-team-title { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.15; color: var(--ink); margin: .3rem 0 .9rem; }
.tp-two { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .tp-two { grid-template-columns: 1fr 1fr; } }
.tp-two > * { min-width: 0; }
.tp-check { font-size: .92rem; }
.tp-check strong { color: var(--ink); }
.tp-go, .tp-back { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-mono); font-size: .78rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.tp-go:hover, .tp-back:hover { text-decoration: underline; }

.tp-data { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.tp-data-item { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; }
.tp-data-item p { color: var(--ink-2); line-height: 1.6; margin: 0 0 .4rem; font-size: .93rem; }
.tp-data-item p:last-child { margin: 0; }
.tp-data-name { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; }
.tp-data-name strong { color: var(--ink); }
.tp-data-status { font-family: var(--font-mono); font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: .15rem .55rem; }
.tp-data-src { font-size: .86rem !important; }

.tp-std-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.tp-std-item { min-width: 0; color: var(--ink-2); line-height: 1.6; font-size: .93rem; }
.tp-std-code { display: inline-block; font-family: var(--font-mono); font-size: .72rem; font-weight: 700; color: var(--accent); background: var(--accent-tint); border: 1px solid var(--line-strong); border-radius: 6px; padding: .12rem .45rem; margin-right: .45rem; white-space: nowrap; }
.tp-std-cite { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); }
.tp-std-why { color: var(--ink); }
.tp-words { color: var(--ink-2); line-height: 1.65; margin: 1rem 0 0; font-size: .93rem; }
.tp-words strong { color: var(--ink); }
.tp-team-foot { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin-top: 1.1rem; }
.tp-btn { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-mono); font-size: .78rem; font-weight: 700; color: var(--accent); border: 1px solid var(--line-strong); border-radius: 8px; padding: .45rem .9rem; text-decoration: none; background: var(--surface); }
.tp-btn:hover { border-color: var(--accent); }

.tp-table-wrap { overflow-x: auto; margin-top: 1.25rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table.tp-rubric { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 44rem; }
.tp-caption { caption-side: top; text-align: left; padding: .85rem 1rem 0; color: var(--muted); font-size: .82rem; }
.tp-rubric th, .tp-rubric td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--ink-2); line-height: 1.55; }
.tp-rubric thead th { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--line-strong); }
.tp-rubric tbody tr:last-child th, .tp-rubric tbody tr:last-child td { border-bottom: 0; }
.tp-strand { display: block; font-family: var(--font-heading); font-weight: 700; color: var(--ink); }
.tp-strand-meta { display: block; font-family: var(--font-mono); font-size: .7rem; color: var(--muted); margin-top: .25rem; }

.tp-print-list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.tp-sources { padding-left: 1.25rem; color: var(--ink-2); line-height: 1.6; font-size: .9rem; }
.tp-sources li { margin: .4rem 0; }
.tp-loading { text-align: center; color: var(--muted); font-family: var(--font-mono); font-size: .8rem; padding: 3rem 1rem; }

@media (prefers-reduced-motion: reduce) {
  .tp-scope *, .tp-scope *::before, .tp-scope *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .tp-team-card:hover { transform: none; }
}

@media print {
  #nav-root, #footer-root, .back-row, .tp-team-foot, .tp-go, #tp-print { display: none !important; }
  .tp-team, .tp-day, .panel { box-shadow: none !important; break-inside: avoid; }
  .tp-table-wrap { overflow: visible; }
  table.tp-rubric { min-width: 0; font-size: 9.5pt; }
  .tp-team { break-before: page; }
  a { text-decoration: underline; }
}

/* ---- build it / teach it panels ---- */
.tp-challenge { max-width: 780px; margin: 0 0 1.2rem; padding: .8rem 1rem; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--ink-2); line-height: 1.65; }
.tp-challenge strong { color: var(--accent); }
.tp-build, .tp-teach { border-left: 4px solid var(--accent); }
.tp-build .tp-two { margin-top: .4rem; }

/* ---- top-of-page print links ---- */
.tp-top-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: -.75rem 0 1.75rem; }
@media print { .tp-top-actions { display: none !important; } }
