/* Task names and details stay readable before opening the complete relationship graph. */
.ta-atlas { --ta-line: var(--border-strong, #c6d1c9); color: var(--ink); min-width: 0; }
.ta-atlas *, .ta-atlas *::before, .ta-atlas *::after { box-sizing: border-box; }
.ta-atlas [hidden] { display: none !important; }
.ta-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 9px; }
.ta-heading h2 { margin: 0; font-size: 24px; line-height: 1.4; }
.ta-heading p, .ta-source { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.ta-total { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.ta-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.ta-tab, .ta-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 7px; color: var(--ink); background: var(--surface); font: inherit; font-size: 12px; line-height: 1.4; cursor: pointer; }
.ta-tab { min-height: 38px; }
.ta-tab span { font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }
.ta-tab[aria-selected="true"], .ta-view-tabs button[aria-selected="true"] { color: var(--accent); background: var(--tint); border-color: var(--accent-border); font-weight: 700; }
.ta-tab:hover, .ta-button:hover, .ta-view-tabs button:hover { background: var(--surface-hover); }
.ta-atlas button:focus-visible, .ta-atlas input:focus-visible, .ta-atlas select:focus-visible, .ta-graph:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ta-search-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; min-width: 0; }
.ta-search-bar > label:first-child { flex: 1; min-width: 0; max-width: 440px; }
.ta-search-bar input, .ta-search-bar select { width: 100%; min-width: 0; height: 38px; padding: 6px 10px; background: var(--surface-input, var(--surface)); color: var(--ink); border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 13px; }
.ta-atlas .ta-search-bar select { appearance: none; background-image: none; }
.ta-search-bar > span { margin-left: auto; white-space: nowrap; font-size: 12px; color: var(--muted); }
.ta-level { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ta-level > span { white-space: nowrap; font-size: 12px; color: var(--muted); }
.ta-level select { max-width: 116px; }
.ta-search-results { display: flex; flex-wrap: wrap; gap: 6px; max-height: 140px; overflow: auto; padding: 10px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.ta-search-results p, .ta-list-empty { margin: 0; padding: 10px; color: var(--muted); font-size: 13px; }
.ta-body, .ta-main { min-width: 0; }
.ta-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .84fr); gap: 12px; align-items: start; }
.ta-navigator { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.ta-view-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid var(--border); }
.ta-view-tabs { display: flex; gap: 5px; min-width: 0; }
.ta-view-tabs button { min-height: 34px; padding: 7px 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.ta-collapse { display: none; }
.ta-task-list { max-height: clamp(340px, calc(100dvh - 304px), 720px); overflow-y: auto; overscroll-behavior: contain; padding: 8px; scrollbar-width: thin; }
.ta-task-group + .ta-task-group { margin-top: 14px; }
.ta-task-group > h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 2px 3px 8px; font-size: 13px; line-height: 1.5; }
.ta-task-group > h3 small { color: var(--muted); font-size: 10px; font-weight: 400; white-space: nowrap; }
.ta-task-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.ta-task-choices > button { min-width: 0; min-height: 57px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-alt, var(--surface)); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ta-task-choices > button strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.ta-task-choices > button small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.ta-task-choices > button:hover { border-color: var(--accent-border); background: var(--surface-hover); }
.ta-task-choices > button[aria-current="step"] { border-color: var(--accent); background: var(--tint); color: var(--accent); }
.ta-graph-shell { overflow: hidden; min-width: 0; background: var(--surface); }
.ta-graph-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid var(--border); }
.ta-graph-toolbar > span { font-size: 12px; font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-graph-toolbar > div { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.ta-graph-toolbar .ta-button { min-height: 32px; min-width: 32px; padding: 5px 8px; }
.ta-graph-toolbar output { width: 40px; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); }
.ta-graph { position: relative; height: clamp(300px, calc(100dvh - 355px), 670px); overflow: hidden; background-color: var(--surface-alt, var(--surface)); background-image: radial-gradient(var(--border) .9px, transparent .9px); background-size: 18px 18px; cursor: grab; touch-action: none; user-select: none; }
.ta-graph:active { cursor: grabbing; }
.ta-world { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; }
.ta-edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ta-edges path { fill: none; stroke: var(--ta-line); stroke-width: 1.5; }
.ta-node { position: absolute; display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 3px; padding: 7px 11px; border: 1px solid var(--border-strong); border-left: 3px solid var(--accent); border-radius: 7px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 2px 6px #00000009; }
.ta-node > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 12px; font-weight: 650; line-height: 1.3; }
.ta-node > small { color: var(--muted); font-size: 10px; line-height: 1.1; }
.ta-side-node { border-left-color: var(--border-strong); }
.ta-node:hover { border-color: var(--accent); background: var(--surface-hover); }
.ta-node.is-selected { border-color: var(--accent); background: var(--tint); box-shadow: 0 0 0 2px var(--accent-border); }
.ta-node.is-dimmed { opacity: .35; }
.ta-graph-hint { position: absolute; left: 10px; bottom: 8px; margin: 0; border-radius: 4px; padding: 4px 6px; background: var(--surface); color: var(--muted); font-size: 10px; pointer-events: none; }
.ta-detail { min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); max-height: clamp(390px, calc(100dvh - 252px), 774px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scroll-margin-top: 76px; }
.ta-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 13px; border-bottom: 1px solid var(--border); }
.ta-detail-heading h3 { margin: 5px 0 0; font-size: 22px; line-height: 1.4; overflow-wrap: anywhere; }
.ta-eyebrow, .ta-detail-index { color: var(--muted); font-size: 11px; line-height: 1.6; }
.ta-detail-index { white-space: nowrap; }
.ta-detail h4 { margin: 0 0 9px; font-size: 12px; color: var(--muted); font-weight: 650; }
.ta-detail section + section { margin-top: 18px; }
.ta-detail ul, .ta-detail ol { margin: 0; padding-left: 20px; }
.ta-detail li { font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.ta-detail li + li { margin-top: 8px; }
.ta-requirements { padding: 10px 12px; background: var(--tint); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; }
.ta-requirements h4 { color: var(--accent); }
.ta-detail .ta-rewards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; list-style: none; padding: 0; }
.ta-rewards > li { display: flex; align-items: center; gap: 8px; padding: 7px; min-width: 0; max-width: 100%; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-alt, var(--surface)); margin: 0 !important; }
.ta-rewards .gc-media { width: 38px; height: 38px; flex: 0 0 38px; border: 0; border-radius: 4px; }
.ta-rewards span { font-size: 12px; line-height: 1.5; min-width: 0; }
.ta-rewards b { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ta-reward-art { display: inline-block; flex: 0 0 38px; width: 38px; height: 38px; background-repeat: no-repeat; }
.ta-reward-empty { display: inline-grid; place-items: center; background: var(--surface-alt, var(--surface)); color: var(--muted); border-radius: 5px; }
.ta-detail-status { color: var(--muted); font-size: 12px; line-height: 1.6; }
.ta-detail-status .ta-button { margin-left: 8px; }
.ta-detail > .ta-links { padding-top: 15px; margin-top: 18px; border-top: 1px solid var(--border); }
.ta-detail-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.ta-detail-nav .ta-button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; text-align: left; overflow-wrap: anywhere; }
.ta-detail-nav .ta-button span { color: var(--muted); font-size: 10px; }
.ta-detail-nav .ta-button strong { font-size: 12px; font-weight: 600; }
.ta-links { display: grid; grid-template-columns: 1fr; gap: 12px; }
.ta-links section + section { margin: 0; }
.ta-links .ta-button { margin: 0 6px 6px 0; }
.ta-links p { font-size: 12px; color: var(--muted); margin: 0; }
.ta-source { margin-top: 12px; }
.ta-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 1600px) {
  .ta-main { grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr); }
  .ta-task-choices { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .ta-detail .ta-rewards { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }
}
@media (min-width: 761px) and (max-width: 1060px) {
  .ta-main { grid-template-columns: minmax(0, .9fr) minmax(290px, 1fr); }
  .ta-task-choices { grid-template-columns: 1fr; }
  .ta-detail { padding: 14px; }
}
@media (max-width: 760px) {
  .ta-heading { gap: 8px; }
  .ta-heading p { font-size: 11px; }
  .ta-total { font-size: 10px; }
  .ta-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .ta-tab { min-width: 0; min-height: 38px; padding: 7px 5px; gap: 5px; font-size: 12px; }
  .ta-tab span { font-size: 10px; }
  .ta-search-bar { flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
  .ta-search-bar > label:first-child { flex-basis: 100%; max-width: none; }
  .ta-search-bar input, .ta-search-bar select { min-height: 40px; font-size: 16px; }
  .ta-search-bar .ta-level { flex: 1; }
  .ta-search-bar .ta-button { min-height: 38px; }
  .ta-main { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .ta-view-bar { padding: 5px 7px; }
  .ta-view-tabs button { min-height: 38px; }
  .ta-collapse { display: inline-flex; min-height: 34px; padding-inline: 9px; }
  .ta-atlas[data-ta-compact="true"] .ta-browser-body, .ta-atlas[data-ta-compact="true"] .ta-collapse { display: none; }
  .ta-atlas[data-ta-compact="true"] .ta-view-bar { border-bottom: 0; }
  .ta-task-list { max-height: 222px; padding: 7px; }
  .ta-task-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .ta-task-choices > button { min-height: 58px; padding: 8px; }
  .ta-task-choices > button strong { font-size: 13px; }
  .ta-graph-toolbar { gap: 6px; padding: 7px; }
  .ta-graph-toolbar > span { width: 100%; }
  .ta-graph-toolbar > div { width: 100%; justify-content: flex-end; }
  .ta-graph-toolbar .ta-button { min-height: 36px; min-width: 36px; }
  .ta-graph { height: 280px; }
  .ta-detail { max-height: none; overflow: visible; padding: 14px 12px; scroll-margin-top: 66px; }
  .ta-detail-heading { margin-bottom: 13px; padding-bottom: 11px; }
  .ta-detail-heading h3 { font-size: 21px; }
  .ta-detail li { font-size: 13px; line-height: 1.8; }
  .ta-rewards > li { padding: 6px; gap: 6px; }
  .ta-rewards .gc-media, .ta-reward-art { width: 34px; height: 34px; flex-basis: 34px; }
  .ta-rewards span, .ta-rewards b { font-size: 11px; }
}
@media (max-width: 400px) { .ta-total { display: none; } .ta-graph-toolbar output { width: 32px; } }
@media (prefers-reduced-motion: reduce) { .ta-world { will-change: auto; } }
