/* Header dropdown menus, Careers and Publications pages. Uses tokens from styles.css. */

/* ───────── Header dropdown menus ───────── */
.nav-item { position: relative; display: flex; align-items: center; gap: .1rem; }
.nav-toggle { background: none; border: 0; font: inherit; font-size: .86rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.nav-toggle:hover, .has-sub.open > .nav-toggle, .has-sub.active-group > .nav-toggle { color: var(--accent-magenta); font-weight: 600; }
.nav-toggle::after { display: none; }
.nav-caret { background: none; border: 0; color: var(--text-muted); cursor: pointer; padding: .35rem .3rem; display: inline-flex; align-items: center; border-radius: 6px; }
.nav-caret:hover, .has-sub.open > .nav-caret { color: var(--accent-magenta); }
.nav-caret-icon { transition: transform .2s ease; }
.has-sub.open .nav-caret-icon { transform: rotate(180deg); }
.has-sub.active-group > .nav-link:not(.active) { color: var(--accent-magenta); }
.nav-sub { display: none; position: absolute; top: calc(100% + 12px); left: -.85rem; min-width: 235px; max-width: calc(100vw - 2rem); list-style: none; padding: .5rem; background: var(--bg-glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-card); z-index: 1300; }
.nav-sub::before { content: ''; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.has-sub.open > .nav-sub { display: block; animation: navdrop .16s ease-out; }
@keyframes navdrop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.nav-sublink { display: block; padding: .6rem .85rem; color: var(--text-main); text-decoration: none; font-size: .88rem; font-weight: 500; border-radius: 8px; white-space: nowrap; }
.nav-sublink:hover, .nav-sublink:focus-visible { background: rgba(233, 30, 99, .12); color: var(--accent-magenta-bright); }
.nav-sublink.active { color: var(--accent-magenta); font-weight: 700; }
@media (max-width: 1180px) {
  .nav-menu { max-height: calc(100vh - 70px); overflow-y: auto; align-items: stretch; }
  .nav-item { flex-wrap: wrap; width: 100%; }
  .nav-item.has-sub > .nav-link { flex: 1; text-align: left; }
  .nav-toggle { width: 100%; justify-content: space-between; }
  .nav-caret { padding: .5rem .6rem; }
  .nav-sub { position: static; flex-basis: 100%; min-width: 0; box-shadow: none; border: 0; border-left: 2px solid var(--border-color); border-radius: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; padding: .15rem 0 .35rem .6rem; margin-left: .3rem; }
  .nav-sub::before { display: none; }
  .nav-sublink { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .has-sub.open > .nav-sub { animation: none; } }

/* ───────── Shared page furniture ───────── */
.page-wide { max-width: 1120px; margin: 0 auto; }
.page-wide.narrow { max-width: 860px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .82rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.crumbs a { color: var(--text-muted); text-decoration: none; } .crumbs a:hover { color: var(--accent-magenta-bright); }
.crumb-sep { opacity: .5; }
.req { color: var(--accent-magenta-bright); }
.form-help { display: block; margin-top: .35rem; color: var(--text-dim); font-size: .78rem; }

/* ───────── Careers ───────── */
.job-list { display: grid; gap: 1.25rem; }
.job-card { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.75rem; flex-wrap: wrap; }
.job-card-main { flex: 1 1 420px; min-width: 0; }
.job-tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.job-card-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; margin-bottom: .5rem; }
.job-card-title a { color: var(--text-main); text-decoration: none; } .job-card-title a:hover { color: var(--accent-magenta-bright); }
.job-card-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; color: var(--text-muted); font-size: .85rem; margin-bottom: .75rem; }
.job-card-summary { color: var(--text-muted); line-height: 1.7; }
.eeo-note { margin-top: 2.5rem; color: var(--text-dim); font-size: .82rem; line-height: 1.7; max-width: 860px; }
.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
.job-body { max-width: none; margin: 0; }
.job-body h3 { font-size: 1.25rem; padding-top: .6rem; border-top: 1px solid var(--border-color); }
.job-body h3:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.job-aside { padding: 1.5rem; position: sticky; top: 100px; }
.job-aside h3 { font-family: var(--font-heading); margin-bottom: 1rem; }
.job-facts { display: grid; gap: .85rem; margin-bottom: 1.5rem; }
.job-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); }
.job-facts dd { color: var(--text-main); font-size: .92rem; }
.job-apply-btn { width: 100%; justify-content: center; }
.job-aside-note { color: var(--text-dim); font-size: .8rem; margin-top: .9rem; line-height: 1.6; }
.job-closed { background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .35); border-radius: var(--radius-md); padding: .9rem 1rem; font-size: .9rem; color: var(--text-main); }
@media (max-width: 900px) { .job-layout { grid-template-columns: 1fr; } .job-aside { position: static; order: -1; } }

