/* TopSelfHosted design layer (2026-11-16), loaded after Bulma (mystyles.css).
   Tokens first; Bulma's own variables are pointed at them so its forms, buttons and grid
   match. Brand orange is the logo's #d75f33. */

:root {
  color-scheme: light dark;
  --ink: #15171c;
  --ink-2: #3a3f4a;
  --muted: #6b7280;
  --faint: #9aa0aa;
  --line: #e7e5e0;
  --line-strong: #d8d5ce;
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --brand: #d75f33;
  --brand-ink: #b54a22;
  --brand-soft: #fbeee8;
  --up: #15803d;
  --up-soft: #e8f5ec;
  --warn: #a16207;
  --warn-soft: #fdf6e3;
  --header: #14161a;
  --on-ink: #ffffff;
  --row-hover: #fcfbf9;
  --warn-line: #f1e2b8;
  --star: #e0a43a;
  --icon-bg: var(--surface-2);
  --header-line: #23262d;
  --hero-bg: #14161a;
  --board-icon-bg: #2a2e36;
  --btn-dark-bg: #14161a;
  --btn-dark-fg: #ffffff;
  --btn-dark-hover: #2a2e36;
  --link-underline: rgba(215, 95, 51, .35);
  --cta-bg: #14161a;
  --cta-line: transparent;
  --footer-bg: #14161a;
  --footer-line: transparent;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 2px 8px rgba(20, 22, 26, .04);
  --shadow-hover: 0 2px 4px rgba(20, 22, 26, .06), 0 8px 24px rgba(20, 22, 26, .08);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --bulma-family-primary: var(--font);
  --bulma-family-code: var(--mono);
  --bulma-body-background-color: var(--bg);
  --bulma-scheme-main: var(--surface);
  --bulma-text: var(--ink-2);
  --bulma-text-strong: var(--ink);
  --bulma-border: var(--line-strong);
  --bulma-radius: var(--radius-sm);
  --bulma-radius-large: var(--radius);
  --bulma-link-h: 16deg;
  --bulma-link-s: 67%;
  --bulma-link-l: 42%;
  --bulma-primary-h: 16deg;
  --bulma-primary-s: 67%;
  --bulma-primary-l: 52%;
}

