/* All resources-page styles.
   Used by the resources page (/resources), frontend/resources.html; loaded in the order the page lists it. */

/* Text can be selected and copied everywhere. */
a[href],
a[href] *,
input:not([type]),
input:is([type="text"], [type="search"], [type="email"], [type="url"], [type="tel"], [type="password"], [type="number"]),
textarea,
[contenteditable="true"],
[contenteditable="true"] *,
[contenteditable=""],
[contenteditable=""] *,
[contenteditable="plaintext-only"],
[contenteditable="plaintext-only"] * {
  -webkit-user-select: text;
  user-select: text;
}

/* Same palette as the tools page in light mode. */
:root {
  --bg: #eef3fc;
  --ink: #14203f;
  --muted: #4b5a7a;
  --line: #d2dcf0;
  --card: #fff;
  --soft: #e7eefc;
  --blue: #23408f;
  --blue-2: #2f55b5;
  --navy: #0d1738;
  --green: #254f40;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-head: var(--font-body);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 var(--font-body);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.brand,
.button,
.eyebrow {
  font-family: var(--font-head);
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid #e0a100;
  outline-offset: 4px;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 10px 16px;
  background: var(--blue);
  color: #fff;
  z-index: 10;
}
.skip-link:focus {
  top: 12px;
}
.container {
  width: min(1120px, calc(100% - 64px));
  margin-inline: auto;
}

.site-header {
  background: var(--navy);
  color: #eef3ff;
}
.header-inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 750;
  font-size: 24px;
  letter-spacing: -1px;
}
.brand-mark {
  width: 39px;
  height: 41px;
  display: grid;
  place-items: center;
  background: var(--green);
  border-radius: 12px;
  color: #fff;
}
.brand-dot {
  color: #8d99ad;
  margin-left: -9px;
}
.header-links {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 14px;
}
.header-links a {
  text-decoration: none;
  color: #eef3ff;
}
.header-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.header-links .emergency-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fbf5ec;
  border: 1px solid #eadfce;
  border-radius: 7px;
  padding: 8px 12px;
  color: #765539;
}


.page-head {
  padding: 48px 0 24px;
  max-width: 760px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--blue-2);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6f8fd6;
}
h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.1;
  letter-spacing: -1.6px;
  font-weight: 800;
  margin-bottom: 14px;
}
h2 {
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.2;
  letter-spacing: -.8px;
  font-weight: 800;
  margin-bottom: 8px;
}
.lead {
  font-size: 17px;
  color: var(--muted);
}
section {
  padding: 28px 0;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 8px #14203f08;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font: 650 15px/1 var(--font-body);
  padding: 13px 18px;
  border-radius: 8px;
  transition: background .2s ease;
}
.button:hover {
  background: #1a3170;
}
.button:disabled {
  opacity: .6;
  cursor: wait;
}
.muted {
  color: var(--muted);
}
.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fbf5ec;
  border: 1px solid #eadfce;
  color: #765539;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  margin-top: 18px;
}
.notice a {
  color: #5c3f22;
  font-weight: 700;
}
.notice svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Ask the AI */
.chat {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  max-height: 520px;
  overflow-y: auto;
}
.chat:empty {
  display: none;
}
.msg {
  padding: 14px 16px;
  border-radius: 12px;
  max-width: 88%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg.user {
  background: var(--blue);
  color: #fff;
  justify-self: end;
  border-bottom-right-radius: 4px;
}
.msg.assistant {
  background: var(--soft);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.msg.assistant[data-state=loading] {
  color: var(--muted);
}
.msg.assistant[data-state=error] {
  background: #fff3ef;
  border-color: #eed1c9;
  color: #8c3e30;
}
.ask-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.ask-form textarea {
  font: inherit;
  min-height: 52px;
  max-height: 160px;
  resize: vertical;
  padding: 13px 15px;
  border: 1px solid #b8c2ce;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.ask-form .button {
  align-self: end;
  height: 52px;
}
.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.examples button {
  font: inherit;
  font-size: 13px;
  border: 1px solid var(--line);
  background: #f3f6fd;
  color: var(--blue);
  border-radius: 20px;
  padding: 6px 12px;
  cursor: pointer;
}
.examples button:hover {
  background: #e2eafb;
}

/* On this page */
.jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}
.jump-links a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  background: #f3f6fd;
  color: var(--blue);
  border-radius: 20px;
  padding: 8px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.jump-links a:hover {
  background: #e2eafb;
}
main section[id] {
  scroll-margin-top: 20px;
}

/* How qualifying works */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.step h3 {
  font-size: 17px;
  margin: 12px 0 6px;
}
.step p,
.step li {
  color: var(--muted);
  font-size: 15px;
}
.step ul {
  padding-left: 18px;
  margin: 8px 0 0;
}
.icon-badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #d5e1f8;
  color: var(--blue);
}
.program-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.program-types .step h3 {
  margin-top: 0;
}

