/* manus.im's header (centered title, search, tabs) over skills.sh's ranked table, dressed as
   www.codedroid.com: off-white paper, green-black ink, forest green for actions and the accent word.
   Type as there too: Host Grotesk throughout, Newsreader for headings, Geist Mono for labels.
   Light only, as there. */
:root {
  --paper: #fafbf8;
  --ink: #1d2b23;
  --ink-soft: #59665e;
  --ink-muted: #68736c;
  --card: #ffffff;
  --wash: hsl(110 19% 94%);
  --brand: #176341;
  --button: #176341;
  --button-ring: #0f4b30;
  --on-button: #ffffff;
  --error: #b5261b;
  --line: hsl(111 12% 88%);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1 { font: 500 2.5rem/1 var(--serif); letter-spacing: -0.045em; text-wrap: balance; }
.accent { color: var(--brand); font-style: normal; }
.lede, .pitch { color: var(--ink-soft); font-size: 1.0625rem; text-wrap: pretty; }
/* skills.sh's small caps-like mono labels. */
.label {
  font: 400 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

/* Top bar, as on manus.im: logo left, sections centered, account and the app on the right. */
.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 16px;
  font-size: 0.875rem;
}
.logo { display: flex; align-items: center; gap: 8px; font: 500 1.0625rem var(--sans); letter-spacing: -0.01em; text-decoration: none; }
.sections { display: flex; gap: 28px; }
.sections a { color: var(--ink-soft); text-decoration: none; }
.sections a[aria-current] { color: var(--ink); font-weight: 500; }
.account { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.account a, .account button {
  color: var(--ink-soft);
  text-decoration: none;
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.account a:hover, .account button:hover { color: var(--ink); }
/* The site's green button: a 1px darker ring and a faint top highlight. */
.account .get, .cta {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--button);
  color: var(--on-button);
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 0 0 1px var(--button-ring), 0 1px 2px rgb(15 75 48 / 0.16);
}
.account .get:hover, .cta:hover { color: var(--on-button); background: var(--button-ring); }

.page { display: flex; flex-direction: column; gap: 40px; max-width: 1100px; margin: 0 auto; padding: 56px 16px 80px; }

/* Hero: one centered line and its subtitle. Once a search starts it folds away, as on skills.sh,
   and the board moves up to the top: `searching` is on the body (search.js sets it as you type; a
   page opened on a search has it already). The one-row grid is what lets its height go from auto
   to 0 smoothly. */
.hero { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 300ms ease, opacity 200ms ease; }
.hero > div { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; min-height: 0; overflow: hidden; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
.hero .pitch { max-width: 560px; color: var(--ink-soft); font-size: 1.125rem; }
.page { transition: gap 300ms ease; }
.searching .page { gap: 0; }
.searching .hero { grid-template-rows: 0fr; opacity: 0; }

/* The board: search, the three lists, category chips, the table. */
.board { display: flex; flex-direction: column; gap: 16px; }
/* What search.js swaps in as you type, laid out as if it weren't there: the board's gap still
   spaces the tabs, chips and table. */
#results { display: contents; }
.search input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.tabs { display: flex; gap: 8px; }
.tabs a { padding: 6px 12px; border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-size: 0.875rem; }
.tabs a[aria-current] { background: var(--wash); color: var(--ink); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font: 0.75rem var(--mono);
}
.chips a[aria-current] { background: var(--button); border-color: var(--button); color: var(--on-button); }

.ranks { width: 100%; border-collapse: collapse; }
.ranks th {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-muted);
  font: 400 0.6875rem var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
}
.ranks td { padding: 14px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ranks tbody tr:hover { background: var(--wash); }
.ranks .rank { width: 40px; color: var(--ink-muted); font: 0.8125rem var(--mono); }
.ranks .name { font-weight: 600; text-decoration: none; margin-right: 10px; }
.ranks .name:hover { text-decoration: underline; }
.ranks .meta { color: var(--ink-muted); font: 0.75rem var(--mono); }
.ranks .muted { color: var(--ink-muted); font-size: 0.8125rem; }
.ranks .num { text-align: right; font: 0.8125rem var(--mono); white-space: nowrap; }
.spark { display: block; }
.spark polyline { fill: none; stroke: var(--brand); stroke-width: 1.25; stroke-linejoin: round; }
.empty { color: var(--ink-soft); padding: 24px 0; }
.more summary { cursor: pointer; color: var(--ink-soft); padding: 12px 0; }
.part { font: 500 1.375rem/1.2 var(--serif); letter-spacing: -0.02em; color: var(--ink); margin: 24px 0 8px; }
/* From the first keystroke until a search's results land (search.js marks the board busy), the
   rows turn into placeholders, as skills.sh's do; the rank numbers stay. */
.board[aria-busy="true"] .ranks tbody :is(.name, .meta, td > span) {
  color: transparent;
  background: var(--line);
  border-radius: 4px;
  animation: skeleton 900ms ease-in-out infinite alternate;
}
.board[aria-busy="true"] .ranks .spark { visibility: hidden; }
.board[aria-busy="true"] .empty { opacity: 0.4; }
@keyframes skeleton { to { opacity: 0.45; } }
/* Then the new rows rise in one after another (each row's --i is its place; past 12 they come in
   together), and so does "No skills match". Only rows a search swaps in: data-loaded is set by
   search.js. */
.board[data-loaded] .ranks tbody tr {
  animation: row-in 260ms ease both;
  animation-delay: calc(min(var(--i, 0), 12) * 30ms);
}
.board[data-loaded] .empty { animation: row-in 260ms ease both; }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  .hero, .page { transition: none; }
  .board[aria-busy="true"] .ranks tbody :is(.name, .meta, td > span) { animation: none; }
  .board[data-loaded] :is(.ranks tbody tr, .empty) { animation: none; }
}
.pager { display: flex; justify-content: space-between; font-size: 0.875rem; }
.pager a { color: var(--ink-soft); text-decoration: none; }
.pager a:hover { color: var(--ink); }
.pager [rel="next"] { margin-left: auto; }

/* Sign-in and messages. */
.signin, .intro { display: flex; flex-direction: column; gap: 16px; max-width: 520px; }
.g_id_signin { min-height: 44px; color-scheme: light; }
.error { color: var(--error); }

/* One skill. */
.skill { display: flex; flex-direction: column; gap: 24px; max-width: 760px; }
.skill header { display: flex; flex-direction: column; gap: 8px; }
.back { color: var(--ink-muted); text-decoration: none; }
.by { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink-muted); font: 0.8125rem var(--mono); }
.badge {
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 500 0.6875rem/1.6 var(--mono);
}
.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; }
.facts dt { color: var(--ink-muted); font: 400 0.6875rem var(--mono); text-transform: uppercase; letter-spacing: 0.14em; }
.facts dd { margin: 0; font-weight: 600; }
.facts small { color: var(--ink-muted); font-weight: 400; }
.note { padding: 12px 16px; border-left: 2px solid var(--brand); color: var(--ink-soft); }
.cta {
  align-self: flex-start;
  padding: 10px 18px;
  font-size: 0.9375rem;
  text-decoration: none;
}
.skill section { display: flex; flex-direction: column; gap: 12px; }
.prompt {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  font: 0.8125rem/1.65 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.histogram { display: grid; gap: 4px; max-width: 360px; padding: 0; list-style: none; }
.histogram li { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; gap: 8px; font: 0.75rem var(--mono); color: var(--ink-muted); }
.histogram meter { width: 100%; height: 6px; }
.comments { display: flex; flex-direction: column; padding: 0; list-style: none; }
.comments li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.who, .more { color: var(--ink-muted); font: 0.75rem var(--mono); }

@media (max-width: 720px) {
  .bar { grid-template-columns: auto 1fr; }
  .sections { display: none; }
  .ranks .wide { display: none; }
  .ranks .meta { display: block; margin-top: 2px; }
}
