:root {
  --econlaunch-navy: #1B2A4A;
  --econlaunch-amber: #D9A441;
  --econlaunch-off-white: #F7F5F0;
  --econlaunch-teal: #3E7C7C;
  --econlaunch-near-black: #111827;

  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --text: #1a1d23;
  --text-muted: #5b6270;
  --border: #e1e4e9;
  --accent: var(--econlaunch-teal);
  --accent-hover: #2f6363;
  --accent-soft: rgba(62, 124, 124, 0.12);
  --danger: #b3261e;
  --warning: #b45309;
  --success: #1e7d34;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(20, 22, 26, 0.08);
  --shadow-md: 0 6px 20px rgba(20, 22, 26, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --bg-alt: #1c1f25;
    --text: #e8eaed;
    --text-muted: #9aa1ac;
    --border: #2b2f37;
    --accent: var(--econlaunch-amber);
    --accent-hover: #e6b568;
    --accent-soft: rgba(217, 164, 65, 0.15);
    --danger: #e0837c;
    --warning: #e8a561;
    --success: #4ade80;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a, button, input, select, textarea, summary {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1rem 1rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.header-account {
  flex-shrink: 0;
  position: relative;
}

.auth-signin-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-signin-btn:hover {
  background: var(--accent-hover);
}

.auth-user-menu {
  position: relative;
}

.auth-user-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
}

.auth-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 120px;
  z-index: 20;
}

.auth-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  color: var(--text);
}

.auth-dropdown button:hover {
  background: var(--bg-alt);
}

.auth-modal,
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.auth-modal:not([hidden]),
.contact-modal:not([hidden]) {
  display: flex;
}

.auth-modal-backdrop,
.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.auth-modal-box,
.contact-modal-box {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  width: 100%;
  max-width: 360px;
  z-index: 1;
}

.contact-modal-box {
  max-width: 460px;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.auth-modal-box h3,
.contact-modal-box h3 {
  margin: 0 0 1rem;
}

.auth-modal-close,
.contact-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-muted);
}

.auth-error {
  color: var(--danger);
  font-size: 0.88rem;
  margin: 0 0 0.75rem;
}

.auth-info {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 0 0.75rem;
}

.contact-status {
  font-size: 0.88rem;
  margin: 0 0 0.75rem;
}

.contact-status-success {
  color: var(--success);
}

.contact-status-error {
  color: var(--danger);
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-switch {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.site-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
}

.site-logo {
  display: block;
  height: 40px;
  width: auto;
}

@media (max-width: 640px) {
  .site-logo {
    height: 32px;
  }
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-width: 1400px;
  margin: 1rem auto 0;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  background: none;
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.tab-panel {
  display: none;
  max-width: 900px;
  margin: 0 auto;
}

.tab-panel.active {
  display: block;
}

.tab-panel.wide {
  max-width: none;
  margin: 0;
}

.tab-panel h2 {
  margin-top: 0;
}

.field-group {
  margin-bottom: 1.75rem;
}

.field-group h3 {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.profile-section-heading {
  margin: 1.5rem 0 0.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.link-list {
  margin: 0;
  padding-left: 1.2rem;
}

.link-list li {
  margin-bottom: 0.5rem;
}

.link-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.link-list a:hover {
  text-decoration: underline;
}

.note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
}

.placeholder-note {
  color: var(--text-muted);
  font-style: italic;
}

/* Tracker form */
.tracker-form {
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.tracker-form:not([hidden]) {
  display: flex;
}

.tracker-fieldset {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 1rem 1rem;
  margin: 0;
}

.tracker-fieldset legend {
  padding: 0 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-row.full {
  grid-column: 1 / -1;
}

.form-row label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.form-row input,
.form-row select,
.form-row textarea {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}

button:active {
  transform: scale(0.98);
}

#tracker-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
}

#tracker-submit:hover {
  background: var(--accent-hover);
}

.tracker-form-actions {
  display: flex;
  gap: 0.6rem;
}

#tracker-cancel-edit {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

#tracker-cancel-edit:hover {
  background: var(--border);
}

.tracker-view-toggle {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.view-toggle-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.view-toggle-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-alt);
}

.add-job-btn {
  margin-left: auto;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
}

.add-job-btn:hover {
  background: var(--accent-hover);
}

.tracker-planner-wrap {
  flex-direction: column;
  gap: 1.5rem;
}

.tracker-planner-wrap:not([hidden]) {
  display: flex;
}

.tracker-planner {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.planner-column {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
}

.planner-column h3 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.planner-column h3 .note {
  font-weight: 400;
  font-size: 0.8rem;
}

#tracker-archived-list h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
}

#tracker-archived-list h3:first-child {
  margin-top: 0;
}

