/* TrialFoundry component styles. Requires tokens.css. Every class is prefixed t1-. */
/* focus — one rule for every control */
.t1-btn:focus-visible, .t1-input:focus-visible, .t1-table tbody tr:focus-visible { outline: var(--focus-width) solid var(--primary); outline-offset: 2px; }

/* Button */
.t1-btn { font: inherit; font-size: 15px; font-weight: 600; line-height: 20px; display: inline-flex; align-items: center; gap: var(--space-2); height: 36px; padding: 0 var(--space-4); border-radius: var(--radius-md); border: var(--border-hairline) solid var(--line-strong); background: var(--surface-raised); color: var(--ink); cursor: pointer; transition: background-color 140ms ease-out, border-color 140ms ease-out; }
.t1-btn:hover { background: var(--surface-sunken); }
.t1-btn-sm { height: 28px; padding: 0 var(--space-3); font-size: 13px; }
.t1-btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.t1-btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.t1-btn-quiet { background: transparent; border-color: transparent; color: var(--primary); }
.t1-btn-quiet:hover { background: var(--primary-soft); }
.t1-btn-danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.t1-btn-danger:hover { background: var(--danger); filter: brightness(0.92); }
.t1-btn:disabled { opacity: .5; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .t1-btn { transition: none; } }

/* Badge */
.t1-badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; line-height: 20px; padding: 0 var(--space-2); border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink); border: var(--border-hairline) solid var(--line); white-space: nowrap; }
.t1-badge-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.t1-badge-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.t1-badge-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.t1-badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

/* Status */
.t1-status { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 13px; font-weight: 500; line-height: 20px; color: var(--ink); white-space: nowrap; }
.t1-status-dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--ink-muted); flex: none; }
.t1-status-info .t1-status-dot { background: var(--info); }
.t1-status-success .t1-status-dot { background: var(--success); }
.t1-status-warning .t1-status-dot { background: var(--warning); }
.t1-status-danger .t1-status-dot { background: var(--danger); }
.t1-status-danger { color: var(--danger); }

/* ModuleTag */
.t1-module { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 20px; letter-spacing: .02em; padding: 0 var(--space-2); border-radius: var(--radius-sm); white-space: nowrap; }
.t1-module-prefix { font-weight: 400; opacity: .8; }
.t1-module-discover { background: var(--module-discover-soft); color: var(--module-discover); }
.t1-module-fund { background: var(--module-fund-soft); color: var(--module-fund); }
.t1-module-design { background: var(--module-design-soft); color: var(--module-design); }
.t1-module-execute { background: var(--module-execute-soft); color: var(--module-execute); }
.t1-module-analyze { background: var(--module-analyze-soft); color: var(--module-analyze); }
.t1-module-enterprise { background: var(--module-enterprise-soft); color: var(--module-enterprise); }

/* Card */
.t1-card { background: var(--surface-raised); border: var(--border-hairline) solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); color: var(--ink); }
.t1-card-dense { padding: var(--space-4); }
.t1-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.t1-card-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 600; }
.t1-card-meta { margin: 2px 0 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.t1-card-foot { display: flex; gap: var(--space-2); justify-content: flex-end; margin-top: var(--space-4); padding-top: var(--space-4); border-top: var(--border-hairline) solid var(--line); }

/* Input */
.t1-field { display: flex; flex-direction: column; gap: 6px; }
.t1-label { font-size: 12px; font-weight: 500; line-height: 16px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.t1-req { color: var(--danger); margin-left: 2px; }
.t1-input { font: inherit; font-size: 15px; line-height: 22px; height: 36px; box-sizing: border-box; padding: 0 var(--space-3); border-radius: var(--radius-md); border: var(--border-hairline) solid var(--line-strong); background: var(--surface-raised); color: var(--ink); }
.t1-input-mono { font-family: var(--font-mono); font-size: 13px; }
.t1-input[readonly] { background: var(--surface-sunken); }
.t1-input[aria-invalid="true"] { border-color: var(--danger); }
.t1-hint { font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.t1-error { font-size: 13px; line-height: 20px; color: var(--danger); }

/* Table */
.t1-table-wrap { background: var(--surface-raised); border: var(--border-hairline) solid var(--line); border-radius: var(--radius-lg); overflow: auto; }
.t1-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; color: var(--ink); }
.t1-table th { background: var(--surface-sunken); text-align: left; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); padding: var(--space-2) var(--space-3); border-bottom: var(--border-hairline) solid var(--line); white-space: nowrap; }
.t1-table td { padding: var(--space-3); border-bottom: var(--border-hairline) solid var(--line); vertical-align: middle; }
.t1-table tbody tr:last-child td { border-bottom: 0; }
.t1-table .t1-num { text-align: right; font-family: var(--font-mono); }
.t1-table .t1-mono { font-family: var(--font-mono); }
.t1-table tbody tr[aria-selected="true"] { background: var(--primary-soft); }
.t1-table tbody tr.t1-clickable { cursor: pointer; }
.t1-table tbody tr.t1-clickable:hover { background: var(--surface-sunken); }
.t1-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