/* Programs and listings */
.toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin: 16px 0;
}
.toolbar label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.toolbar select {
  font: inherit;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #b8c2ce;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.group-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 10px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.item h3 {
  font-size: 17px;
  line-height: 1.35;
}
.item .meta {
  font-size: 13px;
  color: var(--muted);
}
.item p {
  font-size: 14px;
  color: var(--muted);
}
.badge {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: #e2eafb;
  color: var(--blue);
}
.badge.closed {
  background: #fbe9e4;
  color: #8c3e30;
}
.badge.open {
  background: #e3f3e6;
  color: #245b31;
}
.item details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--blue);
}
.item details p {
  margin-top: 8px;
  white-space: pre-line;
}
.item .actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
  margin-top: auto;
  padding-top: 6px;
}
.item .actions a {
  color: var(--blue);
}
.rent {
  font-size: 20px;
  font-weight: 750;
  color: var(--ink);
}
.empty {
  color: var(--muted);
  padding: 12px 0;
}

@media (max-width: 860px) {
  .steps-grid,
  .program-types,
  .grid {
    grid-template-columns: 1fr;
  }
  .header-links>a:not(.emergency-link) {
    display: none;
  }
}
@media (max-width: 560px) {
  .container {
    width: calc(100% - 32px);
  }
  .header-inner {
    height: 70px;
  }
  .brand {
    font-size: 21px;
    gap: 8px;
  }
  .brand-mark {
    width: 33px;
    height: 36px;
    border-radius: 10px;
  }
  .panel {
    padding: 20px;
  }
  .ask-form {
    grid-template-columns: 1fr;
  }
  .msg {
    max-width: 100%;
  }
}
:root {
  color-scheme: light;
}

/* Nothing on the page can be highlighted (text, icons, images); only form fields can. */
img,
svg {
  -webkit-user-drag: none
}
:is(input, textarea, [contenteditable]) {
  -webkit-user-select: text;
  user-select: text
}

/* Google Sans everywhere (code and the repo file list stay monospace). */
html body,
body :not(code):not(pre):not(kbd):not(.repo-tree):not(.repo-tree *):not(svg):not(svg *) {
  font-family: 'Google Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important
}

/* New logo (drawn by backend/make_logo.py): the image carries its own rounded square. */
.brand-mark {
  width: 40px !important;
  height: 40px !important;
  background: none !important;
  border-radius: 12px;
  box-shadow: 0 4px 14px #23408f40;
  overflow: visible
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block
}
@media(max-width:560px) {
  .brand-mark {
    width: 34px !important;
    height: 34px !important
  }
}

/* Default size: the site reads best a bit larger, like 125% browser zoom, on desktop screens. Smaller
       laptops get a gentler step and phones/tablets stay at 100% so layouts never get cramped. */
