/* Tree Capital × ANVEN: design system.
   Colour comes only from the tree mark (aubergine, wine, rose, peach) on a cool lavender-white.
   Shape: the mark's leaf (two rounded, two sharp corners) marks primary surfaces.
   Type: Tektur for headlines, Instrument Sans for reading, Geist Mono only for real machine output.
   Everything is self-hosted: the site makes no third-party requests. */

@font-face { font-family: "Tektur"; font-weight: 400; font-display: swap; src: url(../vendor/fonts/tektur-400.woff) format("woff"); }
@font-face { font-family: "Tektur"; font-weight: 500 700; font-display: swap; src: url(../vendor/fonts/tektur-500.woff) format("woff"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400 500; font-display: swap; src: url(../vendor/fonts/instrument-sans-400.woff) format("woff"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600 800; font-display: swap; src: url(../vendor/fonts/instrument-sans-700.woff) format("woff"); }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url(../vendor/fonts/instrument-sans-400-italic.woff) format("woff"); }
@font-face { font-family: "Geist Mono"; font-weight: 400 700; font-display: swap; src: url(../vendor/fonts/geist-mono-400.woff) format("woff"); }
@font-face { font-family: "Caveat"; font-weight: 400; font-display: swap; src: url(../vendor/fonts/caveat-regular.ttf) format("truetype"); }

:root {
  --aubergine: #451952;
  --night: #1d0a25;
  --night-2: #2a1133;
  --wine: #662549;
  --rose: #ae445a;
  --peach: #f39f5a;
  --peach-2: #f8bd88;
  --graphite: #8d8d8d;

  --paper: #f6f3f8;
  --paper-2: #ebe4ef;
  --sheet: #ffffff;
  --doc: #fbfaf6;
  --rule: #e2d9e7;
  --rule-strong: #cbbdd3;

  --ink: #1e1224;
  --ink-2: #4a3c51;
  --ink-3: #6c5f73;
  --on-dark: #f6f0f8;
  --on-dark-2: rgba(246, 240, 248, .76);
  --on-dark-3: rgba(246, 240, 248, .56);
  --on-dark-rule: rgba(246, 240, 248, .14);

  --ok: #16794a;     --ok-bg: #e5f4ec;
  --flag: #9a6206;   --flag-bg: #fbf1dd;
  --review: #2a52c2; --review-bg: #e9effd;
  --esc: #b42323;    --esc-bg: #fcebeb;
  --series-manual: #c4622d;
  --series-agents: #7a3474;

  --font-display: "Tektur", "Instrument Sans", system-ui, sans-serif;
  --font-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  /* the leaf: rounded top-left and bottom-right, tight elsewhere (the peach piece of the mark) */
  --petal: 26px 6px 26px 6px;
  --petal-md: 18px 5px 18px 5px;
  --petal-sm: 12px 4px 12px 4px;
  --r: 10px;
  --shadow-lift: 0 1px 2px rgba(29, 10, 37, .06), 0 14px 34px -14px rgba(29, 10, 37, .22);

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 68px;
  --section-y: clamp(64px, 8vw, 112px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--wine); text-underline-offset: .18em; }
a:hover { color: var(--rose); }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); text-wrap: balance; }
h1, .h1 { font: 500 clamp(2.6rem, 5.6vw, 5rem)/.98 var(--font-display); letter-spacing: -.025em; }
h2, .h2 { font: 500 clamp(2rem, 3.5vw, 3rem)/1.04 var(--font-display); letter-spacing: -.02em; }
h3, .h3 { font: 500 1.375rem/1.22 var(--font-display); letter-spacing: -.01em; }
h4 { font: 700 1.0625rem/1.35 var(--font-text); }
.lede { font-size: 1.1875rem; line-height: 1.58; color: var(--ink-2); max-width: 40rem; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.tnum { font-variant-numeric: tabular-nums; }
.hand { font-family: var(--font-hand); }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.ico { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.22em; }
.tc-mark { width: 2em; height: 2em; flex: none; display: block; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-block: var(--section-y); }
.section--sheet { background: var(--sheet); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 4vw, 52px); max-width: 46rem; }
.on-dark { background: var(--night); color: var(--on-dark); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: #fff; }
.on-dark .lede, .on-dark .muted { color: var(--on-dark-2); }
.on-dark a:not(.btn) { color: var(--peach-2); }

:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 6px; }
.on-dark :focus-visible, .run :focus-visible, .chat-side :focus-visible { outline-color: var(--peach); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--aubergine); color: #fff; padding: 10px 14px; border-radius: var(--r); }
.skip:focus { top: 12px; color: #fff; }

/* ------------------------------------------------------------------ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--petal-sm);
  font: 700 .9375rem/1.1 var(--font-text); letter-spacing: .005em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn .ico { width: 1.15em; height: 1.15em; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--aubergine); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--wine); color: #fff; }
.btn-peach { background: var(--peach); color: var(--night); }
.btn-peach:hover:not(:disabled) { background: var(--peach-2); color: var(--night); }
.btn-line { background: transparent; border-color: var(--rule-strong); color: var(--ink); }
.btn-line:hover:not(:disabled) { border-color: var(--aubergine); color: var(--aubergine); background: var(--sheet); }
.on-dark .btn-line, .run .btn-line { border-color: rgba(246, 240, 248, .26); color: var(--on-dark); }
.on-dark .btn-line:hover:not(:disabled), .run .btn-line:hover:not(:disabled) { border-color: var(--peach); color: #fff; background: rgba(255, 255, 255, .06); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--paper-2); color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .875rem; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }

.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field > label, .field > .label { font-size: .8125rem; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: .75rem; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; background: var(--sheet); color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--r); font-size: .9375rem;
}
.textarea { min-height: 116px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--rose); outline-offset: 0; border-color: var(--rose); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--aubergine); flex: none; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--paper-2); }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-size: .875rem; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--sheet); color: var(--aubergine); box-shadow: 0 1px 3px rgba(29, 10, 37, .14); }

kbd { font: 600 .6875rem/1 var(--font-text); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--rule-strong); color: var(--ink-3); background: var(--sheet); }
.spinner { display: inline-block; width: 1em; height: 1em; border-radius: 50%; vertical-align: -.125em; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font-size: .8125rem; font-weight: 500; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: .8125rem; font-weight: 700; white-space: nowrap; }
.status .ico { width: 1em; height: 1em; }
.status--ok { background: var(--ok-bg); color: var(--ok); }
.status--flag { background: var(--flag-bg); color: var(--flag); }
.status--review { background: var(--review-bg); color: var(--review); }
.status--esc { background: var(--esc-bg); color: var(--esc); }

/* a leaf-shaped icon tile, the site's recurring icon holder */
.leaf-ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 16px 4px 16px 4px; background: var(--paper-2); color: var(--aubergine); }
.leaf-ico .ico { width: 22px; height: 22px; }
.on-dark .leaf-ico { background: rgba(255, 255, 255, .08); color: var(--peach); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.note { font-size: .8125rem; line-height: 1.5; color: var(--ink-3); max-width: 62rem; }
.on-dark .note { color: var(--on-dark-3); }

/* ------------------------------------------------------------------ header */
.nav {
  position: sticky; top: 0; z-index: 60; height: var(--nav-h);
  background: rgba(246, 243, 248, .9); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav__bar { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 28px); height: 100%; }
.nav__logo { display: flex; align-items: center; flex: none; }
.nav__logo img { height: 30px; width: auto; display: block; }
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px 3px 12px 3px;
  color: var(--ink-2); text-decoration: none; font-size: .9375rem; font-weight: 700;
}
.nav__links a .ico { width: 1.05em; height: 1.05em; color: var(--ink-3); }
.nav__links a:hover { color: var(--ink); background: var(--paper-2); }
.nav__links a[aria-current="page"] { color: var(--aubergine); background: rgba(69, 25, 82, .09); }
.nav__links a[aria-current="page"] .ico { color: var(--rose); }
.nav__tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-btn { gap: 10px; color: var(--ink-2); }
.nav__menu { display: none; }
.gpu { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; word-spacing: .12em; }
.gpu__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--graphite); flex: none; }
.gpu[data-state="live"] .gpu__dot, [data-state="live"] > .gpu__dot { background: #1f9d5c; box-shadow: 0 0 0 4px rgba(31, 157, 92, .16); }
.gpu[data-state="offline"] .gpu__dot, [data-state="offline"] > .gpu__dot { background: var(--peach); box-shadow: 0 0 0 4px rgba(243, 159, 90, .22); }

@media (max-width: 1180px) { .search-btn__label, .search-btn kbd { display: none; } }
@media (max-width: 1020px) {
  .nav__menu { display: inline-flex; }
  .nav__links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 16px;
    box-shadow: 0 16px 30px rgba(29, 10, 37, .1); display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 14px 8px; border-bottom: 1px solid var(--rule); border-radius: 0; }
}
@media (max-width: 560px) {
  .gpu { display: none; }
  .nav__tools { gap: 8px; }
  .nav__cta { padding: 0 12px; }
  .nav__logo img { height: 24px; }
}
@media (max-width: 350px) { .search-btn { display: none; } }

