/* Influxe EBS app. The landing page's tokens and fonts; the approved mockup's layout (left nav from 900 px).
   The CSP allows no inline style, so every style lives here. */
@font-face {
  font-family: "DM Sans";
  src: url("/static/fonts/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/static/fonts/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  --paper: #f8f8f2;
  --white: #fff;
  --ink: #243b32;
  --green: #163e35;
  --green-hover: #275346;
  --sage: #68816b;
  --muted: #66705f;
  --line: #dedfd5;
  --lime: #e7edba;
  --panel: #eef0e6;
  --field: #fffef9;
  --field-line: #dce2cf;
  --label: #617352;
  --focus: #789650;
  --warn-bg: #fff6e5;
  --warn-line: #f3d9a4;
  --warn-ink: #8a5a00;
  --bad-bg: #fde2e2;
  --bad-ink: #a12a2a;
  --ok-bg: #dff3e7;
  --ok-ink: #1f7a43;
  --info-bg: #e8f6ff;
  --info-ink: #1b6a99;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--green);
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin: 0 0 18px;
}
h1 {
  font-size: clamp(32px, 6vw, 44px);
}
h2 {
  font-size: 28px;
  margin-top: 36px;
}
h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 8px;
}
p {
  margin: 0 0 14px;
}
::selection {
  background: #dbe6b4;
  color: var(--green);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--green);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 6px;
  z-index: 10;
}
.skip-link:focus {
  top: 12px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.aside {
  margin-top: 20px;
  font-size: 14px;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--green);
  text-decoration: none;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1;
}
.brand span {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--sage);
}

/* Signed-out pages and short messages: one centred card */
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 32px 24px;
  box-shadow: 0 30px 80px #0e271b14;
}
.auth-card > .brand {
  margin-bottom: 28px;
}
.auth-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

/* Signed-in shell: navigation on top below 900 px, on the left from 900 px */
.side {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}
.side-label {
  margin: 12px 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.nav-link {
  display: block;
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}
.nav-link:hover {
  background: #e3e8d4;
}
.nav-link[aria-current="page"] {
  background: var(--lime);
  color: var(--green);
  font-weight: 600;
}
.side-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.main {
  min-width: 0;
  max-width: 1080px;
  padding: 24px 16px 48px;
}
@media (min-width: 900px) {
  .shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
  }
  .side {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    padding: 24px 16px;
  }
  .side .brand {
    margin-bottom: 12px;
  }
  .nav-list {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
  }
  .side-foot {
    margin-top: auto;
    padding-top: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
  .main {
    padding: 40px 48px 64px;
  }
}

/* TEST MODE banner and messages */
.banner {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-ink);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 24px;
  font-size: 14px;
  font-weight: 500;
}
.notice {
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 18px;
  font-size: 15px;
  border: 1px solid transparent;
}
.notice-error {
  background: var(--bad-bg);
  color: var(--bad-ink);
  border-color: #f4c4c4;
}
.notice-ok {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border-color: #bfe3cc;
}
.notice-info {
  background: var(--info-bg);
  color: var(--info-ink);
  border-color: #c4e3f5;
}

/* Forms */
.form {
  display: grid;
  gap: 16px;
  max-width: 520px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 14px;
  color: var(--label);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 5px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.field [aria-invalid="true"] {
  border-color: var(--bad-ink);
}
.field-hint,
.field-error {
  margin: 0;
  font-size: 13px;
}
.field-hint {
  color: var(--muted);
}
.field-error {
  color: var(--bad-ink);
}
.inline-form {
  display: inline;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}
.button-primary {
  background: var(--green);
  color: var(--white);
}
.button-primary:hover {
  background: var(--green-hover);
}
.button-ghost {
  background: transparent;
  color: var(--green);
  border-color: #c6cbbb;
}
.button-ghost:hover {
  background: var(--panel);
}
.button-link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--green);
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Tables and status pills (client lists, documents, runs) */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 24px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
.table td {
  padding: 10px 8px;
  border-bottom: 1px solid #ebece3;
  vertical-align: top;
}
.pill {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-live {
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.pill-test {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.pill-setup {
  background: var(--lime);
  color: var(--green);
}
.pill-bad {
  background: var(--bad-bg);
  color: var(--bad-ink);
}
.pill-cert {
  background: var(--info-bg);
  color: var(--info-ink);
}

/* Client setup checklist */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.step {
  padding: 16px 0;
  border-top: 1px solid var(--field-line);
}
.step-done h2 {
  color: var(--label);
}
.how {
  padding-left: 20px;
}
.field input[type="checkbox"] {
  width: auto;
  min-height: 0;
  margin-right: 8px;
}
.details dt {
  font-size: 14px;
  color: var(--label);
}
.details dd {
  margin: 0 0 12px;
}

/* Code samples scroll inside their own box, never the page. */
pre {
  max-width: 100%;
  overflow-x: auto;
}
