/* Talent (ATS) app. Tokens, buttons and fonts come from
   www.zer0paper.com/assets/site.css; this file only lays out the app. */
.talent { background: var(--bg); color: var(--ink); min-height: 100vh; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.t-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 12px clamp(16px, 3vw, 32px);
  border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.t-bar .logo { font-size: var(--fs-ui); margin-right: 0; }
.t-product { font-size: var(--fs-sm); color: var(--mute); padding-left: 14px; border-left: 1px solid var(--rule); }
.t-tabs { display: flex; gap: 4px; margin-left: 12px; }
.t-tab { font: inherit; font-size: var(--fs-sm); padding: 7px 14px; border-radius: 999px; border: 0; background: transparent; color: var(--mute); cursor: pointer; }
.t-tab:hover { color: var(--ink); background: var(--fog); }
.t-tab[aria-current="page"] { color: var(--ink); background: var(--fog); font-weight: 500; }
.t-account { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.t-who { color: var(--mute); }
.t-link { font: inherit; font-size: var(--fs-sm); background: none; border: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }
.t-bar .theme-btn { margin-left: 4px; }
.t-account[hidden] + .theme-btn { margin-left: auto; }

.t-avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green-soft); color: var(--green-ink);
  font-size: 12px; font-weight: 600; letter-spacing: .02em; flex: none; }
.t-avatar-lg { width: 44px; height: 44px; font-size: 15px; }

/* Shell */
.t-main { padding: 24px clamp(16px, 3vw, 32px) 64px; max-width: 1360px; margin: 0 auto; }
.t-center { min-height: 70vh; display: grid; place-items: center; }
.t-card { border: 1px solid var(--rule); border-radius: 16px; padding: 28px; background: var(--bg); }
.t-signin { max-width: 440px; text-align: left; }
.t-title { font-family: var(--display); font-weight: 500; font-size: var(--fs-h2); letter-spacing: -.03em; margin: 0 0 8px; line-height: 1.05; }
.t-h2 { font-family: var(--display); font-weight: 500; font-size: var(--fs-h3); letter-spacing: -.02em; margin: 0 0 6px; }
.t-sub { color: var(--mute); margin: 0 0 20px; line-height: var(--lh-text); font-size: var(--fs-ui); }
.t-google { margin-top: 4px; }
.t-alert { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--error) 12%, transparent); color: var(--error); font-size: var(--fs-sm); }
.t-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--rule); border-top-color: var(--ink); animation: t-spin .8s linear infinite; }
@keyframes t-spin { to { transform: rotate(360deg); } }

/* Pipeline: one button per stage, doubles as the stage filter */
.t-pipeline { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.t-stage-btn { font: inherit; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer;
  display: grid; gap: 2px; transition: border-color .15s, background .15s; }
.t-stage-btn:hover { border-color: var(--ink); }
.t-stage-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.t-stage-btn .n { font-family: var(--display); font-size: var(--fs-h4); font-weight: 500; font-feature-settings: 'tnum' 1; line-height: 1.1; }
.t-stage-btn .l { font-size: var(--fs-xs); color: inherit; opacity: .75; }

.t-tools { display: flex; gap: 10px; margin-bottom: 16px; }
.t-search { position: relative; flex: 1; }
.t-search input { width: 100%; font: inherit; font-size: var(--fs-ui); padding: 10px 40px 10px 14px; border-radius: 10px; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); }
.t-search input:focus, .t-select:focus, .t-compose textarea:focus { outline: 2px solid var(--green-ink); outline-offset: 1px; border-color: transparent; }
.t-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 12px/1 var(--text); color: var(--mute); border: 1px solid var(--rule); border-radius: 5px; padding: 3px 6px; }
.t-select { font: inherit; font-size: var(--fs-ui); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); min-width: 200px; }

/* List and detail */
.t-split { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 20px; align-items: start; }
.t-list { display: grid; gap: 6px; outline: none; max-height: calc(100vh - 250px); overflow-y: auto; padding: 2px; }
.t-item { font: inherit; text-align: left; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border-radius: 12px;
  border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; }
