/* Colours come from the cruitme logo. Logo blue is too light for white text, so buttons
   and links use a deeper shade of it; logo blue is kept for highlights and focus rings. */
:root {
  --charcoal: #323232;
  --blue: #4397f7;        /* logo blue: the i, highlights, focus */
  --blue-deep: #1f6fd1;   /* buttons and links */
  --blue-deeper: #16529c; /* hover */
  --blue-tint: #e3effe;
  --blue-ink: #1a5db0;    /* text on blue tint */
  --grey: #dcdcdc;        /* logo grey: header band */
  --ground: #ededed;      /* page background */
  --line: #d2d2d2;
  --white: #ffffff;
  --muted: #5e5e5e;
  --body-text: #4a4a4a;
  --red: #c7362f;
  --green: #2f8a52;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(50, 50, 50, .06), 0 4px 16px rgba(50, 50, 50, .05);
  --head: 'Questrial', 'Century Gothic', 'Avenir Next', system-ui, sans-serif;
  --body: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  color: var(--charcoal);
  background: var(--ground);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-deep); }
a:hover { color: var(--blue-deeper); }
h1, h2, h3 { font-family: var(--head); font-weight: 400; margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Header: the logo sits on its own grey */
.top {
  background: var(--grey);
  border-bottom: 1px solid #cfcfcf;
  position: sticky; top: 0; z-index: 10;
}
/* Cards fade into the page grey as they scroll up under the header. Hidden at the top of the
   page so it never covers the title or filters. */
.top::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 32px; pointer-events: none;
  background: linear-gradient(var(--ground), rgba(237, 237, 237, 0));
  opacity: 0; transition: opacity .2s ease;
}
.scrolled .top::after { opacity: 1; }
.top-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 24px;
}
.wordmark { display: flex; align-items: center; border-radius: 8px; }
.wordmark img { height: 44px; width: auto; display: block; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  font-family: var(--head); text-decoration: none; color: var(--charcoal);
  padding: 10px 16px; border-radius: 999px; font-size: 16px; display: inline-flex; align-items: center;
}
.nav a:hover { background: rgba(255, 255, 255, .55); color: var(--charcoal); }
.nav a.active { background: var(--white); }
.badge {
  display: inline-block; min-width: 22px; padding: 0 7px; margin-left: 8px; border-radius: 999px;
  background: var(--blue-deep); color: var(--white); font-family: var(--body); font-size: 12px; font-weight: 600;
  text-align: center; line-height: 20px;
}

main { max-width: 1120px; margin: 0 auto; padding: 36px 24px 48px; }
.site-foot {
  max-width: 1120px; margin: 0 auto; padding: 20px 24px 32px; border-top: 1px solid #dedede;
  text-align: center; color: var(--muted); font-size: 13px;
}
.site-foot a { color: var(--charcoal); font-weight: 500; text-decoration-color: var(--blue); text-underline-offset: 3px; }
.site-foot a:hover { color: var(--blue-deep); }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.01em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head .spacer { flex: 1; }