/* ------------------------------------------------------------------ footer */
.footer { background: var(--night); color: var(--on-dark-2); padding: 64px 0 28px; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; }
.footer__brand { display: grid; gap: 16px; align-content: start; }
.footer__brand .lockup { display: flex; align-items: center; gap: 12px; color: #fff; font: 500 1.25rem/1 var(--font-display); }
.footer__brand .tc-mark { width: 40px; height: 40px; }
.footer__line { max-width: 30rem; font-size: .9375rem; }
.footer__h { font: 500 1rem/1.2 var(--font-display); color: #fff; margin-bottom: 12px; }
.footer nav, .footer__contact { display: flex; flex-direction: column; gap: 9px; }
.footer a { color: var(--on-dark-2); text-decoration: none; font-size: .9375rem; overflow-wrap: anywhere; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--on-dark-rule); font-size: .8125rem; color: var(--on-dark-3); }
@media (max-width: 900px) { .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .footer__brand { grid-column: 1 / -1; } }

/* ------------------------------------------------------------------ search palette */
.palette { border: 0; padding: 0; background: transparent; width: min(640px, calc(100vw - 32px)); margin-top: 12vh; }
.palette::backdrop { background: rgba(29, 10, 37, .5); backdrop-filter: blur(3px); }
.palette__box { background: var(--sheet); border-radius: var(--petal); box-shadow: 0 30px 80px rgba(20, 5, 25, .35); overflow: hidden; }
.palette__field { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--rule); color: var(--ink-3); }
.palette__field input { flex: 1; border: 0; outline: 0; min-height: 60px; font-size: 1.0625rem; background: transparent; color: var(--ink); }
.palette__list { list-style: none; margin: 0; padding: 8px; max-height: min(60vh, 460px); overflow-y: auto; }
.palette__list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.palette__list li[aria-selected="true"] { background: var(--paper-2); }
.palette__list .pi { width: 36px; height: 36px; border-radius: 13px 3px 13px 3px; display: grid; place-items: center; background: var(--paper-2); color: var(--aubergine); flex: none; }
.palette__list li[aria-selected="true"] .pi { background: var(--aubergine); color: #fff; }
.palette__list .pt { font-weight: 700; font-size: .9375rem; }
.palette__list .ps { font-size: .8125rem; color: var(--ink-3); }
.palette__list .pk { margin-left: auto; font-size: .75rem; color: var(--ink-3); white-space: nowrap; }
.palette__empty { padding: 20px 12px; color: var(--ink-3); font-size: .9375rem; }

/* ------------------------------------------------------------------ toast, boot, motion */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; max-width: min(560px, calc(100vw - 32px)); background: var(--night); color: var(--on-dark); padding: 12px 18px; border-radius: var(--petal-sm); box-shadow: 0 16px 40px rgba(20, 5, 25, .35); font-size: .9375rem; }
.boot { min-height: 60vh; display: grid; place-items: center; color: var(--ink-3); }
main { display: block; min-height: 60vh; }
main:focus { outline: none; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ contact form (home) */
.form-card { background: var(--sheet); color: var(--ink); border-radius: var(--petal); padding: clamp(22px, 3vw, 36px); display: grid; gap: 16px; box-shadow: var(--shadow-lift); }
.form-card h3 { color: var(--ink) !important; }
.on-dark .form-card .note, .on-dark .form-card .muted { color: var(--ink-3); }
.on-dark .form-card a:not(.btn) { color: var(--wine); }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.form-card .estimate-box { background: var(--paper); border-radius: var(--r); padding: 12px 14px; font-size: .875rem; color: var(--ink-2); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { font-size: .9375rem; }
.form-msg.err { color: var(--esc); }
.form-done { display: grid; gap: 10px; }
.form-done .ico { width: 30px; height: 30px; color: var(--ok); }
@media (max-width: 520px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
