:root {
  color-scheme: light;
  --ink-950: #081b2d;
  --ink-900: #102a43;
  --ink-800: #183b56;
  --ink-700: #2e4f65;
  --text: #172b3a;
  --muted: #60717c;
  --subtle: #84939b;
  --canvas: #f4f7f7;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --border: #d8e2df;
  --border-strong: #bdcbc7;
  --teal-700: #0b5f59;
  --teal-600: #0f766e;
  --teal-100: #dff1ed;
  --teal-50: #eef8f5;
  --success: #12623f;
  --success-bg: #e8f5ee;
  --success-border: #b9ddca;
  --warning: #795500;
  --warning-bg: #fff6df;
  --warning-border: #efd28e;
  --error: #9f2d24;
  --error-bg: #fdf0ee;
  --error-border: #edc0ba;
  --info: #1d5d86;
  --info-bg: #edf6fb;
  --info-border: #bddbea;
  --shadow-sm: 0 1px 2px rgba(8, 27, 45, 0.05);
  --shadow-md: 0 12px 32px rgba(8, 27, 45, 0.08);
  --shadow-lg: 0 28px 70px rgba(8, 27, 45, 0.13);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --content: 1240px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-700); text-underline-offset: 0.16em; }
a:hover { color: var(--ink-900); }
button, input, select, textarea { font: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }

:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.34);
  outline-offset: 3px;
}

[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink-950);
  color: white;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