/* application form */
.apply-form { display: grid; gap: 1.5rem; }
.apply-step { border: 1px solid var(--border-color); padding: 1.75rem; min-width: 0; }
.apply-step legend { float: left; width: 100%; display: flex; align-items: center; gap: .75rem; font-family: var(--font-heading); font-size: 1.2rem; font-weight: 800; color: var(--text-main); margin-bottom: 1.25rem; padding: 0; }
.apply-step legend + * { clear: both; }
.step-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--gradient-hero); color: #fff; font-size: .85rem; flex-shrink: 0; }
.step-note { color: var(--text-muted); font-size: .85rem; line-height: 1.65; margin-bottom: 1.1rem; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) { .form-row.three { grid-template-columns: 1fr; } .apply-step { padding: 1.25rem; } }
.apply-form input[type=file].form-input { padding: .6rem; cursor: pointer; }
.rep-title { font-family: var(--font-heading); margin: 1.5rem 0 .75rem; color: var(--text-main); } .rep-title small { color: var(--text-dim); font-weight: 400; font-size: .78rem; margin-left: .4rem; }
.rep { display: grid; gap: 1rem; margin-bottom: 1rem; }
.rep-row { position: relative; border: 1px dashed var(--border-color); border-radius: var(--radius-md); padding: 1rem; }
.rep-remove { background: none; border: 0; color: var(--text-dim); font: 500 .78rem var(--font-body); cursor: pointer; text-decoration: underline; padding: .25rem 0; }
.rep-remove:hover { color: var(--accent-magenta-bright); }
.rep-add { cursor: pointer; font-size: .85rem; padding: .6rem 1.1rem; margin-bottom: 1rem; }
.rep-add[hidden] { display: none; }
.check-inline { display: inline-flex; align-items: center; gap: .5rem; color: var(--text-muted); font-size: .88rem; padding-top: 1.7rem; cursor: pointer; }
.q-row { padding: 1rem 0; border-bottom: 1px solid var(--border-color); } .q-row:last-child { border-bottom: 0; }
.q-text { color: var(--text-main); line-height: 1.6; margin-bottom: .6rem; font-size: .93rem; }
.q-opts { display: flex; gap: 1.5rem; }
.radio, .check-row { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; color: var(--text-muted); font-size: .9rem; }
.radio input, .check-row input { margin-top: .25rem; accent-color: var(--accent-magenta); width: 16px; height: 16px; flex-shrink: 0; }
.q-detail { margin-top: .8rem; }
.q-detail[hidden] { display: none; }
.check-row { padding: .65rem 0; line-height: 1.65; }
.privacy-box { border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: .9rem 1.1rem; margin-bottom: 1rem; color: var(--text-muted); font-size: .85rem; line-height: 1.7; }
.privacy-box summary { cursor: pointer; font-weight: 600; color: var(--text-main); }
.privacy-box p { margin-top: .7rem; }
.apply-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.apply-actions .btn-primary { cursor: pointer; padding: 1rem 2rem; }
.apply-actions .btn-primary:disabled { opacity: .6; cursor: wait; }
.apply-status:empty { display: none; }
.apply-status { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .4); color: var(--text-main); padding: .9rem 1.1rem; border-radius: var(--radius-md); font-size: .9rem; line-height: 1.6; }
.apply-form .invalid { border-color: #ef4444 !important; }
.apply-done { padding: 2.5rem; text-align: center; max-width: 640px; margin: 0 auto; display: grid; gap: 1rem; justify-items: center; }
.apply-done[hidden] { display: none; }
.apply-done h2 { font-family: var(--font-heading); font-size: 2rem; }
.apply-done p { color: var(--text-muted); line-height: 1.7; }
.apply-ref { font-size: 1.05rem; color: var(--text-main) !important; }

/* ───────── Publications ───────── */
.pub-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.pub-tabs a { padding: .5rem 1.1rem; border-radius: var(--radius-full); border: 1px solid var(--border-color); color: var(--text-muted); text-decoration: none; font-size: .88rem; font-weight: 600; }
.pub-tabs a:hover { border-color: var(--border-glow); color: var(--text-main); }
.pub-tabs a.active { background: var(--gradient-hero); color: #fff; border-color: transparent; }
.pub-list { display: grid; gap: 1.25rem; }
.pub-card { display: flex; gap: 1.5rem; padding: 1.75rem; }
.pub-thumb { flex: 0 0 160px; } .pub-thumb img { width: 160px; height: 120px; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.pub-main { flex: 1; min-width: 0; }
.pub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.pub-meta time { color: var(--text-dim); font-size: .8rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.pub-title { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; margin-bottom: .4rem; }
.pub-title a { color: var(--text-main); text-decoration: none; } .pub-title a:hover { color: var(--accent-magenta-bright); }
.pub-byline { color: var(--text-dim); font-size: .85rem; margin-bottom: .6rem; }
.pub-summary { color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.pub-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.pub-actions .btn-secondary, .pub-actions .btn-ghost, .pub-actions .btn-primary { font-size: .82rem; padding: .55rem 1.1rem; cursor: pointer; }
.pub-article { padding: 2.25rem; }
.pub-article-title { font-family: var(--font-heading); font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; line-height: 1.2; margin-bottom: .6rem; }
.pub-cover { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius-md); margin: 1rem 0; }
.pub-lead { font-size: 1.08rem; line-height: 1.8; color: var(--text-main); margin: 1rem 0; }
.pub-body { padding: 0; margin: 1.25rem 0; max-width: none; }
@media (max-width: 640px) { .pub-card { flex-direction: column; } .pub-thumb img { width: 100%; height: 180px; } .pub-article { padding: 1.4rem; } }

/* ───────── IP satellite map ───────── */
.ip-map-card { padding: .6rem; color: #fff; overflow: hidden; }
.ip-map-wrap { position: relative; }
.ip-map { border-radius: var(--radius-md); background: #0b0a3a; }
.ip-glow { mix-blend-mode: screen; pointer-events: none; }
.ip-pin-granted { color: #34d399; } .ip-pin-pending { color: #ff4081; }
.ip-pin-dot { stroke: #fff; stroke-width: 1.8; }
.ip-pin-name, .ip-pin-badge { fill: #fff; paint-order: stroke; stroke: rgba(5, 5, 30, .85); stroke-linejoin: round; }
.ip-pin-name { stroke-width: 4px; font: 700 14px var(--font-heading); }
.ip-pin-badge { stroke-width: 3px; font: 600 11px var(--font-body); }
.ip-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; padding: .7rem .5rem .2rem; font-size: .8rem; color: var(--text-muted); }
.ip-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.ip-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.lg-granted { background: #34d399; box-shadow: 0 0 8px #10b981; } .lg-pending { background: #ff4081; box-shadow: 0 0 8px #e91e63; }
.ip-legend small { margin-left: auto; color: var(--text-dim); font-size: .7rem; }
@media (max-width: 640px) { .ip-pin-name { font-size: 24px; stroke-width: 6px; } .ip-pin-badge { font-size: 19px; stroke-width: 5px; } .ip-legend small { margin-left: 0; } }
