/* Legal — the portal.
 *
 * The whole palette is tokens on :root, so light and dark are the same page
 * with other values. Three states: an explicit choice on data-theme, and the
 * default that follows the operating system.
 */

:root {
  --bg: #f2f4f7;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --line: #dde3ec;
  --ink: #16202f;
  --ink-soft: #5b6879;
  --accent: #0d2b58;
  --accent-ink: #ffffff;
  --mine: #d7f0d2;
  --theirs: #ffffff;
  --quote: #eef2f7;
  --warn: #9a3412;
  --ok: #0a7d3f;
  --ok-soft: #e6f6ec;
  --gone: #6b7280;
  --gone-soft: #eef1f5;
  --bar: rgba(255, 255, 255, .82);
  --ring: rgba(13, 43, 88, .14);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 32, 56, .08);
  --lift: 0 6px 24px rgba(16, 32, 56, .10);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --panel: #131c2b;
    --panel-2: #182335;
    --line: #24334a;
    --ink: #e6ecf5;
    --ink-soft: #93a2b8;
    --accent: #2f6fd0;
    --accent-ink: #ffffff;
    --mine: #16463a;
    --theirs: #1a2637;
    --quote: #1f2c40;
    --warn: #fca5a5;
    --ok: #4ade80;
    --ok-soft: #14321f;
    --gone: #8492a8;
    --gone-soft: #1b2536;
    --bar: rgba(19, 28, 43, .82);
    --ring: rgba(148, 180, 230, .18);
    --shadow: none;
    --lift: 0 8px 28px rgba(0, 0, 0, .38);
  }
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --panel: #131c2b;
  --panel-2: #182335;
  --line: #24334a;
  --ink: #e6ecf5;
  --ink-soft: #93a2b8;
  --accent: #2f6fd0;
  --accent-ink: #ffffff;
  --mine: #16463a;
  --theirs: #1a2637;
  --quote: #1f2c40;
  --warn: #fca5a5;
  --ok: #4ade80;
  --ok-soft: #14321f;
  --gone: #8492a8;
  --gone-soft: #1b2536;
  --bar: rgba(19, 28, 43, .82);
  --ring: rgba(148, 180, 230, .18);
  --shadow: none;
  --lift: 0 8px 28px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); }

/* One focus ring for the whole portal, and only for the keyboard. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Numbers in a table read as columns when the figures are the same width. */
.num { font-variant-numeric: tabular-nums; }

/* -- the bar across the top ---------------------------------------------- */

/* The bar stays one row. Wide screens use compact navigation groups; narrow
 * screens move the same links into the menu drawer. */
.top {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 14px;
  background: var(--bar);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  padding-right: 4px;
}
.brand img {
  border-radius: 7px;
  box-shadow: 0 0 0 1px var(--ring);
}
/* The name with the running release under it: what a screen shows and what was
 * rolled out have to be the same thing, or a report about "the site" is not
 * answerable. */
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-version {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.top nav {
  display: flex;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
}
.top nav a {
  padding: 7px 13px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink-soft);
  transition: background .14s ease, color .14s ease;
}
.top nav a:hover { background: var(--panel-2); color: var(--ink); }
.top nav a.here {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.nav-group { position: relative; flex: none; }
.nav-group summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "▾"; font-size: 9px; opacity: .65; }
.nav-group summary:hover, .nav-group[open] summary { background: var(--panel-2); color: var(--ink); }
.nav-group:has(a.here) summary { color: var(--accent); font-weight: 650; }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 20;
  display: grid;
  min-width: 190px;
  padding: 5px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--lift);
}
.top nav .nav-dropdown a { padding: 9px 11px; border-radius: 8px; }
.top nav .nav-dropdown a.here { background: var(--accent); color: var(--accent-ink); }
.nav-mobile-ai { display: none; }

