/* Tamrat Damtew - site styles. System fonts only: no third-party requests. */
:root {
  --bg: #ffffff;
  --band: #f5f7fb;
  --text: #16202f;
  --muted: #5b6675;
  --line: #e1e6ee;
  --accent: #1f4fd1;
  --accent-text: #ffffff;
  --card: #ffffff;
  --ok: #17703a;
  --warn: #9a5b00;
  --err: #b42318;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 1px 3px rgb(16 24 40 / 8%);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141c;
    --band: #141b26;
    --text: #e6ebf2;
    --muted: #9aa5b4;
    --line: #263142;
    --accent: #7aa2ff;
    --accent-text: #0b1220;
    --card: #182130;
    --ok: #5fd08a;
    --warn: #f0b45a;
    --err: #ff8a80;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-underline-offset: 2px; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
section.wrap, .band > .wrap { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.band { background: var(--band); border-block: 1px solid var(--line); }
.sub { color: var(--muted); max-width: 70ch; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: .88rem; margin-top: 1rem; }
.small { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 1.2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--card); padding: .5rem 1rem; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; flex-wrap: wrap; }
.nav ul { display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--accent); }
.brand { font-weight: 700; }

/* hero */
.hero { padding-top: 4.5rem; padding-bottom: 4rem; }
.eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .04em; margin-bottom: .75rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); max-width: 20ch; letter-spacing: -.02em; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 68ch; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.5rem 0; }
.facts li { border: 1px solid var(--line); border-radius: 999px; padding: .25rem .8rem; font-size: .9rem; background: var(--card); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* buttons + forms */
.button { display: inline-block; background: var(--accent); color: var(--accent-text); border: 1px solid var(--accent);
  border-radius: 10px; padding: .65rem 1.15rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.button:hover { filter: brightness(1.08); }
.button.ghost { background: transparent; color: var(--accent); }
.button:disabled { opacity: .6; cursor: progress; }
input, textarea { width: 100%; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: .65rem .8rem; }
input:focus, textarea:focus, .button:focus-visible, .chip:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

.ask { display: flex; gap: .6rem; margin-top: 1.5rem; }
.ask input { flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.chip { font: inherit; font-size: .88rem; color: var(--text); background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: .3rem .8rem; cursor: pointer; }
.chip:hover { border-color: var(--accent); }

.answer { margin-top: 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem; box-shadow: var(--shadow); }
.answer .text { white-space: pre-wrap; margin: 0; }
.answer .sources { margin: .8rem 0 0; padding: 0; list-style: none; font-size: .85rem; color: var(--muted); }
.answer .sources li::before { content: "↳ "; }
.answer.error { border-color: var(--err); }
.status-ok { color: var(--ok); font-weight: 600; }
.status-wait { color: var(--warn); font-weight: 600; }
.status-no { color: var(--err); font-weight: 600; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 760px; margin-top: 1.5rem; }
.form label { display: grid; gap: .35rem; font-size: .92rem; font-weight: 600; }
.form .full, .form .button { grid-column: 1 / -1; }
.form .button { justify-self: start; }

/* cards */
.grid { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.tag { font-size: .75rem; font-weight: 600; vertical-align: middle; color: var(--accent); border: 1px solid currentColor;
  border-radius: 999px; padding: .05rem .55rem; margin-left: .35rem; white-space: nowrap; }
.ticks { padding-left: 1.1rem; margin: 0; }
.ticks li { margin-bottom: .45rem; }
.links { list-style: none; padding: 0; margin: .25rem 0 0; }
.links li { margin-bottom: .5rem; }
.contact { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.timeline li { display: grid; grid-template-columns: 11rem 1fr; gap: 1.25rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline .when { color: var(--muted); font-variant-numeric: tabular-nums; padding-top: .1rem; }
.timeline h3 { margin-bottom: .3rem; }
.timeline p { margin: 0; color: var(--muted); }

/* long-form pages */
.prose { max-width: 760px; padding-top: 3rem; padding-bottom: 3rem; }
.prose h1 { font-size: 2.1rem; }
.prose h2 { font-size: 1.3rem; margin-top: 2rem; }
.prose li { margin-bottom: .4rem; }

.footer { padding-top: 2rem; padding-bottom: 3rem; color: var(--muted); font-size: .9rem; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .grid.two, .grid.three, .form { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: .25rem; }
  .nav ul { gap: .8rem; }
  .ask { flex-direction: column; }
  .hero { padding-top: 3rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- app pages: /demo and /admin ---------- */
.app-page { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.app-page h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.25rem; margin-top: 1.5rem; align-items: start; }
.split.wide-left { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 1.25rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); min-width: 0; }
.panel.narrow { max-width: 440px; margin: 2rem auto; }
.panel-title { font-size: 1.05rem; margin: 0 0 .75rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.panel-head .panel-title { margin: 0; }
.inline { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); }
select { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; }

.log { height: 26rem; overflow-y: auto; display: flex; flex-direction: column; gap: .55rem; padding: .25rem .1rem 1rem; }
.chat .log .chips { margin-top: .25rem; }
.msg { max-width: 88%; padding: .6rem .85rem; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-text); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--band); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.step { align-self: flex-start; font: .8rem/1.4 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--muted); overflow-wrap: anywhere; }
.step.bad { color: var(--err); }
.step.cost { opacity: .8; }
.decide { align-self: stretch; border: 1px solid var(--warn); border-radius: var(--radius); padding: .8rem 1rem; background: color-mix(in srgb, var(--warn) 8%, var(--card)); }
.decide ul { margin: .2rem 0 .8rem; padding-left: 1.1rem; font: .85rem/1.5 ui-monospace, "Cascadia Code", Consolas, monospace; overflow-wrap: anywhere; }
.decide p { margin: 0 0 .3rem; }
.composer { display: flex; gap: .6rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.composer input { flex: 1; min-width: 0; }

.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.button.danger { color: var(--err); border-color: var(--err); }
.form.one { grid-template-columns: 1fr; }

.board { max-height: 32rem; overflow-y: auto; }
.jobs { list-style: none; margin: 0; padding: 0; }
.jobs li { padding: .7rem .4rem; border-top: 1px solid var(--line); }
.jobs li:first-child { border-top: 0; }
.jobs.selectable li { cursor: pointer; border-radius: 8px; }
.jobs.selectable li:hover, .jobs.selectable li.active { background: var(--band); }
.job-head { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.note { font-size: .85rem; color: var(--muted); margin-top: .3rem; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; }
pre.note { background: var(--band); border: 1px solid var(--line); border-radius: 8px; padding: .7rem; margin: 0; }

.badge { font-size: .75rem; font-weight: 600; border-radius: 999px; padding: .1rem .55rem; white-space: nowrap; border: 1px solid currentColor; }
.s-saved, .s-withdrawn { color: var(--muted); }
.s-shortlisted, .s-applied { color: var(--accent); }
.s-interviewing { color: var(--warn); }
.s-offer { color: var(--ok); }
.s-rejected { color: var(--err); }

.facts-list { display: grid; grid-template-columns: 6.5rem 1fr; gap: .35rem .75rem; margin: 0 0 1rem; font-size: .93rem; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; overflow-wrap: anywhere; }
.actions select { min-width: 9rem; }
.how { margin-top: 1.5rem; }
.how summary, .add summary { cursor: pointer; font-weight: 600; }
.add { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .9rem; }

@media (max-width: 860px) {
  .split, .split.wide-left { grid-template-columns: 1fr; }
  .log { height: 22rem; }
}

/* rate-limit feedback ("7 of 10 questions left") */
.quota { margin-top: .5rem; }