html { background: var(--bg); scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--ink); text-decoration-color: transparent; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--brand-ink); }
.content a:not(.button):not(.tag) { color: var(--brand-ink); text-decoration: underline; text-decoration-color: var(--link-underline); text-underline-offset: 2px; }
.content a:not(.button):not(.tag):hover { text-decoration-color: currentColor; }
.title, .subtitle strong { color: var(--ink); letter-spacing: -0.02em; }
.title.is-1, .title.is-2 { font-weight: 800; letter-spacing: -0.035em; }
.mono, code, pre, kbd { font-family: var(--mono); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.container { padding-left: 16px; padding-right: 16px; }
@media (min-width: 1024px) { .container { padding-left: 24px; padding-right: 24px; } }
.section { padding: 3rem 0; }
@media (max-width: 768px) { .section { padding: 2rem 0; } }

/* ---------- header ---------- */
.site-header { background: var(--header); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--header-line); }
.site-header .navbar { background: transparent; min-height: 60px; }
.site-header .navbar-brand .navbar-item { padding: 0 .75rem 0 0; }
.site-header .logo { height: 36px; width: auto; max-height: none; }
.site-header .navbar-item, .site-header .navbar-link { color: #c9ccd3; font-size: .95rem; font-weight: 500; }
.site-header a.navbar-item:hover, .site-header .navbar-link:hover,
.site-header .navbar-item.has-dropdown:hover .navbar-link,
.site-header a.navbar-item.is-active, .site-header .navbar-link.is-active { color: #fff; background: transparent; }
.site-header .navbar-link:not(.is-arrowless)::after { border-color: #8b909a; }
.site-header .navbar-dropdown { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-hover); padding: .5rem; min-width: 320px; }
.site-header .navbar-dropdown .navbar-item { color: var(--ink-2); border-radius: var(--radius-sm); padding: .5rem .75rem; display: flex; gap: .75rem; align-items: flex-start; }
.site-header .navbar-dropdown .navbar-item:hover { background: var(--surface-2); color: var(--ink); }
.site-header .navbar-dropdown .navbar-item i { color: var(--brand); width: 1.1rem; margin-top: .2rem; text-align: center; }
.site-header .navbar-dropdown small { color: var(--muted); display: block; font-size: .78rem; line-height: 1.3; }
.site-header .navbar-burger { color: #fff; }
.site-header .navbar-burger span { background-color: #fff; }
.header-search { position: relative; }
.header-search input { background: #22252c; border: 1px solid #30343c; color: #fff; border-radius: 999px; height: 2.25rem; padding-left: 2.2rem; width: 220px; font-size: .9rem; box-shadow: none; }
.header-search input::placeholder { color: #8b909a; }
.header-search input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(215, 95, 51, .25); }
.header-search .fa-magnifying-glass { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #8b909a; font-size: .85rem; }
@media (max-width: 1023px) {
  .site-header .navbar-menu { background: var(--header); box-shadow: none; padding: .5rem 0 1rem; }
  .site-header .navbar-dropdown { display: none; }
  .site-header .navbar-link::after { display: none; }
  .header-search input { width: 100%; }
}

/* ---------- buttons, tags, chips ---------- */
.button { font-weight: 600; border-radius: var(--radius-sm); }
.button.is-brand { background: var(--brand); color: #fff; border-color: transparent; }
.button.is-brand:hover { background: var(--brand-ink); color: #fff; }
.button.is-ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.button.is-ghost-light:hover { border-color: #fff; color: #fff; }
.button.is-outline { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); }
.button.is-outline:hover { border-color: var(--ink); color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .85rem; font-weight: 500; line-height: 1.3; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
a.chip:hover { border-color: var(--brand); color: var(--brand-ink); }
.chip .count { color: var(--faint); font-family: var(--mono); font-size: .75rem; }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip.is-active .count { color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.badge { display: inline-block; font-size: .7rem; font-weight: 600; padding: .1rem .45rem; border-radius: 4px; text-transform: uppercase; letter-spacing: .03em; vertical-align: middle; }
.badge.is-archived { background: var(--warn-soft); color: var(--warn); }
.badge.is-new { background: var(--up-soft); color: var(--up); }

/* ---------- page header band ---------- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 2.25rem 0 1.75rem; }
.page-head .title { margin-bottom: .5rem; }
.page-head .lead { color: var(--muted); font-size: 1.05rem; max-width: 46rem; }
.eyebrow { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-ink); margin-bottom: .5rem; display: block; }
.breadcrumb { font-size: .85rem; margin-bottom: 1rem !important; }
.breadcrumb a { color: var(--muted); padding: 0 .5em; }
.breadcrumb li:first-child a { padding-left: 0; }
.breadcrumb a:hover { color: var(--brand-ink); }
.breadcrumb li.is-active a { color: var(--ink); }

/* ---------- home hero ---------- */
.hero-home { background: var(--hero-bg); color: #c9ccd3; padding: 4rem 0 3.5rem; position: relative; overflow: hidden; }
.hero-home::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, #000 40%, transparent); pointer-events: none; }
.hero-home .container { position: relative; }
.hero-home h1 { color: #fff; font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.04em; margin-bottom: 1rem; }
.hero-home h1 .prompt { color: var(--brand); font-family: var(--mono); font-weight: 600; }
.hero-home .lead { font-size: 1.15rem; color: #aeb3bc; max-width: 34rem; margin-bottom: 1.75rem; }
.hero-search { display: flex; gap: .5rem; max-width: 34rem; }
.hero-search .input { height: 3rem; border-radius: var(--radius-sm); border: 1px solid #30343c; background: #1d2026; color: #fff; font-size: 1rem; padding-left: 2.75rem; }
.hero-search .input::placeholder { color: #7d828c; }
.hero-search .input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(215, 95, 51, .3); }
.hero-search .control { flex: 1; position: relative; }
.hero-search .control i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #7d828c; z-index: 2; }
.hero-search .button { height: 3rem; padding: 0 1.4rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 1.75rem; margin-top: 2rem; }
.hero-stats div { font-size: .85rem; color: #8b909a; }
.hero-stats strong { display: block; color: #fff; font-family: var(--mono); font-size: 1.35rem; font-weight: 600; }
.hero-quick { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .85rem; }
.hero-quick span { color: #7d828c; margin-right: .25rem; }
.hero-quick a { color: #c9ccd3; border: 1px solid #30343c; border-radius: 999px; padding: .2rem .65rem; }
.hero-quick a:hover { color: #fff; border-color: var(--brand); }
.board { background: #1b1e24; border: 1px solid #2a2e36; border-radius: var(--radius); padding: 1rem; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.board-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: .78rem; color: #8b909a; padding: 0 .25rem .75rem; border-bottom: 1px solid #2a2e36; margin-bottom: .5rem; }
.board-head .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; margin-right: .4rem; box-shadow: 0 0 8px #22c55e; }
.board-row { display: grid; grid-template-columns: 1.4rem 28px 1fr auto; gap: .75rem; align-items: center; padding: .55rem .25rem; border-radius: var(--radius-sm); color: #e3e5e9; }
.board-row:hover { background: #23272e; color: #fff; }
.board-row .rank { font-family: var(--mono); color: #6b7079; font-size: .8rem; text-align: right; }
.board-row img, .board-row .ph { width: 28px; height: 28px; border-radius: 6px; background: var(--board-icon-bg); object-fit: cover; }
.board-row .name { font-weight: 600; font-size: .92rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row .name small { display: block; font-weight: 400; color: #8b909a; font-size: .75rem; overflow: hidden; text-overflow: ellipsis; }
.board-row .val { font-family: var(--mono); font-size: .82rem; color: #f0b28f; white-space: nowrap; }
.board-row .val.up { color: #4ade80; }
.board-foot { display: block; text-align: center; font-size: .82rem; color: #8b909a; padding-top: .6rem; border-top: 1px solid #2a2e36; margin-top: .5rem; }
.board-foot:hover { color: #fff; }

/* ---------- sections ---------- */
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.sec-head h2 { font-size: 1.6rem; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; line-height: 1.2; }
.sec-head p { color: var(--muted); margin-top: .25rem; }
.sec-head .more { font-weight: 600; font-size: .92rem; color: var(--brand-ink); white-space: nowrap; }
.sec-head .more:hover { text-decoration: underline; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- cards ---------- */
.card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card-grid.is-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s, transform .2s; display: flex; flex-direction: column; min-width: 0; }
.tcard:hover { box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
a.tcard:hover { transform: translateY(-2px); }
.tcard h3 { font-size: 1.05rem; font-weight: 700; color: var(--ink); line-height: 1.3; margin-bottom: .35rem; }
.tcard p { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.tcard .icon-tile { width: 40px; height: 40px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 1.05rem; margin-bottom: .9rem; flex-shrink: 0; }
.tcard .links { margin-top: .9rem; display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .85rem; }
.tcard .links a { color: var(--ink-2); }
.tcard .links a:hover { color: var(--brand-ink); }
.tcard .foot { margin-top: auto; padding-top: 1rem; font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.group-card .count { font-family: var(--mono); font-size: .75rem; color: var(--faint); }

/* app mini card (rising, similar) */
.app-card { gap: .75rem; }
.app-card .top { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.app-card .top img, .app-card .top .ph { width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0; background: var(--icon-bg); object-fit: cover; }
.app-card .top div { min-width: 0; }
.app-card .name { font-weight: 700; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-card .owner { font-family: var(--mono); font-size: .75rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.app-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.stat { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.stat i { color: var(--star); margin-right: .2rem; }
.stat.up { color: var(--up); }

/* ---------- app list (replaces the tables) ---------- */
.app-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.app-row { display: grid; grid-template-columns: 2.25rem 40px minmax(0, 1fr) 9.5rem 7.5rem 4.5rem; gap: 1rem; align-items: center; padding: .9rem 1.25rem; border-top: 1px solid var(--line); color: inherit; transition: background .12s; }
.app-row:first-child { border-top: 0; }
.app-row:hover { background: var(--row-hover); }
.app-row .rank { font-family: var(--mono); color: var(--faint); font-size: .85rem; text-align: right; }
.app-row .logo-img, .app-row .ph { width: 40px; height: 40px; border-radius: 9px; background: var(--icon-bg); object-fit: cover; display: block; }
.app-row .ph { display: grid; place-items: center; color: var(--faint); font-family: var(--mono); font-weight: 700; }
.app-row .main { min-width: 0; }
.app-row .title-line { display: flex; align-items: baseline; gap: .5rem; min-width: 0; flex-wrap: wrap; }
.app-row .app-name { font-weight: 700; color: var(--ink); font-size: 1rem; }
.app-row a.app-name:hover { color: var(--brand-ink); }
.app-row .owner { font-family: var(--mono); font-size: .78rem; color: var(--faint); }
.app-row .desc { color: var(--muted); font-size: .88rem; line-height: 1.45; margin-top: .15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-row .cats { margin-top: .35rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.app-row .cats a { font-size: .75rem; color: var(--muted); background: var(--surface-2); border-radius: 4px; padding: .05rem .45rem; }
.app-row .cats a:hover { color: var(--brand-ink); }
.app-row .stars { text-align: right; }
.app-row .stars .stat { font-size: .92rem; font-weight: 600; color: var(--ink); }
.app-row .stars .up { display: block; font-family: var(--mono); font-size: .75rem; color: var(--up); }
.app-row .meta { font-size: .82rem; color: var(--muted); }
.app-row .meta .lang-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); margin-right: .35rem; }
.app-row .updated { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); text-align: right; }
.app-row .updated.is-stale { color: var(--faint); }

/* ---------- stack comparison (alternatives pages) ---------- */
.stack-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stack-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 640px; }
.stack-table th, .stack-table td { padding: .7rem 1rem; border-top: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--ink-2); line-height: 1.45; }
.stack-table thead th { border-top: 0; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); background: var(--surface-2); white-space: nowrap; }
.stack-table tbody th { font-weight: 700; white-space: nowrap; }
.stack-table tbody th a { color: var(--ink); }
.stack-table tbody th a:hover { color: var(--brand-ink); }
.stack-table tbody tr:hover { background: var(--row-hover); }
.app-list-head { display: grid; grid-template-columns: 2.25rem 40px minmax(0, 1fr) 9.5rem 7.5rem 4.5rem; gap: 1rem; padding: .6rem 1.25rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.app-list-head .r { text-align: right; }
.app-list .empty { padding: 2rem; text-align: center; color: var(--muted); }
@media (max-width: 900px) {
  .app-row, .app-list-head { grid-template-columns: 1.6rem 36px minmax(0, 1fr) auto; gap: .75rem; padding-left: .9rem; padding-right: .9rem; }
  .app-row .meta, .app-row .updated, .app-list-head .h-meta, .app-list-head .h-upd { display: none; }
  .app-row .logo-img, .app-row .ph { width: 36px; height: 36px; }
}
@media (max-width: 480px) {
  .app-row .desc { -webkit-line-clamp: 3; }
  .app-row .cats { display: none; }
}

/* ---------- filter bar ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.filter-bar .select select, .filter-bar .select { font-size: .88rem; }
.filter-bar .select select { border-radius: var(--radius-sm); border-color: var(--line-strong); background: var(--surface); height: 2.3rem; }
.filter-bar .toggle { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); height: 2.3rem; padding: 0 .75rem; cursor: pointer; }
.filter-bar .toggle input { accent-color: var(--brand); }
.filter-bar .reset { font-size: .85rem; color: var(--muted); margin-left: .25rem; }
.filter-bar .total { margin-left: auto; font-size: .85rem; color: var(--muted); }
@media (max-width: 600px) { .filter-bar .select, .filter-bar .select select { width: 100%; } .filter-bar .control { flex: 1 1 45%; } .filter-bar .total { margin-left: 0; } }

/* ---------- pagination ---------- */
.pagination { margin-top: 1.5rem; }
.pagination-link, .pagination-previous, .pagination-next { border-color: var(--line-strong); background: var(--surface); font-family: var(--mono); font-size: .85rem; }
.pagination-link.is-current { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }

/* ---------- sidebar boxes ---------- */
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.side-box h4 { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: .75rem; }
.side-nav a { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem .5rem; margin: 0 -.5rem; border-radius: var(--radius-sm); font-size: .9rem; color: var(--ink-2); }
.side-nav a:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a.is-active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.side-nav a .count { font-family: var(--mono); font-size: .75rem; color: var(--faint); }
.facts { list-style: none; margin: 0; }
.facts li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.facts li:first-child { border-top: 0; padding-top: 0; }
.facts .k { color: var(--muted); }
.facts .v { color: var(--ink); font-weight: 600; text-align: right; }
.facts .v.num { font-weight: 500; }

/* ---------- app page ---------- */
.app-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 2rem 0; }
.app-hero .head { display: flex; gap: 1.25rem; align-items: center; }
.app-hero .head img, .app-hero .head .ph { width: 72px; height: 72px; border-radius: 16px; background: var(--icon-bg); object-fit: cover; flex-shrink: 0; border: 1px solid var(--line); }
.app-hero h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; color: var(--ink); letter-spacing: -0.035em; line-height: 1.1; }
.app-hero .repo { font-family: var(--mono); color: var(--muted); font-size: .9rem; }
.app-hero .tagline { font-size: 1.15rem; color: var(--ink-2); margin-top: 1rem; max-width: 46rem; }
.app-hero .actions { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.app-hero .kpis { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.25rem; font-size: .88rem; color: var(--muted); }
.app-hero .kpis strong { font-family: var(--mono); color: var(--ink); font-weight: 600; margin-right: .25rem; }
.notice { border-radius: var(--radius-sm); padding: .75rem 1rem; font-size: .9rem; margin-top: 1rem; }
.notice.is-warn { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-line); }
.notice.is-info { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.readme-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.readme-box .readme-head { padding: .75rem 1.25rem; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; }
.readme-box .readme { padding: 1.5rem 1.75rem; overflow-wrap: anywhere; }
.readme img { max-width: 100%; height: auto; }
.readme pre { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border-radius: var(--radius-sm); font-size: .82rem; }
.readme code { background: var(--surface-2); color: var(--ink); padding: .1em .35em; border-radius: 4px; font-size: .85em; }
.readme pre code { padding: 0; background: none; }
.readme table { display: block; overflow-x: auto; }
.readme h1, .readme h2 { border-bottom: 1px solid var(--line); padding-bottom: .3em; }
.chart-box svg { display: block; }
.badge-snippet { font-family: var(--mono); font-size: .72rem; background: var(--surface-2); border-radius: var(--radius-sm); padding: .6rem .7rem; white-space: pre-wrap; word-break: break-all; color: var(--ink-2); margin-top: .5rem; }

/* ---------- forms ---------- */
.input, .textarea, .select select { border-color: var(--line-strong); box-shadow: none; }
.input:focus, .textarea:focus, .select select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(215, 95, 51, .18); }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); }
.checklist { list-style: none; margin: 1rem 0 0 !important; padding: 0; }
.checklist li { position: relative; padding-left: 1.6rem; margin-bottom: .5rem; color: var(--ink-2); }
.checklist li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: .1rem; color: var(--up); font-size: .85rem; }

/* ---------- CTA band ---------- */
.cta { background: var(--cta-bg); border: 1px solid var(--cta-line); border-radius: 14px; padding: 2.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; color: #aeb3bc; }
.cta h2 { color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.cta code { background: #23272e; color: #f0b28f; border-radius: 4px; }

/* ---------- blog ---------- */
.post-card { padding: 0; overflow: hidden; }
.post-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--surface-2); }
.post-card .body { padding: 1.1rem 1.25rem 1.25rem; }
.article { max-width: 46rem; margin: 0 auto; }
.article .content { font-size: 1.05rem; line-height: 1.7; }
.article .cover { border-radius: var(--radius); margin: 1.5rem 0; width: 100%; height: auto; }

/* ---------- footer ---------- */
.site-footer { background: var(--footer-bg); border-top: 1px solid var(--footer-line); color: #8b909a; padding: 3.5rem 0 2rem; margin-top: 1rem; font-size: .9rem; }
.site-footer h5 { color: #fff; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .9rem; }
.site-footer a { color: #aeb3bc; display: block; padding: .2rem 0; }
.site-footer a:hover { color: #fff; }
.site-footer .note { display: block; font-size: .8rem; margin-top: .4rem; line-height: 1.45; }
.site-footer .note code { background: none; color: inherit; padding: 0; font-size: inherit; }
.site-footer .bottom { border-top: 1px solid #262a31; margin-top: 2.5rem; padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .82rem; }
.site-footer .bottom a { display: inline; }

.star-yellow { color: var(--star); }
.has-text-nowrap { white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--surface); color: var(--ink); padding: .5rem 1rem; border-radius: var(--radius-sm); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- mobile fixes ---------- */
@media (max-width: 768px) {
  /* Bulma's is-variable gaps (1.5-2rem negative margins) are wider than the 16px gutter */
  .columns.is-variable.is-6, .columns.is-variable.is-8 { --columnGap: .5rem; }
  .columns { margin-left: 0; margin-right: 0; }
  /* long chip rows scroll sideways instead of pushing the content down */
  .chips.is-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; -webkit-overflow-scrolling: touch; }
  .chips.is-scroll::-webkit-scrollbar { display: none; }
  .page-head { padding: 1.5rem 0 1.25rem; }
  .page-head .title.is-2 { font-size: 2rem; }
  .app-hero .head img, .app-hero .head .ph { width: 56px; height: 56px; border-radius: 12px; }
  .cta { padding: 1.5rem; }
  .readme-box .readme { padding: 1rem; }
}
html, body { overflow-x: clip; }
@media (max-width: 600px) {
  .app-row .title-line { flex-direction: column; align-items: flex-start; gap: 0; }
  .app-row .owner { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-row .stars .stat { font-size: .85rem; }
}


/* search page: the hero-search box on a light page head */
.hero-search .input.search-light { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.hero-search .input.search-light::placeholder { color: var(--faint); }

/* ---------- theme-agnostic bits that only mattered in dark ---------- */
.button.is-dark { background: var(--btn-dark-bg); color: var(--btn-dark-fg); border-color: transparent; }
.button.is-dark:hover { background: var(--btn-dark-hover); color: var(--btn-dark-fg); }
.app-row .ph, .app-card .top .ph, .app-hero .head .ph { background: var(--surface-2); }
.readme img { border-radius: 4px; }
.readme-box .readme hr { background: var(--line); }
.content table td, .content table th { border-color: var(--line); }
.content blockquote { background: var(--surface-2); border-left-color: var(--line-strong); }
.breadcrumb li + li::before { color: var(--faint); }
.navbar-dropdown { background: var(--surface); }
.site-header .navbar-divider { background: var(--line); }

/* ---------- dark mode ----------
   html[data-theme] is set by the theme switch in the header (localStorage "tsh-theme"):
   "dark" forces dark, "light" forces light, no attribute = follow the OS. Bulma's own
   [data-theme=...] rules come after its media queries, so a forced choice wins there too.
   The two token blocks below must stay identical. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eceef2;
  --ink-2: #c5c9d1;
  --muted: #979daa;
  --faint: #6f7682;
  --line: #262a32;
  --line-strong: #353a45;
  --bg: #0e1013;
  --surface: #16191e;
  --surface-2: #1f232a;
  --brand: #e2703f;
  --brand-ink: #f2915f;
  --brand-soft: #2b1d16;
  --up: #4ade80;
  --up-soft: #13281b;
  --warn: #f5c451;
  --warn-soft: #2a2412;
  --warn-line: #4a3d17;
  --header: #0a0b0e;
  --on-ink: #0e1013;
  --row-hover: #1a1d23;
  --star: #f0b54a;
  /* app icons are often transparent with dark glyphs: keep a light tile behind them */
  --icon-bg: #e9e7e2;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
  --bulma-link-l: 64%;
  --bulma-scheme-main-l: 9%;
  --header-line: #1d2026;
  --hero-bg: #0a0b0e;
  --board-icon-bg: var(--icon-bg);
  --btn-dark-bg: #eceef2;
  --btn-dark-fg: #0e1013;
  --btn-dark-hover: #ffffff;
  --link-underline: rgba(242, 145, 95, .4);
  --cta-bg: var(--surface);
  --cta-line: var(--line);
  --footer-bg: #0a0b0e;
  --footer-line: #1d2026;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eceef2;
    --ink-2: #c5c9d1;
    --muted: #979daa;
    --faint: #6f7682;
    --line: #262a32;
    --line-strong: #353a45;
    --bg: #0e1013;
    --surface: #16191e;
    --surface-2: #1f232a;
    --brand: #e2703f;
    --brand-ink: #f2915f;
    --brand-soft: #2b1d16;
    --up: #4ade80;
    --up-soft: #13281b;
    --warn: #f5c451;
    --warn-soft: #2a2412;
    --warn-line: #4a3d17;
    --header: #0a0b0e;
    --on-ink: #0e1013;
    --row-hover: #1a1d23;
    --star: #f0b54a;
    /* app icons are often transparent with dark glyphs: keep a light tile behind them */
    --icon-bg: #e9e7e2;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
    --bulma-link-l: 64%;
    --bulma-scheme-main-l: 9%;
    --header-line: #1d2026;
    --hero-bg: #0a0b0e;
    --board-icon-bg: var(--icon-bg);
    --btn-dark-bg: #eceef2;
    --btn-dark-fg: #0e1013;
    --btn-dark-hover: #ffffff;
    --link-underline: rgba(242, 145, 95, .4);
    --cta-bg: var(--surface);
    --cta-line: var(--line);
    --footer-bg: #0a0b0e;
    --footer-line: #1d2026;
  }
}


/* ---------- theme switch (header) ---------- */
.theme-switch { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 2.25rem; min-width: 2.25rem; padding: 0 .6rem; border-radius: 999px; border: 1px solid #30343c; background: transparent; color: #c9ccd3; cursor: pointer; font: inherit; font-size: .9rem; transition: color .15s, border-color .15s; }
.theme-switch:hover { color: #fff; border-color: var(--brand); }
.theme-switch .theme-label { display: none; }
@media (max-width: 1023px) {
  .theme-switch .theme-label { display: inline; }
}
