/* Talient interface – design tokens and basic elements from visual-lab (site.css).
   Everything is served by Talient itself: no foreign fonts or stylesheets (GEO-96). */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-wght.7660bd9909fb.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-ext-wght.341687eeeb6a.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --page: #EDEEF5;
  --mint: #DDF5F1; --mint-deep: #BDEBE3; --mint-ink: #0F7A6E;
  --sun: #FDF3D2; --sun-deep: #F8E3A1; --sun-ink: #9A7600;
  --rose: #FCE4E3; --rose-deep: #F6C9C7; --rose-ink: #C9473F;
  --lilac: #E7E3FC; --lilac-deep: #D2CBF8; --lilac-ink: #4F40D6;
  --primary: #463ACB;
  --primary-dark: #2F2690;
  --ink: #171A26;
  --text: #3D4152;
  --text-2: #4A4E61;
  --muted: #5A5F73;
  --faint: #8A8EA3;
  --tint: #F6F5FE;
  --tint-2: #F1F0FC;
  --highlight: #ECEAFD;
  --border: #ECEBF7;
  --border-2: #E2DFF7;
  --border-btn: #D9D6F3;
  --on-primary-soft: #E6E4FC;
  --ok: #1E6B43; --ok-bg: #F3FAF6; --ok-border: #D5EDDF;
  --bad: #9A3B3B; --bad-bg: #FBF6F6; --bad-border: #F1E2E2;
  --warn: #8A4B00; --warn-bg: #FFF1DD; --warn-border: #F5DDB8;
  --shadow: 0 24px 60px -30px rgba(70, 58, 203, .35);
  --radius-card: 28px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 480px; }
.main { padding: 40px 0 72px; }

/* Typography: smaller scale than the marketing site */
h1, .h1 { font-weight: 800; font-size: 32px; line-height: 1.15; letter-spacing: -.03em; }
h2, .h2 { font-weight: 800; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
h3 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .08em; }
.lead { margin-top: 8px; color: var(--text-2); }
.muted { color: var(--muted); }
strong { font-weight: 700; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: #FFFFFF; }
.btn--primary:hover { background: var(--primary-dark); color: #FFFFFF; }
.btn--secondary { background: #FFFFFF; border-color: var(--border-btn); color: var(--ink); }
.btn--secondary:hover { border-color: var(--primary); color: var(--ink); }
.btn--dark { background: var(--ink); color: #FFFFFF; }
.btn--dark:hover { background: #000; color: #FFFFFF; }
.btn[aria-busy="true"] { cursor: progress; opacity: .85; }

/* Page frame: header with logo and navigation */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(237, 238, 245, .88);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ink); font-weight: 800; font-size: 22px; letter-spacing: -.02em; line-height: 1;
}
.logo:hover { color: var(--ink); }
.logo__tld { color: var(--primary); }
.site-nav ul {
  list-style: none; margin: 0; display: flex; flex-wrap: wrap; gap: 2px; padding: 6px;
  background: #FFFFFF; border-radius: 999px; box-shadow: 0 6px 24px -14px rgba(23, 26, 38, .25);
}
.site-nav a { display: block; padding: 8px 16px; border-radius: 999px; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600; }
.site-nav a:hover { background: var(--tint); color: var(--primary); }
.site-nav a[aria-current="page"] { background: var(--highlight); color: var(--primary-dark); }
.site-header__user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.site-header__user form { margin: 0; }

/* Cards */
.cards { display: flex; flex-wrap: wrap; gap: 20px; }
.card {
  flex: 1 1 300px; min-width: 0; border-radius: var(--radius-card); padding: 32px;
  background: #FFFFFF; box-shadow: var(--shadow);
}
.card--tint { background: var(--tint); box-shadow: none; }
.card > h1 + *, .card > h2 + * { margin-top: 16px; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.form__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--border-btn); background: #FFFFFF;
}
.field textarea { min-height: 120px; padding: 12px 16px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--highlight);
}
.field__error { margin-top: 6px; font-size: 14px; color: var(--bad); }

/* Messages */
.alert { padding: 12px 16px; border-radius: 14px; font-size: 15px; font-weight: 600; }
.alert--ok { border: 1px solid var(--ok-border); background: var(--ok-bg); color: var(--ok); }
.alert--bad { border: 1px solid var(--bad-border); background: var(--bad-bg); color: var(--bad); }
.alert--warn { border: 1px solid var(--warn-border); background: var(--warn-bg); color: var(--warn); }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: 24px; background: #FFFFFF; box-shadow: var(--shadow); }
table.table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.table caption { padding: 18px 20px 0; text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.table th, .table td { padding: 14px 20px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table thead th { font-size: 14px; font-weight: 800; color: var(--ink); background: var(--tint); }
.table td { color: var(--text-2); }
.table tbody th { font-weight: 700; color: var(--ink); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover > * { background: var(--tint); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table__empty { padding: 24px 20px; color: var(--muted); }

/* Status and grades */
.badge {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700; background: var(--tint-2); color: var(--text);
}
.badge--active { background: var(--ok-bg); color: var(--ok); }
.badge--paused { background: var(--warn-bg); color: var(--warn); }
.badge--ended { background: var(--page); color: var(--muted); }
.unknown { color: var(--faint); font-style: italic; }
.grade {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px 4px 10px; border-radius: 999px; font-size: 14px; font-weight: 700;
}
.grade[data-tone="good"] { color: var(--primary-dark); background: var(--highlight); }
.grade[data-tone="warn"] { color: var(--warn); background: var(--warn-bg); }
.grade[data-tone="bad"] { color: var(--bad); background: var(--bad-bg); }

/* htmx: indicator styles live here, not inline (includeIndicatorStyles: false, CSP) */
.htmx-indicator { opacity: 0; transition: opacity .2s ease-in; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

/* Detail pages (GEO-20) */
.detail { display: flex; flex-direction: column; gap: 24px; }
.detail__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.detail__section { display: flex; flex-direction: column; gap: 12px; }
.facts { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 8px 24px; margin-top: 16px; }
.facts dt { font-weight: 700; color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-actions form { margin: 0; }
.link-btn { padding: 0; border: 0; background: none; color: var(--primary); font-weight: 600; text-decoration: underline; cursor: pointer; }
.field input[type="checkbox"] { width: auto; min-height: 0; margin-right: 8px; }

/* Score chart (GEO-20, AK 10) */
.chart-card { padding: 24px; }
.chart-card canvas { width: 100%; max-height: 320px; }

/* Measurement detail (GEO-20, AK 11) */
/* Answers table: answer and citations take the room, the rest what it needs (GEO-97). */
.table .col-tight { width: 1%; white-space: nowrap; }
.table .col-query { min-width: 180px; max-width: 260px; }
.table .col-citations { width: 28%; min-width: 240px; }
.answer-text { width: 45%; min-width: 420px; overflow-wrap: anywhere; }
.answer-text > :first-child { margin-top: 0; }
.answer-text p, .answer-text ul, .answer-text ol, .answer-text table { margin: 0 0 8px; }
.answer-text ul, .answer-text ol { padding-left: 20px; }
.answer-text h1, .answer-text h2, .answer-text h3, .answer-text h4 { margin: 12px 0 6px; font-size: 15px; }
.answer-text table { border-collapse: collapse; font-size: 14px; }
.answer-text th, .answer-text td { padding: 4px 8px; border: 1px solid var(--border); }
.check-panel__engines { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.check-panel__engines legend { margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.messages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.citations { margin: 0; padding-left: 18px; font-size: 14px; overflow-wrap: anywhere; }
.citations li + li { margin-top: 4px; }
