/* Hiring Passport MVP: screen layout on top of tokens.css (the design's
   components). */

.hp-topbar__inner { grid-template-columns: auto 1fr; }
#saved-chip { justify-self: end; }
.is-view .hp-only-edit { display: none !important; }
.app-grid { display: grid; gap: var(--hp-s6); }
@media (min-width: 1100px) { .app-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: start; } .app-side { position: sticky; top: var(--hp-s6); } }
.page-title { font-family: var(--hp-font-display); font-weight: 800; font-size: var(--hp-text-xl); line-height: 1.05; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.lead { font-size: var(--hp-text-md); color: var(--hp-ink-2); margin: 0; max-width: 60ch; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--hp-s2); }
.grid2 { display: grid; gap: var(--hp-s3); }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* Empty state */
.welcome { display: grid; gap: var(--hp-s5); padding-block: var(--hp-s8); max-width: 720px; }
.welcome h1 { font-family: var(--hp-font-display); font-weight: 800; font-size: var(--hp-text-2xl); line-height: 1; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
.welcome h1 em { font-style: normal; background: linear-gradient(transparent 60%, var(--hp-marigold) 60%, var(--hp-marigold) 90%, transparent 90%); }
.welcome ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--hp-s2); }
.welcome li { display: flex; gap: 10px; align-items: flex-start; }
.welcome li svg { width: 20px; height: 20px; color: var(--hp-ok); flex: none; margin-top: 2px; }

/* Application cards / timeline */
.apps { display: grid; gap: var(--hp-s3); }
.year { font-family: var(--hp-font-mono); font-size: var(--hp-text-xs); letter-spacing: .1em; color: var(--hp-muted); margin: var(--hp-s2) 0 0; }
.app-card { background: var(--hp-surface); border: 1px solid var(--hp-line); border-radius: var(--hp-r-lg); padding: var(--hp-s5); display: grid; gap: var(--hp-s4); }
.app-card.is-hidden { background: var(--hp-canvas); border-style: dashed; }
.app-card__top { display: flex; justify-content: space-between; gap: var(--hp-s3); align-items: flex-start; flex-wrap: wrap; }
.app-card h3 { font-family: var(--hp-font-display); font-weight: 700; font-size: 1.25rem; margin: 0; line-height: 1.2; }
.app-card__role { color: var(--hp-ink-2); margin: 2px 0 0; }
.app-card__meta { font-family: var(--hp-font-mono); font-size: var(--hp-text-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--hp-muted); }
.steps-done { display: flex; flex-wrap: wrap; gap: 6px; }
.note-quote { margin: 0; padding: var(--hp-s3) var(--hp-s4); border-left: 3px solid var(--hp-line-strong); background: var(--hp-canvas); border-radius: 0 var(--hp-r-sm) var(--hp-r-sm) 0; color: var(--hp-ink-2); }
.contacts { display: grid; gap: var(--hp-s2); }
.contact { display: grid; gap: 2px; padding: var(--hp-s3) var(--hp-s4); border-radius: var(--hp-r-md); background: var(--hp-canvas); }
.contact b { font-weight: 600; }
.contact a { color: var(--hp-brand); font-weight: 500; overflow-wrap: anywhere; }
.contact__links { display: flex; flex-wrap: wrap; gap: 0 var(--hp-s4); }
.contact__links a { display: inline-flex; align-items: center; min-height: 44px; }
.app-card__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--hp-s2); border-top: 1px solid var(--hp-line); padding-top: var(--hp-s3); }
.share-toggle { display: flex; align-items: center; gap: var(--hp-s2); font-size: var(--hp-text-sm); color: var(--hp-ink-2); }

/* Dialog (add / edit an application) */
.hp-dialog { border: 0; padding: 0; border-radius: var(--hp-r-lg); width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--hp-surface); color: var(--hp-ink); box-shadow: 0 30px 80px -30px rgba(17,20,43,.6); }
.hp-dialog::backdrop { background: rgba(17, 20, 43, .5); }
.hp-dialog form { display: grid; gap: var(--hp-s6); padding: var(--hp-s5); }
@media (min-width: 760px) { .hp-dialog form { padding: var(--hp-s8); } }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--hp-s3); }
.dialog-head h2 { font-family: var(--hp-font-display); font-weight: 800; font-size: var(--hp-text-lg); margin: 0; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--hp-r-md); border: 0; background: transparent; color: var(--hp-ink); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--hp-sunken); }
.icon-btn svg { width: 22px; height: 22px; }
.stage-options { display: grid; gap: var(--hp-s2); }
@media (min-width: 640px) { .stage-options { grid-template-columns: repeat(5, minmax(0, 1fr)); } .stage-options .hp-option { grid-template-columns: 1fr; justify-items: start; } }
.contact-edit { display: grid; gap: var(--hp-s3); padding: var(--hp-s4); border: 1px solid var(--hp-line); border-radius: var(--hp-r-md); }
.contact-edit__head { display: flex; justify-content: space-between; align-items: center; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--hp-text-sm); cursor: pointer; min-height: 44px; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--hp-brand); flex: none; }
.field-error { color: var(--hp-danger); font-size: var(--hp-text-sm); margin: 4px 0 0; }
.dialog-foot { display: flex; flex-wrap: wrap; gap: var(--hp-s2); justify-content: space-between; align-items: center; position: sticky; bottom: calc(-1 * var(--hp-s5)); background: var(--hp-surface); padding-block: var(--hp-s3); margin-bottom: calc(-1 * var(--hp-s3)); border-top: 1px solid var(--hp-line); }

/* Shared (employer) view */
.view-banner { display: flex; gap: var(--hp-s3); align-items: flex-start; padding: var(--hp-s4); border-radius: var(--hp-r-lg); background: var(--hp-warn-soft); color: var(--hp-ink); border: 1px solid rgba(140,90,0,.25); }
.view-banner svg { width: 22px; height: 22px; color: var(--hp-warn); flex: none; margin-top: 2px; }
.person-head { display: grid; gap: var(--hp-s2); }
.summary-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hp-s2); }
.summary-stats div { background: var(--hp-surface); border: 1px solid var(--hp-line); border-radius: var(--hp-r-md); padding: var(--hp-s3); }
.summary-stats b { display: block; font-family: var(--hp-font-display); font-weight: 800; font-size: 1.75rem; line-height: 1.1; }
.summary-stats span { font-size: var(--hp-text-sm); color: var(--hp-ink-2); }
.link-box { font-family: var(--hp-font-mono); font-size: 13px; padding: var(--hp-s3); border-radius: var(--hp-r-sm); background: var(--hp-canvas); border: 1px solid var(--hp-line); overflow-wrap: anywhere; max-height: 5.5em; overflow: hidden; }

@media print {
  .hp-topbar, .hp-foot, .no-print, .hp-toast { display: none !important; }
  body { background: #fff; }
  .app-card { break-inside: avoid; }
  .app-grid { display: block; }
}
