/* =========================================================================
   University Research Grant & Lab Inventory Automation — design system
   Light, professional palette: indigo (primary) + teal (compliance) + amber.
   ========================================================================= */

:root {
  /* Neutrals & surfaces */
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #eef2f9;
  --border: #e3e8f0;
  --border-strong: #cfd8e6;

  /* Text */
  --ink: #1b2533;
  --body: #3b4757;
  --muted: #66728a;

  /* Brand */
  --primary: #2541b2;
  --primary-600: #1e379b;
  --primary-700: #182d80;
  --primary-100: #e7ecfb;
  --primary-050: #f1f4fd;

  --teal: #0f9d8c;
  --teal-700: #0b7568;
  --teal-100: #dcf4f0;

  --amber: #e0890b;
  --amber-600: #c5760a;
  --amber-100: #fcefd7;

  /* Code */
  --code-bg: #f7f9fd;
  --code-border: #e4eaf4;
  --inline-code-bg: #eef2fb;
  --inline-code-ink: #294093;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* Layout */
  --wrap: 1360px;
  --header-h: 66px;
  --radius: 14px;
  --radius-sm: 9px;
  --gap: clamp(1rem, 2vw, 1.6rem);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(20, 33, 61, 0.06), 0 1px 3px rgba(20, 33, 61, 0.05);
  --shadow-md: 0 6px 20px rgba(20, 33, 61, 0.08);
  --shadow-lg: 0 18px 48px rgba(20, 33, 61, 0.14);

  --focus: 0 0 0 3px rgba(37, 65, 178, 0.32);
}

/* ----- Reset ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  line-height: 1.7;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
svg {
  max-width: 100%;
  height: auto;
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

/* ----- Layout shell ----- */
.wrap {
  width: min(100% - 2.4rem, var(--wrap));
  margin-inline: auto;
}
main {
  flex: 1 0 auto;
  width: 100%;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus {
  left: 0;
}

/* ----- Links ----- */
a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
a:hover {
  color: var(--primary-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* =========================================================================
   Header / sticky nav
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
  color: var(--primary-700);
}
.brand__logo {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 2px 4px rgba(20, 33, 61, 0.18));
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand__text strong {
  font-size: 1.02rem;
}
.brand__text span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.primary-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}
.primary-nav a svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.primary-nav a:hover {
  text-decoration: none;
  background: var(--primary-050);
  color: var(--primary-700);
}
.primary-nav a[aria-current="page"] {
  background: var(--primary-100);
  color: var(--primary-700);
  box-shadow: inset 0 0 0 1px rgba(37, 65, 178, 0.18);
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  flex-shrink: 0;
  margin-top: 3.5rem;
  background: #101a33;
  color: #c4cde0;
}
.site-footer a {
  color: #d7deee;
}
.site-footer a:hover {
  color: #fff;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  padding: 2.8rem 0 1.4rem;
}
.site-footer__brand p {
  margin: 0.6rem 0 0;
  color: #9fabc6;
  font-size: 0.92rem;
  max-width: 34ch;
}
.site-footer h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8fa0c0;
  margin: 0 0 0.7rem;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0 2rem;
  font-size: 0.85rem;
  color: #8d9ab6;
}

/* =========================================================================
   Article / content page
   ========================================================================= */
.page {
  padding-top: 1.6rem;
}
.article {
  width: 100%;
}
.article > * {
  max-width: 100%;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.breadcrumbs li:not(:last-child)::after {
  content: "›";
  color: var(--border-strong);
}
.breadcrumbs a {
  color: var(--muted);
  font-weight: 600;
}
.breadcrumbs a:hover {
  color: var(--primary-700);
}
.breadcrumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}
/* Breadcrumb list opts out of the article list styling */
.article .breadcrumbs li {
  padding-left: 0;
  margin: 0;
}
.article .breadcrumbs li::before {
  content: none;
}