/* Controls */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
input, select, textarea {
  font: inherit; font-size: 15px; color: inherit; background: var(--white);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
}
input::placeholder { color: #6b6b6b; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--blue); outline-offset: -1px; border-color: transparent; }
.toolbar input[type=search] { flex: 1; min-width: 220px; border-radius: 999px; padding: 11px 18px; min-height: 44px; }
.seg { display: inline-flex; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button {
  border: 0; background: none; padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; color: var(--charcoal); white-space: nowrap;
}
.seg button:hover { background: var(--ground); }
.seg button.on { background: var(--charcoal); color: var(--white); }
.seg .count { margin-left: 6px; font-size: 12px; font-variant-numeric: tabular-nums; color: #6b6b6b; }
.seg .count:empty { display: none; }
.seg button.on .count { color: var(--grey); }

.btn {
  font: inherit; font-size: 14px; font-weight: 500; border: 1px solid var(--line); background: var(--white); color: var(--charcoal);
  padding: 10px 18px; min-height: 44px; border-radius: 999px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn:hover { border-color: #b5b5b5; color: var(--charcoal); }
.btn.primary { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--white); font-weight: 600; }
.btn.primary:hover { background: var(--blue-deeper); border-color: var(--blue-deeper); color: var(--white); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--ground); }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: .5; cursor: default; }
.page-head .btn.primary { font-size: 15px; padding: 12px 22px; }

/* Job cards (list) */
.jobs { display: grid; gap: 12px; }
.job {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; display: grid; grid-template-columns: 1fr auto; gap: 6px 20px;
}
.job h3 { font-size: 21px; line-height: 1.3; }
.job h3 a { color: var(--charcoal); text-decoration: none; }
.job h3 a:hover { color: var(--blue-deep); }
.job .meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.job .meta span:first-child { color: var(--charcoal); font-weight: 500; }
.job .desc { grid-column: 1 / -1; color: var(--body-text); font-size: 14px; margin: 6px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job .actions { display: flex; gap: 8px; align-items: flex-start; grid-row: 1 / 3; grid-column: 2; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--ground); color: var(--charcoal); }
.tag.remote { background: var(--blue-tint); color: var(--blue-ink); }
.tag.contract { background: var(--white); border: 1px solid var(--charcoal); padding: 1px 9px; }
.tag.sample { background: #fff2d6; color: #7a4f00; }

.empty {
  background: var(--white); border-radius: var(--radius); padding: 44px 24px; text-align: center; color: var(--muted);
}
.empty h2 { color: var(--charcoal); font-size: 24px; margin-bottom: 6px; }

/* Swipe */
.swipe-wrap { max-width: 440px; margin: 0 auto; }
.deck { position: relative; height: min(66vh, 560px); margin: 8px 0 20px; }
.swipe-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
.swipe-filters::-webkit-scrollbar { display: none; }
.swipe-filters .seg { flex: none; }
.swipe-filters .seg button { font-size: 13px; padding: 7px 12px; }
.swipe-filters + .deck { height: min(60vh, 520px); }
.card {
  position: absolute; inset: 0; background: var(--white); border-radius: 26px;
  box-shadow: 0 2px 6px rgba(50, 50, 50, .06), 0 18px 40px rgba(50, 50, 50, .12);
  padding: 26px 24px; display: flex; flex-direction: column; gap: 12px; overflow: hidden;
  touch-action: none; user-select: none; will-change: transform; transition: transform .25s ease, opacity .25s ease;
}
.card.dragging { transition: none; }
.card.behind { transform: scale(.95) translateY(14px); opacity: .6; box-shadow: 0 2px 10px rgba(50, 50, 50, .06); }
.card h2 { font-size: 30px; line-height: 1.15; letter-spacing: -.01em; }
.card .company { font-size: 17px; font-weight: 500; }
.card .meta { color: var(--muted); display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.card .meta .row { display: flex; align-items: center; gap: 10px; }
.card .meta svg { flex: none; color: var(--charcoal); }
.card .desc { color: var(--body-text); font-size: 15px; line-height: 1.55; flex: 1; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.card .stamp {
  position: absolute; top: 22px; padding: 4px 12px; border: 3px solid; border-radius: 10px;
  font-family: var(--head); font-size: 22px; opacity: 0; transform: rotate(-12deg); background: var(--white);
}
.card .stamp.yes { left: 20px; color: var(--blue-deep); }
.card .stamp.no { right: 20px; color: var(--charcoal); transform: rotate(12deg); }
.swipe-buttons { display: flex; justify-content: center; align-items: center; gap: 22px; }
.round {
  width: 68px; height: 68px; border-radius: 50%; border: 1px solid var(--line); background: var(--white);
  box-shadow: 0 4px 14px rgba(50, 50, 50, .10); cursor: pointer; display: grid; place-items: center; color: var(--charcoal);
}
.round:hover { border-color: #b5b5b5; }
.round.yes {
  color: var(--white); background: var(--blue-deep); border: 0;
  box-shadow: 0 0 0 5px rgba(67, 151, 247, .25), 0 6px 16px rgba(31, 111, 209, .35);
}
.round.yes:hover { background: var(--blue-deeper); }
.round.small { width: 50px; height: 50px; box-shadow: none; }
.more { text-align: center; color: var(--muted); font-size: 13px; min-height: 1px; padding: 12px 0; }
.more:empty { padding: 0; }
.hint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 14px; }

/* Sources */
.panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.notice { background: #fff8e6; border: 1px solid #f3dfae; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.src-group h2 { font-size: 22px; margin: 24px 0 10px; }
.src {
  background: var(--white); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 8px;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
}
.src.off { opacity: .55; }
.src .name { font-weight: 600; }
.src .info { color: var(--muted); font-size: 13px; }
.src .acts { display: flex; gap: 6px; grid-row: 1 / 3; grid-column: 2; flex-wrap: wrap; justify-content: flex-end; }
.method { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; padding: 2px 8px; border-radius: 999px; background: var(--ground); margin-left: 8px; font-weight: 600; }
.method.api { background: var(--blue-tint); color: var(--blue-ink); }
.method.rss { background: #e6f4ec; color: var(--green); }

dialog { border: 0; border-radius: 22px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(50, 50, 50, .45); }
dialog form { padding: 22px 24px; display: grid; gap: 12px; }
dialog label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
dialog .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
dialog .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--charcoal); color: var(--white);
  padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 50; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* Login and offline pages */
.solo { min-height: 100vh; display: flex; flex-direction: column; }
.solo-main { flex: 1; width: 100%; max-width: 420px; margin: 0 auto; padding: 48px 20px 32px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.solo-logo { height: 64px; width: auto; }
.solo-panel { width: 100%; display: grid; gap: 14px; padding: 26px 24px; }
.solo-panel h1 { font-size: 28px; }
.solo-panel p { margin: 0; color: var(--muted); }
.solo-panel label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.solo-panel input { font-size: 16px; min-height: 48px; }
.solo-panel .btn.primary { justify-content: center; font-size: 16px; min-height: 48px; }
.solo .site-foot { border-top: 0; padding-bottom: 24px; }
.form-error { color: var(--red) !important; font-size: 14px; }
.solo-note { font-size: 13px; text-align: center; }
.foot-user { display: block; margin-bottom: 6px; }
.linklike { font: inherit; color: var(--charcoal); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 3px; }

/* Mobile: nav moves to a bottom bar */
@media (max-width: 720px) {
  .top-inner { padding: 10px 16px; justify-content: center; }
  .wordmark img { height: 34px; }
  main { padding: 20px 16px 40px; }
  .site-foot { padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }
  .page-head h1 { font-size: 30px; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; background: var(--white); border-top: 1px solid var(--line);
    justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); margin: 0; z-index: 20;
  }
  .nav a { font-size: 14px; padding: 10px 12px; }
  .nav a.active { background: var(--charcoal); color: var(--white); }
  .job { grid-template-columns: 1fr; padding: 18px; }
  .job .actions { grid-row: auto; grid-column: 1; }
  .src { grid-template-columns: 1fr; }
  .src .acts { grid-row: auto; grid-column: 1; justify-content: flex-start; }
  dialog .row { grid-template-columns: 1fr; }
}