@media (min-width: 1100px) {
  html {
    zoom: 1.1
  }
}
@media (min-width: 1400px) {
  html {
    zoom: 1.25
  }
}
html,
body {
  overflow-x: clip
}
/* never swipe sideways */
/* "Need help now?" in the navy header: a white glass pill with a warm orange icon, like the front page's area chip. */
.site-header .header-links .emergency-link {
  background: #ffffff17 !important;
  border: 1px solid #ffffff42 !important;
  border-radius: 999px;
  color: #fff !important;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 8px 15px;
  font-weight: 600;
  transition: background .15s, border-color .15s
}
.site-header .header-links .emergency-link svg {
  color: #ffb15c
}
.site-header .header-links .emergency-link:hover {
  background: #ffffff2b !important;
  border-color: #ffffff73 !important;
  text-decoration: none
}
/* Footer: brand and page links on one row, the team credit underneath. */
.cl-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 40px;
  margin-top: 24px;
  color: var(--muted)
}
.cl-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap
}
.cl-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.4px
}
.cl-footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 3px 10px #23408f33
}
.cl-footer-brand span {
  color: #8d99ad;
  margin-left: -8px
}
.cl-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px
}
.cl-footer-links a {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s
}
.cl-footer-links a:hover {
  color: var(--blue-2);
  background: #e2eafb
}
.cl-footer-credit {
  margin: 18px auto 0;
  padding-top: 18px;
  border-top: 1px solid #d2dcf099;
  font-size: 13.5px;
  line-height: 1.6
}
.cl-footer-credit b {
  color: var(--ink);
  font-weight: 600
}
@media (max-width: 640px) {
  .cl-footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center
  }
  .cl-footer-links {
    justify-content: center
  }
  .cl-footer-credit {
    text-align: center
  }
}
.cl-footer {
  text-align: left
}
.cl-footer-note {
  margin: 18px auto 0;
  padding-top: 18px;
  border-top: 1px solid #d2dcf099;
  font-size: 13.5px;
  line-height: 1.6
}
.cl-footer-note+.cl-footer-credit {
  margin-top: 6px;
  padding-top: 0;
  border-top: 0
}
.cl-footer-links a[aria-current="page"] {
  color: var(--blue-2);
  background: #e2eafb
}
@media (max-width: 640px) {
  .cl-footer-note {
    text-align: center
  }
}

/* Gemma's sort box right above the program cards: the programs that fit move to the top of the list (an instant order
   from the words, then Gemma's). */
.sort-chat {
  margin: 4px 0 22px;
  padding: 16px;
  border-radius: 24px;
  background: radial-gradient(120% 100% at 15% 0%, #ffffffeb, #ffffff00 60%), linear-gradient(140deg, #ffffffd9, #eef3ffb3);
  border: 1px solid #ffffffe6;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #23408f1a, 0 12px 32px #23408f1f;
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.sort-title {
  margin: 0 0 10px 4px;
  font-size: 18px;
  color: var(--ink);
}
.sort-form {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sort-avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8f0fe;
}
.sort-form input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #c9d5ea;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}
.sort-form input:focus-visible {
  outline: 2px solid var(--blue-2);
  outline-offset: 1px;
}
.sort-form button {
  flex: none;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid #ffffff33;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: radial-gradient(120% 100% at 15% 0%, #ffffff38, #ffffff00 55%), linear-gradient(140deg, #14203fe6, #23408fbf);
  box-shadow: inset 0 1px 0 #ffffff59, 0 8px 22px #14203f33;
}
.sort-form button:hover {
  background: radial-gradient(120% 100% at 15% 0%, #ffffff4d, #ffffff00 55%), linear-gradient(140deg, #1d2e5af0, #2f55b5d1);
}
.sort-reply {
  margin: 10px 6px 4px 52px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}
.sort-reply > b {
  color: var(--blue);
}
.sort-reply[data-state=loading] #sort-text {
  color: var(--muted);
}
.sort-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0 52px;
}
.sort-chip {
  min-height: 34px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid #ffffffd9;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #14203f;
  cursor: pointer;
  background: radial-gradient(120% 100% at 15% 0%, #ffffffeb, #ffffff00 60%), linear-gradient(140deg, #ffffffbf, #eef3fd8f);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #23408f24, 0 4px 12px #14203f12;
}
.sort-chip:hover {
  background: radial-gradient(120% 100% at 15% 0%, #fff, #ffffff00 60%), linear-gradient(140deg, #ffffffe0, #e3ebfcb3);
}
.item.ranked {
  border-color: #6f8fd6;
  box-shadow: 0 0 0 1px #6f8fd666, 0 10px 26px #23408f1a;
}
.badge.fit {
  background: #23408f;
  color: #fff;
}
@media (max-width: 560px) {
  .sort-chat {
    padding: 12px;
  }
  .sort-reply,
  .sort-chips {
    margin-left: 4px;
  }
  .sort-form button {
    padding: 10px 16px;
  }
}