/* Headings */
.article h1 {
  font-size: clamp(1.9rem, 1.5rem + 1.8vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0.2rem 0 1rem;
  background: linear-gradient(120deg, var(--primary) 0%, var(--teal) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.article h2 {
  font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.85rem);
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 2.4rem 0 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--surface-2);
}
.article h3 {
  font-size: clamp(1.18rem, 1.05rem + 0.5vw, 1.4rem);
  color: var(--primary-700);
  margin: 1.9rem 0 0.7rem;
}
.article h4 {
  font-size: 1.08rem;
  color: var(--teal-700);
  margin: 1.5rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.article h2,
.article h3,
.article h4 {
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
}
.article p {
  margin: 0 0 1.15rem;
}
.article strong {
  color: var(--ink);
  font-weight: 700;
}
.article ul,
.article ol {
  margin: 0 0 1.3rem;
  padding-left: 0;
  list-style: none;
}
.article li {
  margin: 0.5rem 0;
  line-height: 1.65;
}

/* Unordered lists: gradient square bullet (task lists keep their checkbox) */
.article ul:not(.contains-task-list) > li {
  position: relative;
  padding-left: 1.65rem;
}
.article ul:not(.contains-task-list) > li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.62em;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--teal), var(--primary));
  transform: translateY(-50%) rotate(0deg);
}

/* Ordered lists: numbered gradient badge */
.article ol {
  counter-reset: ol-counter;
}
.article ol > li {
  position: relative;
  padding-left: 2.6rem;
  counter-increment: ol-counter;
}
.article ol > li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 0.02em;
  width: 1.7rem;
  height: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

/* Nested lists */
.article li > ul,
.article li > ol {
  margin: 0.5rem 0 0.25rem;
}
.article blockquote {
  margin: 1.4rem 0;
  padding: 0.4rem 1.2rem;
  border-left: 4px solid var(--teal);
  background: var(--teal-100);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
}
.article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Heading anchor link */
.header-anchor {
  margin-left: 0.4rem;
  color: var(--border-strong);
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
  text-decoration: none;
  font-weight: 400;
}
h2:hover .header-anchor,
h3:hover .header-anchor,
h4:hover .header-anchor,
.header-anchor:focus {
  opacity: 1;
  color: var(--primary);
}

/* Inline code */
.article :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--inline-code-bg);
  color: var(--inline-code-ink);
  padding: 0.12em 0.42em;
  border-radius: 5px;
  border: none;
  word-break: break-word;
}

/* =========================================================================
   Code blocks (server-side Prism + copy button)
   ========================================================================= */