.header-ai-link {
  flex: none;
  padding: 7px 12px;
  border-radius: 9px;
  background: #c99a3d;
  color: #302006;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.header-ai-link:hover { background: #d9ae57; }
.header-ai-link.here { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px #c99a3d; }

.top .right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding-left: 4px;
  border-left: 1px solid var(--line);
}
.top .who {
  color: var(--ink);
  text-decoration: none;
  max-width: 12ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top .who:hover { text-decoration: underline; }
.top form { margin: 0; }

.header-help-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.header-help-link > span:first-child {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-weight: 800;
}
.header-help-link:hover, .header-help-link.here { background: var(--panel-2); }

.account-menu { position: relative; }
.account-menu > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 180px;
  padding: 4px 7px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  cursor: pointer;
  list-style: none;
}
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary::after { content: "▾"; flex: none; font-size: 9px; color: var(--ink-soft); }
.account-menu > summary:hover, .account-menu[open] > summary { border-color: var(--accent); }
.account-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}
.account-dropdown {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 230px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--lift);
}
.account-name { margin: 0 5px 6px; padding: 7px 5px 10px; border-bottom: 1px solid var(--line); font-weight: 700; overflow-wrap: anywhere; }
.account-name span { display: block; color: var(--ink-soft); font-size: 11px; font-weight: 400; }
.account-dropdown a, .account-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.account-dropdown a:hover, .account-action:hover { background: var(--panel-2); }
.account-dropdown form { width: 100%; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.navigation-scrim, .navigation-scrim[hidden] { display: none; }

button.icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: none;
  border: 0;
  border-radius: 8px;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
}
button.icon:hover { background: var(--panel-2); color: var(--ink); }

/* the language switch — a pulldown, because more languages are coming */
.languages { position: relative; }
.languages summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}
.languages summary::-webkit-details-marker { display: none; }
.languages summary::after {
  content: "▾";
  font-size: 9px;
  opacity: .6;
}
.languages summary:hover { color: var(--ink); border-color: var(--accent); }
.languages[open] summary { color: var(--ink); }
.languages form {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(6, 14, 30, .18);
}
.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.lang:hover { background: var(--panel-2); }
.lang.on { font-weight: 600; }
.lang.on::after { content: "✓"; margin-left: auto; opacity: .7; }
/* Bound to .languages: further down the sheet .flag is a signal label, whose
 * padding, border and background would otherwise land on this SVG and push the
 * three bands of the flag out of view. Hence the undoing. */
.languages .flag {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}
.languages .flag-letters { font-size: 11px; font-weight: 700; }
.lang-code { letter-spacing: .04em; }
.corner { position: absolute; top: 14px; right: 16px; }