.t-item:hover { background: var(--fog); }
.t-item[aria-selected="true"] { background: var(--fog); border-color: var(--rule); }
.t-item .t-avatar { grid-row: span 2; }
.t-item-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-item-time { font-size: var(--fs-xs); color: var(--mute); white-space: nowrap; }
.t-item-meta { font-size: var(--fs-sm); color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-pill { justify-self: end; font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--fog); color: var(--ink); white-space: nowrap; border: 1px solid var(--rule); }
.t-pill[data-stage="test_sent"], .t-pill[data-stage="test_done"] { background: color-mix(in srgb, #3B6FD8 14%, transparent); border-color: transparent; }
.t-pill[data-stage="interview"], .t-pill[data-stage="offer"] { background: var(--green-soft); color: var(--green-ink); border-color: transparent; }
.t-pill[data-stage="rejected"] { color: var(--mute); }
.t-list-empty { padding: 32px 14px; color: var(--mute); text-align: center; font-size: var(--fs-ui); }

.t-detail { position: sticky; top: 76px; border: 1px solid var(--rule); border-radius: 16px; padding: 28px; min-height: 360px; min-width: 0; }
.t-empty { min-height: 300px; display: grid; place-content: center; text-align: center; }
.t-empty-title { font-family: var(--display); font-size: var(--fs-h4); margin: 0 0 4px; }
.t-back { display: none; font: inherit; font-size: var(--fs-sm); background: none; border: 0; color: var(--mute); padding: 0; margin-bottom: 16px; cursor: pointer; }
.t-head { display: flex; align-items: center; gap: 14px; }
.t-head-text { flex: 1; min-width: 0; }
.t-name { font-family: var(--display); font-weight: 500; font-size: var(--fs-h3); letter-spacing: -.02em; margin: 0; line-height: 1.15; }
.t-meta { margin: 4px 0 0; color: var(--mute); font-size: var(--fs-sm); }

.t-stages { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 6px; }
.t-stages button { font: inherit; font-size: var(--fs-sm); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; }
.t-stages button:hover { border-color: var(--ink); }
.t-stages button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.t-stages button[data-stage="rejected"][aria-pressed="true"] { background: var(--mute); border-color: var(--mute); }
.t-note-line { margin: 6px 0 0; font-size: var(--fs-xs); color: var(--mute); }

.t-block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--rule); }
.t-h { font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin: 0 0 12px; }
.t-count { color: var(--ink); }
.t-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.t-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; background: var(--fog); color: var(--ink); text-decoration: none; font-size: var(--fs-sm); max-width: 100%; overflow-wrap: anywhere; }
.t-chip:hover { background: color-mix(in srgb, var(--ink) 10%, var(--fog)); }
.t-answer { white-space: pre-wrap; margin: 0; line-height: var(--lh-text); font-size: var(--fs-body); }

.t-timeline { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 14px; }
.t-timeline li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }
.t-timeline .t-avatar { grid-row: span 2; width: 24px; height: 24px; font-size: 10px; }
.t-tl-meta { font-size: var(--fs-xs); color: var(--mute); }
.t-tl-body { white-space: pre-wrap; line-height: var(--lh-text); font-size: var(--fs-ui); }
.t-compose { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.t-compose textarea { font: inherit; font-size: var(--fs-ui); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); resize: vertical; min-height: 44px; }

/* Staff */
.t-staff { list-style: none; padding: 0; margin: 8px 0 0; }
.t-staff li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--rule); }
.t-staff .who { flex: 1; min-width: 0; display: grid; }
.t-staff .who small { color: var(--mute); font-size: var(--fs-xs); }
.t-seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; }
.t-seg button { font: inherit; font-size: var(--fs-sm); border: 0; background: transparent; color: var(--mute); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.t-seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.t-badge { font-size: var(--fs-xs); padding: 4px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green-ink); font-weight: 500; }

.t-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: var(--fs-sm); z-index: 10; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.t-toast[data-kind="error"] { background: var(--error); color: #fff; }

@media (max-width: 1100px) { .t-pipeline { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .t-split { grid-template-columns: 1fr; }
  .t-list { max-height: none; }
  .t-detail { position: static; display: none; padding: 20px; }
  .t-split.is-open .t-list { display: none; }
  .t-split.is-open .t-detail { display: block; }
  .t-back { display: inline-block; }
  .t-who, .t-product, .t-account .t-avatar { display: none; }
  .t-bar { gap: 10px; padding: 10px 16px; }
  .t-tabs { margin-left: 0; }
  .t-tab { padding: 6px 10px; }
  .t-link { white-space: nowrap; }
  .t-pipeline { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px; }
  .t-pipeline::-webkit-scrollbar { display: none; }
  .t-stage-btn { flex: none; display: flex; align-items: baseline; gap: 6px; padding: 8px 12px; border-radius: 999px; }
  .t-stage-btn .n { font-size: var(--fs-ui); }
  .t-stage-btn .l { font-size: var(--fs-sm); opacity: 1; }
  .t-search kbd { display: none; }
  .t-tools { flex-direction: column; }
  .t-select { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .t-spinner { animation-duration: 3s; } }