.code-block {
  margin: 1.5rem 0;
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  background: var(--code-bg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.code-block__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.55rem 0.4rem 0.95rem;
  background: linear-gradient(180deg, #eef2fa, #e7edf8);
  border-bottom: 1px solid var(--code-border);
}
.code-block__lang {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.code-block__copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-700);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 0.28rem 0.6rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.code-block__copy:hover {
  background: var(--primary-100);
  border-color: var(--primary);
}
.code-block__copy.is-copied {
  background: var(--teal-100);
  border-color: var(--teal);
  color: var(--teal-700);
}
.code-block pre {
  margin: 0;
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.65;
  color: #243049;
  tab-size: 4;
}
.code-block code {
  font-family: inherit;
  background: none;
  padding: 0;
  white-space: pre;
}

/* Prism token theme (light, brand-aligned) */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #8a94a6;
  font-style: italic;
}
.token.punctuation {
  color: #6b7587;
}
.token.keyword,
.token.control,
.token.atrule,
.token.important {
  color: #2a3fb8;
  font-weight: 600;
}
.token.string,
.token.char,
.token.attr-value,
.token.inserted {
  color: #117a4e;
}
.token.number,
.token.boolean,
.token.constant,
.token.symbol {
  color: #b4540a;
}
.token.function,
.token.method {
  color: #1d4ed8;
}
.token.class-name,
.token.builtin,
.token.property,
.token.attr-name,
.token.namespace {
  color: #0f766e;
}
.token.operator,
.token.entity,
.token.url {
  color: #6b7587;
}
.token.decorator,
.token.annotation {
  color: #9333a8;
}
.token.deleted {
  color: #c0392b;
}

/* =========================================================================
   Tables
   ========================================================================= */
.table-wrap {
  margin: 1.6rem 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  min-width: 480px;
}
.table-wrap th,
.table-wrap td {
  padding: 0.7rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.table-wrap thead th {
  background: var(--primary-050);
  color: var(--primary-700);
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 2px solid var(--primary-100);
}
.table-wrap tbody tr:nth-child(even) {
  background: #fafcff;
}
.table-wrap tbody tr:hover {
  background: var(--primary-050);
}
.table-wrap code {
  white-space: nowrap;
}

/* =========================================================================
   Task lists (interactive checkboxes)
   ========================================================================= */
.contains-task-list {
  list-style: none;
  padding-left: 0.2rem;
}
.task-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.5rem 0;
}
.task-list-item::marker {
  content: "";
}
.task-list-item label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
}
.task-list-item-checkbox {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 1.2em;
  height: 1.2em;
  margin-top: 0.18em;
  border: 2px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.task-list-item-checkbox:hover {
  border-color: var(--teal);
}
.task-list-item-checkbox:checked {
  background: var(--teal);
  border-color: var(--teal);
}
.task-list-item-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 0.32em;
  top: 0.1em;
  width: 0.32em;
  height: 0.6em;
  border: solid #fff;
  border-width: 0 0.16em 0.16em 0;
  transform: rotate(45deg);
}
.task-list-item.is-checked {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--border-strong);
}

/* =========================================================================
   Mermaid + KaTeX
   ========================================================================= */
.mermaid {
  margin: 1.6rem 0;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
.mermaid:not([data-processed]) {
  color: transparent;
  min-height: 2rem;
}
.mermaid.is-zoomable {
  cursor: zoom-in;
}
.mermaid.is-zoomable:hover {
  border-color: var(--primary-100);
  box-shadow: var(--shadow-md);
}
.mermaid-caption {
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted);
  margin: -0.7rem 0 1.9rem;
}

/* Enlarge-on-click overlay for diagrams */
.diagram-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(16, 26, 51, 0.72);
  backdrop-filter: blur(4px);
  overflow: auto;
  cursor: zoom-out;
}
.diagram-overlay[hidden] {
  display: none;
}
.diagram-overlay__inner {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-lg);
  max-width: 96vw;
  max-height: 92vh;
  overflow: auto;
}

.katex-display {
  margin: 1.4rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.4rem 0;
}

/* On-this-page contents navigator */
.toc {
  margin: 0 0 2rem;
  padding: 0.3rem 1.1rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-size: 0.92rem;
}
.toc > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  padding: 0.55rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toc > summary::-webkit-details-marker {
  display: none;
}
.toc > summary::before {
  content: "▸";
  color: var(--primary);
  transition: transform 0.15s ease;
}
.toc[open] > summary::before {
  transform: rotate(90deg);
}
.toc ul {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
  columns: 2;
  column-gap: 2.4rem;
}
.toc li {
  margin: 0.32rem 0;
  break-inside: avoid;
}
.toc li.toc__sub {
  padding-left: 1rem;
}
.toc a {
  color: var(--muted);
  font-weight: 600;
}
.toc a:hover {
  color: var(--primary-700);
  text-decoration: none;
}
.toc a.is-active {
  color: var(--primary-700);
  font-weight: 700;
}
.toc li.toc__sub a {
  font-weight: 500;
}
@media (max-width: 640px) {
  .toc ul {
    columns: 1;
  }
}

/* =========================================================================
   FAQ accordions
   ========================================================================= */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin: 0.7rem 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.accordion > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 1.2rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.accordion > summary::-webkit-details-marker {
  display: none;
}
.accordion > summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--primary);
  line-height: 1;
}
.accordion[open] > summary::after {
  content: "–";
}
.accordion > summary:hover {
  background: var(--primary-050);
}
.accordion__body {
  padding: 0 1.2rem 1.1rem;
}

