/* School Software Directory.
   Same design as clientportals.dev: its colours, type scale, spacing and parts
   (sticky top bar, hero with badge and two buttons, browse pills, cards,
   stat tiles, tags). Light and dark via prefers-color-scheme. System fonts
   only; no third-party requests. */

:root {
  --ink: #1a1a2e;
  --slate: #4a5568;
  --mist: #e2e8f0;
  --snow: #f8fafc;
  --ocean: #2563eb;
  --ocean-light: #dbeafe;
  --ocean-dark: #1d4ed8;
  --emerald: #059669;
  --rose: #dc2626;
  --card: #ffffff;
  --bg: #f8fafc;
  --nav-bg: #ffffffe6;
  --shadow-sm: 0 1px 2px #0000000a;
  --shadow-md: 0 4px 12px #00000014;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaf0;
    --slate: #9aa3b2;
    --mist: #2a2f3a;
    --snow: #14171e;
    --ocean: #60a5fa;
    --ocean-light: #1e3a5f;
    --ocean-dark: #3b82f6;
    --emerald: #34d399;
    --rose: #f87171;
    --card: #1a1d26;
    --bg: #0f1116;
    --nav-bg: #1a1d26e6;
    --shadow-sm: 0 1px 2px #00000040;
    --shadow-md: 0 4px 12px #00000066;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--slate);
  font: 1rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ocean); text-decoration: none; }
h1, h2, h3 { margin: 0; }

.skip {
  position: absolute; left: -9999px;
}
.skip:focus {
  position: fixed; top: .5rem; left: .5rem; z-index: 200;
  background: var(--ocean); color: #fff; padding: .5rem 1rem;
  border-radius: .5rem; font-size: .875rem; font-weight: 600;
}

/* Top bar: site name and navigation, sticky with a blurred background. */
.sticky-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mist);
}
.sticky-nav nav {
  max-width: 64rem; margin: 0 auto; padding: .875rem 1rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1.25rem;
}
.brand { font-size: 1rem; font-weight: 700; color: var(--ink); letter-spacing: -.025em; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; font-size: .875rem; }
.nav-link { color: var(--slate); font-weight: 500; transition: color .15s; }
.nav-link:hover { color: var(--ocean); }
.nav-link svg { display: block; }

main { max-width: 64rem; margin: 0 auto; padding: 2.5rem 1rem; }
.section { margin-bottom: 4rem; }
.section:last-child { margin-bottom: 0; }

/* Hero: badge pill, headline, one line, two buttons. */
.hero {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--mist);
  margin: 0 -1rem 3rem;
  padding: 4rem 1rem 3rem;
  text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--ocean-light); color: var(--ocean);
  border: 1px solid #2563eb26; border-radius: 100px;
  padding: .375rem 1rem; font-size: .875rem; font-weight: 500;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: 3rem; line-height: 1.15; letter-spacing: -.02em;
  font-weight: 700; color: var(--ink);
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 1.25rem; color: var(--slate);
  max-width: 32rem; margin: 0 auto 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--ocean) 0%, var(--ocean-dark) 100%);
  color: #fff; border-radius: 8px; padding: .75rem 1.75rem;
  font-weight: 600; transition: all .2s;
  box-shadow: 0 2px 4px #2563eb4d;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px #2563eb66; }
.btn-secondary {
  display: inline-block;
  color: var(--ocean); border: 1px solid var(--ocean);
  background: var(--card); border-radius: 8px; padding: .625rem 1.5rem;
  font-weight: 500; transition: all .15s;
}
.btn-secondary:hover { background: var(--ocean-light); }

/* Section headings. */
.section-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.section-heading h2 { font-size: 1.375rem; font-weight: 700; color: var(--ink); }
.section-heading .count {
  color: var(--slate); background: var(--bg); border: 1px solid var(--mist);
  border-radius: 100px; padding: .125rem .5rem; font-size: .75rem; font-weight: 500;
}

/* Browse by: group labels and pills with counts. */
.browse-group { margin-bottom: 1.5rem; }
.browse-group:last-child { margin-bottom: 0; }
.browse-label {
  font-size: .75rem; font-weight: 700; color: var(--ink);
  text-transform: uppercase; letter-spacing: .025em;
  margin-bottom: .5rem;
}
.browse-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.browse-pill {
  display: inline-flex; align-items: center; gap: .25rem;
  color: var(--ink); border: 1px solid var(--mist); background: var(--card);
  border-radius: 100px; padding: .375rem .75rem;
  font-size: .8125rem; font-weight: 500; transition: all .15s;
}
.browse-pill span { color: var(--slate); font-weight: 400; }
.browse-pill:hover { border-color: var(--ocean); color: var(--ocean); background: var(--ocean-light); }