.muted { color: var(--muted); }
.tabular, .cell-amount, .amount { font-variant-numeric: tabular-nums lining-nums; }
.cell-nowrap { white-space: nowrap; }
.cell-wrap { min-width: 240px; max-width: 440px; }
.cell-action { text-align: right; white-space: nowrap; }
.cell-amount { text-align: right !important; white-space: nowrap; }
.separator { margin: 0 0.3rem; color: var(--border-strong); }

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 {
  color: var(--ink-950);
  line-height: 1.2;
  letter-spacing: -0.025em;
}
h1 { margin-bottom: 0.65rem; font-size: clamp(2rem, 3vw, 2.6rem); font-weight: 720; }
h2 { margin-bottom: 0.6rem; font-size: clamp(1.35rem, 2vw, 1.65rem); font-weight: 700; }
h3 { margin-bottom: 0.45rem; font-size: 1.08rem; font-weight: 700; }
h4 { margin-bottom: 0.35rem; font-size: 0.98rem; }
p { margin-bottom: 1rem; }
.eyebrow {
  margin-bottom: 0.55rem;
  color: var(--teal-700);
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0.105em;
  line-height: 1.3;
  text-transform: uppercase;
}
.page-lead { max-width: 720px; margin-bottom: 0; color: var(--muted); font-size: 1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(216, 226, 223, 0.92);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}
.header-inner {
  display: flex;
  min-height: 68px;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 24px;
  align-items: center;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 0.72rem;
  color: var(--ink-950);
  text-decoration: none;
}
.brand:hover { color: var(--ink-950); }
.brand-mark { display: block; width: 38px; height: 38px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font-size: 1.06rem; letter-spacing: -0.015em; }
.brand-copy small { margin-top: 0.2rem; color: var(--muted); font-size: 0.68rem; }
.marketing-nav { display: flex; margin-left: auto; align-items: center; gap: 1.7rem; }
.marketing-nav > a:not(.button), .app-nav a {
  color: var(--ink-700);
  font-size: 0.9rem;
  font-weight: 620;
  text-decoration: none;
}
.marketing-nav > a:not(.button):hover, .app-nav a:hover { color: var(--teal-700); }
.language-switch {
  display: inline-flex;
  padding: 0.16rem;
  align-items: center;
  gap: 0.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1;
}
.language-switch a {
  min-width: 2rem;
  padding: 0.38rem 0.42rem;
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
}
.language-switch a:hover { color: var(--teal-700); }
.language-switch a[aria-current="true"] {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink-950);
}
.nav-toggle { display: none; }
.app-header .header-inner { max-width: 1440px; }
.app-nav { display: flex; align-self: stretch; align-items: center; gap: 0.35rem; }
.app-nav a {
  display: inline-flex;
  height: 100%;
  padding: 0 0.85rem;
  align-items: center;
  border-bottom: 2px solid transparent;
}
.app-nav a[aria-current="page"] { border-color: var(--teal-600); color: var(--ink-950); }
.account-menu { display: flex; margin-left: auto; align-items: center; gap: 1rem; }
.account-copy { display: flex; min-width: 0; flex-direction: column; text-align: right; line-height: 1.25; }
.account-copy strong { max-width: 260px; overflow: hidden; color: var(--ink-900); font-size: 0.82rem; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { max-width: 260px; overflow: hidden; color: var(--muted); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons and controls */
.button, button {
  display: inline-flex;
  min-height: 42px;
  padding: 0.62rem 1rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-900);
  font-weight: 680;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.button:hover, button:hover { border-color: #93a8a2; background: var(--surface-soft); color: var(--ink-950); }
.button:active, button:active { transform: translateY(1px); }
.button-primary, .button.primary {
  border-color: var(--teal-600);
  background: var(--teal-600);
  color: #fff;
  box-shadow: 0 3px 10px rgba(15, 118, 110, 0.16);
}
.button-primary:hover, .button.primary:hover { border-color: var(--teal-700); background: var(--teal-700); color: #fff; }
.button-secondary, .button.secondary { border-color: #9eb4ae; background: var(--surface); color: var(--teal-700); }
.button-secondary:hover, .button.secondary:hover { border-color: var(--teal-600); background: var(--teal-50); color: var(--teal-700); }
.button-quiet { border-color: transparent; background: transparent; color: var(--teal-700); box-shadow: none; }
.button-quiet:hover { border-color: var(--border); background: var(--surface-soft); }
.button-danger { border-color: var(--error); background: var(--error); color: white; }
.button-danger:hover { border-color: #7f211a; background: #7f211a; color: white; }
.button-danger-quiet { border-color: transparent; background: transparent; color: var(--error); }
.button-small { min-height: 34px; padding: 0.42rem 0.68rem; font-size: 0.8rem; }
.button-block { width: 100%; }
button:disabled, .button[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.text-link, .table-primary-link { color: var(--teal-700); font-weight: 680; text-decoration: none; }
.text-link:hover, .table-primary-link:hover { text-decoration: underline; }

form { margin: 0; }
.inline-form { display: inline-flex; margin: 0; }
.stack-form { display: grid; gap: 1rem; }
.field { display: flex; min-width: 150px; flex-direction: column; gap: 0.35rem; }
.field--wide { min-width: 250px; }
.field--short { max-width: 110px; }
.field label, .checkbox-field label {
  color: var(--ink-800);
  font-size: 0.81rem;
  font-weight: 680;
}
.field-optional { color: var(--muted); font-size: 0.72rem; font-weight: 500; }
.field small { color: var(--muted); font-size: 0.74rem; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.57rem 0.72rem;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  line-height: 1.25;
}
input::placeholder, textarea::placeholder { color: #8c9aa1; }
input:hover, select:hover, textarea:hover { border-color: #91a6a0; }
input:focus, select:focus, textarea:focus { border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12); outline: 0; }
input[type="file"] { padding: 0.42rem; }
input[type="range"] { min-height: 42px; padding: 0; border: 0; background: transparent; box-shadow: none; }
input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 0.7rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink-900);
  font-weight: 650;
  cursor: pointer;
}
.checkbox-field { display: flex; align-items: flex-start; gap: 0.55rem; }
.checkbox-field input { width: 18px; height: 18px; margin: 0.12rem 0 0; accent-color: var(--teal-600); }
.checkbox-field label { display: flex; flex-direction: column; }
.checkbox-field label small { color: var(--muted); font-weight: 500; }
.checkbox-field--inline { min-height: 42px; align-items: center; }
.form-grid { display: grid; gap: 0.85rem; }
.form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid__full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; }
.form-callout {
  display: flex;
  padding: 0.7rem;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid var(--info-border);
  border-radius: var(--radius-sm);
  background: var(--info-bg);
  color: var(--info);
  font-size: 0.8rem;
}
