/* track-a.css — Track A (Capture + Tasks + Search) styles.
   Reuses base classes (btn, btn-primary, btn-quiet, chip, seg, sheet, field,
   t-title, t-body, t-meta) from components.css. Only Track A specifics here. */

/* ---------- capture bar ---------- */
.cb-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  padding: var(--s2) var(--screen-pad) 0;
}

.capture-bar {
  display: flex;
  gap: var(--s2);
  align-items: center;
}

.cb-field {
  flex: 1 1 auto;
  min-width: 0;
}

.cb-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--r-comp);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.cb-btn:active {
  background: var(--raised);
  color: var(--ink);
}

.cb-save {
  flex: 0 0 auto;
  min-height: 44px;
}

.cb-preview {
  margin: var(--s1) 0 var(--s2);
  min-height: 1.25em;
  color: var(--muted);
}

/* ---------- tasks tab ---------- */
.ttab {
  padding: 0 var(--screen-pad) var(--s8);
}

.t-seg {
  margin: var(--s3) 0;
}

.t-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s3);
}

.t-searchrow {
  display: flex;
  gap: var(--s2);
  align-items: center;
  margin-bottom: var(--s3);
}

.t-searchrow .field {
  flex: 1 1 auto;
  min-width: 0;
}

.t-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
  margin-bottom: var(--s3);
}

@media (min-width: 560px) {
  .t-filters {
    grid-template-columns: repeat(5, 1fr);
  }
}

.t-flabel {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  min-width: 0;
}

.t-sel {
  width: 100%;
  min-height: 44px;
}

.t-clear-row {
  margin: calc(-1 * var(--s2)) 0 var(--s2);
}

.t-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.t-empty {
  padding: var(--s8) var(--s4);
  text-align: center;
  color: var(--muted);
}

/* ---------- task rows ---------- */
.trow {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 64px;
  padding: var(--s2) var(--s3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-comp);
  position: relative; /* swipe-row anchor for Track E */
}

.trow-check {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
}

.trow-box {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  display: inline-block;
}

.trow-check[aria-pressed="true"] .trow-box {
  background: var(--teal);
  border-color: var(--teal);
}

.trow-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s1) 0;
}

.trow-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1);
}

.t-proj {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
}

.trow-chev {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 22px;
  line-height: 1;
}

.trow-done .t-title {
  text-decoration: line-through;
  color: var(--faint);
}

/* ---------- reminders ---------- */
.rrow {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-comp);
  position: relative; /* swipe-row anchor for Track E */
}

.rrow-needs {
  border-color: var(--amber);
  background: var(--amber-tint);
}

.r-tier {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--r-chip);
  border: 1px solid var(--border-strong);
  color: var(--muted);
  white-space: nowrap;
}

.r-tier-important {
  color: var(--amber-deep);
  border-color: var(--amber);
}

.r-tier-contract {
  color: #fff;
  background: var(--coral);
  border-color: var(--coral);
}

.r-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.r-needs {
  margin: 0;
  font-weight: 700;
  color: var(--amber-deep);
  font-size: 14px;
}

.r-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

/* ---------- task detail sheet ---------- */
.td-label {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  margin-bottom: var(--s3);
}

.td-glabel {
  margin: 0;
  color: var(--muted);
}

.td-group {
  margin-bottom: var(--s3);
}

.td-group .seg {
  margin-top: var(--s1);
}

.td-est {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s2);
  margin-top: var(--s1);
}

.td-est .td-label {
  margin-bottom: 0;
}

.td-sub {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--divider);
}

.td-check {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
}

.td-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  display: inline-block;
}

.td-check[aria-pressed="true"] .td-box {
  background: var(--teal);
  border-color: var(--teal);
}

.td-sub-t {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.td-sub.td-done .td-sub-t {
  text-decoration: line-through;
  color: var(--faint);
}

.td-x {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--faint);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.td-sub-add {
  display: flex;
  gap: var(--s2);
  align-items: center;
  margin-top: var(--s2);
}

.td-sub-add .field {
  flex: 1 1 auto;
  min-width: 0;
}

.td-defer {
  margin: var(--s3) 0;
}

.td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  padding-bottom: var(--s4);
}

.td-actions .btn {
  min-height: 44px;
}