button.link {
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.only-narrow { display: none; }

/* -- logging in ---------------------------------------------------------- */

.entry {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}
.entry .card { width: min(380px, 100%); text-align: center; }
.entry .logo { border-radius: 14px; margin-bottom: 8px; }
.entry h1 { margin: 0; font-size: 26px; }
.entry .sub { color: var(--ink-soft); margin-top: 4px; }
.entry .version {
  color: var(--ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.card h2 { margin-top: 0; font-size: 17px; }

label { display: block; text-align: left; margin: 12px 0; color: var(--ink-soft); }
input, select, textarea {
  width: 100%;
  margin-top: 4px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  transition: border-color .14s ease, box-shadow .14s ease;
}
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
input::placeholder, textarea::placeholder { color: var(--ink-soft); opacity: .75; }
select {
  appearance: none;
  padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) calc(50% + 1px), calc(100% - 12px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
button.primary, .button {
  display: inline-block;
  padding: 9px 18px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: filter .14s ease, transform .06s ease;
}
button.primary:hover, .button:hover { filter: brightness(1.08); }
button.primary:active, .button:active { transform: translateY(1px); }
.button.quiet {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 500;
}
.button.quiet:hover { background: var(--panel-2); filter: none; }
.problem { color: #b00020; }
:root[data-theme="dark"] .problem { color: #fca5a5; }
.told { color: #0a7d3f; }
.fine { color: var(--ink-soft); font-size: 13px; }
.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;
}

/* -- the conversation ---------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - 57px);
}

.list {
  border-right: 1px solid var(--line);
  background: var(--panel);
  overflow-y: auto;
  padding: 8px;
}
.list .new {
  display: block;
  padding: 10px;
  margin-bottom: 8px;
  text-align: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
}
.list .row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
}
.list .row:hover { background: var(--panel-2); }
.list .row.current { background: var(--panel-2); font-weight: 600; }
.row-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--quote);
  color: var(--ink-soft);
}
.tag.warn { color: var(--warn); }
.badge {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #25d366;
  color: #06281a;
  font-size: 12px;
  text-align: center;
  font-weight: 700;
}

.talk { display: flex; flex-direction: column; min-width: 0; }
.talk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.talk-head .fine { display: block; }
.talk-head form { margin: 0; }
.talk-head select { width: auto; margin: 0; }

.stream {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.empty { color: var(--ink-soft); text-align: center; margin: auto; max-width: 420px; }

.bubble {
  max-width: min(680px, 82%);
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--theirs);
  border: 1px solid var(--line);
  position: relative;
}
.bubble.user { align-self: flex-end; background: var(--mine); }
.bubble.assistant, .bubble.system { align-self: flex-start; }
.bubble.system { font-style: italic; color: var(--ink-soft); }
.bubble .text { white-space: pre-wrap; word-wrap: break-word; }
.bubble .meta {
  font-size: 11px;
  color: var(--ink-soft);
  text-align: right;
  margin-top: 2px;
}
.bubble .ticks { color: #2f6fd0; margin-left: 4px; }
.bubble.running .text::after { content: " …"; }

.quote {
  border-left: 3px solid var(--accent);
  background: var(--quote);
  padding: 4px 8px;
  margin-bottom: 6px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}
.reply-button {
  position: absolute;
  top: 2px;
  right: 6px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink-soft);
  opacity: 0;
}
.bubble:hover .reply-button { opacity: 1; }

.steps { margin-top: 6px; font-size: 12px; color: var(--ink-soft); }
.steps ul { margin: 4px 0 0; padding-left: 18px; }

.day {
  align-self: center;
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--panel-2);
  padding: 2px 10px;
  border-radius: 999px;
}

.typing { padding: 4px 16px; color: var(--ink-soft); font-size: 13px; }

.composer {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  flex-wrap: wrap;
}
.composer textarea {
  flex: 1;
  resize: none;
  max-height: 160px;
  margin: 0;
  border-radius: 20px;
}
.composer button { border-radius: 20px; }
.replying {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: var(--quote);
  border-left: 3px solid var(--accent);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}
.replying button { background: none; border: 0; cursor: pointer; color: var(--ink-soft); }

.disclaimer {
  margin: 0;
  padding: 6px 16px 10px;
  font-size: 11px;
  color: var(--ink-soft);
  background: var(--panel);
}

/* -- pages --------------------------------------------------------------- */

.page { padding: 28px 24px 40px; max-width: 1100px; margin: 0 auto; }
.page.narrow { max-width: 720px; }
.page h1 { font-size: 24px; letter-spacing: -.02em; margin-top: 0; }
.page h2 { font-size: 17px; margin-top: 28px; }

/* Title on the left, the count of what is on screen on the right. */
.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-head h1 { margin: 0; }
.page-head .fine { margin: 0; }

.row-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.row-form input, .row-form select { width: auto; flex: 1; min-width: 140px; margin: 0; }
.row-form select { flex: 0 1 auto; }
.row-form .check { display: flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.row-form .check input { width: auto; flex: none; }

/* the quick filter */
.filters { padding: 14px 16px; }
.filters .row-form { margin-bottom: 2px; }
.filters .row-form input[type="text"] { min-width: 200px; flex: 2; }
.filters .clear { align-self: center; font-size: 13px; color: var(--ink-soft); }
.filters .clear:hover { color: var(--accent); }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  padding: 10px 0 0;
  margin-top: 10px;
  border-top: 1px solid var(--line);
}
.chips + .chips { margin-top: 0; }
.chips-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  width: 82px;
  flex: none;
  padding-top: 5px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.chip:hover { border-color: var(--accent); background: var(--panel); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip .count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--quote);
  color: var(--ink-soft);
}
.chip.on .count { background: rgba(255, 255, 255, .22); color: inherit; }

.pager {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
}
.pager .fine { margin: 0 4px; }

/* A table reads as a card: rounded, one line between rows, and a head that
 * stays put while the hundred rows below it scroll past. */
.sheet {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 16px 0;
}
.sheet .grid { margin: 0; }
.sheet-scroll { overflow-x: auto; }

.grid { width: 100%; border-collapse: collapse; margin: 12px 0; }
.grid th, .grid td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.grid th {
  background: var(--panel-2);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.grid tbody tr { transition: background .12s ease; }
.grid tbody tr:hover { background: var(--panel-2); }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid td a { text-decoration: none; font-weight: 500; }
.grid td a:hover { text-decoration: underline; }
/* One accent per row: the identifier is the link that looks like one, the
 * title reads as text and only underlines when the pointer is on it. */
.grid .title a { color: var(--ink); font-weight: 500; }
.grid tr.gone { color: var(--ink-soft); text-decoration: line-through; }
.grid .shrink { width: 1%; white-space: nowrap; }
/* Columns that may go when the screen is narrow, so the title keeps its room. */
.grid .optional { display: table-cell; }

/* An identifier is a code, not prose. */
.code {
  font: 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -.01em;
  white-space: nowrap;
}

/* in force / repealed, as a dot and a word */
.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.state.live { color: var(--ok); }
.state.dead { color: var(--gone); }

.diff { font-size: 12px; color: var(--ink-soft); }

/* Nothing found: say so across the sheet, not in a stray cell. */
.nothing {
  padding: 44px 20px;
  text-align: center;
  color: var(--ink-soft);
}

.plain { list-style: none; padding: 0; }
.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.plain.tree li { border: 0; padding: 2px 0; }
.tree .kind-book { font-weight: 700; }
.tree .kind-title { padding-left: 12px; }
.tree .kind-section { padding-left: 24px; }
.log li { font-size: 13px; }

.actions { display: flex; gap: 8px; align-items: center; }
.actions form { margin: 0; }

.provision { border-top: 1px solid var(--line); padding-top: 12px; }
.provision h3 { margin-bottom: 2px; font-size: 15px; }
.provision pre {
  white-space: pre-wrap;
  font: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
}

/* -- what hangs under an answer ------------------------------------------ */

/* -- what held up, what a later court did, what our own standard says ----- */

.checked {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
}

.flag {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.flag.bad { border-color: var(--warn); color: var(--warn); }

/* The citator, in one colour per signal. Red is not decoration here: it is the
 * difference between a line to stand on and one to walk around. */
.signal-positive { color: var(--ok); }
.signal-neutral { color: var(--ink-soft); }
.signal-questioned { color: #b06000; }
.signal-negative { color: var(--warn); font-weight: 600; }
.signal-unknown { color: var(--gone); }

.treatment-followed, .treatment-applied, .treatment-explained { color: var(--ok); }
.treatment-distinguished, .treatment-criticised { color: #b06000; }
.treatment-overruled { color: var(--warn); font-weight: 600; }

/* The stoplight of a playbook. */
.stop-green { border-left: 3px solid var(--ok); }
.stop-amber { border-left: 3px solid #b06000; }
.stop-red { border-left: 3px solid var(--warn); }
.stop-absent { border-left: 3px solid var(--gone); }

.finding {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
}
.finding h3 { margin: 0 0 6px; font-size: 15px; }
.finding blockquote {
  margin: 6px 0;
  padding-left: 10px;
  border-left: 2px solid var(--line);
  color: var(--ink-soft);
}

/* The facts of a matter: two accounts beside each other. */
.conflict {
  background: var(--panel);
  border: 1px solid var(--warn);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
}
.conflict.settled { border-color: var(--line); opacity: .7; }
.conflict .reason { font-weight: 600; margin-top: 0; }
.conflict .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.conflict blockquote {
  margin: 6px 0;
  padding-left: 10px;
  border-left: 2px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

/* A table over documents, and the countries beside each other. */
.cell { vertical-align: top; min-width: 180px; }
.cell.absent { color: var(--ink-soft); font-style: italic; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.column {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.column h2 { margin-top: 0; }

@media (max-width: 800px) {
  .conflict .two { grid-template-columns: 1fr; }
}

.sources, .followups, .tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

.sources .chip, .followups .chip {
  font-size: 12px;
  padding: 3px 9px;
  text-decoration: none;
}

.followups .chip { border-style: dashed; }

.tools {
  border-top: 1px solid var(--line);
  padding-top: 6px;
  font-size: 12px;
}

.tools .link { font-size: 12px; }
.tools .link.on { color: var(--accent); font-weight: 700; }

/* -- the documents put to the jurist ------------------------------------- */

.papers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 6px 16px;
  border-top: 1px solid var(--line);
}

.paper {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
}

.paper a { text-decoration: none; }
.paper.unread { border-color: var(--warn); }
.paper .link { font-size: 12px; }

.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 6px;
}

.quick .chip { font-size: 12px; text-decoration: none; }

.composer .icon { align-self: flex-end; }

.token-once code {
  display: block;
  margin: 8px 0;
  padding: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  word-break: break-all;
}

/* Keep the desktop bar comfortably inside tablet-sized viewports. */
@media (min-width: 801px) and (max-width: 1024px) {
  .top { gap: 6px; padding-inline: 10px; }
  .brand-name, .header-help-label { display: none; }
  .top nav a, .nav-group summary { padding-inline: 9px; }
  .header-ai-link { padding-inline: 9px; }
  .top .right { gap: 5px; padding-left: 5px; }
  .top .who { max-width: 7ch; }
  .header-help-link { padding-inline: 4px; }
}

/* -- on a telephone ------------------------------------------------------ */

@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .list {
    position: fixed;
    inset: 57px auto 0 0;
    width: 280px;
    z-index: 4;
    transform: translateX(-100%);
    transition: transform .18s ease;
    box-shadow: var(--lift);
  }
  .list.open { transform: none; }
  .only-narrow { display: grid; }
  .bubble { max-width: 88%; }

  .top { padding: 0 10px; gap: 5px; }
  .brand span { display: none; }
  .top .top-nav {
    position: fixed;
    inset: 57px auto 0 0;
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    width: min(340px, 88vw);
    padding: 14px;
    overflow-y: auto;
    background: var(--panel);
    border-right: 1px solid var(--line);
    box-shadow: var(--lift);
    visibility: hidden;
    opacity: 0;
    transform: translateX(-100%);
    transition: transform .18s ease, opacity .18s ease, visibility .18s;
  }
  .top .top-nav.open { visibility: visible; opacity: 1; transform: none; }
  .top .top-nav > a, .top .top-nav .nav-group > summary { padding: 11px 12px; border-radius: 9px; font-size: 15px; }
  .top .top-nav > a.here { background: var(--accent); color: var(--accent-ink); }
  .nav-group { width: 100%; }
  .nav-group summary { justify-content: space-between; }
  .nav-dropdown {
    position: static;
    min-width: 0;
    margin: 2px 0 5px 14px;
    padding: 3px 0 3px 8px;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }
  .top nav .nav-dropdown a { padding: 9px 11px; }
  .nav-mobile-ai { display: block; margin-top: 8px; background: #c99a3d; color: #302006 !important; font-weight: 750; }
  .header-ai-link { display: none; }
  .navigation-scrim {
    position: fixed;
    inset: 56px 0 0;
    z-index: 10;
    display: block;
    width: 100%;
    height: calc(100% - 56px);
    padding: 0;
    border: 0;
    background: rgba(6, 14, 30, .48);
  }
  .navigation-scrim[hidden] { display: none; }
  body.nav-open { overflow: hidden; }
  .top .right { gap: 5px; margin-left: auto; padding-left: 6px; }
  .top .who { max-width: 8ch; }

  .page { padding: 18px 14px 32px; }
  .chips-label { width: 100%; padding-top: 0; }
  .grid th, .grid td { padding: 10px 11px; }

  /* A minimum width wider than the telephone is what pushes a page sideways.
   * Here every field takes the whole line instead. */
  .row-form { gap: 8px; }
  .row-form input, .row-form select,
  .filters .row-form input[type="text"], .filters .row-form input[type="search"] {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
  }
  .row-form button.primary { flex: 1 1 auto; }
  .row-form .check { flex: 1 1 100%; }
  .grid .optional { display: none; }
}

@media (max-width: 520px) {
  .top .who { display: none; }
  .account-menu > summary { padding-right: 4px; }
  .account-menu > summary::after { display: none; }
  .header-help-label, .lang-code { display: none; }
  .languages summary { padding: 5px; }
}

/* Someone who asked for less movement gets less movement. */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* -- help --------------------------------------------------------------- */

.help-page { max-width: 1040px; }
.help-page-head { max-width: 720px; margin: 8px 0 22px; }
.help-page-head h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); }
.help-page-head > p:last-child { margin: 8px 0 0; color: var(--ink-soft); font-size: 16px; }
.help-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.help-shortcuts a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.help-shortcuts a:hover { border-color: var(--accent); box-shadow: var(--lift); }
.help-shortcuts a span { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--panel-2); color: var(--accent); font-size: 17px; }
.help-sections { display: grid; gap: 16px; }
.help-section {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 15px;
  scroll-margin-top: 74px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.help-section-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: #0d2b58; color: #fff; font-size: 20px; }
.help-section h2 { margin: 0 0 6px; font-size: 21px; }
.help-section p { max-width: 760px; margin: 5px 0 12px; color: var(--ink-soft); }
.help-section ol, .help-section ul { margin: 8px 0 16px; padding-left: 20px; }
.help-section li + li { margin-top: 5px; }
.help-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.help-glossary { display: grid; gap: 8px; margin: 13px 0 17px; }
.help-glossary div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 9px 11px; border-radius: 9px; background: var(--panel-2); }
.help-glossary dt { font-weight: 750; }
.help-glossary dd { margin: 0; color: var(--ink-soft); }

@media (max-width: 800px) {
  .help-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .help-shortcuts { grid-template-columns: 1fr; }
  .help-section { grid-template-columns: 1fr; padding: 17px; }
  .help-section-icon { width: 36px; height: 36px; }
  .help-glossary div { grid-template-columns: 1fr; gap: 2px; }
}

/* -- provider settings ---------------------------------------------------- */

.provider-page { max-width: 1240px; }
.provider-page-head { margin: 8px 0 24px; }
.eyebrow {
  margin: 0 0 4px;
  color: #9b6d1e;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.provider-page-head h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); }
.provider-intro { max-width: 650px; margin: 8px 0 0; color: var(--ink-soft); font-size: 16px; }
.provider-help-link { display: inline-block; margin-top: 10px; color: #76500b; font-size: 13px; font-weight: 700; text-underline-offset: 2px; }
.provider-help {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid #d8c38e;
  border-radius: 12px;
  background: #fffaf0;
}
.provider-help-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #c99a3d; color: #382400; font-weight: 800; }
.provider-help h2 { margin: 0; font-size: 15px; }
.provider-help p { margin: 4px 0 0; color: var(--ink-soft); font-size: 13px; }
.provider-messages { display: grid; gap: 10px; margin-bottom: 18px; }
.provider-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 10px;
  font-weight: 550;
}
.provider-alert-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}
.provider-alert.is-success { border-color: #9bd6b2; background: #edf9f1; color: #086534; }
.provider-alert.is-success .provider-alert-icon { background: #0a7d3f; color: #fff; }
.provider-alert.is-warning { border-color: #e4c77e; background: #fff8e6; color: #78530e; }
.provider-alert.is-warning .provider-alert-icon { background: #c99a3d; color: #382400; }
.provider-alert.is-error { border-color: #e6a4a4; background: #fff1f1; color: #a12121; }
.provider-alert.is-error .provider-alert-icon { background: #b42318; color: #fff; }
.provider-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.provider-panel {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--lift);
}
.provider-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 96px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(13, 43, 88, .08), transparent 70%);
}
.provider-panel-chatgpt .provider-panel-head { background: linear-gradient(135deg, rgba(201, 154, 61, .14), transparent 70%); }
.provider-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.provider-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #0d2b58;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 6px 16px rgba(13, 43, 88, .18);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.06em;
}
.provider-mark-chatgpt {
  background: #c99a3d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 6px 16px rgba(154, 103, 12, .18);
  color: #2b210f;
  font-size: 13px;
  letter-spacing: -.08em;
}
.provider-brand h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.provider-brand p { margin: 1px 0 0; color: var(--ink-soft); font-size: 13px; }
.provider-admin-link { padding-top: 4px; color: var(--ink-soft); font-size: 12px; text-decoration: none; white-space: nowrap; }
.provider-admin-link:hover { color: var(--accent); text-decoration: underline; }
.provider-flow { padding: 20px; border-bottom: 1px solid var(--line); }
.provider-flow.is-pending { background: linear-gradient(180deg, rgba(201, 154, 61, .09), transparent); }
.provider-flow-status { display: grid; gap: 7px; margin-bottom: 16px; }
.provider-flow-status p { margin: 0; color: var(--ink-soft); }
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-good { border-color: #93cfab; background: #edf9f1; color: #087239; }
.status-warning { border-color: #e4c77e; background: #fff8e6; color: #78530e; }
.status-danger { border-color: #e6a4a4; background: #fff1f1; color: #a12121; }
.status-neutral { border-color: var(--line); background: var(--panel-2); color: var(--ink-soft); }
.is-pulsing { animation: provider-pulse 1.35s ease-in-out infinite; }
@keyframes provider-pulse { 50% { opacity: .35; transform: scale(.72); } }
.provider-steps { display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; counter-reset: provider-step; }
.provider-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.step-number {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0d2b58;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
}
.provider-steps strong { display: block; font-size: 14px; }
.provider-steps p { margin: 2px 0 9px; color: var(--ink-soft); font-size: 13px; }
.provider-steps-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.provider-steps-compact li { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.provider-action { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; background: #0d2b58; }
.provider-code-form, .provider-connect-form > div { display: flex; gap: 8px; align-items: end; }
.provider-code-form input, .provider-connect-form input { min-width: 0; margin: 0; }
.provider-code-form input { flex: 1; }
.provider-connect-form { margin-top: 6px; }
.provider-connect-form label { margin: 0 0 5px; font-size: 13px; font-weight: 650; color: var(--ink); }
.provider-connect-form label .fine { margin-left: 5px; font-weight: 400; }
.provider-connect-form input { flex: 1; }
.provider-cancel { margin-top: 14px; color: var(--ink-soft); font-size: 13px; }
.provider-cancel:hover { color: #a12121; }
.provider-disabled { opacity: .65; cursor: wait; pointer-events: none; background: #0d2b58; }
.provider-device-code {
  display: inline-block;
  padding: 9px 12px;
  border: 1px dashed #c99a3d;
  border-radius: 8px;
  background: #fff8e6;
  color: #4a3304;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .08em;
}
.provider-account-grid { display: grid; gap: 12px; padding: 16px; }
.provider-account { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.provider-account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.provider-account h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.provider-account-head p { margin: 2px 0 0; color: var(--ink-soft); font-size: 12px; overflow-wrap: anywhere; }
.provider-account-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
.provider-account-meta div { min-width: 0; }
.provider-account-meta dt { color: var(--ink-soft); font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.provider-account-meta dd { margin: 2px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }
.provider-usage { display: grid; gap: 5px; margin-top: 14px; }
.provider-usage-label { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-soft); font-size: 12px; }
.provider-usage progress { width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 999px; background: #dfe7f1; accent-color: #0d2b58; }
.provider-usage progress::-webkit-progress-bar { background: #dfe7f1; border-radius: 999px; }
.provider-usage progress::-webkit-progress-value { border-radius: 999px; background: #0d2b58; }
.provider-usage progress::-moz-progress-bar { border-radius: 999px; background: #0d2b58; }
.provider-usage-time, .provider-usage-checked { margin: 0; color: var(--ink-soft); font-size: 11px; }
.provider-usage-checked { margin-top: 5px; font-weight: 600; }
.provider-account-link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 650; text-decoration: none; }
.provider-account-link:hover { text-decoration: underline; }
.provider-activity { display: flex; align-items: center; gap: 7px; margin: 14px 0 0; color: var(--ink-soft); font-size: 13px; }
.provider-activity-dot { width: 8px; height: 8px; border-radius: 50%; background: #c99a3d; }
.provider-empty { display: grid; place-items: center; min-height: 112px; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-soft); text-align: center; }
.provider-empty span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--panel-2); color: #c99a3d; font-size: 22px; }
.provider-empty p { margin: 8px 0 0; font-size: 13px; }

.provider-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.provider-guide-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
  padding: 19px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.provider-guide-card h2 { margin: 0; font-size: 19px; }
.provider-guide-card p { margin: 4px 0 0; color: var(--ink-soft); }
.provider-access-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  margin-top: 18px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid #d9bd78;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.provider-access-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: #fff5d9; font-size: 19px; }
.provider-access-card h2 { margin: 0; font-size: 19px; }
.provider-access-card p { max-width: 700px; margin: 5px 0 14px; color: var(--ink-soft); }
.provider-access-card .provider-help-link { margin-left: 12px; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .eyebrow, :root:not([data-theme="light"]) .provider-help-link { color: #f4d27b; }
  :root:not([data-theme="light"]) .provider-access-card { border-color: #74531a; }
  :root:not([data-theme="light"]) .provider-access-icon { background: #3c2d0d; color: #f4d27b; }
  :root:not([data-theme="light"]) .help-shortcuts a span { color: #f4d27b; }
  :root:not([data-theme="light"]) .provider-alert.is-success, :root:not([data-theme="light"]) .status-good { border-color: #246f48; background: #14321f; color: #86e3a6; }
  :root:not([data-theme="light"]) .provider-alert.is-warning, :root:not([data-theme="light"]) .status-warning { border-color: #74531a; background: #3c2d0d; color: #f4d27b; }
  :root:not([data-theme="light"]) .provider-alert.is-error, :root:not([data-theme="light"]) .status-danger { border-color: #7f3030; background: #3a1717; color: #ffb3b3; }
  :root:not([data-theme="light"]) .provider-device-code { background: #3c2d0d; color: #f4d27b; }
  :root:not([data-theme="light"]) .provider-help { border-color: #74531a; background: #2d230f; }
  :root:not([data-theme="light"]) .provider-usage progress, :root:not([data-theme="light"]) .provider-usage progress::-webkit-progress-bar { background: #24334a; }
}
:root[data-theme="dark"] .eyebrow, :root[data-theme="dark"] .provider-help-link { color: #f4d27b; }
:root[data-theme="dark"] .provider-access-card { border-color: #74531a; }
:root[data-theme="dark"] .provider-access-icon { background: #3c2d0d; color: #f4d27b; }
:root[data-theme="dark"] .help-shortcuts a span { color: #f4d27b; }
:root[data-theme="dark"] .provider-alert.is-success, :root[data-theme="dark"] .status-good { border-color: #246f48; background: #14321f; color: #86e3a6; }
:root[data-theme="dark"] .provider-alert.is-warning, :root[data-theme="dark"] .status-warning { border-color: #74531a; background: #3c2d0d; color: #f4d27b; }
:root[data-theme="dark"] .provider-alert.is-error, :root[data-theme="dark"] .status-danger { border-color: #7f3030; background: #3a1717; color: #ffb3b3; }
:root[data-theme="dark"] .provider-device-code { background: #3c2d0d; color: #f4d27b; }
:root[data-theme="dark"] .provider-help { border-color: #74531a; background: #2d230f; }
:root[data-theme="dark"] .provider-usage progress, :root[data-theme="dark"] .provider-usage progress::-webkit-progress-bar { background: #24334a; }

@media (max-width: 900px) { .provider-layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .provider-guide-grid { grid-template-columns: 1fr; }
  .provider-access-card { grid-template-columns: 1fr; padding: 17px; }
  .provider-access-card .provider-help-link { display: block; margin: 12px 0 0; }
  .provider-panel-head { min-height: auto; padding: 16px; }
  .provider-admin-link { padding-top: 0; }
  .provider-flow { padding: 16px; }
  .provider-steps-compact { grid-template-columns: 1fr; }
  .provider-code-form, .provider-connect-form > div { align-items: stretch; flex-direction: column; }
  .provider-code-form .primary, .provider-connect-form .primary { width: 100%; }
  .provider-account-grid { padding: 12px; }
  .provider-account-meta { grid-template-columns: 1fr; gap: 8px; }
  .provider-page-head { margin-top: 0; }
}