/* =========================================================================
   Related-content navigation
   ========================================================================= */
.related {
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}
.related h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 1rem;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.link-card {
  display: block;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.link-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-100);
}
.link-card strong {
  display: block;
  color: var(--ink);
  font-size: 1.02rem;
  margin-bottom: 0.25rem;
}
.link-card span {
  color: var(--muted);
  font-size: 0.88rem;
}
.link-card .link-card__cue {
  color: var(--primary);
  font-weight: 600;
}

/* =========================================================================
   Homepage
   ========================================================================= */
.hero {
  text-align: center;
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 1rem;
}
.hero__logo {
  width: clamp(96px, 14vw, 148px);
  height: auto;
  margin: 0 auto 1.4rem;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(37, 65, 178, 0.28));
}
.hero h1 {
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 auto 1rem;
  max-width: 18ch;
  color: var(--ink);
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--primary), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.28rem);
  color: var(--body);
  max-width: 70ch;
  margin: 0 auto 1rem;
}
.hero__lead.muted {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 74ch;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin: 2rem auto 0;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.cta:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.cta__icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: #fff;
  flex: none;
}
.cta__icon svg {
  width: 18px;
  height: 18px;
}
.cta--indigo .cta__icon {
  background: linear-gradient(135deg, #3457d5, #2541b2);
}
.cta--teal .cta__icon {
  background: linear-gradient(135deg, #19b6a3, #0f9d8c);
}
.cta--amber .cta__icon {
  background: linear-gradient(135deg, #f5a623, #e0890b);
}
.cta--indigo:hover {
  border-color: var(--primary);
}
.cta--teal:hover {
  border-color: var(--teal);
}
.cta--amber:hover {
  border-color: var(--amber);
}

.section-heading {
  text-align: center;
  margin: 3.5rem auto 0.5rem;
}
.section-heading h2 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  color: var(--ink);
  margin: 0 0 0.4rem;
}
.section-heading p {
  color: var(--muted);
  max-width: 60ch;
  margin: 0 auto;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.4rem;
  margin: 2rem 0;
}
.feature-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 1rem;
}
.feature-card__icon svg {
  width: 28px;
  height: 28px;
}
.feature-card--indigo {
  border-top: 3px solid var(--primary);
}
.feature-card--indigo .feature-card__icon {
  background: linear-gradient(135deg, #3457d5, #2541b2);
}
.feature-card--teal {
  border-top: 3px solid var(--teal);
}
.feature-card--teal .feature-card__icon {
  background: linear-gradient(135deg, #19b6a3, #0f9d8c);
}
.feature-card--amber {
  border-top: 3px solid var(--amber);
}
.feature-card--amber .feature-card__icon {
  background: linear-gradient(135deg, #f5a623, #e0890b);
}
.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.22rem;
  color: var(--ink);
  line-height: 1.25;
}
.feature-card p {
  color: var(--body);
  margin: 0 0 1rem;
  flex: 1;
}
.feature-card ul {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.feature-card ul a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.94rem;
  font-weight: 600;
}
.feature-card ul a::before {
  content: "›";
  color: var(--teal);
}
.feature-card__more {
  font-weight: 700;
}

.home-section {
  padding: 1rem 0;
}
.home-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  margin-top: 1.5rem;
}
.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.3rem;
  box-shadow: var(--shadow-sm);
}
.mini-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--primary-700);
}
.mini-card p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }
  .primary-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem clamp(1rem, 5vw, 2rem) 1.2rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    transition: transform 0.25s ease;
  }
  .primary-nav.is-open {
    transform: translateY(0);
  }
  .primary-nav a {
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
  }
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}
@media (max-width: 540px) {
  .brand__text span {
    display: none;
  }
  .site-footer__inner {
    grid-template-columns: 1fr;
  }
  .cta {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Widescreen — use more real estate */
@media (min-width: 1600px) {
  :root {
    --wrap: 1520px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}