/* Vendor cards. */
.vendor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.vendor-card {
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  border: 1px solid var(--mist); box-shadow: var(--shadow-sm);
  background: var(--card); border-radius: 12px;
  transition: all .2s;
}
.vendor-card:hover { box-shadow: var(--shadow-md); border-color: #cbd5e1; transform: translateY(-1px); }
.vendor-card:after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--ocean); opacity: 0; transition: opacity .2s;
}
.vendor-card:hover:after { opacity: 1; }
.vendor-card-body { padding: 1rem; min-width: 0; }
.vendor-card-name { margin-bottom: .25rem; }
.vendor-card-name a {
  display: block; font-weight: 600; color: var(--ink); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vendor-card-name a:hover { color: var(--ocean); }
.vendor-card-desc {
  font-size: .875rem; color: var(--slate); margin-bottom: .75rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vendor-card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* Tags. */
.tag {
  display: inline-block; border-radius: 6px; padding: .2rem .6rem;
  font-size: .75rem; font-weight: 500; transition: all .15s;
}
.tag-category { background: var(--ocean-light); color: var(--ocean); }
a.tag-category:hover { background: var(--ocean); color: #fff; }
.tag-country { background: var(--ocean-light); color: var(--ocean); }
a.tag-country:hover { background: var(--ocean); color: #fff; }
.tag-neutral { background: var(--bg); color: var(--ink); border: 1px solid var(--mist); font-weight: 600; }

/* Breadcrumb. */
.breadcrumb { margin-bottom: 1.5rem; font-size: .875rem; color: var(--slate); }
.breadcrumb ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: .375rem;
}
.breadcrumb a { color: var(--slate); transition: color .15s; }
.breadcrumb a:hover { color: var(--ocean); }
.breadcrumb .sep { color: var(--mist); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 500; }

/* Page titles and leads. */
.page-title {
  font-size: 1.875rem; font-weight: 700; color: var(--ink);
  line-height: 1.2; letter-spacing: -.01em;
  margin-bottom: .5rem;
}
.page-lead { font-size: 1.125rem; color: var(--slate); margin: 0 0 2rem; }

/* Vendor page: header, visit button, stat tiles, tags. */
.vendor-header { margin-bottom: 2.5rem; }
.vendor-header h1 {
  font-size: 1.875rem; font-weight: 700; color: var(--ink);
  line-height: 1.2; letter-spacing: -.01em;
  margin-bottom: .25rem;
}
.vendor-tagline { font-size: 1.125rem; color: var(--slate); margin: 0 0 1.5rem; }
.vendor-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.vendor-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }

/* Stat tiles: one per fact. The value sits over its label, as in the
   reference's stat bar; the source and date sit under it. */
dl.facts {
  margin: 0 0 2.5rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--mist);
  border: 1px solid var(--mist); border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
dl.facts > div {
  background: var(--card); padding: 1rem; text-align: center;
  display: flex; flex-direction: column;
}
dl.facts dt { order: 2; font-size: .75rem; color: var(--slate); margin: .125rem 0 0; }
dl.facts dd { order: 1; margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
dl.facts .fact-meta { order: 3; font-size: .75rem; font-weight: 400; color: var(--slate); margin-top: .5rem; }
.source { text-decoration: underline; text-underline-offset: 2px; }

/* Search. */
.search-card {
  border: 1px solid var(--mist); box-shadow: var(--shadow-sm);
  background: var(--card); border-radius: 12px; padding: 1.25rem;
}
.search-card label {
  display: block; font-size: .75rem; font-weight: 700; color: var(--ink);
  text-transform: uppercase; letter-spacing: .025em;
  margin-bottom: .5rem;
}
.search-card input {
  width: 100%; padding: .6rem .7rem; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--mist); border-radius: 8px;
}
.search-card input:focus { outline: 2px solid var(--ocean); outline-offset: 1px; border-color: var(--ocean); }
.search-status { color: var(--slate); font-size: .875rem; margin: .75rem 0 0; min-height: 1.25rem; }
.search-results { list-style: none; margin: .5rem 0 0; padding: 0; }
.search-results li { padding: .625rem 0; border-bottom: 1px solid var(--mist); }
.search-results a { color: var(--ink); font-weight: 500; }
.search-results .meta { color: var(--slate); font-size: .875rem; }

/* Compare table. */
.table-card { box-shadow: var(--shadow-sm); border-radius: 12px; overflow: hidden; margin-bottom: 2.5rem; }
.table-wrap { overflow-x: auto; }
table.compare { width: 100%; border-collapse: collapse; }
table.compare th, table.compare td {
  border: 1px solid var(--mist); text-align: left; vertical-align: top;
  padding: .625rem 1rem; font-size: .9375rem;
}
table.compare thead th { background: var(--bg); color: var(--ink); font-weight: 600; }
table.compare tbody tr:nth-child(even) td { background: var(--bg); }
table.compare th[scope="row"] { background: var(--bg); font-weight: 600; color: var(--ink); }

/* Prose (about, compare intro). */
.prose { color: var(--slate); max-width: 42rem; line-height: 1.7; }
.prose h2 { color: var(--ink); font-size: 1.5rem; font-weight: 600; margin: 2em 0 .75em; line-height: 1.3; }
.prose p { margin: 1.25em 0; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }

.meta { color: var(--slate); }

/* Footer. */
.site-footer { background: var(--card); border-top: 1px solid var(--mist); margin-top: 4rem; }
.site-footer .container { max-width: 64rem; margin: 0 auto; padding: 3.5rem 1rem; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 2.5rem; }
.footer-label { font-size: .75rem; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .025em; margin-bottom: 1rem; }
.footer-grid a { display: block; font-size: .875rem; color: var(--slate); margin-bottom: .625rem; transition: color .15s; }
.footer-grid a:hover { color: var(--ocean); }
.footer-bottom { border-top: 1px solid var(--mist); padding-top: 2rem; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 1rem; font-size: .875rem; color: var(--slate); }
.footer-bottom p { margin: 0; }

/* Phone width. */
@media (max-width: 1024px) {
  .vendor-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .vendor-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 2.25rem; }
  .hero-sub { font-size: 1.125rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-primary, .hero-actions .btn-secondary { width: 100%; text-align: center; }
}