.planner-count {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.planner-empty {
  margin-top: 0.25rem;
}

.planner-task-badge {
  display: inline-block;
  margin-left: 0.15rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.planner-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 2rem;
}

.planner-card {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 0.6rem 0.7rem;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.planner-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.planner-card-body {
  flex: 1;
  min-width: 0;
}

.planner-card-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.planner-card-title a {
  color: inherit;
  text-decoration: none;
}

.planner-card-title a:hover {
  text-decoration: underline;
}

.planner-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.planner-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: stretch;
}

.planner-card-actions button {
  font-size: 0.72rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  white-space: nowrap;
}

.planner-card-actions button:hover {
  background: var(--border);
}

.planner-card-actions .tone-neutral {
  border-color: var(--accent);
  color: var(--accent);
}

.planner-card-actions .tone-green {
  border-color: #16a34a;
  color: #16a34a;
}

.planner-card-actions .tone-green:hover {
  background: #16a34a;
  color: #fff;
}

.planner-card-actions .tone-red {
  border-color: #dc2626;
  color: #dc2626;
}

.planner-card-actions .tone-red:hover {
  background: #dc2626;
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .planner-card-actions .tone-green { border-color: #4ade80; color: #4ade80; }
  .planner-card-actions .tone-green:hover { background: #4ade80; color: #052e16; }
  .planner-card-actions .tone-red { border-color: #f87171; color: #f87171; }
  .planner-card-actions .tone-red:hover { background: #f87171; color: #450a0a; }
}

.tracker-calendar {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.cal-header h3 {
  margin: 0;
  font-size: 1rem;
  min-width: 10rem;
  text-align: center;
}

.cal-header button {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 0.25rem 0.6rem;
}

.cal-header button:hover {
  background: var(--border);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.cal-weekday {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  padding: 0.2rem;
}

.cal-cell {
  min-height: 60px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem;
}

.cal-cell.cal-empty {
  border: none;
}

.cal-daynum {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cal-chip {
  display: block;
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
  margin-top: 2px;
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.cal-chip-task {
  background: var(--border);
  color: var(--text);
  font-style: italic;
}

@media (max-width: 720px) {
  .cal-cell {
    min-height: 40px;
  }
}

.tracker-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tracker-toolbar input[type="text"] {
  flex: 1;
  min-width: 180px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

.tracker-toolbar select {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

.tracker-toolbar button {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.85rem;
}

.tracker-toolbar button:hover {
  background: var(--border);
}

.table-wrap {
  overflow-x: auto;
}

.table-wrap--tall {
  max-height: 72vh;
  overflow-y: auto;
}

#tracker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

#tracker-table th,
#tracker-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

#tracker-table th {
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
}

#tracker-table tbody tr:hover,
#jf-table tbody tr:hover,
#task-table tbody tr:hover {
  background: var(--bg-alt);
}

#tracker-table td.notes-cell {
  max-width: 220px;
  white-space: pre-wrap;
  word-break: break-word;
}

#task-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

#task-table th,
#task-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

#task-table th {
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.task-overdue td {
  color: #991b1b;
}

@media (prefers-color-scheme: dark) {
  .task-overdue td {
    color: #fecaca;
  }
}

.truncate-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover {
  color: var(--text);
}

th.sortable .sort-arrow {
  display: inline-block;
  margin-left: 0.25rem;
  color: var(--accent);
  opacity: 0.4;
}

th.sortable.sort-active .sort-arrow {
  opacity: 1;
}

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-saved { background: #e5e7eb; color: #374151; }
.status-preparing { background: #f3e8ff; color: #6b21a8; }
.status-applied { background: #dbeafe; color: #1e40af; }
.status-interview { background: #fef3c7; color: #92400e; }
.status-offer { background: #d1fae5; color: #065f46; }
.status-closed-accepted { background: #bbf7d0; color: #14532d; }
.status-closed-rejected { background: #fee2e2; color: #991b1b; }
.status-closed-withdrawn { background: #ede9fe; color: #5b21b6; }
.status-closed-other { background: #e5e7eb; color: #374151; }

@media (prefers-color-scheme: dark) {
  .status-saved { background: #374151; color: #e5e7eb; }
  .status-preparing { background: #4c1d75; color: #e9d5ff; }
  .status-applied { background: #1e3a5f; color: #bfdbfe; }
  .status-interview { background: #4b3a0a; color: #fde68a; }
  .status-offer { background: #064e3b; color: #a7f3d0; }
  .status-closed-accepted { background: #0d3b21; color: #bbf7d0; }
  .status-closed-rejected { background: #5f1d1b; color: #fecaca; }
  .status-closed-withdrawn { background: #3b2264; color: #ddd6fe; }
  .status-closed-other { background: #374151; color: #e5e7eb; }
}

.actions-cell {
  white-space: nowrap;
}

.row-edit,
.row-delete {
  background: none;
  border: none;
  font-size: 0.85rem;
  padding: 0.2rem 0.4rem;
}

.row-edit {
  color: var(--accent);
}

.row-delete {
  color: var(--danger);
}

.row-edit:hover,
.row-delete:hover {
  text-decoration: underline;
}

/* Job Feed */
.job-feed-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.job-feed-sidebar {
  flex: 0 0 190px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.job-feed-sidebar h3 {
  margin: 0 0 0.3rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.board-btn {
  text-align: left;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.88rem;
}

.board-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
  background: var(--bg-alt);
}

.board-btn:disabled {
  color: var(--text-muted);
  cursor: default;
  opacity: 0.7;
}

.soon-tag {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.7rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.province-picker {
  padding: 0.3rem 0.2rem 0.3rem 0.9rem;
  border-left: 2px solid var(--border);
  margin-left: 0.3rem;
}

.province-picker select {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
}

.job-feed-main {
  flex: 1;
  min-width: 0;
}

.jf-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.jf-toolbar #jf-search {
  flex: 1;
  min-width: 200px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

.jf-toolbar #jf-sort {
  flex: 0 0 auto;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

/* Collapsed by default (native <details>, no JS needed for the toggle
   itself) so the filter controls don't crowd the table by default. */
.jf-filters-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--bg);
}

.jf-filters-panel summary {
  cursor: pointer;
  padding: 0.5rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.jf-filters-panel summary::-webkit-details-marker {
  display: none;
}

.jf-filters-panel summary::after {
  content: " \25BE";
  font-size: 0.7em;
  color: var(--text-muted);
}

.jf-filters-panel[open] summary::after {
  content: " \25B4";
}

.jf-filters-panel summary:hover {
  color: var(--accent);
}

.jf-filters-panel-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0 0.9rem 0.9rem;
}

.job-feed-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.job-feed-filters input[type="text"] {
  flex: 1;
  min-width: 160px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

.job-feed-filters select {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-type-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.7rem;
  margin: 0;
}

.job-type-filter legend {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0 0.3rem;
}

.job-type-filter label,
.jf-ai-relevant-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.jf-ai-relevant-label {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.7rem;
}

#jf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

#jf-table th,
#jf-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

#jf-table th {
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
}

#jf-table td:first-child a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

#jf-table td:first-child a:hover {
  text-decoration: underline;
}

.jf-send-btn {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.jf-send-btn:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
}

.jf-send-btn:disabled {
  border-color: var(--border);
  color: var(--text-muted);
  cursor: default;
}

.jf-hide-btn {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.jf-hide-btn:hover {
  background: var(--border);
  color: var(--text);
}

.category-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #dbeafe;
  color: #1e40af;
  margin: 0 0.2rem 0.2rem 0;
}

@media (prefers-color-scheme: dark) {
  .category-badge { background: #1e3a5f; color: #bfdbfe; }
}

.jobbank-badge {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: #15803d;
}

.jobbank-lmia-badge {
  color: #b45309;
}

@media (prefers-color-scheme: dark) {
  .jobbank-badge { color: #86efac; }
  .jobbank-lmia-badge { color: #fbbf24; }
}

.closing-soon {
  color: var(--warning);
  font-weight: 600;
}

.closing-urgent {
  color: var(--danger);
  font-weight: 600;
}

@media (max-width: 640px) {
  .job-feed-layout {
    flex-direction: column;
  }
  .job-feed-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-bar {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
}

.footer-tag {
  flex: 1 1 260px;
}

@media (max-width: 640px) {
  .tracker-fieldset {
    grid-template-columns: 1fr;
  }
}

/* --- Quick filter chips --- */
.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.quick-chip {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.82rem;
}

.quick-chip:hover {
  background: var(--bg-alt);
}

.quick-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* --- Active filter chips --- */
.active-filters {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.active-filters:not([hidden]) {
  display: flex;
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.78rem;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#jf-clear-filters {
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.78rem;
}

#jf-clear-filters:hover {
  background: var(--border);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
  font-size: inherit;
  cursor: pointer;
}

/* --- Error state --- */
.error-state {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 1.25rem;
  margin: 1rem 0;
}

.error-state h3 {
  margin: 0 0 0.4rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.error-actions button,
.error-actions a {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: none;
}

.error-actions button:hover,
.error-actions a:hover {
  background: var(--accent);
  color: #fff;
}

/* --- Source status line --- */
.source-status {
  font-size: 0.82rem;
}

/* --- Programs tab subsections --- */
.programs-subsection {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.programs-subsection:last-child {
  border-bottom: none;
}

.programs-subsection > h3 {
  margin-bottom: 0.25rem;
}

.home-hero {
  max-width: 640px;
  margin-bottom: 2rem;
}

.home-hero h2 {
  margin-bottom: 0.5rem;
}

.home-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.home-cta-primary,
.home-cta-secondary {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
}

.home-cta-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

.home-cta-primary:hover {
  background: var(--accent-hover);
}

.home-cta-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.home-cta-secondary:hover {
  background: var(--border);
}

.home-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.home-highlight {
  flex: 1 1 220px;
}

.home-highlight h3 {
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.home-market-stats {
  margin-top: 2.5rem;
  max-width: 780px;
}

.market-stats-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.market-stats-tile {
  flex: 1 1 150px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.market-stats-tile h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  text-transform: capitalize;
}

.market-stats-tile .stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.15rem;
}

.market-stats-tile .stat-row strong {
  font-variant-numeric: tabular-nums;
}

.market-stats-footnote {
  font-size: 0.78rem;
}

.mentoring-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.mentoring-hero-text {
  flex: 1 1 360px;
}

.mentoring-hero h2 {
  margin-bottom: 0.5rem;
}

.mentoring-photo {
  flex: 0 0 auto;
}

.mentoring-photo img {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .mentoring-hero {
    flex-direction: column;
    text-align: center;
  }
}

.mentoring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.mentoring-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--bg-alt);
}

.mentoring-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.mentoring-icon svg {
  width: 22px;
  height: 22px;
}

.mentoring-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.mentoring-card p {
  margin: 0 0 0.75rem;
}

.mentoring-cta {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.mentoring-cta:hover {
  text-decoration: underline;
}

.mentoring-contact {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.75rem;
  text-align: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mentoring-contact h3 {
  margin-top: 0;
}

.mentoring-contact-btn {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.65rem 1.4rem;
  background: var(--accent);
  border: none;
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.mentoring-contact-btn:hover {
  background: var(--accent-hover);
}

/* --- Footer secondary sections: a compact row of inline disclosures.
   [open] gets flex-basis:100% so its panel drops to its own full-width
   line below the link row, instead of stretching that one flex item
   tall inside the row. --- */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.25rem;
}

.footer-section summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8rem;
  list-style: none;
}

.footer-section summary::-webkit-details-marker {
  display: none;
}

.footer-section summary::after {
  content: " \25BE";
  font-size: 0.7em;
}

.footer-section[open] summary::after {
  content: " \25B4";
}

.footer-section summary:hover {
  color: var(--accent);
}

.footer-section[open] {
  flex-basis: 100%;
}

.footer-section[open] summary {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.footer-section p,
.footer-section .link-list {
  max-width: 640px;
}

/* --- Responsive tables: collapse to cards below 720px --- */
@media (max-width: 720px) {
  #jf-table, #tracker-table {
    border: none;
  }

  #jf-table thead, #tracker-table thead {
    display: none;
  }

  #jf-table tbody, #tracker-table tbody {
    display: block;
  }

  #jf-table tr, #tracker-table tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-alt);
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.75rem;
  }

  #jf-table td, #tracker-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    text-align: right;
    padding: 0.3rem 0;
    border-bottom: 1px dashed var(--border);
    max-width: none;
    white-space: normal;
  }

  #jf-table td:last-child, #tracker-table td:last-child {
    border-bottom: none;
  }

  #jf-table td::before, #tracker-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    white-space: nowrap;
  }

  #jf-table td.actions-cell, #tracker-table td.actions-cell {
    justify-content: flex-end;
    gap: 0.5rem;
  }

  .table-wrap--tall {
    max-height: none;
  }
}

/* --- Career profile checkbox groups --- */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.7rem;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: normal;
  color: var(--text);
}

#profile-export-btn,
#profile-delete-btn {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

#profile-export-btn:hover {
  background: var(--border);
}

#profile-delete-btn {
  color: #dc2626;
  border-color: #dc2626;
}

#profile-delete-btn:hover {
  background: #dc2626;
  color: #fff;
}
