:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #647084;
  --line: #d9e2ea;
  --surface: #ffffff;
  --soft: #f4f7fb;
  --panel: #edf3fa;
  --accent: #0aaec0;
  --accent-dark: #087083;
  --accent-2: #715cf6;
  --ink-2: #172033;
  --nav: #050a16;
  --warn: #9a5a12;
  --error: #a73535;
}

/* Atlas: the user-facing workspace built from exact-ready Pro knowledge. */
.atlas-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.atlas-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.atlas-hero::after {
  content: none;
}

.atlas-hero > * { min-width: 0; }
.atlas-hero .eyebrow { color: var(--muted); }
.atlas-hero h1 {
  margin: 3px 0 4px;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: 0;
}
.atlas-hero p:last-child {
  max-width: 630px;
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
}
.atlas-pro-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #a7c6b7;
  border-radius: 6px;
  color: #23694d;
  background: #edf8f3;
  font-size: .72rem;
  font-weight: 760;
}

.atlas-command-card,
.atlas-section,
.atlas-empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}
.atlas-command-card { padding: 20px; }
.atlas-command-head,
.atlas-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.atlas-command-head { margin-bottom: 16px; }
.atlas-command-head h2,
.atlas-section-head h2 {
  margin: 4px 0 0;
  color: var(--ink);
  letter-spacing: -.03em;
}
.atlas-command-head h2 { font-size: 1.2rem; }
.atlas-section-head h2 { font-size: 1rem; }
.atlas-section-label,
.atlas-card-kicker {
  color: var(--accent-dark);
  font-size: .69rem;
  font-weight: 780;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.atlas-question-layout { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .7fr); }
.atlas-question-chat .question-chat-transcript { max-height: 390px; }
.atlas-question-composer { margin-top: 10px; }

.atlas-command-card .question-live-review {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.atlas-command-card .question-live-empty {
  border-radius: 6px;
}

.atlas-command-card .question-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.atlas-command-card .question-composer textarea[name="frage"] {
  min-height: 52px;
  max-height: 180px;
  padding: 12px 14px 11px 42px;
  border: 1px solid #cfd8df;
  border-radius: 6px;
  background: var(--surface);
  font-size: .9rem;
  line-height: 1.45;
}

.atlas-command-card .question-composer textarea[name="frage"]:focus {
  border-color: #7ca795;
  outline: 2px solid rgba(47, 133, 90, .14);
}

.atlas-command-card .question-stop-button {
  border-radius: 6px;
  box-shadow: none;
}

.atlas-new-chat-action,
.atlas-inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  font-size: .76rem;
  font-weight: 740;
  text-decoration: none;
}

.atlas-new-chat-action:hover,
.atlas-inline-action:hover {
  border-color: #9ebcac;
  background: #edf8f3;
}

.atlas-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: none;
}
.atlas-search svg {
  width: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
}
.atlas-search input {
  min-width: 0;
  padding: 11px 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
}
.atlas-search > a {
  color: var(--muted);
  font-size: 1.4rem;
  text-decoration: none;
}

.atlas-explorer-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.atlas-explorer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 20px 16px;
}
.atlas-explorer-head h2 { margin: 4px 0 5px; font-size: 1.28rem; letter-spacing: -.03em; }
.atlas-explorer-head p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.atlas-explorer-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #23694d;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.atlas-explorer-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3aa879;
  box-shadow: 0 0 0 4px rgba(58, 168, 121, .13);
}
.atlas-explorer-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 20px;
  padding: 0 12px;
  border: 1px solid #bfcbd5;
  border-radius: 8px;
  background: #fbfcfe;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.atlas-explorer-search:focus-within {
  border-color: #6d9e8a;
  box-shadow: 0 0 0 3px rgba(47, 133, 90, .11);
}
.atlas-explorer-search svg { width: 20px; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.atlas-explorer-search label { min-width: 0; }
.atlas-explorer-search input {
  width: 100%;
  padding: 13px 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: .92rem;
}
.atlas-explorer-search-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.atlas-explorer-search-actions button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
}
.atlas-explorer-search-actions .atlas-explorer-submit {
  color: #fff;
  background: #23694d;
  font-size: 1rem;
  font-weight: 800;
}
.atlas-explorer-search-actions .atlas-explorer-submit:hover,
.atlas-explorer-search-actions .atlas-explorer-submit:focus-visible {
  background: #174d38;
  outline: 0;
}
.atlas-explorer-status { min-height: 16px; margin: 6px 22px 0; color: var(--muted); font-size: .68rem; }
.atlas-explorer-shell.is-loading .atlas-explorer-content { opacity: .55; }
.atlas-explorer-content { padding: 0 20px 20px; transition: opacity .12s ease; }
.atlas-profile-suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 7px;
  margin: 8px 20px 0;
  padding: 9px;
  border: 1px solid #dfe7eb;
  border-radius: 8px;
  background: #fbfcfd;
}
.atlas-profile-suggestions[hidden],
.atlas-query-builder[hidden],
.atlas-query-filter-editor[hidden],
.atlas-query-filter-editor label[hidden] { display: none !important; }
.atlas-profile-suggestions button {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.atlas-profile-suggestions button:hover,
.atlas-profile-suggestions button:focus-visible { background: #edf8f3; outline: 0; }
.atlas-profile-suggestions strong { font-size: .76rem; }
.atlas-profile-suggestions span { color: var(--muted); font-size: .64rem; white-space: nowrap; }
.atlas-query-builder {
  display: grid;
  gap: 14px;
  margin: 8px 20px 16px;
  padding: 14px;
  border: 1px solid #dfe7eb;
  border-radius: 9px;
  background: #fbfcfd;
}
.atlas-query-profile { display: flex; align-items: baseline; gap: 8px; }
.atlas-query-profile > span { color: var(--muted); font-size: .64rem; font-weight: 780; text-transform: uppercase; }
.atlas-query-profile strong { font-size: .9rem; }
.atlas-query-profile small { margin-left: auto; color: var(--muted); font-size: .66rem; }
.atlas-query-fields { display: grid; gap: 8px; }
.atlas-query-fields > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.atlas-query-fields > div:first-child strong { font-size: .73rem; }
.atlas-query-fields > div:first-child span { color: var(--muted); font-size: .64rem; }
.atlas-query-fields > div:last-child { display: flex; flex-wrap: wrap; gap: 6px; }
.atlas-query-fields button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid #d4dfe5;
  border-radius: 7px;
  color: var(--ink-2);
  background: var(--surface);
  font-size: .68rem;
  font-weight: 720;
  cursor: pointer;
}
.atlas-query-fields button:hover { border-color: #93b6a7; background: #edf8f3; }
.atlas-query-fields button small { color: var(--muted); font-weight: 600; }
.atlas-query-filter-editor {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(130px, .8fr) minmax(150px, 1fr) minmax(130px, .8fr) auto;
  align-items: end;
  gap: 9px;
  padding: 11px;
  border-radius: 8px;
  background: #eef5f1;
}
.atlas-query-filter-editor label { display: grid; gap: 5px; min-width: 0; }
.atlas-query-filter-editor label > span { color: var(--muted); font-size: .6rem; font-weight: 760; text-transform: uppercase; }
.atlas-query-filter-editor label > strong { min-height: 36px; padding: 9px 0; font-size: .72rem; }
.atlas-query-filter-editor input,
.atlas-query-filter-editor select {
  width: 100%;
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid #c9d6dc;
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: .72rem;
}
.atlas-query-filter-editor > div { display: flex; gap: 6px; }
.atlas-query-filter-editor button { min-height: 36px; padding: 7px 10px; white-space: nowrap; }
.atlas-query-active-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.atlas-query-active-filters:empty { display: none; }
.atlas-query-active-filters button {
  padding: 6px 9px;
  border: 1px solid #b8d4c7;
  border-radius: 999px;
  color: #205f47;
  background: #edf8f3;
  font-size: .68rem;
  font-weight: 720;
  cursor: pointer;
}
.atlas-query-explanation {
  margin: 0;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.5;
}
.atlas-index-result-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #e7edf1; }
.atlas-index-result-summary strong { font-size: .82rem; }
.atlas-index-result-summary span { color: var(--muted); font-size: .67rem; }
.atlas-index-coverage { display: grid; gap: 3px; margin: 8px 0 12px; padding: 10px 12px; border: 1px solid #e2c97c; border-radius: 8px; background: #fff9e8; color: #56491f; }
.atlas-index-coverage strong { font-size: .74rem; }
.atlas-index-coverage span { font-size: .67rem; line-height: 1.45; }
.atlas-index-document-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.atlas-index-document { min-width: 0; padding: 14px; border: 1px solid #e0e7ec; border-radius: 8px; background: var(--surface); }
.atlas-index-document header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.atlas-index-document header > div { min-width: 0; }
.atlas-index-document header span { color: var(--muted); font-size: .62rem; }
.atlas-index-document h3 { margin: 4px 0 0; font-size: .9rem; line-height: 1.28; }
.atlas-index-document h3 a { color: var(--ink); text-decoration: none; }
.atlas-index-open { flex: 0 0 auto; color: var(--accent-dark); font-size: .65rem; font-weight: 760; text-decoration: none; }
.atlas-index-document > p { margin: 9px 0; color: var(--muted); font-size: .69rem; line-height: 1.45; }
.atlas-index-uncertain { margin-top: 14px; padding: 12px; border: 1px solid #e5ddd0; border-radius: 8px; background: #fcfaf6; }
.atlas-index-uncertain > summary { cursor: pointer; color: var(--ink); font-size: .75rem; font-weight: 650; }
.atlas-index-uncertain > p { margin: 8px 0 12px; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.atlas-index-document.is-uncertain { background: rgba(255, 255, 255, .72); border-color: #e5ddd0; }
.atlas-index-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin: 11px 0; }
.atlas-index-facts > div { min-width: 0; padding: 7px 8px; border-radius: 6px; background: var(--soft); }
.atlas-index-facts dt { overflow: hidden; color: var(--muted); font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.atlas-index-facts dd { margin: 2px 0 0; overflow: hidden; font-size: .68rem; font-weight: 740; text-overflow: ellipsis; white-space: nowrap; }
.atlas-index-participants { display: flex; flex-wrap: wrap; gap: 5px; }
.atlas-index-participants span { display: inline-flex; gap: 4px; padding: 4px 6px; border: 1px solid #e0e7ec; border-radius: 5px; font-size: .62rem; }
.atlas-index-participants small { color: var(--muted); }
.atlas-index-empty { display: grid; gap: 4px; padding: 18px; border-radius: 8px; background: var(--soft); }
.atlas-index-empty strong { font-size: .8rem; }
.atlas-index-empty span { color: var(--muted); font-size: .7rem; }
.atlas-explorer-suggestions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 4px 0 13px;
  scrollbar-width: thin;
}
.atlas-explorer-suggestions button {
  display: grid;
  flex: 0 0 auto;
  gap: 1px;
  padding: 7px 10px;
  border: 1px solid #d8e2e8;
  border-radius: 7px;
  color: var(--ink-2);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.atlas-explorer-suggestions button:hover { border-color: #93b6a7; background: #f0f8f4; }
.atlas-explorer-suggestions span { font-size: .74rem; font-weight: 760; }
.atlas-explorer-suggestions small { color: var(--muted); font-size: .62rem; }
.atlas-active-filters { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 0 13px; }
.atlas-active-filters button {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid #b8d4c7;
  border-radius: 999px;
  color: #205f47;
  background: #edf8f3;
  font-size: .7rem;
  font-weight: 760;
  cursor: pointer;
}
.atlas-active-filters button small { color: #537a68; font-weight: 600; }
.atlas-active-filters .atlas-filter-clear { border-color: transparent; color: var(--muted); background: transparent; }
.atlas-explorer-start {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 8px;
  color: var(--ink-2);
  background: var(--soft);
}
.atlas-explorer-start strong { font-size: .8rem; }
.atlas-explorer-start span { color: var(--muted); font-size: .73rem; line-height: 1.45; }
.atlas-explorer-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #e7edf1;
}
.atlas-explorer-summary strong { font-size: .83rem; }
.atlas-explorer-summary span { color: var(--muted); font-size: .7rem; }
.atlas-explorer-layout {
  display: grid;
  grid-template-columns: minmax(190px, .33fr) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  padding-top: 8px;
}
.atlas-explorer-facets {
  overflow: hidden;
  border: 1px solid #e0e7ec;
  border-radius: 8px;
}
.atlas-facet-title { display: grid; gap: 2px; padding: 12px; background: var(--soft); }
.atlas-facet-title strong { font-size: .75rem; }
.atlas-facet-title span { color: var(--muted); font-size: .63rem; }
.atlas-explorer-facets details { border-top: 1px solid #e7edf1; }
.atlas-explorer-facets summary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  color: var(--ink-2);
  font-size: .7rem;
  font-weight: 780;
  cursor: pointer;
  list-style: none;
}
.atlas-explorer-facets summary span { color: var(--muted); font-weight: 600; }
.atlas-explorer-facets details > div { display: grid; gap: 2px; padding: 0 6px 8px; }
.atlas-explorer-facets details button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 6px;
  border: 0;
  border-radius: 5px;
  color: var(--ink-2);
  background: transparent;
  font-size: .68rem;
  text-align: left;
  cursor: pointer;
}
.atlas-explorer-facets details button:hover,
.atlas-explorer-facets details button.is-active { color: #205f47; background: #edf8f3; }
.atlas-explorer-facets details button small { color: var(--muted); }
.atlas-explorer-results { display: grid; gap: 24px; min-width: 0; }
.atlas-explorer-result-head { display: flex; justify-content: space-between; margin-bottom: 5px; }
.atlas-explorer-result-head h3 { margin: 0; font-size: .82rem; }
.atlas-explorer-result-head span { color: var(--muted); font-size: .7rem; }
.atlas-explorer-records { display: grid; }
.atlas-explorer-record { padding: 15px 0; border-top: 1px solid #e7edf1; }
.atlas-explorer-record:first-child { border-top: 0; }
.atlas-explorer-record .atlas-card-kicker time { margin-left: auto; color: var(--muted); }
.atlas-explorer-record h4 { margin: 5px 0 10px; font-size: .98rem; }
.atlas-explorer-record h4 a { color: var(--ink); text-decoration: none; }
.atlas-explorer-record dl { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 10px; }
.atlas-explorer-record dl > div { padding: 6px 8px; border-radius: 6px; background: var(--soft); }
.atlas-explorer-record dt { color: var(--muted); font-size: .6rem; }
.atlas-explorer-record dd { margin: 2px 0 0; max-width: 220px; overflow: hidden; font-size: .7rem; font-weight: 740; text-overflow: ellipsis; white-space: nowrap; }
.atlas-explorer-participants { display: flex; flex-wrap: wrap; gap: 6px; }
.atlas-explorer-participants > span { display: inline-flex; gap: 5px; padding: 4px 7px; border: 1px solid #e1e8ec; border-radius: 6px; font-size: .68rem; }
.atlas-explorer-participants small { color: var(--muted); }
.atlas-explorer-entity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.atlas-explorer-entity-grid > a,
.atlas-explorer-documents > a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #e2e8ed;
  border-radius: 7px;
  color: var(--ink);
  text-decoration: none;
}
.atlas-explorer-entity-grid > a > span:nth-child(2),
.atlas-explorer-documents > a > span { display: grid; min-width: 0; gap: 2px; }
.atlas-explorer-entity-grid strong,
.atlas-explorer-documents strong { overflow: hidden; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.atlas-explorer-entity-grid small,
.atlas-explorer-documents small { overflow: hidden; color: var(--muted); font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
.atlas-explorer-entity-grid em { margin-left: auto; color: var(--muted); font-size: .64rem; font-style: normal; }
.atlas-explorer-documents { display: grid; gap: 6px; }
.atlas-explorer-documents time { margin-left: auto; color: var(--muted); font-size: .65rem; white-space: nowrap; }

.atlas-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.atlas-stat-grid article {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 11px 14px;
  border-right: 1px solid var(--line);
  background: transparent;
}
.atlas-stat-grid article:last-child { border-right: 0; }
.atlas-stat-grid strong { color: var(--ink); font-size: 1rem; letter-spacing: 0; }
.atlas-stat-grid span { color: var(--muted); font-size: .72rem; font-weight: 760; }

.atlas-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .78fr);
  align-items: start;
  gap: 16px;
  margin-top: 0;
}
.atlas-section { padding: 18px; }
.atlas-section-head { margin-bottom: 18px; }
.atlas-section-head > span { color: var(--muted); font-size: .72rem; }
.atlas-side-column { display: grid; gap: 16px; }
.atlas-timeline-list { display: grid; }
.atlas-record-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid #e8edf1;
}
.atlas-record-card:first-child { padding-top: 2px; border-top: 0; }
.atlas-record-date time,
.atlas-record-date span {
  display: inline-block;
  color: var(--ink-2);
  font-size: .75rem;
  font-weight: 780;
}
.atlas-record-body { min-width: 0; }
.atlas-card-kicker { display: flex; flex-wrap: wrap; gap: 5px 10px; }
.atlas-card-kicker span + span { color: var(--muted); }
.atlas-record-body h3 { margin: 5px 0 10px; font-size: 1.02rem; line-height: 1.25; }
.atlas-record-body h3 a { color: var(--ink); text-decoration: none; }
.atlas-record-body h3 a:hover { color: var(--accent-dark); }
.atlas-participants,
.atlas-source-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.atlas-participants a {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--ink-2);
  background: var(--soft);
  font-size: .76rem;
  text-decoration: none;
}
.atlas-participants small { color: var(--muted); font-size: .67rem; }
.atlas-source-row { margin-top: 9px; color: var(--muted); font-size: .7rem; }
.atlas-source-row a { max-width: 260px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.atlas-record-card.is-compact { grid-template-columns: 78px minmax(0, 1fr); padding: 14px 0; }

.atlas-upcoming-list,
.atlas-entity-list { display: grid; }
.atlas-upcoming-list > a,
.atlas-entity-list > a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-top: 1px solid #e8edf1;
  color: var(--ink);
  text-decoration: none;
}
.atlas-upcoming-list > a:first-child,
.atlas-entity-list > a:first-child { border-top: 0; }
.atlas-upcoming-list time {
  min-width: 48px;
  color: var(--accent-dark);
  font-size: .73rem;
  font-weight: 850;
}
.atlas-upcoming-list span,
.atlas-entity-list a > span:last-child { display: grid; min-width: 0; gap: 2px; }
.atlas-upcoming-list strong,
.atlas-entity-list strong { overflow: hidden; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.atlas-upcoming-list small,
.atlas-entity-list small { color: var(--muted); font-size: .69rem; }
.atlas-entity-avatar {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: var(--accent-dark);
  background: rgba(10, 174, 192, .1);
  font-size: .77rem;
  font-weight: 850;
}

.atlas-search-results,
.atlas-focus { margin: 0; }
.atlas-search-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 28px;
}
.atlas-search-result-grid h3 { margin: 0 0 12px; font-size: .82rem; }
.atlas-focus-meta { margin-top: -9px; color: var(--muted); font-size: .8rem; }
.atlas-fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.atlas-fact-grid > div { padding: 13px; border-radius: 12px; background: var(--soft); }
.atlas-fact-grid dt { color: var(--muted); font-size: .68rem; }
.atlas-fact-grid dd { margin: 5px 0 0; overflow-wrap: anywhere; color: var(--ink); font-size: .84rem; font-weight: 700; }
.atlas-focus-sources { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); font-size: .76rem; }

.atlas-review-section { padding: 0; overflow: hidden; }
.atlas-review-section summary { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; cursor: pointer; list-style: none; }
.atlas-review-section summary > span:first-child { display: grid; gap: 3px; }
.atlas-review-section summary small { color: var(--warn); font-weight: 800; text-transform: uppercase; }
.atlas-review-section > div { padding: 0 22px 18px; }
.atlas-review-section article { padding: 12px 0; border-top: 1px solid var(--line); }
.atlas-review-section article strong { font-size: .76rem; }
.atlas-review-section article p { margin: 4px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }

.atlas-empty-state { display: grid; justify-items: center; gap: 10px; padding: clamp(36px, 7vw, 68px) 24px; text-align: center; }
.atlas-empty-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #b8d4c7; border-radius: 8px; color: #23694d; background: #edf8f3; font-size: 1.1rem; }
.atlas-empty-state h2 { margin: 5px 0 0; }
.atlas-empty-state p { max-width: 560px; margin: 0 0 10px; color: var(--muted); line-height: 1.55; }
.atlas-empty-state p strong { color: var(--ink); }

@media (max-width: 900px) {
  .atlas-question-layout,
  .atlas-dashboard-grid,
  .atlas-search-result-grid,
  .atlas-explorer-layout { grid-template-columns: 1fr; }
  .atlas-question-layout .question-live-review { position: static; max-height: none; }
  .atlas-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-query-filter-editor { grid-template-columns: 1fr 1fr; }
  .atlas-query-filter-editor > div { grid-column: 1 / -1; }
  .atlas-index-document-list { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  .atlas-hero { align-items: flex-start; padding: 0 0 12px; }
  .atlas-pro-badge { display: none; }
  .atlas-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-stat-grid article { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .atlas-stat-grid article:nth-child(2) { border-right: 0; }
  .atlas-stat-grid article:nth-last-child(-n + 2) { border-bottom: 0; }
  .atlas-record-card,
  .atlas-record-card.is-compact { grid-template-columns: 1fr; gap: 5px; }
  .atlas-fact-grid { grid-template-columns: 1fr 1fr; }
  .atlas-explorer-head,
  .atlas-explorer-summary { display: grid; }
  .atlas-explorer-search { margin-inline: 12px; }
  .atlas-explorer-content { padding-inline: 12px; }
  .atlas-profile-suggestions,
  .atlas-query-builder { margin-inline: 12px; }
  .atlas-query-filter-editor { grid-template-columns: 1fr; }
  .atlas-query-filter-editor > div { grid-column: auto; }
  .atlas-query-fields > div:first-child,
  .atlas-index-result-summary { display: grid; }
  .atlas-explorer-entity-grid { grid-template-columns: 1fr; }
}

/* Standalone recovery page for unexpected server errors. */
.clutr-error-page {
  display: grid;
  min-height: 100dvh;
  margin: 0;
  padding: clamp(24px, 7vw, 80px);
  place-items: center;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(172, 206, 182, 0.28), transparent 34%),
    radial-gradient(circle at 85% 90%, rgba(222, 191, 143, 0.24), transparent 32%),
    var(--soft);
}

.clutr-error-card {
  width: min(100%, 680px);
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(31, 46, 39, 0.12);
}

.clutr-error-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(38px, 7vw, 70px);
  color: inherit;
  font-size: 1.08rem;
  font-weight: 700;
  text-decoration: none;
}

.clutr-error-brand img {
  width: 32px;
  height: 32px;
}

.clutr-error-symbol {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  border: 1px solid color-mix(in srgb, var(--error) 35%, var(--line));
  border-radius: 15px;
  place-items: center;
  color: var(--error);
  background: color-mix(in srgb, var(--error) 7%, var(--surface));
  font-size: 1.45rem;
  font-weight: 750;
}

.clutr-error-card h1 {
  max-width: 560px;
  margin: 8px 0 14px;
  font-size: clamp(2rem, 7vw, 3.45rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.clutr-error-copy {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.clutr-error-reference {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.clutr-error-reference code {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.clutr-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.clutr-error-actions a,
.clutr-error-actions button {
  min-height: 44px;
}

@media (max-width: 520px) {
  .clutr-error-actions {
    display: grid;
  }

  .clutr-error-actions a,
  .clutr-error-actions button {
    width: 100%;
    justify-content: center;
  }
}

/* Public homepage */
.landing-home {
  display: grid;
  margin-top: -28px;
}

.landing-stage,
.landing-value-band,
.landing-final-band {
  box-sizing: border-box;
  width: 100%;
  margin-left: 0;
  padding-right: 0;
  padding-left: 0;
  clip-path: inset(0 -100vmax);
}

.landing-stage {
  position: relative;
  min-height: 570px;
  padding-top: 58px;
  padding-bottom: 42px;
  border-bottom: 1px solid #d9e2ea;
  background: #eef3f6;
  box-shadow: 0 0 0 100vmax #eef3f6;
  overflow: hidden;
}

.landing-stage-copy {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 15px;
  width: min(570px, 48%);
}

.landing-stage-copy h1 {
  max-width: 560px;
  margin: 0;
  color: #0c172a;
  font-size: clamp(2.8rem, 4.5vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.landing-stage-lead {
  max-width: 555px;
  margin: 0;
  color: #405069;
  font-size: 1.08rem;
  line-height: 1.58;
}

.landing-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.landing-stage-note {
  margin: 0;
  color: #617087;
  font-size: 0.84rem;
  font-weight: 750;
}

.landing-product-scene {
  position: absolute;
  top: 44px;
  right: 0;
  bottom: -22px;
  left: 49%;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  border: 1px solid #cbd7e1;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #ffffff;
  box-shadow: 0 24px 58px rgba(12, 23, 42, 0.15);
  overflow: hidden;
}

.landing-scene-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 16px 18px;
  border-bottom: 1px solid #dde5ec;
  background: #f9fbfc;
}

.landing-scene-header > div:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.landing-scene-header span,
.landing-analysis-results dt,
.landing-scene-target > span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.landing-scene-header strong {
  min-width: 0;
  color: #132238;
  overflow-wrap: anywhere;
}

.landing-scene-checks {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.landing-scene-checks span,
.landing-scene-keywords span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid #b9e2d0;
  border-radius: 999px;
  background: #eef9f3;
  color: #24734a;
  font-size: 0.68rem;
  font-weight: 850;
}

.landing-analysis-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.78fr) minmax(260px, 1.22fr);
  min-height: 0;
}

.landing-document-preview {
  display: grid;
  place-items: center;
  padding: 26px;
  border-right: 1px solid #dde5ec;
  background: #e6edf2;
}

.landing-document-paper {
  display: grid;
  align-content: start;
  gap: 10px;
  width: min(188px, 100%);
  aspect-ratio: 0.72;
  padding: 24px 20px;
  border: 1px solid #c6d1db;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(12, 23, 42, 0.14);
}

.landing-document-paper strong {
  margin-bottom: 10px;
  color: #0d7f91;
  font-size: 1.05rem;
}

.landing-document-paper i {
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: #d9e2e9;
}

.landing-document-paper i:nth-of-type(2),
.landing-document-paper i:nth-of-type(5) {
  width: 72%;
}

.landing-document-paper div {
  height: 68px;
  margin: 8px 0;
  border: 1px solid #dce5eb;
  background: #f5f8fa;
}

.landing-document-paper b {
  justify-self: end;
  margin-top: auto;
  color: #132238;
  font-size: 1.05rem;
}

.landing-analysis-results {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px;
}

.landing-analysis-results dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  margin: 0;
}

.landing-analysis-results dl > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid #e3e9ee;
}

.landing-analysis-results dd {
  min-width: 0;
  margin: 0;
  color: #17263c;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.landing-scene-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.landing-scene-keywords span {
  border-color: #c8d7e5;
  background: #f2f6f9;
  color: #4c5d73;
  text-transform: none;
}

.landing-scene-target {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 14px 0 0;
  border-top: 2px solid #75c79a;
}

.landing-scene-target strong {
  color: #226d47;
  font-size: 1.02rem;
  overflow-wrap: anywhere;
}

.landing-process-section {
  display: grid;
  gap: 30px;
  padding: 42px 0 62px;
}

.landing-section-heading {
  max-width: 700px;
}

.landing-section-heading h2,
.landing-value-copy h2,
.landing-final-band h2 {
  max-width: 720px;
  margin: 0;
  color: #0c172a;
  font-size: clamp(1.85rem, 3.4vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.landing-process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-process-grid li {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding-top: 16px;
  border-top: 3px solid #0aaec0;
}

.landing-process-grid li:nth-child(2) {
  border-top-color: #2c8f5b;
}

.landing-process-grid li:nth-child(3) {
  border-top-color: #c08624;
}

.landing-process-grid li:nth-child(4) {
  border-top-color: #63738a;
}

.landing-process-grid li > span {
  color: #66768b;
  font-size: 0.75rem;
  font-weight: 900;
}

.landing-process-grid h3,
.landing-value-list strong,
.landing-trust-strip strong {
  margin: 0;
  color: #14233a;
  font-size: 1.03rem;
}

.landing-process-grid p,
.landing-value-copy > p:last-child,
.landing-value-list span,
.landing-trust-strip span {
  margin: 0;
  color: #5a697d;
  line-height: 1.55;
}

.landing-value-band {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(480px, 1.2fr);
  gap: clamp(44px, 7vw, 96px);
  align-items: start;
  padding-top: 64px;
  padding-bottom: 64px;
  border-top: 1px solid #d9e2ea;
  border-bottom: 1px solid #d9e2ea;
  background: #eef3f6;
  box-shadow: 0 0 0 100vmax #eef3f6;
}

.landing-value-copy {
  display: grid;
  gap: 12px;
}

.landing-value-list {
  display: grid;
}

.landing-value-list > div {
  display: grid;
  grid-template-columns: minmax(140px, 0.42fr) minmax(0, 1fr);
  gap: 24px;
  padding: 17px 0;
  border-top: 1px solid #ccd7e0;
}

.landing-value-list > div:first-child {
  border-top: 3px solid #0aaec0;
}

.landing-trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 50px 0;
  border-bottom: 1px solid #d9e2ea;
}

.landing-trust-strip > div {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 0 22px;
  border-left: 1px solid #d9e2ea;
}

.landing-trust-strip > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.landing-final-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding-top: 46px;
  padding-bottom: 46px;
  background: #0b1425;
  box-shadow: 0 0 0 100vmax #0b1425;
}

.landing-final-band > div:first-child {
  display: grid;
  gap: 8px;
}

.landing-final-band .eyebrow {
  color: #55d2df;
}

.landing-final-band h2 {
  color: #ffffff;
}

.landing-final-band p:last-child {
  margin: 0;
  color: #b9c6d7;
}

.landing-final-band .secondary-button {
  border-color: rgba(255, 255, 255, 0.36);
  background: transparent;
  color: #ffffff;
}

@media (max-width: 960px) {
  .landing-stage {
    min-height: auto;
    padding-top: 42px;
  }

  .landing-stage-copy {
    width: min(680px, 100%);
  }

  .landing-product-scene {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 400px;
    margin-top: 34px;
    border-bottom: 1px solid #cbd7e1;
    border-radius: 8px;
  }

  .landing-process-grid,
  .landing-trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-value-band {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .landing-trust-strip {
    gap: 28px 0;
  }

  .landing-trust-strip > div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .landing-stage {
    padding-top: 30px;
    padding-bottom: 32px;
  }

  .landing-stage-copy h1 {
    font-size: 2.55rem;
  }

  .landing-stage-lead {
    font-size: 1rem;
  }

  .landing-stage-actions {
    width: 100%;
  }

  .landing-stage-actions a {
    flex: 1 1 150px;
    min-width: 0;
    justify-content: center;
    text-align: center;
  }

  .landing-product-scene {
    min-height: 0;
  }

  .landing-scene-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }

  .landing-scene-checks {
    flex-wrap: wrap;
  }

  .landing-analysis-grid {
    grid-template-columns: 1fr;
  }

  .landing-document-preview {
    display: none;
  }

  .landing-analysis-results {
    gap: 14px;
    padding: 14px;
  }

  .landing-analysis-results dl {
    gap: 0 14px;
  }

  .landing-process-section {
    padding: 50px 0 46px;
  }

  .landing-process-grid,
  .landing-trust-strip {
    grid-template-columns: 1fr;
  }

  .landing-process-grid {
    gap: 22px;
  }

  .landing-value-band {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .landing-value-list > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .landing-trust-strip {
    gap: 0;
    padding: 34px 0;
  }

  .landing-trust-strip > div,
  .landing-trust-strip > div:first-child,
  .landing-trust-strip > div:nth-child(3) {
    padding: 16px 0;
    border-top: 1px solid #d9e2ea;
    border-left: 0;
  }

  .landing-trust-strip > div:first-child {
    border-top: 0;
  }

  .landing-final-band {
    align-items: stretch;
    flex-direction: column;
    gap: 24px;
    padding-top: 38px;
    padding-bottom: 38px;
  }
}

@media (max-width: 420px) {
  .landing-stage-copy h1 {
    font-size: 2.05rem;
  }

  .landing-stage-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-stage-actions a {
    width: 100%;
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0.86rem;
  }
}

* {
  box-sizing: border-box;
}

.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;
}

html {
  min-height: 100%;
  background: var(--nav);
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, #eef5fb 0, #f7f9fc 260px, #f4f7fb 100%);
  color: var(--ink);
  overscroll-behavior-y: none;
}

body::before {
  content: "";
  position: fixed;
  top: -120px;
  left: 0;
  right: 0;
  height: 120px;
  z-index: 79;
  background: var(--nav);
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: -1px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 9px clamp(16px, 4vw, 42px) 8px;
  background: var(--nav);
  border-bottom: 1px solid rgba(111, 132, 161, 0.25);
  backdrop-filter: blur(14px);
}

.workspace-encryption-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px;
  border-bottom: 1px solid #d8e6dd;
  background: #f3fbf6;
  color: #173c2b;
  font-size: 0.88rem;
}

.workspace-encryption-banner.locked {
  border-bottom-color: #efd2a6;
  background: #fff8ec;
  color: #5e3b00;
}

.workspace-encryption-banner a {
  color: inherit;
  font-weight: 700;
}

.workspace-encryption-banner-meter {
  width: min(220px, 35vw);
  height: 5px;
  border-radius: 999px;
  background: rgba(23, 60, 43, 0.14);
  overflow: hidden;
}

.workspace-encryption-banner-meter span {
  display: block;
  height: 100%;
  background: #2e7d56;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 136px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.nav-menu summary,
.section-head a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.topbar .nav-link,
.topbar .nav-menu summary {
  color: #e9f4ff;
}

.nav-link,
.nav-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border: 2px solid var(--nav);
  border-radius: 999px;
  background: #e22b3d;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.nav-link:hover,
.nav-menu[open] summary,
.nav-menu summary:hover {
  background: var(--panel);
}

.topbar .nav-link:hover,
.topbar .nav-menu[open] summary,
.topbar .nav-menu summary:hover {
  background: rgba(73, 198, 226, 0.14);
}

.topbar .nav-link.active,
.topbar .nav-link[aria-current="page"] {
  background: transparent;
  color: #ffffff;
}

.nav-menu {
  position: relative;
}

.nav-menu summary {
  cursor: pointer;
  list-style: none;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.nav-menu[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.nav-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  display: grid;
  min-width: 210px;
  padding: 8px;
  border: 1px solid rgba(117, 138, 166, 0.35);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(5, 10, 22, 0.24);
}

.nav-menu-list.align-right {
  right: 0;
  left: auto;
}

.nav-menu-list a,
.nav-post-form button {
  padding: 10px 12px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  text-align: left;
}

.nav-menu-list a:hover,
.nav-post-form button:hover {
  background: var(--soft);
  color: var(--accent-dark);
}

.nav-post-form {
  display: grid;
  margin: 0;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(233, 244, 255, 0.22);
  border-radius: 8px;
  color: #b9c9dc;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 5px;
  border-radius: 6px;
  color: #d7e7f8;
  text-decoration: none;
}

.language-switcher a:hover,
.language-switcher a[aria-current="true"] {
  background: rgba(73, 198, 226, 0.16);
  color: #ffffff;
}

.language-switcher span {
  color: rgba(233, 244, 255, 0.34);
}

.mobile-top-actions,
.mobile-workspace-slot,
.mobile-bottom-nav,
.mobile-menu {
  display: none;
}

main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 32px) 56px;
}

.hero,
.detail-header,
.dashboard-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 18px;
  padding: 24px 0 18px;
}

.dashboard-header {
  align-items: end;
  padding-bottom: 10px;
}

.dashboard-header h1 {
  margin-bottom: 8px;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding-bottom: 8px;
}

.detail-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.archive-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 10px;
  min-width: min(260px, 100%);
}

.archive-stats div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
}

.archive-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.archive-stats strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.35rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(2rem, 7vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  font-size: 1.25rem;
}

.lead {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.preview-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(520px, 1.14fr);
  align-items: center;
  gap: clamp(24px, 5vw, 58px);
  min-height: calc(100vh - 154px);
  padding: clamp(28px, 5vw, 58px) 0 38px;
}

.preview-hero-copy {
  display: grid;
  gap: 14px;
  align-content: center;
}

.preview-hero-copy h1 {
  max-width: 760px;
  margin-bottom: 2px;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.preview-note {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.insight-demo {
  display: grid;
}

.insight-card {
  position: relative;
  display: grid;
  gap: 16px;
  min-height: 430px;
  padding: 24px;
  border: 1px solid rgba(111, 132, 161, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 252, 255, 0.72)),
    repeating-linear-gradient(90deg, rgba(8, 112, 131, 0.06) 0 1px, transparent 1px 34px);
  box-shadow: 0 24px 54px rgba(5, 10, 22, 0.13);
  overflow: hidden;
}

.insight-card::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(10, 174, 192, 0.14);
  border-radius: 8px;
  pointer-events: none;
}

.insight-card-head,
.insight-fields,
.insight-keywords,
.insight-target,
.insight-scan {
  position: relative;
  z-index: 1;
}

.insight-card-head {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(5, 10, 22, 0.08);
}

.demo-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.insight-card-head strong {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
}

.insight-scan {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.insight-scan span,
.insight-keywords span {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border: 1px solid rgba(111, 132, 161, 0.28);
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(5, 10, 22, 0.06);
}

.insight-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.insight-fields div {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.insight-fields span,
.insight-target span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.insight-fields strong {
  color: var(--ink);
  line-height: 1.25;
}

.insight-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.insight-keywords span {
  background: #effaf4;
  color: #1c6b42;
  text-transform: none;
}

.insight-target {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 18px;
  border: 1px solid rgba(37, 132, 82, 0.34);
  border-radius: 8px;
  background: #effaf4;
}

.insight-target strong {
  color: #1c6b42;
  font-size: 1.12rem;
  font-weight: 800;
}

.process-section,
.value-section,
.trust-strip {
  margin-top: 34px;
}

.section-headline {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-headline h2,
.value-section h2 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.05;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.process-step {
  display: grid;
  gap: 10px;
  min-height: 220px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.process-step span {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eefcff;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.process-step h3,
.value-list strong,
.trust-strip strong {
  margin: 0;
  color: var(--ink);
}

.process-step p,
.value-section p,
.value-list span,
.trust-strip span {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.value-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 28px;
  align-items: start;
  padding: 28px 0;
}

.value-list {
  display: grid;
  gap: 10px;
}

.value-list div {
  display: grid;
  gap: 5px;
  padding: 16px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
}

.value-list div:nth-child(2) {
  border-left-color: var(--accent-2);
}

.value-list div:nth-child(3) {
  border-left-color: #2c8f5b;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.trust-strip div {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.public-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  min-height: calc(100vh - 154px);
  padding: clamp(32px, 6vw, 72px) 0 34px;
}

.public-home-copy {
  display: grid;
  gap: 16px;
}

.public-home-copy h1 {
  max-width: 860px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.96;
}

.public-home-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-home-proof span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.public-product-shot {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(117, 138, 166, 0.34);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(20, 35, 55, 0.16);
}

.product-shot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.product-shot-top strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.product-shot-top span,
.product-shot-grid small,
.product-shot-grid span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.product-shot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.product-shot-grid div,
.product-shot-questions,
.product-shot-question {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.product-shot-grid strong {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}

.phone-scan-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(44, 143, 91, 0.28);
  border-radius: 8px;
  background: #f3fbf6;
}

.phone-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  aspect-ratio: 9 / 16;
  border: 2px solid #172033;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 252, 255, 0.9)),
    radial-gradient(circle at 50% 72%, rgba(10, 174, 192, 0.14), transparent 44%);
  box-shadow: 0 16px 32px rgba(20, 35, 55, 0.16);
  overflow: hidden;
}

.phone-camera-bar {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 30px;
  height: 4px;
  border-radius: 999px;
  background: #d5e0ea;
  transform: translateX(-50%);
}

.phone-document {
  display: grid;
  gap: 5px;
  width: 58px;
  padding: 9px 8px;
  border: 2px solid rgba(10, 174, 192, 0.58);
  border-radius: 7px;
  background: #ffffff;
  color: var(--accent-dark);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-3deg);
}

.phone-document i {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: #c8d8e7;
}

.phone-document i:nth-child(3) {
  width: 72%;
}

.phone-document i:nth-child(4) {
  width: 84%;
}

.phone-scan-copy {
  display: grid;
  gap: 4px;
}

.phone-scan-copy span {
  color: #24794d;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.phone-scan-copy strong {
  color: #173c2b;
  font-size: 1.08rem;
  line-height: 1.15;
}

.phone-scan-copy p {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.product-shot-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.product-shot-calendar span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-align: center;
}

.product-shot-calendar button {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 54px;
  place-items: center;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: default;
  font: inherit;
  font-weight: 850;
}

.product-shot-calendar button em {
  color: inherit;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 900;
}

.product-shot-calendar .has-event {
  cursor: help;
}

.product-shot-calendar .payment {
  border-color: rgba(192, 74, 56, 0.42);
  background: #fff6f4;
  color: #a33a28;
}

.product-shot-calendar .appointment {
  border-color: rgba(44, 143, 91, 0.35);
  background: #f3fbf6;
  color: #24794d;
}

.product-shot-calendar .deadline {
  border-color: rgba(154, 107, 8, 0.34);
  background: rgba(232, 195, 109, 0.16);
  color: #795103;
}

.product-shot-calendar .event {
  border-color: rgba(99, 115, 138, 0.32);
  background: rgba(99, 115, 138, 0.1);
  color: #3d4b5f;
}

.calendar-hover-card {
  position: absolute;
  right: 50%;
  bottom: calc(100% + 8px);
  z-index: 8;
  display: grid;
  width: min(240px, 72vw);
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(117, 138, 166, 0.34);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(20, 35, 55, 0.2);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(50%, 6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.calendar-hover-card strong {
  color: var(--ink);
  font-size: 0.85rem;
}

.calendar-hover-card small {
  color: var(--muted);
  font-size: 0.72rem;
}

.product-shot-calendar .has-event:hover .calendar-hover-card,
.product-shot-calendar .has-event:focus-visible .calendar-hover-card {
  opacity: 1;
  transform: translate(50%, 0);
}

.product-shot-questions {
  padding: 0;
  border: 0;
  background: transparent;
}

.product-shot-question {
  border-color: rgba(10, 174, 192, 0.32);
  background: rgba(10, 174, 192, 0.08);
}

.product-shot-question span,
.product-shot-question small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.product-shot-question strong {
  color: var(--accent-dark);
  font-size: 0.98rem;
  font-weight: 850;
}

.product-shot-question p {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.4;
}

.public-feature-band,
.public-capability-grid,
.public-security-strip {
  display: grid;
  gap: 14px;
  margin: 30px 0;
}

.public-feature-band {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-feature-band article,
.public-capability-grid div,
.public-security-strip div,
.public-workflow,
.public-final-cta {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(20, 35, 55, 0.05);
}

.public-feature-band article,
.public-capability-grid div,
.public-security-strip div {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.public-feature-band article > span {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.public-feature-band h2,
.public-workflow h2,
.public-capability-grid h2,
.public-final-cta h2 {
  margin: 0;
  color: var(--ink);
}

.public-feature-band p,
.public-workflow p,
.public-capability-grid p,
.public-security-strip span {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.public-workflow {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
  padding: 22px;
}

.public-workflow ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-workflow li {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.public-workflow li strong,
.public-security-strip strong {
  color: var(--ink);
}

.public-workflow li span {
  color: var(--muted);
  font-size: 0.92rem;
}

.public-capability-grid,
.public-security-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-final-cta {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 34px 0 10px;
  padding: 34px 18px;
  text-align: center;
}

.status {
  min-width: 118px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--warn);
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
}

.status.ready {
  color: var(--accent-dark);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 18px;
}

.status-chip {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(20, 35, 55, 0.04);
}

.status-chip span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-chip strong {
  color: var(--warn);
  font-size: 0.95rem;
}

.status-chip.ready strong {
  color: var(--accent-dark);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.dashboard-upload,
.dashboard-processing {
  min-height: 100%;
}

.dashboard-processing {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.calendar-panel {
  margin-top: 18px;
}

.calendar-workspace-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.calendar-workspace-filter > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace-filter-chip {
  --workspace-accent: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--workspace-accent);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 850;
}

.workspace-filter-chip input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--workspace-accent);
}

.workspace-filter-chip small {
  color: var(--muted);
  font-size: 0.72rem;
}

.workspace-filter-chip.disabled {
  opacity: 0.55;
}

.workspace-color-teal {
  --workspace-accent: #0aaec0;
}

.workspace-color-green {
  --workspace-accent: #2c8f5b;
}

.workspace-color-violet {
  --workspace-accent: #715cf6;
}

.workspace-color-amber {
  --workspace-accent: #9a6b08;
}

.workspace-color-rose {
  --workspace-accent: #c04a38;
}

.workspace-color-slate {
  --workspace-accent: #63738a;
}

.calendar-filter-row {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  gap: 8px;
  position: relative;
  z-index: 20;
  margin: 0 0 12px;
  max-width: 100%;
  overflow: visible;
}

.calendar-viewbar,
.calendar-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.segmented-control .active {
  border-color: rgba(10, 174, 192, 0.45);
  background: rgba(10, 174, 192, 0.12);
  color: var(--accent-dark);
}

.calendar-filter-form {
  position: relative;
  z-index: 20;
  margin: 0 0 12px;
  max-width: 100%;
  overflow: visible;
}

.calendar-filterbar {
  display: flex;
  align-items: flex-start;
  flex-flow: row nowrap;
  gap: 8px;
  position: relative;
  z-index: 20;
  margin: 0;
  max-width: 100%;
  overflow: visible;
}

.calendar-filter-menu {
  --calendar-type-color: var(--accent);
  --calendar-type-bg: rgba(10, 174, 192, 0.1);
  --calendar-type-border: rgba(10, 174, 192, 0.34);
  display: inline-block;
  flex: 0 0 auto;
  position: relative;
}

.calendar-filter-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--calendar-type-border);
  border-radius: 8px;
  background: var(--calendar-type-bg);
  color: var(--calendar-type-color);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
  list-style: none;
  white-space: nowrap;
  user-select: none;
}

.calendar-filter-menu summary::-webkit-details-marker {
  display: none;
}

.calendar-filter-menu summary::after {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease;
}

.calendar-filter-menu[open] summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.calendar-filter-menu summary small {
  color: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  opacity: 0.72;
}

.calendar-filter-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 8px;
  border: 1px solid rgba(14, 28, 54, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(20, 35, 55, 0.16);
}

.calendar-filter-menu.legal,
.calendar-filter-menu.orders {
  --calendar-type-color: #845607;
  --calendar-type-bg: rgba(232, 195, 109, 0.18);
  --calendar-type-border: rgba(154, 107, 8, 0.32);
}

.calendar-filter-menu.appointments {
  --calendar-type-color: #24794d;
  --calendar-type-bg: rgba(44, 143, 91, 0.12);
  --calendar-type-border: rgba(44, 143, 91, 0.32);
}

.calendar-filter-menu.payments {
  --calendar-type-color: #a33a28;
  --calendar-type-bg: rgba(192, 74, 56, 0.1);
  --calendar-type-border: rgba(192, 74, 56, 0.32);
}

.calendar-filter-menu.other {
  --calendar-type-color: #4f6075;
  --calendar-type-bg: rgba(99, 115, 138, 0.12);
  --calendar-type-border: rgba(99, 115, 138, 0.32);
}

.calendar-filter-chip {
  --calendar-type-color: var(--accent);
  --calendar-type-bg: rgba(10, 174, 192, 0.1);
  --calendar-type-border: rgba(10, 174, 192, 0.34);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--calendar-type-border);
  border-radius: 8px;
  background: var(--calendar-type-bg);
  color: var(--calendar-type-color);
  font-size: 0.84rem;
  font-weight: 800;
}

.calendar-filter-menu-panel .calendar-filter-chip {
  justify-content: flex-start;
  width: 100%;
  border-color: rgba(14, 28, 54, 0.1);
  background: #fff;
  color: var(--text);
}

.calendar-filterbar input {
  accent-color: var(--calendar-type-color);
}

.calendar-filter-chip.payment_deadline {
  --calendar-type-color: #a33a28;
  --calendar-type-bg: rgba(192, 74, 56, 0.1);
  --calendar-type-border: rgba(192, 74, 56, 0.32);
}

.calendar-filter-chip.legal_deadline,
.calendar-filter-chip.response_deadline,
.calendar-filter-chip.submission_deadline,
.calendar-filter-chip.compliance_deadline,
.calendar-filter-chip.cancellation_deadline,
.calendar-filter-chip.contract_deadline,
.calendar-filter-chip.renewal_deadline,
.calendar-filter-chip.warranty_deadline {
  --calendar-type-color: #845607;
  --calendar-type-bg: rgba(232, 195, 109, 0.18);
  --calendar-type-border: rgba(154, 107, 8, 0.32);
}

.calendar-filter-chip.deadline {
  --calendar-type-color: #845607;
  --calendar-type-bg: rgba(232, 195, 109, 0.18);
  --calendar-type-border: rgba(154, 107, 8, 0.32);
}

.calendar-filter-chip.appointment {
  --calendar-type-color: #24794d;
  --calendar-type-bg: rgba(44, 143, 91, 0.12);
  --calendar-type-border: rgba(44, 143, 91, 0.32);
}

.calendar-filter-chip.delivery_window,
.calendar-filter-chip.service_appointment,
.calendar-filter-chip.travel_event {
  --calendar-type-color: #266f88;
  --calendar-type-bg: rgba(34, 126, 156, 0.1);
  --calendar-type-border: rgba(34, 126, 156, 0.3);
}

.calendar-filter-chip.return_window,
.calendar-filter-chip.informational_date {
  --calendar-type-color: #4f6075;
  --calendar-type-bg: rgba(99, 115, 138, 0.12);
  --calendar-type-border: rgba(99, 115, 138, 0.32);
}

.calendar-filter-chip.event {
  --calendar-type-color: #4f6075;
  --calendar-type-bg: rgba(99, 115, 138, 0.12);
  --calendar-type-border: rgba(99, 115, 138, 0.32);
}

.calendar-archive-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 12px;
}

.calendar-filter-row .calendar-archive-switch,
.calendar-filter-row .calendar-filter-form,
.calendar-filter-row .calendar-filterbar {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

.calendar-filter-row .calendar-archive-switch {
  justify-content: flex-start;
}

.calendar-filter-row .calendar-filter-form {
  flex: 1 1 auto;
  min-width: min(100%, 420px);
}

.calendar-filter-row .calendar-filterbar {
  flex-flow: row wrap;
}

.calendar-archive-switch .active {
  border-color: rgba(10, 174, 192, 0.45);
  background: rgba(10, 174, 192, 0.12);
  color: var(--accent-dark);
}

.calendar-navigation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  justify-content: flex-start;
}

.calendar-navigation strong {
  min-width: 0;
  color: var(--ink);
  font-size: 1.05rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-board {
  margin-bottom: 16px;
}

.calendar-weekdays,
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  gap: 6px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-align: center;
}

.calendar-month-grid,
.week-view {
  gap: 6px;
}

.calendar-cell {
  position: relative;
  min-height: 118px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: visible;
}

.calendar-cell.muted {
  background: #f8fafc;
  color: var(--muted);
}

.calendar-cell.today {
  border-color: rgba(10, 174, 192, 0.55);
  box-shadow: inset 0 0 0 1px rgba(10, 174, 192, 0.12);
}

.calendar-cell > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.week-view {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.week-cell {
  min-height: 220px;
}

.day-view,
.agenda-view {
  display: grid;
  gap: 8px;
}

.calendar-day-column {
  display: grid;
  gap: 8px;
  min-height: 180px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.calendar-chip {
  position: relative;
  display: block;
  margin-bottom: 5px;
  padding: 5px 7px 5px 10px;
  border: 1px solid rgba(10, 174, 192, 0.22);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: rgba(10, 174, 192, 0.08);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: inset 3px 0 0 var(--workspace-accent, var(--accent));
  cursor: pointer;
}

.calendar-chip:hover,
.calendar-chip:focus-visible,
.calendar-chip.is-previewing {
  z-index: 6;
  border-color: rgba(10, 174, 192, 0.46);
  box-shadow: 0 10px 24px rgba(17, 97, 122, 0.12);
}

.calendar-chip > span:first-child {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.calendar-chip-completed {
  position: absolute;
  top: 4px;
  right: 5px;
  z-index: 2;
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 999px;
  background: #2c8f5b;
  color: #fff;
  box-shadow: 0 3px 8px rgba(44, 143, 91, 0.22);
}

.calendar-chip-completed svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-chip-workspace,
.calendar-workspace-label {
  display: block;
  color: var(--workspace-accent, var(--accent-dark));
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.2;
}

.calendar-chip-detail {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: grid;
  width: min(360px, 82vw);
  max-height: min(420px, calc(100vh - 170px));
  overflow-y: auto;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid rgba(117, 138, 166, 0.34);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(20, 35, 55, 0.22);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.calendar-chip-detail,
.calendar-chip-detail * {
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  overflow: visible;
}

.calendar-chip-detail strong,
.calendar-chip-detail b,
.calendar-chip-detail small,
.calendar-chip-detail em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.calendar-chip-detail strong {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-chip-detail b {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.35;
}

.calendar-chip-detail small {
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.35;
}

.calendar-chip-detail em {
  color: var(--ink);
  font-size: 0.76rem;
  font-style: normal;
}

.calendar-chip:hover .calendar-chip-detail,
.calendar-chip:focus-visible .calendar-chip-detail,
.calendar-chip.is-previewing .calendar-chip-detail {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.calendar-chip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 2px;
}

.calendar-chip-actions .calendar-mini-action {
  width: 30px;
  height: 30px;
  background: #fff;
}

.calendar-chip.payment_deadline {
  border-left-color: #c04a38;
  background: rgba(192, 74, 56, 0.08);
}

.calendar-chip.legal_deadline,
.calendar-chip.response_deadline,
.calendar-chip.submission_deadline,
.calendar-chip.compliance_deadline,
.calendar-chip.cancellation_deadline,
.calendar-chip.contract_deadline,
.calendar-chip.renewal_deadline,
.calendar-chip.warranty_deadline {
  border-left-color: #9a6b08;
  background: rgba(232, 195, 109, 0.16);
}

.calendar-chip.deadline {
  border-left-color: #9a6b08;
  background: rgba(232, 195, 109, 0.16);
}

.calendar-chip.appointment {
  border-left-color: #2c8f5b;
  background: rgba(44, 143, 91, 0.1);
}

.calendar-chip.delivery_window,
.calendar-chip.service_appointment,
.calendar-chip.travel_event {
  border-left-color: #227e9c;
  background: rgba(34, 126, 156, 0.09);
}

.calendar-chip.return_window,
.calendar-chip.informational_date {
  border-left-color: #63738a;
  background: rgba(99, 115, 138, 0.1);
}

.calendar-chip.event {
  border-left-color: #63738a;
  background: rgba(99, 115, 138, 0.1);
}

.calendar-mobile-day-panel {
  display: none;
}

.calendar-agenda-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.calendar-bulk-form {
  display: grid;
  gap: 12px;
  margin: 0;
}

.calendar-taskbar {
  position: sticky;
  top: 64px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(12px);
}

.calendar-select-all,
.calendar-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.calendar-select-all {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.gmail-candidate-select-group {
  display: inline-flex;
  align-items: stretch;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.gmail-candidate-select-group .calendar-select-all {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.gmail-candidate-select-group .calendar-select-all + .calendar-select-all {
  border-left: 1px solid var(--line);
}

.gmail-candidate-select-group .calendar-select-all:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.calendar-select input,
.calendar-select-all input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.calendar-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.calendar-event-card {
  --workspace-accent: var(--accent);
  display: grid;
  grid-template-columns: 34px minmax(112px, 0.18fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--workspace-accent);
  border-radius: 8px;
  background: var(--soft);
}

.calendar-event-card.no-actions {
  grid-template-columns: minmax(112px, 0.18fr) minmax(0, 1fr);
}

.calendar-event-card.read:not(.completed) {
  background: #f8fafc;
}

.calendar-event-card.overdue {
  border-color: rgba(192, 74, 56, 0.35);
  background: #fff6f4;
}

.calendar-event-card.completed {
  border-color: rgba(44, 143, 91, 0.28);
  background: #f3fbf6;
}

.calendar-event-card.completed .calendar-event-main {
  opacity: 0.78;
}

.calendar-event-card.completed .calendar-event-main strong {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(44, 143, 91, 0.45);
}

.calendar-date {
  display: grid;
  gap: 4px;
}

.calendar-date strong {
  color: var(--ink);
  font-size: 1rem;
}

.calendar-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.calendar-labels span {
  width: max-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(10, 174, 192, 0.12);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.calendar-event-card.overdue .calendar-labels span:first-child {
  background: rgba(192, 74, 56, 0.12);
  color: #a33a28;
}

.calendar-labels .calendar-status-label,
.calendar-event-card.completed .calendar-labels .calendar-status-label {
  background: rgba(44, 143, 91, 0.14);
  color: #24794d;
}

.calendar-event-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.calendar-event-main strong,
.calendar-event-main a,
.calendar-event-main span,
.calendar-event-main small {
  overflow-wrap: anywhere;
}

.calendar-event-main a {
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.calendar-event-main a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.calendar-event-main span {
  color: var(--muted);
  font-size: 0.9rem;
}

.calendar-event-main small {
  color: var(--muted);
  line-height: 1.35;
}

.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.calendar-actions form {
  display: inline;
}

.calendar-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.calendar-row-actions form {
  display: inline;
  margin: 0;
}

.calendar-snooze-menu {
  position: relative;
  display: inline-flex;
  margin: 0;
}

.calendar-snooze-menu summary {
  list-style: none;
}

.calendar-snooze-menu summary::-webkit-details-marker {
  display: none;
}

.calendar-snooze-menu summary svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-snooze-menu-bulk summary {
  min-width: 44px;
  padding: 0 12px;
}

.calendar-snooze-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.16);
}

.calendar-snooze-menu-bulk .calendar-snooze-options .compact {
  min-width: 42px;
  min-height: 34px;
  padding: 0 10px;
}

.calendar-mini-action {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.calendar-mini-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-mini-action:hover,
.calendar-mini-action:focus-visible {
  border-color: rgba(10, 174, 192, 0.45);
  background: rgba(10, 174, 192, 0.1);
  color: var(--accent-dark);
}

.calendar-mini-action.success {
  color: #24794d;
}

.calendar-mini-action.success:hover,
.calendar-mini-action.success:focus-visible {
  border-color: rgba(44, 143, 91, 0.35);
  background: rgba(44, 143, 91, 0.1);
}

.calendar-mini-action.subtle {
  color: var(--muted);
}

.calendar-mini-action.danger {
  border-color: rgba(192, 74, 56, 0.35);
  color: #a33a28;
}

.calendar-mini-action.danger:hover,
.calendar-mini-action.danger:focus-visible {
  border-color: rgba(192, 74, 56, 0.55);
  background: rgba(192, 74, 56, 0.1);
  color: #8f2f20;
}

.calendar-mini-action.text-action {
  width: 32px;
  font-size: 0.62rem;
}

.danger-action {
  border-color: rgba(192, 74, 56, 0.35);
  color: #a33a28;
}

.danger-action:hover,
.danger-action:focus-visible {
  border-color: rgba(192, 74, 56, 0.55);
  background: rgba(192, 74, 56, 0.1);
  color: #8f2f20;
}

.upload-panel,
.search-panel,
.text-preview {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(20, 35, 55, 0.05);
}

.upload-panel form {
  display: grid;
  gap: 12px;
}

.upload-panel form.calendar-filterbar {
  display: flex;
  align-items: flex-start;
  flex-flow: row nowrap;
  gap: 8px;
}

.upload-panel form.calendar-filter-form {
  display: block;
  gap: 0;
}

.dashboard-upload form {
  grid-template-columns: 1fr;
}

.upload-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-upload .upload-options {
  grid-template-columns: 1fr;
}

.upload-option {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.upload-option:hover,
.upload-option:focus-within {
  border-color: rgba(10, 174, 192, 0.6);
  background: #eefcff;
  box-shadow: 0 10px 22px rgba(10, 112, 131, 0.08);
}

.upload-option strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.upload-option span {
  color: var(--muted);
  line-height: 1.35;
}

.upload-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-combine-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  color: var(--ink);
}

.upload-combine-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.upload-combine-option span {
  display: grid;
  gap: 2px;
}

.upload-combine-option strong {
  font-size: 0.94rem;
}

.upload-combine-option small {
  color: var(--muted);
  line-height: 1.35;
}

.upload-dropzone {
  display: grid;
  place-items: center;
  min-height: 124px;
  padding: 24px;
  border: 2px dashed rgba(10, 174, 192, 0.65);
  border-radius: 8px;
  background: #f3fcff;
  text-align: center;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.upload-dropzone strong {
  font-size: 1.1rem;
}

.upload-dropzone span {
  color: var(--muted);
}

.upload-dropzone.drag-over {
  border-color: var(--accent-dark);
  background: #e8fbff;
  box-shadow: 0 12px 26px rgba(10, 112, 131, 0.12);
}

.upload-next-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(20, 35, 55, 0.22);
}

.upload-next-dialog::backdrop {
  background: rgba(20, 35, 55, 0.32);
}

.choice-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(20, 35, 55, 0.22);
}

.choice-dialog::backdrop {
  background: rgba(20, 35, 55, 0.32);
}

.choice-dialog > div {
  display: grid;
  gap: 12px;
}

.choice-dialog h3,
.choice-dialog p {
  margin: 0;
}

.upload-next-dialog > div {
  display: grid;
  gap: 12px;
}

.upload-next-dialog h3,
.upload-next-dialog p {
  margin: 0;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.selected,
.document-card small,
.metadata-grid span,
.metadata-grid small {
  color: var(--muted);
}

.document-viewer {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.document-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.document-viewer-head h2 {
  margin: 0;
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

.document-viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.document-viewer-actions .icon-button {
  width: 38px;
  height: 38px;
}

.document-viewer-actions svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.document-page-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  max-height: 72vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f7;
}

.document-page-frame img {
  display: block;
  max-width: 100%;
  height: auto;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(5, 10, 22, 0.14);
  transition: opacity 140ms ease;
}

.document-page-frame img.is-loading {
  opacity: 0.28;
}

.document-viewer-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: rgba(238, 242, 247, 0.72);
  color: var(--accent-dark);
  text-align: center;
  font-weight: 900;
}

.document-viewer-loading[hidden] {
  display: none;
}

.document-viewer-loading span {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(8, 112, 131, 0.18);
  border-top-color: var(--accent-dark);
  border-radius: 999px;
  animation: viewerSpin 900ms linear infinite;
}

@keyframes viewerSpin {
  to {
    transform: rotate(360deg);
  }
}

.document-text-frame {
  display: grid;
  gap: 10px;
}

.document-text-frame p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.document-text-frame pre {
  max-height: 520px;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  white-space: pre-wrap;
}

.selected {
  min-height: 24px;
  font-size: 0.95rem;
}

.dashboard-upload .selected,
.dashboard-upload .upload-clear,
.dashboard-upload .primary-button {
  grid-column: 1 / -1;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: white;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-button.compact {
  min-height: 44px;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-dark);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.secondary-button.compact {
  min-height: 44px;
}

.secondary-button.danger {
  border-color: rgba(192, 74, 56, 0.35);
  color: #a33a28;
}

.secondary-button.danger:hover,
.secondary-button.danger:focus-visible {
  border-color: rgba(192, 74, 56, 0.55);
  background: rgba(192, 74, 56, 0.1);
  color: #8f2f20;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.ghost-button.compact {
  min-height: 44px;
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.primary-button:disabled {
  background: #c6cfdb;
  color: #5f6c7d;
  box-shadow: none;
}

.settings-panel {
  padding: 24px 0 18px;
}

.workspace-switcher {
  display: inline-flex;
  align-items: center;
  height: 38px;
  margin: 0;
}

.workspace-switcher select {
  max-width: 190px;
  height: 38px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(233, 244, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #e9f4ff;
  font: inherit;
  font-weight: 800;
  line-height: 38px;
}

.workspace-switcher select:hover,
.workspace-switcher select:focus-visible {
  border-color: rgba(73, 198, 226, 0.48);
  background: rgba(73, 198, 226, 0.14);
  outline: none;
}

.workspace-switcher option {
  color: var(--ink);
}

.workspace-label {
  max-width: 190px;
  overflow: hidden;
  color: #e9f4ff;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-workspace-slot {
  min-width: 0;
}

.team-panel {
  display: grid;
  gap: 16px;
}

.team-member-list {
  display: grid;
  gap: 10px;
}

.team-member-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.security-workspace-row {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 380px);
}

.security-workspace-row > div,
.security-workspace-row > form {
  min-width: 0;
}

.security-key-form {
  width: 100%;
  margin: 0;
  grid-template-columns: minmax(0, 1fr) auto;
}

.security-key-form:has(input[name="recovery_code"]) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.security-key-form input {
  min-width: 0;
  width: 100%;
}

.security-key-form button {
  white-space: nowrap;
}

.security-key-form-lock {
  justify-self: end;
  width: auto;
  grid-template-columns: auto;
}

.security-action-stack {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.security-disable-panel {
  width: 100%;
  text-align: right;
}

.security-disable-panel summary {
  display: inline-flex;
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 0.88rem;
}

.security-disable-form {
  margin-top: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.security-disable-form input {
  min-width: 0;
}

.security-recovery-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #b7d7c4;
  border-radius: 8px;
  background: #f3fbf6;
}

.security-recovery-box p {
  margin: 0;
  color: var(--muted);
}

.security-recovery-box code {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  background: #ffffff;
  overflow-wrap: anywhere;
}

.security-session-meter {
  width: min(260px, 100%);
  height: 6px;
  border-radius: 999px;
  background: #e8edf3;
  overflow: hidden;
}

.security-session-meter span {
  display: block;
  height: 100%;
  background: #2e7d56;
}

.security-grant-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.security-grant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.security-grant-row > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-grant-form {
  margin: 0;
  grid-template-columns: auto;
}

.team-member-row div {
  display: grid;
  gap: 3px;
}

.team-member-row span {
  color: var(--muted);
  font-size: 0.92rem;
}

.workspace-row {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-left: 14px;
}

.workspace-row.is-default-workspace {
  border-color: #b7d7c4;
  background: linear-gradient(90deg, #f3fbf6 0, #ffffff 52%);
  box-shadow: inset 3px 0 0 #2e7d56;
}

.workspace-name-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.workspace-default-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #2e7d56;
  box-shadow: 0 0 0 3px rgba(46, 125, 86, 0.14);
}

.workspace-action-menu {
  position: relative;
  justify-self: end;
  z-index: 20;
}

.workspace-action-menu[open] {
  z-index: 90;
}

.workspace-action-menu summary {
  list-style: none;
}

.workspace-action-menu summary::-webkit-details-marker {
  display: none;
}

.workspace-action-button svg {
  fill: currentColor;
  stroke: none;
}

.workspace-action-panel {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 60;
  display: none;
  width: min(320px, calc(100vw - 40px));
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.16);
}

.workspace-action-menu[open] .workspace-action-panel {
  display: grid;
}

.workspace-action-panel form {
  margin: 0;
}

.workspace-menu-rename {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.workspace-menu-rename label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.workspace-menu-rename label span {
  font-size: 0.78rem;
  font-weight: 800;
}

.workspace-menu-rename input {
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.workspace-menu-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.workspace-menu-item:hover,
.workspace-menu-item:focus-visible {
  background: var(--soft);
}

.workspace-menu-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shared-link-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.shared-link-row > div {
  min-width: 0;
}

.shared-link-field {
  display: grid;
  gap: 4px;
}

.shared-link-field span {
  font-size: 0.78rem;
  font-weight: 800;
}

.shared-link-field input {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  color: var(--text);
  font: inherit;
}

.team-member-row select,
.field-row select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font: inherit;
}

@media (max-width: 760px) {
  .team-member-row {
    grid-template-columns: 1fr;
  }

  .workspace-menu-rename {
    grid-template-columns: 1fr;
  }

  .security-key-form,
  .security-key-form-lock {
    justify-self: stretch;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .security-action-stack {
    justify-content: stretch;
  }

  .document-audit-compact {
    grid-column: 2;
  }

  .document-audit-compact li,
  .document-audit-item {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .security-action-stack form,
  .security-action-stack button {
    width: 100%;
  }

  .security-disable-panel {
    text-align: left;
  }

  .security-disable-form {
    grid-template-columns: 1fr;
  }

  .security-key-form:has(input[name="recovery_code"]) {
    grid-template-columns: 1fr;
  }
}

.passkey-prompt {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  width: min(560px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid #bdd6e2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(21, 36, 54, 0.18);
}

.passkey-prompt-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #e8f7fa;
  color: var(--accent-dark);
}

.passkey-prompt-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.passkey-prompt-body h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.passkey-prompt-body p {
  margin: 0;
  color: var(--muted);
}

.passkey-prompt-body .empty {
  margin-top: 8px;
}

.passkey-prompt-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.connection-onboarding-prompt {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  width: min(440px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid #cbd9d4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(21, 36, 54, 0.18);
}

.connection-onboarding-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #edf7f2;
  color: #216e50;
}

.connection-onboarding-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.connection-onboarding-body h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.connection-onboarding-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.connection-onboarding-body .empty {
  margin-top: 7px;
  color: var(--danger);
  font-size: 0.82rem;
}

.connection-onboarding-body .empty:empty {
  display: none;
}

.connection-onboarding-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-form {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.toggle-row,
.field-row {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.toggle-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.toggle-row input {
  width: 22px;
  height: 22px;
}

.field-row input,
.field-row textarea {
  min-height: 44px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.field-row textarea {
  resize: vertical;
}

.setup-notes {
  margin-top: 22px;
}

.cloud-panel {
  margin-bottom: 18px;
}

.settings-group {
  padding: 10px 0 4px;
}

.settings-group-head {
  align-items: flex-end;
}

.settings-disclosure {
  padding: 0;
  overflow: hidden;
}

.settings-disclosure.is-filtered-out {
  display: none;
}

.settings-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 18px;
  cursor: pointer;
  list-style: none;
}

.settings-disclosure > summary::-webkit-details-marker {
  display: none;
}

.settings-disclosure > summary span {
  display: grid;
  gap: 4px;
}

.settings-disclosure > summary strong {
  font-size: 1.05rem;
}

.settings-disclosure > summary small {
  color: var(--muted);
  font-weight: 700;
}

.settings-disclosure > summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent-dark);
  border-bottom: 2px solid var(--accent-dark);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.settings-disclosure[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.settings-disclosure[open] > summary::after {
  transform: rotate(225deg);
}

.settings-disclosure > form,
.settings-disclosure > .document-list,
.settings-disclosure > .folder-tree,
.settings-disclosure > .folder-tree-toolbar,
.settings-disclosure > .settings-actions,
.settings-disclosure > .settings-grid,
.settings-disclosure > .storage-disclosure-list,
.settings-disclosure > .setup-notes,
.settings-disclosure > p,
.settings-disclosure > pre {
  margin: 18px;
}

.storage-disclosure-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.storage-disclosure-item {
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.storage-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 18px;
}

.storage-status-row span {
  display: grid;
  gap: 4px;
}

.storage-status-row strong {
  font-size: 1.05rem;
}

.storage-status-row small {
  color: var(--muted);
  font-weight: 700;
}

.storage-status-row .status-text.ready {
  color: #147a46;
}

.folder-tree-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.file-browser-toolbar,
.folder-preview-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  color: var(--muted);
  font-weight: 700;
}

.folder-preview-note {
  min-height: 28px;
  padding: 10px 12px;
  border: 1px solid rgba(10, 174, 192, 0.28);
  border-radius: 8px;
  background: #eefcff;
  color: var(--accent-dark);
}

.search-result-pages {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.search-result-pages > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.disabled-link {
  pointer-events: none;
  opacity: 0.48;
}

.folder-preferences-form {
  margin-bottom: 14px;
}

.folder-apply-form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: -2px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 700;
}

.folder-apply-progress {
  display: grid;
  gap: 8px;
  margin: 18px;
  padding: 12px;
  border: 1px solid rgba(10, 174, 192, 0.28);
  border-radius: 8px;
  background: #eefcff;
}

.folder-apply-progress[hidden] {
  display: none;
}

.folder-apply-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent-dark);
}

.folder-apply-progress progress {
  width: 100%;
  height: 10px;
  accent-color: var(--accent-dark);
}

.folder-apply-progress small {
  color: var(--muted);
  font-weight: 800;
}

.folder-apply-progress.is-done {
  border-color: rgba(37, 132, 82, 0.34);
  background: #effaf4;
}

.folder-apply-progress.is-error {
  border-color: rgba(185, 28, 28, 0.28);
  background: #fff5f5;
}

.range-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) minmax(110px, auto);
  align-items: center;
  gap: 14px;
}

.range-row > span {
  display: grid;
  gap: 3px;
}

.range-row strong {
  color: var(--ink);
}

.range-row small,
.range-row output {
  color: var(--muted);
}

.range-row output {
  font-weight: 800;
  text-align: right;
}

.range-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent-dark);
}

.range-row.is-disabled {
  opacity: 0.62;
}

.range-row.is-disabled input[type="range"] {
  cursor: not-allowed;
}

.folder-template-builder {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #f8fbfd;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toggle-row > span {
  display: grid;
  gap: 3px;
}

.toggle-row input {
  width: 44px;
  height: 24px;
  accent-color: var(--accent-dark);
}

.folder-template-canvas {
  display: grid;
  gap: 8px;
  position: relative;
}

.folder-template-node {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(10, 174, 192, 0.22);
  border-radius: 8px;
  background: #fff;
  transition: background 140ms ease, border-color 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.folder-template-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eefcff;
  color: var(--accent-dark);
  font-weight: 900;
}

.folder-template-node.is-active {
  border-color: rgba(37, 132, 82, 0.34);
  background: #effaf4;
}

.folder-template-node.is-active .folder-template-index {
  background: #fff;
  color: #18633c;
  border: 1px solid rgba(37, 132, 82, 0.22);
}

.folder-template-node span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.folder-template-node small {
  color: var(--muted);
}

.folder-template-node.is-muted {
  border-style: dashed;
  background: #f4f7f9;
  opacity: 0.5;
  transform: scale(0.985);
}

.folder-template-buttons,
.folder-template-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.folder-template-actions select {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.folder-template-builder.is-disabled .folder-template-canvas,
.folder-template-builder.is-disabled .folder-template-actions {
  opacity: 0.48;
}

.folder-tree-status {
  color: var(--accent-dark);
  font-weight: 800;
}

.folder-tree-status.error {
  color: var(--error);
}

.folder-tree {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.folder-node {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.folder-node:first-child {
  border-left-color: transparent;
}

.folder-node summary {
  list-style: none;
}

.folder-node summary::-webkit-details-marker {
  display: none;
}

.folder-node-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.folder-node-summary:hover {
  background: var(--soft);
}

.folder-node-summary::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent-dark);
  border-bottom: 2px solid var(--accent-dark);
  transform: rotate(-45deg);
}

.folder-node[open] > .folder-node-summary::before {
  transform: rotate(45deg);
}

.folder-node-summary.dragging {
  opacity: 0.5;
}

.folder-node.is-dragging {
  opacity: 0.78;
}

.folder-node.folder-preview {
  animation: folderSlideIn 140ms ease-out;
}

.folder-node-summary.drop-target {
  border-color: rgba(10, 174, 192, 0.65);
  background: #eefcff;
}

.folder-node-label {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.folder-node-summary small {
  color: var(--muted);
  white-space: nowrap;
}

.folder-node-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.folder-node-actions button {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent-dark);
  font-weight: 900;
  cursor: pointer;
}

.folder-node-actions button:hover,
.folder-node-actions button:focus-visible {
  border-color: rgba(10, 174, 192, 0.65);
  background: #eefcff;
}

.folder-inline-notification {
  display: grid;
  grid-template-columns: minmax(180px, 360px) auto;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px 34px;
  padding: 0 10px 8px;
}

.folder-inline-notification input {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.folder-inline-notification input:focus {
  outline: 2px solid rgba(10, 174, 192, 0.22);
  border-color: rgba(10, 174, 192, 0.65);
}

.folder-inline-notification .icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent-dark);
}

.folder-inline-notification .icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.folder-inline-notification .icon-button:hover,
.folder-inline-notification .icon-button:focus-visible {
  border-color: rgba(10, 174, 192, 0.65);
  background: #eefcff;
}

.folder-inline-notification.is-disabled {
  grid-template-columns: 1fr;
}

.folder-inline-notification.is-disabled small {
  color: var(--muted);
  font-weight: 700;
}

.folder-children {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0 0 0 24px;
  border-left: 1px solid rgba(111, 132, 161, 0.22);
}

@keyframes folderSlideIn {
  from {
    opacity: 0.45;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.path {
  color: var(--muted);
  word-break: break-all;
}

.error-text {
  color: #b42318;
}

.email-connection-dialog {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
  max-width: min(720px, calc(100vw - 32px));
  width: 720px;
  padding: 24px;
}

.email-connection-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.email-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 780;
  line-height: 1.1;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.email-action-button.primary {
  border-color: #087e8c;
  background: #087e8c;
  color: #ffffff;
}

.email-action-button.primary:hover,
.email-action-button.primary:focus-visible {
  border-color: #076b77;
  background: #076b77;
}

.email-action-button.secondary {
  border-color: #d4dfe4;
  background: #f8fafb;
  color: #354650;
}

.email-action-button.secondary:hover,
.email-action-button.secondary:focus-visible {
  border-color: #b9cbd2;
  background: #f0f5f7;
}

.email-action-button.danger {
  color: var(--error);
}

.email-action-button.danger:hover,
.email-action-button.danger:focus-visible {
  border-color: rgba(171, 43, 43, 0.14);
  background: rgba(171, 43, 43, 0.07);
}

.email-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.email-connection-choice {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.email-wizard-steps {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.email-wizard-steps li {
  border-bottom: 2px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0 0 8px;
}

.email-wizard-steps li.active {
  border-color: var(--accent);
  color: var(--text);
  font-weight: 700;
}

.email-wizard-steps li.complete {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  color: var(--text);
}

.email-connection-list .settings-actions {
  align-items: center;
  justify-content: flex-end;
}

.gmail-candidate-row.email-connection-row {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.email-connection-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
}

.email-connection-icon.gmail {
  background: #eef8f4;
  color: #0f6848;
}

.email-connection-icon.imap {
  background: #eef6fb;
  color: #0f4b5b;
}

.email-connection-icon.forwarding {
  background: #fff7e8;
  color: #8a5700;
}

.gmail-candidate-row.email-connection-row:hover,
.gmail-candidate-row.email-connection-row:focus-visible {
  border-color: rgba(10, 174, 192, 0.48);
  box-shadow: 0 12px 26px rgba(20, 35, 55, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.email-connection-copy {
  min-width: 0;
}

.gmail-candidate-row.email-connection-row .email-connection-copy strong,
.gmail-candidate-row.email-connection-row .email-connection-copy small {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.email-connection-status {
  align-self: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
  white-space: nowrap;
}

.email-connection-detail {
  display: grid;
  gap: 18px;
}

.email-connection-detail-actions {
  justify-content: flex-start;
}

.storage-connections-panel {
  padding: 20px;
}

.storage-connections-panel > .section-head {
  align-items: flex-start;
  margin-bottom: 18px;
}

.storage-connections-panel > .section-head h2,
.storage-connections-panel > .section-head p {
  margin: 0;
}

.storage-connections-panel > .section-head p {
  margin-top: 5px;
}

.storage-connection-list {
  display: grid;
  gap: 10px;
}

.storage-connection-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.storage-connection-row > summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.storage-connection-row > summary::-webkit-details-marker {
  display: none;
}

.storage-connection-row > summary > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.storage-connection-row > summary small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.storage-connection-row[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
}

.storage-connection-settings {
  padding: 18px;
  margin: 0;
}

.storage-disconnect-form {
  padding: 0 18px 18px;
  margin: 0;
}

.storage-connections-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

.storage-connection-dialog {
  width: 680px;
}

.storage-connection-wizard {
  margin: 0;
}

.storage-wizard-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.storage-wizard-step {
  min-height: 260px;
}

.storage-wizard-step h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.storage-provider-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.storage-provider-choice {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.storage-provider-choice:hover,
.storage-provider-choice:focus-visible {
  border-color: rgba(10, 174, 192, 0.56);
  background: #f7fcfc;
  outline: none;
}

.storage-provider-choice:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.storage-provider-choice > span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.storage-provider-choice small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.storage-provider-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f7f9;
  color: #243446;
  font-weight: 900;
}

.storage-provider-icon.google,
.storage-provider-icon.google_drive {
  background: #eef8f4;
  color: #126b4a;
}

.storage-provider-icon.onedrive {
  background: #eaf5fc;
  color: #075f8f;
}

.storage-provider-icon.dropbox {
  background: #edf3ff;
  color: #0758c7;
}

.storage-provider-icon.hidrive {
  background: #fff7d6;
  color: #624b00;
}

.storage-provider-icon.api_upload {
  background: #f2effb;
  color: #51407c;
  font-size: 0.68rem;
}

.storage-provider-icon.local_sync {
  background: #eef6f8;
  color: #145c67;
}

.storage-technical-details {
  display: grid;
  gap: 14px;
}

.storage-technical-details .settings-actions form {
  margin: 0;
}

.storage-platform-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.storage-platform-fieldset legend {
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 800;
}

.storage-platform-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.storage-platform-options label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.storage-platform-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.storage-platform-options span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.87rem;
  font-weight: 750;
  text-align: center;
}

.storage-platform-options input:checked + span {
  border-color: var(--accent);
  background: #eef9fa;
  color: #075c66;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.storage-platform-options input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.storage-completion {
  margin: 0;
}

.storage-secret-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: end;
}

.storage-secret-block > span {
  grid-column: 1 / -1;
  color: var(--ink);
  font-weight: 800;
}

.storage-secret-block pre {
  min-width: 0;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .email-wizard-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .storage-connections-panel {
    padding: 14px;
  }

  .storage-provider-choice-grid {
    grid-template-columns: 1fr;
  }

  .storage-wizard-step {
    min-height: 0;
  }

  .storage-connection-row > summary {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .storage-connection-row > summary .email-connection-status {
    display: none;
  }

  .storage-secret-block {
    grid-template-columns: 1fr;
  }

  .storage-secret-block > span {
    grid-column: auto;
  }

  .storage-secret-block .secondary-button {
    justify-self: start;
  }

  .storage-platform-options {
    grid-template-columns: 1fr;
  }
}

.recent {
  padding-top: 28px;
}

.dashboard-processing.recent {
  padding-top: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.compact-head {
  align-items: flex-start;
  margin-bottom: 12px;
}

.section-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.document-list {
  display: grid;
  gap: 10px;
}

.document-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(140px, 0.7fr) minmax(160px, 0.75fr);
  gap: 8px 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.document-bulk-form {
  display: grid;
  gap: 12px;
}

.document-taskbar {
  top: 64px;
}

.document-card-selectable {
  grid-template-columns: 34px 84px minmax(0, 1fr) minmax(220px, 0.45fr) auto auto;
}

.document-card-title {
  grid-column: 2 / -1;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.document-card-title:hover {
  color: var(--accent-dark);
}

.document-card-selectable .manual-classification-thumb {
  grid-column: 2;
}

.document-card-selectable .document-card-main {
  grid-column: 3;
  grid-template-columns: minmax(0, 1fr);
}

.document-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(140px, 0.7fr) minmax(160px, 0.75fr);
  gap: 8px 14px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.document-card-move {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.document-card-move input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
}

.document-card-move small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
}

a.document-card:hover {
  border-color: rgba(10, 174, 192, 0.45);
  box-shadow: 0 10px 26px rgba(17, 97, 122, 0.08);
}

.document-card-selectable:has(.document-card-main:hover) {
  border-color: rgba(10, 174, 192, 0.45);
  box-shadow: 0 10px 26px rgba(17, 97, 122, 0.08);
}

.document-card strong,
.document-card span,
.document-card small,
.document-card-main strong,
.document-card-main span,
.document-card-main small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.document-card span,
.document-card-main span {
  color: var(--accent-dark);
  font-weight: 700;
}

.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 800;
}

.import-job {
  grid-template-columns: 1fr;
  gap: 8px;
}

.job-heading,
.job-identity,
.job-state {
  display: flex;
  align-items: center;
}

.job-heading {
  justify-content: space-between;
  gap: 16px;
}

.job-identity {
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.job-source-type {
  color: var(--muted) !important;
  font-size: 0.78rem;
  font-weight: 700 !important;
}

.document-card .job-state {
  flex: 0 0 auto;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.document-card .job-status {
  color: inherit;
}

.job-activity {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: import-activity-pulse 1.4s ease-in-out infinite;
}

.job-list-scroll {
  max-height: min(58vh, 680px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.progress-shell {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 180ms ease;
}

.progress-shell.is-running:not(.is-indeterminate) .progress-bar {
  background-size: 200% 100%;
  animation: import-progress-active 1.8s linear infinite;
}

.progress-shell.is-indeterminate .progress-bar {
  width: 34%;
  animation: import-progress-indeterminate 1.35s ease-in-out infinite;
}

@keyframes import-activity-pulse {
  0%,
  100% { opacity: 0.42; }
  50% { opacity: 1; }
}

@keyframes import-progress-active {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@keyframes import-progress-indeterminate {
  from { transform: translateX(-110%); }
  to { transform: translateX(305%); }
}

.job-current,
.job-error,
.job-warning {
  overflow-wrap: anywhere;
  word-break: normal;
}

.job-current,
.job-count {
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .job-activity,
  .progress-shell.is-running .progress-bar {
    animation: none;
  }
}

.job-error {
  color: var(--error);
}

.job-warning {
  color: var(--warn);
}

.cancel-job {
  justify-self: start;
}

.cancel-job:disabled {
  cursor: wait;
  opacity: 0.65;
}

.form-submit-status {
  color: var(--muted);
  display: block;
  font-weight: 800;
  margin-top: 4px;
}

.job-details {
  margin-top: 4px;
}

.job-source-type {
  align-self: start;
  background: #eaf4ff;
  border: 1px solid #b8d7f4;
  border-radius: 999px;
  color: #19527f;
  font-size: 0.78rem;
  font-weight: 800;
  justify-self: start;
  padding: 3px 8px;
}

.job-details summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 800;
}

.job-documents {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.job-document {
  display: grid;
  gap: 4px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.job-document > :not(.job-document-thumb) {
  grid-column: 2;
}

.job-document a {
  color: var(--ink);
  font-weight: 800;
}

.job-document-thumb {
  display: block;
  grid-row: 1 / span 7;
  width: 54px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.job-document-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.manual-classification-card {
  grid-template-columns: 28px 78px minmax(0, 0.9fr) minmax(280px, 1.1fr);
  align-items: start;
}

.manual-classification-select {
  padding-top: 6px;
}

.manual-classification-thumb {
  display: block;
  width: 78px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.manual-classification-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.manual-classification-taskbar {
  margin-bottom: 12px;
}

.manual-classification-form {
  grid-column: 4;
  margin-bottom: 0;
}

.manual-classification-actions {
  display: flex;
  grid-column: 4;
  flex-wrap: nowrap;
  gap: 10px;
}

.manual-classification-actions form {
  margin: 0;
}

.manual-classification-actions .compact {
  min-width: 86px;
  white-space: nowrap;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 10px 0 24px;
}

.metadata-grid > div {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.workspace-card-breakdown {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  margin-top: 2px;
}

.workspace-card-breakdown span,
.workspace-card-breakdown strong {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.25;
}

.workspace-card-breakdown span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-card-breakdown strong {
  text-align: right;
}

pre {
  max-height: 460px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #26322e;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  line-height: 1.5;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.search-form label {
  display: grid;
  gap: 7px;
}

.search-form label span {
  color: var(--muted);
  font-weight: 900;
}

.search-form input {
  width: 100%;
}

.search-progress {
  grid-column: 1 / -1;
}

.question-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.question-form label {
  display: grid;
  gap: 7px;
}

.question-form label span {
  color: var(--muted);
  font-weight: 900;
}

.question-form textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.question-progress,
.search-progress {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(10, 174, 192, 0.28);
  border-radius: 8px;
  background: #eefcff;
}

.question-progress[hidden],
.search-progress[hidden] {
  display: none;
}

.question-progress-head,
.search-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 0.92rem;
}

.question-progress-head span,
.search-progress-head span {
  color: var(--muted);
  font-weight: 800;
}

.question-progress-track,
.search-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(10, 174, 192, 0.16);
}

.question-progress-track span,
.search-progress-track span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transition: width 0.55s ease;
}

.search-progress-track span {
  width: 100%;
  transform: scaleX(0.04);
  transform-origin: left center;
  transition: transform 0.55s ease;
}

.question-evidence-preview {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 2px;
}

.question-evidence-preview[hidden] {
  display: none;
}

.question-evidence-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
}

.question-evidence-preview-head small {
  color: var(--muted);
  font-weight: 800;
}

.question-evidence-list {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-height: 360px;
  overflow: auto;
}

.question-evidence-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(14, 28, 54, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.question-evidence-item.is-relevant {
  border-color: rgba(10, 174, 192, 0.42);
  background: rgba(255, 255, 255, 0.92);
}

.question-evidence-item.is-muted {
  opacity: 0.76;
}

.question-evidence-item.is-error {
  border-color: rgba(204, 67, 67, 0.35);
}

.question-evidence-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.question-evidence-item-top a {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-evidence-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(14, 28, 54, 0.08);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.question-evidence-item.is-running .question-evidence-status {
  background: rgba(10, 174, 192, 0.16);
  color: var(--ink);
}

.question-evidence-item.is-relevant .question-evidence-status {
  background: rgba(10, 174, 192, 0.2);
  color: #076a75;
}

.question-evidence-item.is-error .question-evidence-status {
  background: rgba(204, 67, 67, 0.12);
  color: #9b2f2f;
}

.question-evidence-item small {
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.question-evidence-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.answer-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  margin-top: 18px;
}

.answer-panel > * {
  min-width: 0;
  max-width: 100%;
}

.answer-text {
  min-width: 0;
  max-width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.answer-document-link {
  max-width: 100%;
  color: var(--accent-dark);
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.answer-document-link:hover {
  color: var(--accent);
}

.answer-sources {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.answer-sources > strong {
  color: var(--ink);
}

.answer-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.answer-source-row > a:first-child,
.answer-sources > a {
  display: grid;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
}

.answer-source-row > a:first-child:hover,
.answer-sources > a:hover {
  border-color: rgba(10, 174, 192, 0.45);
  background: #eefcff;
}

.answer-sources span {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.answer-sources small {
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.document-hover-preview {
  position: fixed;
  z-index: 1500;
  display: grid;
  grid-template-columns: minmax(250px, 286px) minmax(190px, 1fr);
  gap: 14px;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.48);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2), 0 4px 12px rgba(15, 23, 42, 0.1);
  opacity: 0;
  transform: translateY(3px);
  pointer-events: none;
  transition: opacity 90ms ease, transform 90ms ease;
}

.document-hover-preview[hidden] {
  display: none;
}

.document-hover-preview.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.document-hover-preview-media {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 0.72;
  max-height: min(390px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid #dce3ea;
  border-radius: 6px;
  background: #edf1f5;
}

.document-hover-preview-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.document-hover-preview-media > span {
  display: none;
  width: 42%;
  aspect-ratio: 0.72;
  border: 1px solid #c7d1dc;
  border-radius: 4px;
  background: #ffffff;
}

.document-hover-preview-media.is-loading img,
.document-hover-preview-media.is-error img {
  display: none;
}

.document-hover-preview-media.is-loading > span,
.document-hover-preview-media.is-error > span {
  display: block;
}

.document-hover-preview-media.is-loading > span {
  animation: document-preview-pulse 1.15s ease-in-out infinite alternate;
}

.document-hover-preview-copy {
  display: flex;
  min-width: 0;
  padding: 8px 6px 8px 0;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.document-hover-preview-copy strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.document-hover-preview-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #526174;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.55;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 11;
}

@keyframes document-preview-pulse {
  from { opacity: 0.48; }
  to { opacity: 0.9; }
}

@media (hover: none), (pointer: coarse), (max-width: 700px) {
  .document-hover-preview {
    display: none !important;
  }
}

input[name="q"] {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.file-browser {
  display: grid;
  gap: 16px;
  padding-top: 28px;
}

.document-result-shell {
  display: grid;
  gap: 16px;
  margin: 8px 0 22px;
  padding-top: 10px;
}

.question-document-results {
  margin-top: 22px;
}

.document-result-head {
  align-items: flex-end;
}

.result-view-switch {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  min-height: 40px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf1f5;
}

.result-view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 92px;
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
}

.result-view-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.result-view-button[aria-pressed="true"] {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(30, 41, 59, 0.14);
}

.result-view-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.result-view-panel[hidden] {
  display: none;
}

.result-folder-browser.file-browser {
  gap: 12px;
  padding-top: 0;
}

.search-relevance-results {
  display: grid;
  gap: 12px;
  margin: 0;
}

.search-relevance-heading {
  margin-bottom: 2px;
}

.search-relevance-list {
  display: grid;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.search-relevance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 240px) 34px;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 10px 6px 10px 12px;
  border-bottom: 1px solid rgba(217, 226, 234, 0.72);
  content-visibility: auto;
  contain-intrinsic-size: auto 62px;
}

.search-relevance-row:last-child {
  border-bottom: 0;
}

.search-relevance-row > a {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.search-relevance-row > a:hover strong {
  color: var(--accent-dark);
}

.search-relevance-row strong,
.search-relevance-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-relevance-row small,
.search-relevance-row > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.search-relevance-list.is-strong .search-relevance-row {
  background: #f3fbf7;
  box-shadow: inset 3px 0 0 #2f855a;
}

.search-relevance-disclosure {
  border-bottom: 1px solid var(--line);
}

.search-relevance-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 8px 6px 8px 12px;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.search-relevance-disclosure > summary small {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #e7edf3;
  color: #334155;
  font-weight: 850;
}

.search-relevance-disclosure.is-possible .search-relevance-row {
  opacity: 0.82;
}

.search-relevance-empty {
  margin: 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.file-count-pill {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-dark);
  font-weight: 900;
}

.file-tree {
  display: grid;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.file-tree-folder {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.file-tree-folder > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}

.file-tree-folder > summary:hover {
  background: var(--soft);
}

.file-tree-folder > summary.drop-target {
  background: #eefcff;
  outline: 2px solid rgba(10, 174, 192, 0.45);
  outline-offset: -2px;
}

.file-tree-folder > summary::-webkit-details-marker {
  display: none;
}

.file-tree-folder > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 0;
  flex: 0 0 auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}

.file-tree-folder[open] > summary::after {
  transform: translateY(3px) rotate(225deg);
}

.file-tree-folder > summary > span:not(.folder-icon):not(.folder-action-bar) {
  display: grid;
  gap: 3px;
}

.file-tree-folder summary .folder-action-bar {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  margin-left: auto;
}

.folder-action-menu {
  position: relative;
  z-index: 20;
}

.folder-action-menu-button svg {
  fill: currentColor;
  stroke: none;
}

.folder-action-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  display: none;
  min-width: 210px;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.16);
}

.folder-action-menu.is-open .folder-action-menu-panel,
.folder-action-menu:focus-within .folder-action-menu-panel {
  display: grid;
}

.folder-action-menu-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.folder-action-menu-item:hover,
.folder-action-menu-item:focus-visible {
  background: var(--soft);
}

.folder-action-menu-item.danger {
  color: #a33a28;
}

.folder-action-menu-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-tree-folder summary strong {
  color: var(--ink);
}

.file-tree-folder summary small,
.file-tree-file small {
  color: var(--muted);
  font-weight: 700;
}

.folder-icon,
.file-icon {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
}

.folder-icon::before {
  content: "";
  position: absolute;
  inset: 7px 2px 2px;
  border: 1px solid rgba(8, 112, 131, 0.32);
  border-radius: 5px;
  background: #eefcff;
}

.folder-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 13px;
  height: 8px;
  border: 1px solid rgba(8, 112, 131, 0.32);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: #eefcff;
}

.file-icon::before {
  content: "";
  position: absolute;
  inset: 2px 6px 2px 5px;
  border: 1px solid rgba(111, 132, 161, 0.42);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(5, 10, 22, 0.06);
}

.file-icon::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 3px;
  width: 7px;
  height: 7px;
  border-left: 1px solid rgba(111, 132, 161, 0.42);
  border-bottom: 1px solid rgba(111, 132, 161, 0.42);
  background: #f4f7fb;
}

.file-icon::after {
  z-index: 1;
}

.file-icon[data-file-label] {
  display: inline-grid;
  place-items: end center;
  padding-bottom: 4px;
  color: #50627c;
  font-size: 0.55rem;
  font-weight: 950;
  letter-spacing: 0;
}

.file-icon[data-file-label]::after {
  content: attr(data-file-label);
  right: auto;
  top: auto;
  bottom: 4px;
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
}

.file-icon-pdf::before {
  border-color: rgba(185, 28, 28, 0.36);
  background: #fff5f5;
}

.file-icon-pdf[data-file-label] {
  color: #b91c1c;
}

.file-icon-word::before {
  border-color: rgba(37, 99, 235, 0.34);
  background: #eff6ff;
}

.file-icon-word[data-file-label] {
  color: #2563eb;
}

.file-icon-tabelle::before {
  border-color: rgba(22, 163, 74, 0.34);
  background: #f0fdf4;
}

.file-icon-tabelle[data-file-label] {
  color: #16803b;
}

.file-icon-praesentation::before {
  border-color: rgba(234, 88, 12, 0.34);
  background: #fff7ed;
}

.file-icon-praesentation[data-file-label] {
  color: #c2410c;
}

.file-icon-bild::before {
  border-color: rgba(8, 145, 178, 0.34);
  background: #ecfeff;
}

.file-icon-bild[data-file-label] {
  color: #087f99;
}

.file-icon-code::before {
  border-color: rgba(76, 29, 149, 0.32);
  background: #f5f3ff;
}

.file-icon-code[data-file-label] {
  color: #5b21b6;
}

.file-icon-text::before {
  border-color: rgba(82, 82, 91, 0.28);
  background: #fafafa;
}

.file-tree-children {
  display: grid;
  gap: 2px;
  margin-left: 17px;
  padding: 0 0 0 22px;
  border-left: 1px solid rgba(111, 132, 161, 0.22);
}

.file-tree-children .file-tree-folder {
  margin-top: 0;
}

.file-tree-file {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(217, 226, 234, 0.72);
  border-radius: 8px;
  content-visibility: auto;
  contain-intrinsic-size: auto 54px;
}

.file-tree-file.is-strong-search-result {
  background: #f3fbf7;
  box-shadow: inset 3px 0 0 #2f855a;
}

.file-tree-file.is-search-focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.file-tree-file:hover {
  background: rgba(244, 247, 251, 0.78);
}

.file-tree-file:last-child {
  border-bottom: 0;
}

.file-select {
  display: inline-grid;
  place-items: center;
}

.file-select input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.file-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.file-main span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.file-main strong,
.file-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-main:hover strong {
  color: var(--accent-dark);
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.file-actions form {
  margin: 0;
}

.document-audit-compact {
  grid-column: 2 / 4;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.document-audit-compact summary {
  cursor: pointer;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-audit-compact ul,
.document-audit-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.document-audit-compact li,
.document-audit-item {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid rgba(217, 226, 234, 0.72);
}

.document-audit-compact li > span,
.document-audit-item > span {
  color: var(--muted);
  font-size: 0.78rem;
}

.document-audit-compact li > strong,
.document-audit-item strong {
  color: var(--text);
}

.document-audit-compact small,
.document-audit-item small {
  display: block;
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.document-audit-panel {
  margin-bottom: 18px;
}

.document-extraction-review {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(178, 117, 16, 0.28);
  border-radius: 8px;
  background: linear-gradient(150deg, #fffaf0, #fff 62%);
}

.document-extraction-review-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.document-extraction-review-heading .eyebrow {
  color: #956510;
  font-size: 0.68rem;
}

.document-extraction-review-heading h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1rem;
}

.document-extraction-review-intro,
.document-extraction-review-boundary {
  margin: 0;
  color: #6e5935;
  font-size: 0.8rem;
  line-height: 1.5;
}

.document-extraction-review-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 6px;
  background: #edf8f3;
  color: #266247;
}

.document-extraction-review-status svg,
.document-extraction-review-submit svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.document-extraction-review-status span {
  display: grid;
  gap: 2px;
}

.document-extraction-review-status small {
  color: #4f7866;
  font-size: 0.73rem;
}

.document-extraction-review-form {
  display: grid;
  gap: 12px;
}

.document-extraction-conflict {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(178, 117, 16, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.76);
}

.document-extraction-conflict legend {
  display: grid;
  gap: 2px;
  max-width: 100%;
  padding: 0 5px;
}

.document-extraction-conflict legend span {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.document-extraction-conflict legend strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.document-extraction-values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px;
}

.document-extraction-values span {
  padding: 4px 7px;
  border: 1px solid rgba(178, 117, 16, 0.2);
  border-radius: 999px;
  background: #fff8e8;
  color: #65450f;
  font-size: 0.75rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.document-extraction-choice {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.document-extraction-choice:hover,
.document-extraction-choice:has(input:checked) {
  border-color: rgba(8, 126, 140, 0.24);
  background: rgba(8, 126, 140, 0.06);
}

.document-extraction-choice input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent-dark);
}

.document-extraction-choice > span {
  display: grid;
  gap: 2px;
}

.document-extraction-choice strong {
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.document-extraction-choice small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.document-extraction-meanings {
  display: none;
  gap: 7px;
  padding: 0 8px 4px 33px;
}

.document-extraction-choice.is-separate:has(input:checked) + .document-extraction-meanings {
  display: grid;
}

.document-extraction-meanings label {
  display: grid;
  grid-template-columns: minmax(70px, 0.5fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #65450f;
  font-size: 0.74rem;
  font-weight: 750;
}

.document-extraction-meanings input {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #cad8df;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.document-extraction-review-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid #087e8c;
  border-radius: 6px;
  background: #087e8c;
  color: #fff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.document-extraction-review-submit:hover,
.document-extraction-review-submit:focus-visible {
  border-color: #076b77;
  background: #076b77;
}

.document-notes-panel {
  display: grid;
  gap: 10px;
}

.document-guidance-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border-color: rgba(8, 126, 140, 0.2);
  background: linear-gradient(180deg, rgba(242, 250, 251, 0.72), #ffffff 58%);
}

.document-guidance-boundary {
  margin: 0;
  padding: 9px 10px;
  border-left: 3px solid rgba(8, 126, 140, 0.48);
  border-radius: 0 7px 7px 0;
  background: rgba(8, 126, 140, 0.055);
  color: #52636d;
  font-size: 0.75rem;
  line-height: 1.45;
}

.document-guidance-card {
  border-color: rgba(8, 126, 140, 0.22);
}

.document-guidance-composer-footer > span {
  max-width: 60%;
}

.document-notes-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.document-notes-heading h2 {
  margin: 0;
  font-size: 0.98rem;
}

.document-notes-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.document-notes-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.document-note-list {
  display: grid;
  gap: 10px;
}

.document-note-card {
  padding: 12px;
  border: 1px solid #d8e1e6;
  border-radius: 8px;
  background: var(--surface);
}

.document-note-card > p {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.document-note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.document-note-meta strong {
  color: #465463;
  font-weight: 750;
}

.document-note-meta > span::before {
  content: "·";
  margin-right: 8px;
  color: #a3adb4;
}

.document-note-edit {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.document-note-edit > summary {
  width: fit-content;
  cursor: pointer;
  color: #087e8c;
  font-weight: 750;
}

.document-note-edit form,
.document-note-create {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.document-note-edit textarea,
.document-note-create textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
}

.document-note-edit textarea {
  padding: 10px 11px;
  border: 1px solid #cfdbe1;
  border-radius: 7px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.5;
}

.document-note-edit textarea:focus {
  border-color: rgba(10, 174, 192, 0.72);
  box-shadow: 0 0 0 3px rgba(10, 174, 192, 0.1);
}

.document-note-create {
  margin: 2px 0 0;
}

.document-note-composer {
  overflow: hidden;
  border: 1px solid #cfdbe1;
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.document-note-composer:focus-within {
  border-color: rgba(10, 174, 192, 0.72);
  box-shadow: 0 0 0 3px rgba(10, 174, 192, 0.1);
}

.document-note-composer textarea {
  display: block;
  min-height: 92px;
  padding: 12px 13px 8px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  line-height: 1.5;
}

.document-note-composer textarea::placeholder {
  color: #86939c;
}

.document-note-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  padding: 7px 8px 7px 12px;
  border-top: 1px solid #e3e9ed;
  background: #f8fafb;
}

.document-note-composer-footer > span {
  min-width: 0;
  color: #73818c;
  font-size: 0.68rem;
  line-height: 1.3;
}

.document-note-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #087e8c;
  border-radius: 6px;
  background: #087e8c;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 780;
  line-height: 1;
  transition: background 140ms ease, border-color 140ms ease;
}

.document-note-action:hover,
.document-note-action:focus-visible {
  border-color: #076b77;
  background: #076b77;
}

.document-note-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.document-note-edit .document-note-action {
  justify-self: start;
}

.document-note-action.is-danger {
  border-color: transparent;
  background: transparent;
  color: var(--error);
}

.document-note-action.is-danger:hover,
.document-note-action.is-danger:focus-visible {
  border-color: rgba(171, 43, 43, 0.14);
  background: rgba(171, 43, 43, 0.07);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent-dark);
  cursor: pointer;
  text-decoration: none;
}

.icon-button.mini {
  width: 30px;
  height: 30px;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: var(--soft);
}

.icon-button.danger {
  color: var(--error);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.public-share-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #f6f8fa;
}

.public-share-page::before {
  display: none;
}

.public-share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 68px;
  padding: 0 max(24px, calc((100% - 1120px) / 2));
  background: #071427;
  color: #d9e2ea;
}

.public-share-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: #d9e2ea;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.public-share-brand img {
  display: block;
  width: 104px;
  height: 38px;
  object-fit: contain;
}

.public-share-language {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8fa1b5;
  font-size: 0.76rem;
  font-weight: 800;
}

.public-share-language a {
  color: #9eafc1;
  text-decoration: none;
}

.public-share-language a[aria-current="true"],
.public-share-language a:hover,
.public-share-language a:focus-visible {
  color: #ffffff;
}

.public-share-main {
  width: min(760px, calc(100% - 32px));
  margin: clamp(34px, 7vh, 72px) auto 24px;
}

.public-share-tool {
  overflow: hidden;
  border: 1px solid #dce3e8;
  border-radius: 8px;
  background: #ffffff;
}

.public-share-heading {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 18px;
  padding: 30px 32px 26px;
}

.public-share-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid #bcded6;
  border-radius: 8px;
  background: #edf8f5;
  color: #0f766e;
}

.public-share-symbol.is-unavailable {
  border-color: #e4d3cf;
  background: #fbf4f2;
  color: #a33a28;
}

.public-share-symbol svg,
.public-share-error svg,
.public-share-download svg,
.public-share-security svg,
.public-share-home svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.public-share-symbol svg {
  width: 23px;
  height: 23px;
}

.public-share-kicker {
  margin: 0 0 7px;
  color: #0f766e;
  font-size: 0.73rem;
  font-weight: 850;
  text-transform: uppercase;
}

.public-share-heading h1 {
  margin: 0;
  color: #101b2b;
  font-size: 1.75rem;
  line-height: 1.2;
}

.public-share-heading p:not(.public-share-kicker) {
  max-width: 590px;
  margin: 10px 0 0;
  color: #607080;
  line-height: 1.55;
}

.public-share-summary {
  display: grid;
  grid-template-columns: 0.8fr 0.8fr 1.4fr;
  margin: 0;
  padding: 0 32px;
  border-top: 1px solid #e4e9ed;
  border-bottom: 1px solid #e4e9ed;
  background: #f8fafb;
}

.public-share-summary > div {
  min-width: 0;
  padding: 17px 18px;
  border-left: 1px solid #e4e9ed;
}

.public-share-summary > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.public-share-summary dt {
  margin-bottom: 5px;
  color: #738190;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.public-share-summary dd {
  overflow: hidden;
  margin: 0;
  color: #263444;
  font-size: 0.88rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-share-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 26px 32px 18px;
}

.public-share-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.public-share-form label > span {
  color: #344454;
  font-size: 0.78rem;
  font-weight: 800;
}

.public-share-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cbd5dc;
  border-radius: 6px;
  background: #ffffff;
  color: #101b2b;
  font: inherit;
}

.public-share-form input:focus {
  border-color: #0f766e;
  outline: 2px solid rgba(15, 118, 110, 0.15);
  outline-offset: 1px;
}

.public-share-form input[aria-invalid="true"] {
  border-color: #b64938;
}

.public-share-download,
.public-share-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid #0f766e;
  border-radius: 6px;
  background: #0f766e;
  color: #ffffff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.public-share-download:hover,
.public-share-download:focus-visible,
.public-share-home:hover,
.public-share-home:focus-visible {
  border-color: #0b5d57;
  background: #0b5d57;
}

.public-share-download svg,
.public-share-home svg {
  width: 18px;
  height: 18px;
}

.public-share-error {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #ead2cd;
  border-radius: 6px;
  background: #fbf4f2;
  color: #963725;
  font-size: 0.82rem;
  font-weight: 750;
}

.public-share-error svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.public-share-security {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 32px 26px;
  color: #6c7a88;
  font-size: 0.76rem;
  line-height: 1.45;
}

.public-share-security svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: #0f766e;
}

.public-share-home {
  width: max-content;
  margin: 0 32px 30px 96px;
}

.legal-language-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(1216px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 12px 14px;
  border: 1px solid #c9d7e2;
  border-radius: 8px;
  background: #eef4f7;
  color: #4c5d73;
  font-size: 0.86rem;
}

.legal-language-notice strong {
  color: #14233a;
}

.legal-language-notice a {
  color: var(--accent-dark);
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .legal-language-notice {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.public-share-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px;
  color: #61707f;
}

.public-share-promo strong {
  color: #263444;
}

.public-share-promo p {
  margin: 4px 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

.public-share-promo a {
  flex: 0 0 auto;
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.public-share-promo a:hover,
.public-share-promo a:focus-visible {
  text-decoration: underline;
}

.public-share-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1120px, calc(100% - 48px));
  margin: auto auto 0;
  padding: 20px 0 24px;
  border-top: 1px solid #dfe5e9;
  color: #7a8793;
  font-size: 0.75rem;
}

.public-share-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.public-share-footer a {
  color: inherit;
  text-decoration: none;
}

.public-share-footer a:hover,
.public-share-footer a:focus-visible {
  color: #0f766e;
}

@media (max-width: 620px) {
  .public-share-header {
    min-height: 62px;
    padding: 0 16px;
  }

  .public-share-brand {
    gap: 10px;
  }

  .public-share-brand img {
    width: 92px;
    height: 34px;
  }

  .public-share-brand span {
    display: none;
  }

  .public-share-main {
    width: min(100% - 24px, 760px);
    margin-top: 24px;
  }

  .public-share-heading {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 13px;
    padding: 22px 18px 20px;
  }

  .public-share-symbol {
    width: 40px;
    height: 40px;
  }

  .public-share-heading h1 {
    font-size: 1.42rem;
  }

  .public-share-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 18px;
  }

  .public-share-summary > div {
    padding: 14px 12px;
  }

  .public-share-summary > div:nth-child(3) {
    grid-column: 1 / -1;
    padding-left: 0;
    border-top: 1px solid #e4e9ed;
    border-left: 0;
  }

  .public-share-form {
    grid-template-columns: 1fr;
    padding: 22px 18px 16px;
  }

  .public-share-download {
    width: 100%;
  }

  .public-share-security {
    align-items: flex-start;
    padding: 0 18px 22px;
  }

  .public-share-home {
    width: calc(100% - 36px);
    margin: 0 18px 22px;
  }

  .public-share-promo {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 20px 2px;
  }

  .public-share-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    width: calc(100% - 32px);
  }
}

.auth-panel {
  padding: 24px 0 18px;
}

.auth-panel.narrow {
  width: min(520px, 100%);
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 18px;
  align-items: start;
}

.qr-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.qr-box img {
  display: block;
  width: 100%;
  height: auto;
}

.manual-secret-box {
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.manual-secret-box > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.manual-secret {
  display: block;
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.manual-secret-box .secondary-button {
  width: 100%;
}

.setup-auth-fallback {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.setup-auth-fallback strong {
  color: var(--ink);
}

.auth-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.auth-alt-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.google-login-button,
.apple-login-button,
.passkey-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  gap: 10px;
  padding: 0 16px;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.google-login-button {
  border: 1px solid #d7dee8;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.google-login-button:hover,
.google-login-button:focus-visible {
  border-color: #b8c4d4;
  background: #f8fafc;
}

.apple-login-button {
  position: relative;
  border: 1px solid #111827;
  background: #111827;
  color: #fff;
}

.apple-login-button small {
  position: absolute;
  right: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.apple-login-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.passkey-login-button {
  border: 1px solid rgba(13, 130, 143, 0.28);
  background: rgba(13, 130, 143, 0.08);
  color: var(--accent-dark);
}

.passkey-login-button:hover,
.passkey-login-button:focus-visible {
  border-color: rgba(13, 130, 143, 0.45);
  background: rgba(13, 130, 143, 0.13);
}

.google-login-button svg,
.apple-login-button svg,
.passkey-login-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.apple-login-button svg {
  fill: currentColor;
}

.passkey-login-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-security-step {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.auth-status {
  margin: 0;
}

.auth-inline-link {
  justify-self: center;
  color: var(--brand-strong);
  font-weight: 800;
  text-decoration: none;
}

.auth-inline-link:hover,
.auth-inline-link:focus-visible {
  text-decoration: underline;
}

.auth-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.auth-form input {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.password-field {
  position: relative;
  display: block;
}

.auth-form .password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible,
.password-toggle.is-visible {
  border-color: var(--line);
  background: var(--soft);
  color: var(--accent-dark);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-form .legal-consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  font-weight: 700;
  line-height: 1.45;
}

.auth-form .legal-consent input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin-top: 3px;
  padding: 0;
}

.auth-form .checkbox-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.auth-form .checkbox-row input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
}

.auth-form .legal-consent a,
.site-footer a,
.legal-panel a {
  color: var(--brand-strong);
  font-weight: 800;
}

.auth-choice {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.choice-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.choice-card strong {
  font-size: 1.25rem;
}

.choice-card span {
  color: var(--muted);
  line-height: 1.45;
}

.legal-panel {
  width: min(980px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.legal-panel h1 {
  margin-bottom: 24px;
}

.legal-panel h2 {
  margin: 28px 0 10px;
  font-size: 1.25rem;
}

.legal-panel p {
  max-width: 78ch;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
}

.site-footer {
  display: flex;
  gap: 18px;
  justify-content: center;
  padding: 20px 16px 34px;
}

.cookie-notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  width: min(680px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(20, 35, 55, 0.18);
}

.cookie-notice[hidden] {
  display: none;
}

.cookie-notice strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.cookie-notice p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.cookie-notice-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.messages {
  width: min(980px, 100%);
  margin: 14px auto 0;
  padding: 0 clamp(16px, 4vw, 32px);
}

.message {
  padding: 12px 14px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.message.success {
  border-color: #9acbb9;
  color: var(--accent-dark);
}

.message.error {
  border-color: #e2a6a6;
  color: var(--error);
}

.empty {
  color: var(--muted);
}

.admin-billing-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-billing-card small {
  color: var(--muted);
}

.admin-status-pill {
  align-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-weight: 800;
}

.admin-status-pill.ready {
  border-color: #9acbb9;
  color: var(--accent-dark);
}

.admin-status-pill.warning {
  border-color: #e4b36b;
  color: #9b5c00;
}

.admin-panel {
  display: grid;
  gap: 16px;
}

.admin-live-stats,
.admin-account-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-live-stats > div,
.admin-account-metrics > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-live-stats span,
.admin-account-metrics span,
.admin-field-compact > span,
.admin-workspace-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-live-stats strong,
.admin-account-metrics strong,
.admin-workspace-row strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.admin-live-stats small,
.admin-account-metrics small {
  color: var(--muted);
}

.admin-live-user-list,
.admin-account-list {
  display: grid;
  gap: 12px;
}

.admin-live-user-row,
.admin-account-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-live-user-main,
.admin-account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.admin-live-user-main > div,
.admin-account-head > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-live-user-main span,
.admin-account-head span,
.admin-live-current small,
.admin-workspace-row small {
  color: var(--muted);
}

.admin-progress-line {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef4;
}

.admin-progress-line span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--accent);
}

.admin-live-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-live-meta span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.admin-live-current,
.admin-account-form {
  display: grid;
  gap: 10px;
}

.admin-job-details summary,
.admin-workspace-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}

.admin-account-actions {
  display: grid;
  grid-template-columns: minmax(120px, 150px) auto;
  gap: 8px;
  align-items: center;
}

.admin-account-actions input,
.admin-account-controls input:not([type="checkbox"]) {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.admin-account-controls {
  display: grid;
  grid-template-columns: repeat(3, max-content) minmax(180px, 1.3fr) repeat(3, minmax(110px, 0.6fr));
  gap: 10px;
  align-items: end;
}

.admin-field-compact {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-field-compact .admin-small-input {
  width: 100%;
}

.admin-workspace-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.admin-workspace-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) repeat(3, minmax(130px, 1fr));
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.admin-workspace-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-task-list {
  display: grid;
  gap: 14px;
}

.admin-task-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-task-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-task-status-actions,
.admin-task-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-task-title-row {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.25;
}

.admin-task-history-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.admin-task-history-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.86rem;
}

.admin-task-history-meta span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.admin-task-history-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-table td > span,
.admin-table td > small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.admin-user-form {
  display: grid;
  gap: 8px;
}

.admin-usage-summary,
.admin-workspace-list {
  display: grid;
  gap: 4px;
}

.admin-usage-summary span,
.admin-usage-summary small,
.admin-workspace-row span,
.admin-workspace-row small {
  display: block;
  color: var(--muted);
}

.admin-workspace-details {
  margin-top: 8px;
}

.admin-workspace-breakdown > td {
  padding-top: 0;
  background: color-mix(in srgb, var(--panel) 82%, var(--background));
}

.admin-workspace-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.admin-workspace-table {
  min-width: 760px;
  margin-top: 10px;
  background: var(--panel);
}

.admin-workspace-table th,
.admin-workspace-table td {
  padding: 10px;
}

.compact-toggle {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.admin-credit-control {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto;
  gap: 8px;
}

.admin-credit-control input,
.inline-form input {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.inline-form {
  align-items: end;
  grid-template-columns: minmax(160px, 260px) auto auto;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.pricing-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pricing-card.active {
  border-color: #4bb7c9;
  box-shadow: 0 0 0 2px rgba(75, 183, 201, 0.15);
}

.plan-selection-notice {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(75, 183, 201, 0.45);
  border-radius: 8px;
  background: rgba(75, 183, 201, 0.08);
  color: var(--ink);
}

.plan-selection-notice span {
  color: var(--muted);
  line-height: 1.45;
}

.pricing-card-head {
  display: grid;
  gap: 4px;
}

.pricing-card-head strong {
  font-size: 1.15rem;
}

.pricing-card-head span {
  color: var(--ink);
  font-weight: 800;
}

.pricing-card small,
.pricing-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.pricing-card .trial-note {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(75, 183, 201, 0.12);
  color: var(--ink);
  font-weight: 800;
}

.pricing-card .button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pricing-card .button-row .compact {
  width: 100%;
  min-height: 40px;
  white-space: normal;
}

.plan-feature-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-feature-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  gap: 12px;
  align-items: center;
  min-height: 28px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.plan-feature-list li:last-child {
  border-bottom: 0;
}

.plan-feature-list .feature-label {
  min-width: 0;
}

.plan-feature-list .feature-state {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  justify-self: end;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.plan-feature-list li strong {
  color: var(--ink);
  font-size: inherit;
}

.plan-feature-list .included .feature-state {
  color: #fff;
  background: #15803d;
}

.plan-feature-list .limited .feature-state {
  color: #8a5a00;
  background: #fff2c7;
}

.plan-feature-list .not-included {
  color: #8a96a8;
}

.plan-feature-list .not-included .feature-state {
  color: #8a96a8;
  background: #eef2f7;
}

.admin-select {
  min-height: 40px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.admin-table input:not([type="checkbox"]),
.admin-table textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.admin-table textarea {
  min-width: 260px;
  resize: vertical;
}

.admin-small-input {
  min-height: 40px;
  width: 90px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.compact-table {
  min-width: 620px;
}

.guide-panel {
  max-width: 1040px;
}

.guide-panel code {
  background: #eef5fb;
  border-radius: 6px;
  color: #07506d;
  padding: 2px 6px;
}

.guide-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 34px;
}

.guide-overview div {
  align-items: center;
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  min-height: 68px;
  padding: 14px;
}

.guide-overview span {
  align-items: center;
  background: #0ea5b7;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.guide-image {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: block;
  height: auto;
  margin: 18px 0 32px;
  max-width: 960px;
  width: 100%;
}

.guide-code {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #06152f;
  overflow-x: auto;
  padding: 14px 16px;
}

.guide-notes {
  display: grid;
  gap: 12px;
}

.guide-notes p {
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 14px 16px;
}

.gmail-candidate-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.gmail-candidate-taskbar {
  margin-top: 12px;
}

.gmail-candidate-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: auto 72px minmax(0, 1fr) auto;
  padding: 12px 14px;
}

.relationship-map-panel {
  display: grid;
  gap: 18px;
}

.relationship-map-toolbar {
  max-width: 620px;
}

.relationship-map-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: stretch;
}

.relationship-map-summary > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.relationship-map-summary span,
.relationship-map-summary small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.relationship-map-summary strong {
  color: var(--ink);
}

.relationship-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.relationship-workspace-browser {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.relationship-global-entities {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.relationship-section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.relationship-section-header h2 {
  margin: 0;
  font-size: 1rem;
}

.relationship-section-header.compact {
  margin-bottom: 10px;
}

.relationship-section-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.relationship-entity-filters {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.relationship-entity-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.admin-search-input {
  width: 100%;
  min-height: 39px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.relationship-entity-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.relationship-entity-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: #ffffff;
}

.relationship-entity-table th,
.relationship-entity-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 0.86rem;
}

.relationship-entity-table th {
  background: #f7fbff;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.relationship-entity-table tr:last-child td {
  border-bottom: 0;
}

.relationship-entity-table td:nth-child(3),
.relationship-entity-table td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.relationship-entity-pagination {
  justify-content: flex-end;
}

.relationship-map-canvas {
  min-height: 560px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  transition: opacity 0.15s ease;
}

.relationship-map-canvas.is-empty {
  min-height: 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f7fbff;
}

.relationship-map-canvas.is-loading {
  opacity: 0.58;
}

.relationship-map-canvas svg {
  display: block;
  min-width: 980px;
  width: 100%;
  height: 560px;
}

.relationship-map-canvas.is-empty svg {
  display: none;
}

.relationship-edge {
  stroke: #9bb8c5;
  stroke-width: 1.5;
  opacity: 0.72;
  transition: opacity 0.15s ease, stroke 0.15s ease, stroke-width 0.15s ease;
}

.relationship-edge.is-active {
  stroke: #113c52;
  stroke-width: 2.5;
  opacity: 0.95;
}

.relationship-edge.is-dimmed {
  opacity: 0.13;
}

.relationship-edge-count {
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 5px;
  fill: #113c52;
  font-size: 13px;
  font-weight: 950;
  pointer-events: none;
  text-anchor: middle;
  transition: opacity 0.15s ease, fill 0.15s ease;
}

.relationship-edge-count:empty {
  display: none;
}

.relationship-edge-count.is-active {
  fill: #082f49;
}

.relationship-edge-count.is-dimmed {
  opacity: 0.13;
}

#relationshipArrow path,
#relationshipForceArrow path,
#relationshipEgoArrow path {
  fill: #9bb8c5;
}

.relationship-edge-label {
  pointer-events: none;
}

.relationship-edge-label text {
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 5px;
  fill: #375569;
  font-size: 11px;
  font-weight: 850;
  text-anchor: middle;
}

.relationship-node {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.relationship-node.is-focus {
  cursor: default;
}

.relationship-node circle {
  stroke: #ffffff;
  stroke-width: 3;
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.16));
  transition: stroke 0.15s ease, stroke-width 0.15s ease, r 0.15s ease;
}

.relationship-node.document circle {
  fill: #0aaec0;
}

.relationship-node.organization circle {
  fill: #2563eb;
}

.relationship-node.person circle {
  fill: #16a34a;
}

.relationship-node.object circle {
  fill: #d97706;
}

.relationship-node.reference circle,
.relationship-node.document_reference circle {
  fill: #7c3aed;
}

.relationship-node.case_reference circle {
  fill: #9333ea;
}

.relationship-node.contract_reference circle {
  fill: #be185d;
}

.relationship-node.financial_identifier circle {
  fill: #0f766e;
}

.relationship-node.tax_identifier circle {
  fill: #64748b;
}

.relationship-node.is-selected circle {
  stroke: #102033;
  stroke-width: 4;
}

.relationship-node.is-focus circle {
  filter: drop-shadow(0 12px 18px rgba(15, 23, 42, 0.2));
}

.relationship-node.is-search-match circle {
  stroke: #0aaec0;
  stroke-width: 4;
}

.relationship-node.is-selected.is-search-match circle {
  stroke: #102033;
}

.relationship-node.is-dimmed {
  opacity: 0.22;
}

.relationship-node text {
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 4px;
  fill: #102033;
  stroke-linejoin: round;
  font-weight: 850;
  pointer-events: none;
}

.relationship-node-type {
  font-size: 11px;
  text-anchor: middle;
}

.relationship-node-name {
  font-size: 12px;
  text-anchor: middle;
}

.relationship-map-lists {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.relationship-map-relations {
  display: grid;
  gap: 10px;
}

.relationship-map-lists h2 {
  margin: 0 0 10px;
}

.relationship-list {
  display: grid;
  gap: 8px;
}

.relationship-node-list-compact {
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.relationship-list article,
.relationship-list-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.relationship-list-item {
  cursor: pointer;
}

.relationship-list-item:hover,
.relationship-list-item:focus-visible,
.relationship-list-item.active {
  border-color: rgba(10, 174, 192, 0.45);
  background: #f0fbfd;
  outline: none;
}

.relationship-list small {
  color: var(--muted);
}

.relationship-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: #e7f7fa;
  color: #0f4b5b;
  font-size: 0.74rem;
  font-weight: 950;
  vertical-align: middle;
}

.relationship-pill {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef6fb;
  color: #0f4b5b;
  font-size: 0.76rem;
  font-weight: 900;
}

.relationship-pill.document {
  background: #dff8fb;
}

.relationship-pill.organization {
  background: #dbeafe;
}

.relationship-pill.person {
  background: #dcfce7;
}

.relationship-pill.object {
  background: #fef3c7;
}

.relationship-pill.reference,
.relationship-pill.document_reference,
.relationship-pill.case_reference,
.relationship-pill.contract_reference {
  background: #ede9fe;
}

.relationship-pill.financial_identifier {
  background: #ccfbf1;
}

.relationship-pill.tax_identifier {
  background: #e2e8f0;
}

.gmail-candidate-thumb {
  display: block;
  position: relative;
  width: 72px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.gmail-candidate-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.gmail-candidate-thumb small {
  position: absolute;
  right: 4px;
  bottom: 4px;
  max-width: calc(100% - 8px);
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(5, 10, 22, 0.76);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.gmail-candidate-row.import {
  border-color: #9bd7ad;
}

.gmail-candidate-row.review {
  border-color: #e8c36d;
}

.gmail-candidate-row.skip {
  opacity: 0.68;
}

.danger-button {
  border-color: #f0b8b8;
  color: #9f1d1d;
}

.gmail-candidate-row > span:not(.gmail-candidate-thumb) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.gmail-candidate-row > span:not(.gmail-candidate-thumb) strong,
.gmail-candidate-row > span:not(.gmail-candidate-thumb) small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmail-candidate-row > span:not(.gmail-candidate-thumb) small {
  color: var(--muted);
}

.gmail-candidate-row em {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: normal;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .admin-live-stats,
  .admin-account-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-account-controls,
  .admin-workspace-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
    background:
      linear-gradient(180deg, #eef5fb 0, #f7f9fc 260px, #f4f7fb 100%);
  }

  main,
  .app-tab-shell,
  [data-app-tab-panel] {
    background:
      linear-gradient(180deg, #eef5fb 0, #f7f9fc 260px, #f4f7fb 100%);
  }

  main {
    max-width: 100vw;
    min-height: calc(100vh - 56px - 72px - env(safe-area-inset-bottom));
    min-height: calc(100dvh - 56px - 72px - env(safe-area-inset-bottom));
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .search-panel,
  .file-browser,
  .upload-panel,
  .cloud-panel,
  .settings-panel {
    max-width: 100%;
    overflow-x: clip;
  }

  .app-tab-shell {
    min-height: calc(100vh - 56px - 72px - env(safe-area-inset-bottom));
    min-height: calc(100dvh - 56px - 72px - env(safe-area-inset-bottom));
  }

  .topbar {
    top: 0;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
    min-height: calc(56px + env(safe-area-inset-top));
    padding: calc(7px + env(safe-area-inset-top)) 12px 6px;
    overflow: visible;
  }

  .brand img {
    width: 104px;
    height: 38px;
  }

  .main-nav {
    display: none;
  }

  .mobile-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }

  .mobile-workspace-slot + .mobile-top-actions {
    margin-left: 0;
  }

  .mobile-workspace-slot {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    max-width: min(42vw, 210px);
    margin-left: auto;
  }

  .mobile-workspace-switcher {
    display: flex;
    align-items: center;
    width: 100%;
    height: 34px;
    margin: 0;
  }

  .mobile-workspace-switcher select,
  .mobile-workspace-label {
    width: 100%;
    max-width: none;
    height: 34px;
    min-height: 34px;
    border-color: rgba(233, 244, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
    color: #e9f4ff;
    font-size: 0.78rem;
    line-height: 34px;
  }

  .mobile-workspace-switcher select {
    appearance: none;
    -webkit-appearance: none;
    background-image:
      linear-gradient(45deg, transparent 50%, currentColor 50%),
      linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position:
      calc(100% - 14px) 14px,
      calc(100% - 9px) 14px;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding: 0 25px 0 8px;
  }

  .mobile-workspace-switcher option {
    color: var(--ink);
  }

  .mobile-workspace-label {
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
  }

  .mobile-language-switcher {
    display: inline-flex;
    height: 34px;
    min-height: 34px;
    padding: 0 7px;
    font-size: 0.8rem;
  }

  .mobile-menu {
    position: relative;
    display: block;
  }

  .mobile-menu summary {
    list-style: none;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(233, 244, 255, 0.24);
    border-radius: 8px;
    color: #e9f4ff;
    cursor: pointer;
  }

  .mobile-menu-button svg,
  .mobile-bottom-nav svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-menu[open] .mobile-menu-button {
    background: rgba(73, 198, 226, 0.16);
    color: #ffffff;
  }

  .mobile-menu-panel {
    position: fixed;
    top: 64px;
    right: 12px;
    left: 12px;
    z-index: 90;
    display: grid;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding: 10px;
    border: 1px solid rgba(117, 138, 166, 0.35);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 42px rgba(5, 10, 22, 0.3);
  }

  .mobile-menu-panel a,
  .mobile-menu-panel .nav-post-form button,
  .mobile-menu-kicker,
  .mobile-menu-section {
    padding: 11px 12px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    text-align: left;
  }

  .mobile-menu-panel a:hover,
  .mobile-menu-panel .nav-post-form button:hover {
    background: var(--soft);
    color: var(--accent-dark);
  }

  .mobile-menu-kicker {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
  }

  .mobile-menu-section {
    margin-top: 6px;
    padding-bottom: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
  }

  .mobile-menu-panel a.mobile-menu-subitem {
    margin-left: 14px;
    padding-left: 18px;
    border-left: 2px solid var(--line);
    color: #26322e;
    font-weight: 750;
  }

  .mobile-menu-panel hr {
    width: 100%;
    margin: 8px 0;
    border: 0;
    border-top: 1px solid var(--line);
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(117, 138, 166, 0.35);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -12px 28px rgba(5, 10, 22, 0.12);
    backdrop-filter: blur(14px);
  }

  .mobile-bottom-nav a {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    padding: 6px 4px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1.05;
    text-align: center;
    text-decoration: none;
  }

  .mobile-bottom-nav .mobile-nav-badge {
    position: absolute;
    top: 4px;
    left: calc(50% + 7px);
    min-width: 18px;
    height: 18px;
    margin-left: 0;
    border-color: #ffffff;
    font-size: 0.64rem;
  }

  .mobile-bottom-nav a:hover,
  .mobile-bottom-nav a:focus-visible,
  .mobile-bottom-nav a[aria-current="page"] {
    background: var(--soft);
    color: var(--accent-dark);
  }

  .mobile-bottom-nav span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero,
  .preview-hero,
  .public-home-hero,
  .public-workflow,
  .public-feature-band,
  .public-capability-grid,
  .public-security-strip,
  .detail-header,
  .dashboard-header,
  .search-form {
    grid-template-columns: 1fr;
  }

  .preview-hero {
    min-height: auto;
  }

  .public-home-hero {
    min-height: auto;
  }

  .public-home-hero .public-home-copy {
    display: contents;
  }

  .public-home-copy .eyebrow {
    order: 0;
  }

  .public-home-copy h1 {
    order: 1;
  }

  .public-home-copy .lead {
    order: 2;
  }

  .public-home-hero .public-product-shot {
    order: 3;
  }

  .public-home-copy .preview-actions {
    order: 4;
    margin-top: 0;
  }

  .public-home-copy .public-home-proof {
    order: 5;
  }

  .product-shot-grid {
    grid-template-columns: 1fr;
  }

  .phone-scan-card {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .phone-frame {
    width: 68px;
  }

  .phone-document {
    width: 46px;
    padding: 8px 7px;
  }

  .product-shot-calendar {
    grid-template-columns: repeat(7, minmax(34px, 1fr));
    gap: 4px;
    padding: 8px;
  }

  .product-shot-calendar button {
    min-height: 42px;
    padding: 5px 2px;
    font-size: 0.78rem;
  }

  .insight-card {
    min-height: auto;
  }

  .detail-header-actions {
    justify-content: flex-start;
  }

  .insight-fields {
    grid-template-columns: 1fr;
  }

  .process-grid,
  .value-section,
  .trust-strip {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .file-tree-children {
    margin-left: 10px;
    padding-left: 14px;
  }

  .file-browser,
  .file-tree {
    min-width: 0;
    max-width: 100%;
  }

  .file-browser-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-width: 100%;
  }

  .file-browser-toolbar .secondary-button,
  .file-browser-toolbar .folder-tree-status {
    min-width: 0;
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .file-browser-toolbar .folder-tree-status {
    grid-column: 1 / -1;
  }

  .search-result-pages,
  .search-result-pages > div {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .search-result-pages > div {
    grid-template-columns: 1fr;
  }

  .file-tree {
    padding: 10px;
    overflow: visible;
  }

  .file-tree-folder > summary {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 8px;
    align-items: center;
    padding: 9px 4px;
  }

  .file-tree-folder > summary > span:not(.folder-icon):not(.folder-action-bar) {
    min-width: 0;
  }

  .file-tree-folder summary strong,
  .file-tree-folder summary small {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .file-tree-folder summary .folder-action-bar {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    margin-left: 0;
    padding-left: 0;
  }

  .file-tree-folder > summary::after {
    display: none;
  }

  .folder-action-menu-panel {
    right: 0;
    max-width: min(260px, calc(100vw - 40px));
  }

  .file-tree-file {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 9px 4px;
    gap: 8px;
  }

  .file-actions {
    grid-column: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .document-audit-compact {
    grid-column: 2;
  }

  .file-main {
    align-items: flex-start;
  }

  .file-main strong,
  .file-main small {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .process-step {
    min-height: auto;
  }

  .dashboard-actions {
    justify-content: flex-start;
  }

  .upload-dropzone {
    display: none;
  }

  .folder-upload-option {
    display: none;
  }

  .status-strip,
  .dashboard-grid,
  .dashboard-upload form,
  .pricing-grid,
  .guide-overview,
  .inline-form,
  .range-row,
  .admin-live-stats,
  .admin-account-metrics,
  .admin-account-controls,
  .admin-workspace-row {
    grid-template-columns: 1fr;
  }

  .admin-live-user-main,
  .admin-account-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-account-actions {
    grid-template-columns: 1fr;
  }

  .admin-account-row,
  .admin-live-user-row {
    padding: 12px;
  }

  .range-row output {
    text-align: left;
  }

  .gmail-candidate-row {
    align-items: flex-start;
    grid-template-columns: auto 58px minmax(0, 1fr);
  }

  .gmail-candidate-row em {
    grid-column: 3;
  }

  .gmail-candidate-thumb {
    width: 58px;
  }

  .document-card {
    grid-template-columns: 1fr;
  }

  .manual-classification-card {
    grid-template-columns: 28px 70px minmax(0, 1fr);
  }

  .manual-classification-thumb {
    width: 70px;
  }

  .manual-classification-card > div,
  .manual-classification-form,
  .manual-classification-actions {
    grid-column: 2 / -1;
  }

  .calendar-event-card {
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: stretch;
  }

  .week-view {
    grid-template-columns: 1fr;
  }

  .month-view .calendar-weekdays,
  .month-view .calendar-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .month-view .calendar-weekdays {
    gap: 3px;
    margin-bottom: 4px;
    font-size: 0.68rem;
  }

  .month-view .calendar-cell {
    min-height: 58px;
    padding: 5px 4px;
    border-radius: 6px;
    cursor: pointer;
  }

  .month-view .calendar-cell.is-selected {
    border-color: rgba(10, 174, 192, 0.65);
    background: #f3fbfd;
    box-shadow: inset 0 0 0 1px rgba(10, 174, 192, 0.16);
  }

  .month-view .calendar-cell > strong {
    margin-bottom: 5px;
    font-size: 0.72rem;
    line-height: 1;
  }

  .month-view .calendar-cell > div {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
  }

  .month-view .calendar-chip {
    width: 9px;
    height: 9px;
    min-width: 9px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--workspace-accent, var(--accent));
    box-shadow: none;
    overflow: visible;
  }

  .month-view .calendar-chip.payment_deadline {
    background: #c04a38 !important;
  }

  .month-view .calendar-chip.deadline {
    background: #9a6b08 !important;
  }

  .month-view .calendar-chip.appointment {
    background: #2c8f5b !important;
  }

  .month-view .calendar-chip.event {
    background: #63738a !important;
  }

  .month-view .calendar-cell > div > .calendar-chip > span:not(.calendar-chip-completed):not(.calendar-chip-detail),
  .month-view .calendar-cell > div > .calendar-chip > small {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .month-view .calendar-cell > div > .calendar-chip .calendar-chip-completed {
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    border: 1px solid #fff;
  }

  .month-view .calendar-cell > div > .calendar-chip .calendar-chip-completed svg {
    width: 8px;
    height: 8px;
  }

  .week-cell {
    min-height: auto;
  }

  .month-view .calendar-cell > div > .calendar-chip .calendar-chip-detail {
    display: none;
  }

  .calendar-mobile-day-panel {
    position: fixed;
    right: 12px;
    bottom: max(78px, env(safe-area-inset-bottom));
    left: 12px;
    z-index: 82;
    display: grid;
    gap: 8px;
    width: auto;
    max-height: min(46vh, 340px);
    overflow: hidden;
    padding: 10px;
    border: 1px solid rgba(117, 138, 166, 0.34);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(20, 35, 55, 0.22);
  }

  .calendar-mobile-day-header {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 8px;
    align-items: center;
  }

  .calendar-mobile-day-counter {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-align: center;
  }

  .calendar-mobile-day-header .calendar-mini-action {
    width: 32px;
    height: 32px;
  }

  .calendar-mobile-day-header .calendar-mini-action:disabled {
    opacity: 0.35;
    cursor: default;
  }

  .calendar-mobile-day-slide {
    min-width: 0;
  }

  .calendar-mobile-day-panel .calendar-chip {
    width: auto;
    height: auto;
    min-width: 0;
    margin: 0;
    padding: 8px 10px 8px 12px;
    border: 1px solid rgba(10, 174, 192, 0.22);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: rgba(10, 174, 192, 0.08);
    box-shadow: inset 3px 0 0 var(--workspace-accent, var(--accent));
  }

  .calendar-mobile-day-panel .calendar-chip.payment_deadline {
    border-left-color: #c04a38;
    background: rgba(192, 74, 56, 0.08) !important;
  }

  .calendar-mobile-day-panel .calendar-chip.deadline {
    border-left-color: #9a6b08;
    background: rgba(232, 195, 109, 0.16) !important;
  }

  .calendar-mobile-day-panel .calendar-chip.appointment {
    border-left-color: #2c8f5b;
    background: rgba(44, 143, 91, 0.1) !important;
  }

  .calendar-mobile-day-panel .calendar-chip.event {
    border-left-color: #63738a;
    background: rgba(99, 115, 138, 0.1) !important;
  }

  .calendar-mobile-day-panel .calendar-chip > span:first-child,
  .calendar-mobile-day-panel .calendar-chip-workspace {
    position: static;
    display: block;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
  }

  .calendar-mobile-day-panel .calendar-chip-completed {
    top: 7px;
    right: 8px;
    width: 18px;
    height: 18px;
  }

  .calendar-mobile-day-panel .calendar-chip > span:first-child {
    margin-bottom: 5px;
    line-height: 1.35;
    overflow-wrap: break-word;
  }

  .calendar-mobile-day-panel .calendar-chip-workspace {
    margin-top: 2px;
    line-height: 1.35;
  }

  .calendar-mobile-day-panel .calendar-chip-detail {
    position: static;
    display: grid;
    width: auto;
    max-height: none;
    margin-top: 8px;
    padding: 8px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .calendar-mobile-day-panel .calendar-chip-detail small:last-child {
    display: none;
  }

  .week-view .calendar-chip-detail,
  .day-view .calendar-chip-detail,
  .agenda-view .calendar-chip-detail {
    right: auto;
    left: 0;
    width: min(360px, calc(100vw - 44px));
    transform: translateY(6px);
  }

  .week-view .calendar-chip:hover .calendar-chip-detail,
  .week-view .calendar-chip:focus-visible .calendar-chip-detail,
  .week-view .calendar-chip.is-previewing .calendar-chip-detail,
  .day-view .calendar-chip:hover .calendar-chip-detail,
  .day-view .calendar-chip:focus-visible .calendar-chip-detail,
  .day-view .calendar-chip.is-previewing .calendar-chip-detail,
  .agenda-view .calendar-chip:hover .calendar-chip-detail,
  .agenda-view .calendar-chip:focus-visible .calendar-chip-detail,
  .agenda-view .calendar-chip.is-previewing .calendar-chip-detail {
    transform: translateY(0);
  }

  .calendar-agenda-row {
    grid-template-columns: 1fr;
  }

  .segmented-control,
  .calendar-filterbar,
  .calendar-archive-switch {
    width: 100%;
  }

  .calendar-archive-switch {
    justify-content: flex-start;
  }

  .segmented-control .compact {
    flex: 1 1 0;
    min-width: 0;
  }

  .calendar-event-card.no-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-event-card.no-actions .calendar-date,
  .calendar-event-card.no-actions .calendar-event-main {
    grid-column: 1;
  }

  .document-card-selectable {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .document-card-title,
  .document-card-selectable .manual-classification-thumb,
  .document-card-selectable .document-card-main {
    grid-column: 2;
  }

  .document-card-main {
    grid-template-columns: 1fr;
  }

  .document-card-main {
    grid-column: 2;
  }

  .document-card-move {
    grid-column: 2;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .document-card-move .secondary-button {
    width: 100%;
    justify-content: center;
  }

  .document-card-selectable > .calendar-select {
    grid-row: 1 / span 2;
  }

  .document-card-selectable > .calendar-mini-action {
    grid-column: 2;
    justify-self: start;
  }

  .calendar-date,
  .calendar-event-main,
  .calendar-row-actions {
    grid-column: 2;
  }

  .calendar-select {
    grid-row: 1 / span 3;
    align-self: start;
    padding-top: 2px;
  }

  .calendar-row-actions {
    justify-content: flex-start;
  }

  .calendar-row-actions .calendar-snooze-options {
    right: auto;
    left: 0;
  }

  .calendar-taskbar {
    top: 60px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .calendar-taskbar::-webkit-scrollbar {
    display: none;
  }

  .calendar-taskbar .primary-button,
  .calendar-taskbar .secondary-button,
  .calendar-taskbar .gmail-candidate-select-group,
  .calendar-taskbar .calendar-select-all,
  .calendar-taskbar .calendar-snooze-menu {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .calendar-taskbar .primary-button.compact,
  .calendar-taskbar .secondary-button.compact {
    min-width: max-content;
    padding-right: 12px;
    padding-left: 12px;
  }

  .document-taskbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    white-space: normal;
  }

  .document-taskbar .calendar-select-all,
  .document-taskbar .secondary-button,
  .document-taskbar .gmail-candidate-select-group {
    min-width: 0;
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .gmail-candidate-taskbar {
    grid-template-columns: 1fr;
  }

  .gmail-candidate-taskbar .gmail-candidate-select-group {
    width: 100%;
  }

  .metadata-grid {
    grid-template-columns: 1fr 1fr;
  }

  .relationship-map-summary,
  .relationship-map-lists,
  .relationship-map-relations {
    grid-template-columns: 1fr;
  }

  .relationship-section-header,
  .relationship-entity-filters {
    grid-template-columns: 1fr;
    display: grid;
  }

  .relationship-entity-pagination {
    justify-content: flex-start;
  }

  .relationship-map-canvas {
    min-height: 430px;
  }

  .relationship-map-canvas.is-empty {
    min-height: 92px;
  }

  .relationship-map-canvas svg {
    min-width: 760px;
    height: 430px;
  }

  .workspace-card-breakdown {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-card-breakdown strong {
    text-align: left;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-choice {
    grid-template-columns: 1fr;
  }

  .passkey-prompt {
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    grid-template-columns: 1fr;
  }

  .passkey-prompt-actions {
    flex-direction: column;
  }

  .connection-onboarding-prompt {
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    grid-template-columns: auto minmax(0, 1fr);
  }

  .connection-onboarding-actions {
    grid-column: 1 / -1;
  }

  .cookie-notice {
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    grid-template-columns: 1fr;
  }

  .cookie-notice-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.25rem;
  }

  .metadata-grid {
    grid-template-columns: 1fr;
  }
}

/* 2026 workspace UI foundation */
body {
  background: #f7f8fa;
}

main {
  width: min(1280px, 100%);
  padding-top: 28px;
}

h1,
.dashboard-header h1 {
  margin-bottom: 8px;
  font-size: 2rem;
  line-height: 1.15;
}

h2 {
  line-height: 1.25;
}

.workspace-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 112px;
  margin-bottom: 24px;
  padding: 12px 0 22px;
  border-bottom: 1px solid var(--line);
}

.workspace-page-header > div {
  min-width: 0;
}

.workspace-page-header p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.nav-link {
  position: relative;
}

.topbar .nav-link.active::after,
.topbar .nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 2px;
  left: 12px;
  height: 2px;
  border-radius: 2px;
  background: #33c5d4;
}

.nav-import-action,
.mobile-import-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(79, 211, 224, 0.48);
  border-radius: 7px;
  background: rgba(10, 174, 192, 0.14);
  color: #f5fdff;
  font-weight: 800;
  text-decoration: none;
}

.nav-import-action:hover,
.mobile-import-action:hover {
  background: rgba(10, 174, 192, 0.24);
}

.nav-import-action svg,
.mobile-import-action svg,
.profile-menu summary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.profile-menu summary {
  width: 38px;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(233, 244, 255, 0.24);
}

.profile-menu summary::after {
  display: none;
}

.profile-menu.active summary {
  border-color: rgba(51, 197, 212, 0.7);
  color: #ffffff;
}

.nav-menu-list hr {
  width: 100%;
  margin: 6px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.section-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: -8px 0 24px;
  border-bottom: 1px solid var(--line);
}

.section-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
}

.section-tabs a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.section-tabs a span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e7edf3;
  color: #334155;
  font-size: 0.72rem;
}

.inbox-view[hidden] {
  display: none;
}

.inbox-view > .upload-panel,
.inbox-view > .cloud-panel,
.calendar-panel,
.focused-search-panel,
.file-browser {
  box-shadow: none;
}

.inbox-view > .upload-panel,
.inbox-view > .cloud-panel {
  margin-bottom: 18px;
}

.secondary-disclosure {
  margin: 4px 0 18px;
  border: 0;
}

.secondary-disclosure > summary,
.document-inspector-section > summary,
.document-technical-details > summary,
.auth-help > summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 750;
}

.secondary-disclosure[open] > summary {
  margin-bottom: 12px;
}

.email-reply-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.email-reply-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.email-reply-item > details > summary {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 70px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.email-reply-item > details > summary::-webkit-details-marker {
  display: none;
}

.email-reply-item > details > summary:hover {
  background: #f8fafc;
}

.email-reply-state {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2f855a;
}

.email-reply-item.review .email-reply-state {
  background: #c27a12;
}

.email-reply-item.high .email-reply-state {
  background: #c04438;
}

.email-reply-summary,
.email-reply-labels {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.email-reply-summary strong,
.email-reply-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-reply-summary small,
.email-reply-labels small {
  color: var(--muted);
  font-size: 0.8rem;
}

.email-reply-labels {
  justify-items: end;
  text-align: right;
}

.email-reply-labels em {
  color: var(--ink);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

.email-reply-detail {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr);
  gap: 20px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.email-reply-assessment {
  display: grid;
  align-content: start;
  gap: 16px;
}

.email-reply-assessment > div {
  display: grid;
  gap: 6px;
}

.email-reply-assessment span,
.email-reply-draft label > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.email-reply-assessment p,
.email-reply-assessment ul {
  margin: 0;
  line-height: 1.5;
}

.email-reply-assessment ul {
  padding-left: 18px;
}

.email-reply-context-note {
  padding: 9px 10px;
  border-left: 3px solid #c27a12;
  background: #fff8e8;
  color: #72500d;
  line-height: 1.45;
}

.email-reply-draft {
  align-content: start;
}

.email-reply-draft label {
  display: grid;
  gap: 6px;
}

.email-reply-draft input,
.email-reply-draft textarea {
  width: 100%;
}

.email-reply-draft textarea {
  min-height: 168px;
  resize: vertical;
  line-height: 1.5;
}

.email-reply-actions,
.email-reply-resolution {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-reply-resolution {
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding-top: 4px;
}

.email-reply-resolution form {
  display: block;
}

@media (max-width: 760px) {
  .section-tabs {
    gap: 18px;
    overflow-x: auto;
  }

  .section-tabs a {
    flex: 0 0 auto;
  }

  .email-reply-item > details > summary {
    grid-template-columns: 9px minmax(0, 1fr);
  }

  .email-reply-labels {
    grid-column: 2;
    grid-auto-flow: column;
    justify-content: start;
    justify-items: start;
    gap: 10px;
    text-align: left;
  }

  .email-reply-detail {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .email-reply-resolution {
    grid-column: 1;
    justify-content: flex-start;
  }
}

.search-page-header {
  margin-bottom: 18px;
}

.focused-search-panel {
  margin-bottom: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}

.focused-search-panel .search-form,
.focused-search-panel .question-form {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.focused-search-panel .search-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.focused-search-panel input[name="q"] {
  min-height: 46px;
  font-size: 1rem;
}

.focused-search-panel textarea[name="frage"] {
  min-height: 116px;
  resize: vertical;
  font-size: 1rem;
  line-height: 1.5;
}

.answer-panel {
  border-left: 3px solid var(--accent);
}

.question-file-browser {
  margin-top: 24px;
}

.file-browser-toolbar {
  align-items: center;
}

.file-selection-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.file-browser:has([data-file-select]:checked) .file-selection-actions {
  display: inline-flex;
}

.toolbar-more-menu {
  position: relative;
  margin-left: auto;
}

.toolbar-more-menu > summary {
  list-style: none;
}

.toolbar-more-menu > summary::-webkit-details-marker {
  display: none;
}

.toolbar-more-menu > div {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.16);
}

.toolbar-more-menu a {
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.toolbar-more-menu a:hover {
  background: var(--soft);
}

.calendar-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

.document-views-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.document-views-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.document-views-header h1 {
  margin: 3px 0 0;
  font-size: 2rem;
  letter-spacing: 0;
}

.document-views-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.document-views-actions .icon-button:disabled {
  color: #a5b0b7;
  cursor: default;
  opacity: 0.58;
}

.document-views-actions .icon-button:disabled:hover {
  background: #ffffff;
}

.document-view-export-menu {
  position: relative;
}

.document-view-export-menu > summary {
  list-style: none;
}

.document-view-export-menu > summary::-webkit-details-marker {
  display: none;
}

.document-view-export-menu[open] > summary {
  border-color: #9ebcac;
  background: #edf8f3;
}

.document-view-export-menu-panel {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 45;
  display: grid;
  width: min(340px, calc(100vw - 28px));
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(5, 10, 22, 0.14);
}

.document-view-export-menu-panel > a,
.document-view-export-menu-panel > button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.document-view-export-menu-panel > a:hover,
.document-view-export-menu-panel > a:focus-visible,
.document-view-export-menu-panel > button:hover,
.document-view-export-menu-panel > button:focus-visible {
  background: var(--soft);
}

.document-view-export-menu-panel svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.document-view-export-menu-panel span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.document-view-export-menu-panel strong {
  font-size: 0.84rem;
}

.document-view-export-menu-panel small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.document-view-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.document-view-summary > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 11px 14px;
  border-right: 1px solid var(--line);
}

.document-view-summary > div:last-child {
  border-right: 0;
}

.document-view-summary strong {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-view-summary span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.document-view-search {
  position: relative;
  min-width: 0;
}

.document-view-search svg {
  position: absolute;
  top: 12px;
  left: 13px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  pointer-events: none;
}

.document-view-search input {
  width: 100%;
  min-height: 42px;
  padding: 9px 14px 9px 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
}

.document-view-search input:focus {
  border-color: #7ca795;
  outline: 2px solid rgba(47, 133, 90, 0.14);
  outline-offset: 0;
}

.document-view-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
}

.document-view-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: stretch;
  padding: 0 2px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.document-view-tabs a:hover {
  color: var(--ink);
}

.document-view-tabs a.active {
  border-bottom-color: var(--accent-dark);
  color: var(--ink);
}

.document-view-tabs a span {
  padding: 2px 5px;
  border: 1px solid #b9c8cf;
  border-radius: 4px;
  color: #526670;
  font-size: 0.62rem;
  line-height: 1;
}

.document-view-remove-level svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.document-views-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  min-width: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.document-view-preset,
.document-view-dimension {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.document-view-preset > span,
.document-view-dimension > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.document-view-preset {
  flex: 0 1 280px;
}

.document-view-preset select,
.document-view-dimension select {
  width: 100%;
  min-height: 40px;
  padding: 8px 34px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
}

.document-view-grouping {
  display: flex;
  flex: 1 1 auto;
  gap: 10px;
  min-width: 0;
}

.document-view-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-self: flex-end;
  align-items: center;
  gap: 6px;
}

.document-view-toolbar-actions .icon-button {
  width: 40px;
  height: 40px;
  border-radius: 6px;
}

.document-view-toolbar-actions .icon-button:disabled {
  color: #9caaaf;
  cursor: default;
  opacity: 0.56;
}

.document-view-toolbar-actions .icon-button:disabled:hover {
  background: var(--surface);
}

.document-view-edit-dialog.document-view-manager-dialog {
  width: min(640px, calc(100vw - 32px));
}

.document-view-manager-form {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.document-view-manager-content {
  display: grid;
  gap: 16px;
  padding: 18px;
  overflow: auto;
}

.document-view-manager-switcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: end;
  gap: 8px;
}

.document-view-manager-switcher > label,
.document-view-manager-name,
.document-view-manager-dimension {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.document-view-manager-switcher label > span,
.document-view-manager-name > span,
.document-view-manager-dimension label > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.document-view-manager-switcher select,
.document-view-manager-name input,
.document-view-manager-dimension select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 34px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
}

.document-view-manager-name input {
  padding-right: 10px;
}

.document-view-manager-dimensions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.document-view-manager-dimension > div {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(130px, 0.75fr) auto;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.document-view-manager-dimension label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.document-view-manager-dimension .document-view-remove-level {
  position: static;
  width: 40px;
  height: 40px;
}

.document-view-manager-add {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.document-view-manager-add:hover {
  background: var(--soft);
}

.document-view-manager-add svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.document-view-manager-form > footer .danger {
  border-color: #e1b7b7;
  background: var(--surface);
  color: #a23d3d;
}

.document-view-dimension {
  flex: 1 1 180px;
}

.document-view-dimension > div {
  position: relative;
  min-width: 0;
}

.document-view-dimension:has(.document-view-remove-level) select {
  padding-right: 64px;
}

.document-view-remove-level {
  position: absolute;
  top: 5px;
  right: 5px;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: var(--soft);
  color: var(--muted);
  cursor: pointer;
}

.document-view-remove-level:hover {
  color: var(--ink);
}

.document-views-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.55fr);
  min-height: 590px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.document-view-browser,
.document-view-results {
  min-width: 0;
}

.document-view-browser {
  border-right: 1px solid var(--line);
}

.document-view-browser-head,
.document-view-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.document-view-browser-head-actions > span,
.document-view-results-head span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.document-view-browser-head-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.document-view-browser-head-actions .icon-button {
  width: 32px;
  height: 32px;
  color: var(--muted);
}

.document-view-browser-head-actions .icon-button.is-active {
  background: #edf8f3;
  color: var(--accent-dark);
}

.document-view-merge-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #f5f9f7;
}

.document-view-merge-bar[hidden] {
  display: none;
}

.document-view-merge-bar > span {
  color: #405660;
  font-size: 0.78rem;
  font-weight: 800;
}

.document-view-merge-bar > div {
  display: flex;
  gap: 6px;
}

.document-view-merge-bar .document-view-dialog-button {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 0.76rem;
}

.document-view-results-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.document-view-results-head > div > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-view-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px 8px 16px;
  border-bottom: 1px solid var(--line);
  background: #f5f9f7;
}

.document-view-selection-bar[hidden] {
  display: none;
}

.document-view-selection-bar > span {
  color: #405660;
  font-size: 0.8rem;
  font-weight: 740;
}

.document-view-selection-bar > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.document-view-selection-bar .document-view-dialog-button {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 0.76rem;
}

.document-view-selection-bar .icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.document-view-action-status {
  color: var(--accent-dark) !important;
}

.document-view-action-status.is-error {
  color: var(--error) !important;
}

.document-view-action-status:empty {
  display: none;
}

.document-view-search-radius {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #c8d5db;
  border-radius: 6px;
  background: var(--surface);
  color: #405660;
  font: inherit;
  cursor: pointer;
}

.document-view-search-radius:hover,
.document-view-search-radius:focus-visible {
  border-color: #91aa9f;
  background: #f2f8f5;
  color: var(--accent-dark);
}

.document-view-search-radius.is-expanded {
  border-color: #9ebcac;
  background: #edf8f3;
  color: var(--accent-dark);
}

.document-view-search-radius:disabled {
  cursor: wait;
  opacity: 0.58;
}

.document-view-search-radius svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.document-view-search-radius.is-expanded svg path:nth-of-type(2) {
  display: none;
}

.document-view-search-radius span {
  color: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.document-view-search-radius[hidden] {
  display: none;
}

.document-view-tree {
  max-height: 70vh;
  overflow: auto;
  padding: 7px 0 14px;
}

.document-view-tree-item {
  min-width: 0;
}

.document-view-tree-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 40px;
  padding: 7px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.document-view-merge-check {
  display: none;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #9cabb3;
  border-radius: 4px;
  background: var(--surface);
  color: #ffffff;
}

.document-view-merge-check svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.document-view-tree.is-merge-mode > .document-view-tree-item > .document-view-tree-row .document-view-merge-check {
  display: grid;
}

.document-view-tree.is-merge-mode > .document-view-tree-item > .document-view-tree-row .document-view-disclosure {
  display: none;
}

.document-view-tree-row.is-merge-selected {
  background: #edf8f3;
  box-shadow: inset 3px 0 0 #2f855a;
}

.document-view-tree-row.is-merge-selected .document-view-merge-check {
  border-color: #2f855a;
  background: #2f855a;
}

.document-view-tree-row:hover {
  background: #f3f7f8;
}

.document-view-tree-row.is-selected {
  background: #edf8f3;
  box-shadow: inset 3px 0 0 #2f855a;
}

.document-view-disclosure {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 120ms ease;
}

.document-view-tree-row.is-open .document-view-disclosure {
  transform: rotate(45deg) translate(-2px, -2px);
}

.document-view-disclosure.is-leaf {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 50%;
  background: #9aabb7;
  transform: none;
}

.document-view-tree-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 720;
}

.document-view-tree-count {
  min-width: 26px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e8eef2;
  color: #405260;
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
}

.document-view-tree-children {
  margin-left: 19px;
  border-left: 1px solid #dce5e9;
}

.document-view-more-groups {
  width: calc(100% - 24px);
  margin: 7px 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent-dark);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.document-view-more-groups:hover {
  background: var(--soft);
}

.document-view-document-list {
  display: grid;
}

.document-view-document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 9px 12px 9px 16px;
  border-bottom: 1px solid rgba(217, 226, 234, 0.72);
  content-visibility: auto;
  contain-intrinsic-size: auto 62px;
}

.document-view-document-select {
  display: none;
  place-items: center;
  width: 24px;
  min-height: 34px;
}

.document-view-document-select input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent-dark);
}

.document-views-page.is-document-selection .document-view-document-row {
  grid-template-columns: 24px minmax(0, 1fr) auto;
}

.document-views-page.is-document-selection .document-view-document-select {
  display: grid;
}

.document-view-document-row.is-selection-selected {
  background: #f2f8f5;
}

.document-view-document-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.document-view-document-main:hover strong {
  color: var(--accent-dark);
}

.document-view-document-row strong,
.document-view-document-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-view-document-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.document-view-document-actions .icon-button {
  width: 34px;
  height: 34px;
}

.document-view-document-actions .icon-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.document-view-edit-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #c9d5da;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(17, 24, 39, 0.22);
}

.document-view-edit-dialog::backdrop {
  background: rgba(22, 31, 36, 0.42);
}

.document-view-edit-form {
  display: grid;
  max-height: inherit;
}

.document-view-edit-form > header,
.document-view-edit-form > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
}

.document-view-edit-form > header {
  border-bottom: 1px solid var(--line);
}

.document-view-edit-form > header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.document-view-edit-form > footer {
  border-top: 1px solid var(--line);
}

.document-view-edit-form > footer > span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.document-view-edit-form > footer > div {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.document-view-edit-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  overflow: auto;
}

.document-view-edit-fields label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.document-view-edit-fields label > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.document-view-edit-fields input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
}

.document-view-edit-title {
  grid-column: 1 / -1;
}

.document-view-merge-fields {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.document-view-merge-fields label {
  display: grid;
  gap: 6px;
}

.document-view-merge-fields label > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.document-view-merge-fields select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.document-view-merge-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.document-view-merge-selection span {
  max-width: 100%;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--soft);
  color: #405260;
  font-size: 0.78rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-view-share-content {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.document-view-share-content > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.document-view-share-recipients {
  display: grid;
  gap: 6px;
}

.document-view-share-recipients > span {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.document-view-share-recipients input {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.document-view-share-recipients input:focus {
  border-color: var(--accent-dark);
  outline: 2px solid color-mix(in srgb, var(--accent-dark) 18%, transparent);
  outline-offset: 1px;
}

.document-view-share-recipients small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.document-view-share-folder-option {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 750;
}

.document-view-share-folder-option input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent-dark);
}

.document-view-share-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.35fr);
  gap: 10px;
  padding-top: 4px;
}

.document-view-share-result[hidden] {
  display: none;
}

.document-view-share-result label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.document-view-share-result label > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.document-view-share-result input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fa;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
}

.document-view-share-copy-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.document-view-merge-management-list {
  display: grid;
  max-height: min(480px, calc(100vh - 190px));
  overflow: auto;
}

.document-view-merge-management-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 11px 14px 11px 18px;
  border-bottom: 1px solid var(--line);
}

.document-view-merge-management-row:last-child {
  border-bottom: 0;
}

.document-view-merge-management-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.document-view-merge-management-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-view-merge-management-row strong {
  font-size: 0.88rem;
}

.document-view-merge-management-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 680;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.document-view-merge-management-row .icon-button {
  color: #52656e;
}

.document-view-merge-management-row .icon-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.document-view-dialog-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.document-view-dialog-button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.document-view-dialog-button.primary {
  background: var(--accent-dark);
  color: #ffffff;
}

.document-view-dialog-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.document-view-document-row span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 680;
}

.document-view-empty {
  padding: 16px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.document-view-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: calc(100% - 32px);
  min-height: 40px;
  margin: 12px 16px 16px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.document-view-more:hover,
.document-view-more:focus-visible {
  background: var(--soft);
}

.document-view-more:disabled {
  cursor: wait;
  opacity: 0.55;
}

.document-view-more svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.document-view-more[hidden] {
  display: none;
}

.document-view-index-status,
.document-views-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #cad8df;
  border-radius: 6px;
  background: #f6f9fa;
  color: #33464f;
  font-weight: 750;
}

.document-view-index-status[hidden],
.document-views-workspace[hidden] {
  display: none;
}

.document-review-queue {
  overflow: hidden;
  border: 1px solid rgba(178, 117, 16, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, #fffaf0, #fffdf8);
}

.document-review-queue > summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  min-height: 64px;
  padding: 10px 14px;
  list-style: none;
  cursor: pointer;
}

.document-review-queue > summary::-webkit-details-marker {
  display: none;
}

.document-review-queue > summary > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.document-review-queue > summary strong {
  color: #65450f;
  font-size: 0.9rem;
}

.document-review-queue > summary small {
  color: #80612c;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.4;
}

.document-review-queue-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(204, 137, 28, 0.13);
  color: #956510;
}

.document-review-queue-icon svg,
.document-review-queue-chevron,
.document-review-queue-list svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.document-review-queue-chevron {
  color: #956510;
  transition: transform 150ms ease;
}

.document-review-queue[open] .document-review-queue-chevron {
  transform: rotate(180deg);
}

.document-review-queue-list {
  display: grid;
  padding: 0 12px 12px 59px;
}

.document-review-queue-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 7px 9px;
  border-top: 1px solid rgba(178, 117, 16, 0.16);
  color: #65450f;
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
}

.document-review-queue-list a:hover,
.document-review-queue-list a:focus-visible {
  border-radius: 5px;
  background: rgba(204, 137, 28, 0.08);
}

.document-view-status-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--accent-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.document-search-header {
  margin-bottom: 0;
}

.document-search-header h1 {
  margin: 3px 0 0;
  font-size: 2rem;
  letter-spacing: 0;
}

.focused-search-panel .document-search-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.document-search-field {
  position: relative;
  display: block;
  min-width: 0;
}

.document-search-field > svg {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transform: translateY(-50%);
  pointer-events: none;
}

.focused-search-panel .document-search-field input[name="q"] {
  min-height: 40px;
  padding: 8px 12px 8px 38px;
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.9rem;
}

.document-search-toolbar .search-progress {
  grid-column: 1 / -1;
}

.document-browser-page.file-browser {
  gap: 12px;
  padding-top: 0;
}

.document-browser-toolbar {
  min-height: 48px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.document-browser-toolbar .secondary-button {
  gap: 7px;
  border-color: transparent;
  background: transparent;
}

.document-browser-toolbar .secondary-button:hover,
.document-browser-toolbar .secondary-button:focus-visible {
  border-color: var(--line);
  background: var(--surface);
}

.document-browser-toolbar .secondary-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.document-browser-toolbar .folder-tree-status:not(:empty) {
  margin-left: 6px;
  font-size: 0.8rem;
}

.document-browser-workspace {
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.6fr);
  min-height: 620px;
}

.document-browser-tree.file-tree {
  display: block;
  max-height: 70vh;
  overflow: auto;
  padding: 6px 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.document-browser-tree .file-tree-folder > summary {
  min-height: 42px;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  border-radius: 0;
}

.document-browser-tree .file-tree-folder > summary:hover {
  background: #f3f7f8;
}

.document-browser-tree .file-tree-folder > summary.is-selected {
  background: #edf8f3;
  box-shadow: inset 3px 0 0 #2f855a;
}

.document-browser-tree .file-tree-folder > summary > span:not(.folder-icon):not(.folder-action-bar) {
  min-width: 0;
}

.document-browser-tree .file-tree-folder summary strong,
.document-browser-tree .file-tree-folder summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-browser-tree .file-tree-folder summary strong {
  font-size: 0.86rem;
}

.document-browser-tree .file-tree-folder summary small {
  font-size: 0.72rem;
}

.document-browser-tree .folder-icon {
  width: 25px;
  height: 25px;
}

.document-browser-tree .folder-icon::before {
  inset: 6px 1px 1px;
}

.document-browser-tree .folder-icon::after {
  left: 3px;
  top: 2px;
  width: 11px;
  height: 7px;
}

.document-browser-tree .file-tree-children {
  margin-left: 18px;
  padding-left: 10px;
}

.document-browser-tree .folder-action-menu-button {
  opacity: 0.35;
}

.document-browser-tree summary:hover .folder-action-menu-button,
.document-browser-tree .folder-action-menu-button:focus-visible,
.document-browser-tree .folder-action-menu.is-open .folder-action-menu-button {
  opacity: 1;
}

.document-browser-results {
  min-width: 0;
}

.document-browser-document-list {
  display: grid;
}

.document-browser-document-list .file-tree-file {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 8px 10px 8px 14px;
  border-radius: 0;
}

.document-browser-document-list .file-tree-file:hover {
  background: #f7fafb;
}

.document-browser-document-list .file-select {
  opacity: 0.42;
}

.document-browser-document-list .file-select:has(input:checked),
.document-browser-document-list .file-tree-file:hover .file-select,
.document-browser-document-list .file-select:focus-within {
  opacity: 1;
}

.document-browser-document-list .file-actions {
  opacity: 0.4;
}

.document-browser-document-list .file-tree-file:hover .file-actions,
.document-browser-document-list .file-actions:focus-within {
  opacity: 1;
}

@media (max-width: 820px) {
  .document-views-toolbar {
    align-items: end;
    overflow: visible;
    padding-bottom: 12px;
  }

  .document-view-summary {
    overflow-x: auto;
  }

  .document-view-summary > div {
    min-width: 112px;
  }

  .document-view-toolbar-actions {
    flex: 0 0 auto;
  }

  .document-view-dimension {
    flex: 0 0 190px;
  }

  .document-views-workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .document-view-browser {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .document-view-tree {
    max-height: 42vh;
  }

  .document-view-merge-bar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .document-view-merge-bar > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }


  .document-browser-workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .document-browser-tree.file-tree {
    max-height: 38vh;
  }

  .document-browser-document-list {
    min-height: 220px;
  }
}

@media (max-width: 520px) {
  .document-views-header {
    align-items: center;
  }

  .document-views-header h1 {
    font-size: 1.55rem;
  }

  .document-view-document-row {
    padding-left: 12px;
  }

  .document-view-selection-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-view-selection-bar > div {
    width: 100%;
  }

  .document-view-selection-bar .document-view-dialog-button {
    flex: 1 1 auto;
  }

  .document-view-share-result {
    grid-template-columns: 1fr;
  }

  .document-view-edit-fields {
    grid-template-columns: 1fr;
  }

  .document-view-edit-title {
    grid-column: auto;
  }

  .document-view-edit-form > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-view-edit-form > footer > div {
    width: 100%;
    margin-left: 0;
  }

  .document-view-dialog-button {
    flex: 1 1 0;
  }

  .document-view-tabs {
    gap: 18px;
  }


  .document-search-header h1 {
    font-size: 1.55rem;
  }

  .document-browser-toolbar {
    flex-wrap: wrap;
  }

  .document-browser-toolbar .folder-tree-status:not(:empty) {
    flex-basis: 100%;
    margin-left: 0;
  }

  .document-browser-document-list .file-tree-file {
    padding-left: 10px;
  }
}

.calendar-viewbar {
  justify-content: space-between;
}

.calendar-filter-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.calendar-status-switch {
  display: inline-flex;
  justify-self: start;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf1f4;
}

.calendar-status-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.calendar-status-switch a:hover,
.calendar-status-switch a:focus-visible {
  color: var(--ink);
}

.calendar-status-switch a.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 35, 55, 0.14);
}

.calendar-filter-row .calendar-filter-form {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  width: 100%;
}

.calendar-filter-row .calendar-filterbar {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.calendar-filter-row .calendar-filter-menu:last-child .calendar-filter-menu-panel {
  right: 0;
  left: auto;
}

.calendar-filter-menu summary {
  min-height: 40px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
}

.calendar-filter-menu summary::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--calendar-type-color);
  content: "";
}

.calendar-filter-menu summary small {
  min-width: 28px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  text-align: center;
  opacity: 1;
}

.calendar-filter-menu[open] summary,
.calendar-filter-menu summary:hover,
.calendar-filter-menu summary:focus-visible {
  border-color: rgba(10, 174, 192, 0.48);
  background: #fbfeff;
}

.calendar-taskbar[hidden],
.calendar-bulk-form[hidden],
.calendar-list[hidden],
.calendar-board[hidden],
.calendar-navigation[hidden] {
  display: none;
}

.calendar-bulk-form:not([hidden]) {
  margin: 16px 0 10px;
}

.settings-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 32px;
}

.settings-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 2px;
  padding-right: 20px;
  border-right: 1px solid var(--line);
}

.settings-sidebar > span {
  margin: 20px 10px 5px;
  color: #7a8493;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.settings-sidebar > span:first-child {
  margin-top: 0;
}

.settings-sidebar a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 6px;
  color: #364152;
  font-size: 0.9rem;
  font-weight: 680;
  text-decoration: none;
}

.settings-sidebar a:hover {
  background: #eef2f5;
}

.settings-sidebar a[aria-current="page"] {
  background: #e6f4f5;
  color: #075f6b;
}

.settings-content {
  min-width: 0;
}

.settings-content > .account-section {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.settings-content > .account-section > summary {
  display: none;
}

.settings-content > .account-section[open] {
  display: block;
}

.settings-content .storage-disclosure-list {
  padding: 0;
}

.settings-content .storage-disclosure-item {
  box-shadow: none;
}

.data-export-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.integration-technical-details,
.historical-import-disclosure {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.integration-technical-details > summary,
.historical-import-disclosure > summary {
  cursor: pointer;
  color: #526071;
  font-size: 0.9rem;
  font-weight: 750;
}

.integration-technical-details[open] > summary,
.historical-import-disclosure[open] > summary {
  margin-bottom: 14px;
}

.email-connection-detail {
  width: min(860px, 100%);
  margin-inline: auto;
  box-shadow: none;
}

.email-connection-detail > .metadata-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.historical-import-disclosure {
  margin-top: 18px;
}

.document-detail-page {
  display: grid;
  gap: 18px;
}

.document-detail-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 8px 0 18px;
  border-bottom: 1px solid var(--line);
}

.document-detail-back {
  margin-top: 2px;
}

.document-detail-header .icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.document-detail-title {
  min-width: 0;
}

.document-detail-title h1 {
  margin: 2px 0 6px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  overflow-wrap: anywhere;
}

.document-detail-title p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.document-detail-actions {
  display: flex;
  gap: 8px;
}

.document-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.65fr);
  align-items: start;
  gap: 24px;
}

.document-detail-primary,
.document-inspector {
  min-width: 0;
}

.document-detail-viewer {
  margin: 0;
}

.document-detail-viewer .document-viewer-head {
  min-height: 42px;
  padding: 0 2px;
}

.document-inspector {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.document-current-folder,
.document-detail-metadata,
.document-inspector-section {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.document-current-folder span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.document-current-folder strong {
  display: block;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.document-detail-metadata h2 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.document-detail-metadata-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.document-detail-metadata-heading h2 {
  margin: 0;
}

.document-data-origin {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eaf2f7;
  color: #315d78;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.document-data-origin.is-manual {
  margin-left: 6px;
  background: #f4efe7;
  color: #795b2e;
}

.document-data-origin.is-system {
  margin-left: 6px;
  background: #f1f3f5;
  color: #66717a;
}

.document-data-origin.is-pro {
  background: #e5f5f6;
  color: #076b77;
}

@media (max-width: 620px) {
  .document-guidance-composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .document-guidance-composer-footer > span {
    max-width: none;
  }
}

.document-detail-metadata dl {
  margin: 0;
}

.document-detail-metadata dl > div {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0f3;
}

.document-detail-metadata dl > div:last-child {
  border-bottom: 0;
}

.document-detail-metadata dt,
.document-detail-metadata dd {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.4;
}

.document-detail-metadata dt {
  color: var(--muted);
}

.document-detail-metadata dd {
  color: var(--text);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.document-classifications {
  display: grid;
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.document-data-tiers {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.document-data-tier {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.document-data-tier > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.document-data-tier > summary::-webkit-details-marker {
  display: none;
}

.document-data-tier[open] > summary {
  border-bottom: 1px solid var(--line);
}

.document-data-tier-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.document-data-tier-heading > span:last-child {
  min-width: 0;
}

.document-data-tier-heading strong,
.document-data-tier-heading small {
  display: block;
  overflow-wrap: anywhere;
}

.document-data-tier-heading strong {
  color: var(--text);
  font-size: 0.94rem;
}

.document-data-tier-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.document-data-tier-label {
  flex: 0 0 auto;
  min-width: 68px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eaf2f7;
  color: #315d78;
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
}

.document-data-tier.is-business .document-data-tier-label {
  background: #f0ecf7;
  color: #60477f;
}

.document-data-tier-count {
  flex: 0 0 auto;
  min-width: 34px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f3f5f7;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-align: center;
}

.document-data-tier-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  align-items: start;
  gap: 26px;
  padding: 18px 14px 20px;
}

.document-data-tier-totals,
.document-data-tier-body > .document-classification-empty,
.document-data-tier-profiles {
  grid-column: 1 / -1;
}

.document-specialized-record + .document-specialized-record {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.document-classifications-header,
.document-classification-group-heading,
.document-classification-item > summary,
.document-taxonomy-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.document-classifications-header h2,
.document-classification-group-heading h3 {
  margin: 0;
  letter-spacing: 0;
}

.document-classifications-header h2 {
  margin-top: 2px;
  font-size: 1.22rem;
}

.document-classification-totals {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.document-classification-totals span + span::before {
  content: "·";
  margin-right: 8px;
}

.document-classification-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  align-items: start;
  gap: 28px;
}

.document-classification-group {
  min-width: 0;
}

.document-base-search-terms {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
}

.document-base-search-terms > summary {
  padding: 12px 0;
  color: var(--text);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 750;
}

.document-base-search-terms[open] > summary {
  margin-bottom: 8px;
}

.document-classification-group-heading {
  min-height: 38px;
  padding-bottom: 10px;
}

.document-classification-group-heading h3 {
  font-size: 0.96rem;
}

.document-classification-group-heading > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.document-classification-list {
  border-top: 1px solid var(--line);
}

.document-classification-item {
  border-bottom: 1px solid var(--line);
}

.document-classification-item > summary {
  min-height: 58px;
  padding: 10px 2px;
  cursor: pointer;
  list-style: none;
}

.document-classification-item > summary::-webkit-details-marker {
  display: none;
}

.document-classification-item > summary > span:first-child {
  min-width: 0;
}

.document-classification-item > summary strong,
.document-classification-item > summary small {
  display: block;
  overflow-wrap: anywhere;
}

.document-classification-item > summary strong {
  color: var(--text);
  font-size: 0.9rem;
}

.document-classification-item > summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.document-classification-count,
.document-classification-state,
.document-classification-source,
.document-classification-meta span {
  flex: 0 0 auto;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 750;
}

.document-classification-count {
  min-width: 28px;
  padding: 5px 7px;
  background: #eef2f5;
  color: var(--text);
  text-align: center;
}

.document-classification-state,
.document-classification-source,
.document-classification-meta span {
  padding: 4px 6px;
  background: #f3f5f7;
  color: var(--muted);
}

.document-classification-state.is-insufficient {
  background: #f8f1e8;
  color: #805726;
}

.document-classification-state.is-supported {
  background: #e8f4ed;
  color: #26633f;
}

.document-classification-source.is-supported,
.document-classification-meta .is-supported {
  background: #e8f4ed;
  color: #26633f;
}

.document-classification-meta .is-muted {
  color: var(--muted);
}

.document-classification-body {
  display: grid;
  gap: 12px;
  padding: 4px 2px 16px;
}

.document-classification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.document-taxonomy-list {
  display: grid;
}

.document-activity-list {
  display: grid;
  border-top: 1px solid #edf0f3;
}

.document-activity-row {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f3;
}

.document-activity-row > span,
.document-activity-row > small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.document-activity-row > strong {
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.document-taxonomy-row {
  min-width: 0;
  padding: 11px 0;
  border-top: 1px solid #edf0f3;
}

.document-taxonomy-code,
.document-taxonomy-row > strong,
.document-taxonomy-row > small {
  display: block;
}

.document-taxonomy-code {
  margin-bottom: 4px;
  color: #315d78;
  font-size: 0.72rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.document-taxonomy-row > strong {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.document-taxonomy-row > small,
.document-taxonomy-foot small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.document-taxonomy-row > p,
.document-classification-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.document-classification-evidence {
  padding-top: 2px;
}

.document-model-output {
  border-top: 1px solid var(--line);
}

.document-model-output > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 750;
  list-style: none;
}

.document-model-output > summary::-webkit-details-marker {
  display: none;
}

.document-model-output > summary > span:last-child {
  min-width: 24px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #f3f5f7;
  text-align: center;
}

.document-model-output-body {
  display: grid;
  gap: 10px;
  padding-bottom: 6px;
}

.document-model-assessment {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.document-model-proposal > strong {
  font-weight: 700;
}

.document-model-decision {
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 750;
}

.document-model-decision.is-accepted {
  background: #e8f4ed;
  color: #26633f;
}

.document-model-decision.is-rejected {
  background: #f8f1e8;
  color: #805726;
}

.document-model-decision.is-alternative {
  background: #eef2f5;
  color: #315d78;
}

.document-classification-evidence > summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 750;
}

.document-classification-body blockquote {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-left: 2px solid #8da8b8;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.document-inspector-section {
  padding-top: 2px;
}

.document-technical-details {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.document-inspector-section[open] > summary,
.document-technical-details[open] > summary {
  margin-bottom: 14px;
}

.document-storage-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.document-technical-details {
  margin-top: 2px;
}

.document-technical-details pre {
  max-height: 480px;
  overflow: auto;
}

.auth-panel.narrow {
  width: min(440px, 100%);
  margin: 40px auto 20px;
}

.auth-panel h1 {
  font-size: 2rem;
}

.auth-intro {
  margin-bottom: 22px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.auth-help {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.auth-help > summary {
  list-style-position: inside;
  text-align: center;
}

.auth-help[open] > summary {
  margin-bottom: 16px;
}

.auth-help .resend-verification-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.cookie-notice {
  position: static;
  width: min(900px, calc(100% - 32px));
  margin: 0 auto 18px;
  box-shadow: none;
}

@media (max-width: 1100px) {
  .topbar {
    gap: 10px;
    padding-inline: 18px;
  }

  .brand img {
    width: 112px;
  }

  .main-nav {
    gap: 3px;
  }

  .nav-link {
    padding-inline: 8px;
    font-size: 0.88rem;
  }

  .language-switcher:not(.mobile-language-switcher) {
    display: none;
  }
}

@media (max-width: 820px) {
  .settings-shell,
  .document-detail-layout {
    grid-template-columns: 1fr;
  }

  .settings-sidebar {
    position: static;
    display: flex;
    gap: 4px;
    margin: -8px 0 8px;
    padding: 0 0 10px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-sidebar > span {
    display: none;
  }

  .settings-sidebar a {
    flex: 0 0 auto;
  }

  .document-inspector {
    position: static;
  }

  .document-detail-header {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .document-detail-actions {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  body,
  main,
  .app-tab-shell,
  [data-app-tab-panel] {
    background: #f7f8fa;
  }

  main {
    padding-top: 16px;
  }

  h1,
  .dashboard-header h1 {
    font-size: 1.75rem;
  }

  .workspace-page-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 18px;
    padding: 8px 0 16px;
  }

  .workspace-page-header > .primary-button {
    width: 100%;
  }

  .mobile-import-action {
    width: 34px;
    min-height: 34px;
    padding: 0;
  }

  .section-tabs {
    gap: 18px;
    overflow-x: auto;
  }

  .focused-search-panel .search-form {
    grid-template-columns: 1fr;
  }

  .focused-search-panel .search-form,
  .focused-search-panel .question-form {
    padding: 14px;
  }

  .focused-search-panel .document-search-toolbar {
    grid-template-columns: minmax(0, 1fr) 40px;
    padding: 0 0 14px;
  }

  .document-result-head,
  .result-view-switch {
    width: 100%;
  }

  .result-view-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .search-relevance-row {
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 8px;
    padding-left: 10px;
  }

  .search-relevance-row > span {
    grid-column: 1;
    grid-row: 2;
  }

  .search-relevance-row > .icon-button {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .toolbar-more-menu {
    margin-left: 0;
  }

  .settings-page-header {
    margin-bottom: 12px;
  }

  .settings-shell {
    gap: 18px;
  }

  .document-detail-layout {
    gap: 16px;
  }

  .document-detail-header {
    gap: 10px;
  }

  .document-detail-title h1 {
    font-size: 1.45rem;
  }

  .document-classifications-header,
  .document-taxonomy-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-classification-totals {
    white-space: normal;
  }

  .document-classification-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .document-classification-source {
    align-self: flex-start;
  }

  .data-export-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-panel.narrow {
    margin-top: 12px;
  }

  .cookie-notice {
    position: static;
    width: auto;
    margin: 18px 12px;
    box-shadow: none;
  }

  .calendar-filter-row {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .calendar-status-switch {
    width: 100%;
  }

  .calendar-status-switch a {
    flex: 1 1 0;
  }

  .calendar-filter-row .calendar-filter-form {
    width: 100%;
    padding-left: 0;
    border-left: 0;
  }

  .calendar-filter-row .calendar-filterbar {
    flex-wrap: wrap;
  }
}

/* Clean questions and calendar surfaces */
.question-page-header,
.calendar-page-header {
  margin-bottom: 0;
}

.question-search-panel {
  margin-bottom: 18px;
}

.question-interactive-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.75fr);
  align-items: start;
  gap: clamp(24px, 4vw, 54px);
}

.question-dialogue-column {
  min-width: 0;
}

.question-live-review {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 14px;
  min-width: 0;
  min-height: 290px;
  max-height: calc(100vh - 150px);
  padding: 18px;
  overflow: hidden;
  border: 1px solid #dce4e9;
  border-radius: 14px;
  background: linear-gradient(165deg, #ffffff 0%, #f7fafb 100%);
  box-shadow: 0 16px 42px rgba(24, 47, 61, 0.07);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.question-live-review.is-active {
  border-color: rgba(10, 174, 192, 0.42);
  box-shadow: 0 18px 48px rgba(10, 126, 140, 0.11);
}

.question-live-review.is-complete {
  border-color: rgba(49, 149, 112, 0.3);
}

.question-live-review.is-error {
  border-color: rgba(204, 67, 67, 0.28);
}

.question-live-review-head,
.question-live-review-head > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.question-live-review-head {
  justify-content: space-between;
}

.question-live-review-head strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.question-live-review-head small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
}

.question-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #bdc8ce;
  box-shadow: 0 0 0 4px rgba(189, 200, 206, 0.2);
}

.question-live-dot.is-active {
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(10, 174, 192, 0.15);
  animation: question-live-pulse 1.7s ease-in-out infinite;
}

@keyframes question-live-pulse {
  50% {
    box-shadow: 0 0 0 8px rgba(10, 174, 192, 0.03);
  }
}

.question-live-review .question-progress {
  padding: 11px 0 2px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.question-live-review .question-progress-head {
  font-size: 0.78rem;
}

.question-live-review .question-progress-track {
  height: 4px;
}

.question-live-review .question-evidence-preview {
  min-height: 0;
  overflow: hidden;
}

.question-live-review .question-evidence-list {
  align-content: start;
  max-height: min(54vh, 560px);
  padding-right: 3px;
}

.question-live-review .question-evidence-item {
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.question-live-review .question-evidence-item:last-child {
  border-bottom: 0;
}

.question-evidence-more {
  padding: 10px 2px 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
}

.question-live-empty {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 190px;
  padding: 20px;
  border: 1px dashed #d5dfe5;
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

.question-live-empty strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.question-live-empty span {
  font-size: 0.82rem;
  line-height: 1.5;
}

.question-stop-button {
  display: grid;
  gap: 2px;
  width: 100%;
  margin-top: auto;
  padding: 11px 14px;
  border-color: rgba(10, 126, 140, 0.38);
  color: #087e8c;
  text-align: left;
}

.question-stop-button[hidden] {
  display: none;
}

.question-stop-button span {
  font-weight: 900;
}

.question-stop-button small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.question-stop-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.question-new-chat {
  align-self: center;
  text-decoration: none;
}

.question-chat {
  min-width: 0;
}

.question-chat-transcript {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: min(62vh, 720px);
  padding: 10px 2px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.question-chat-intro {
  display: grid;
  gap: 5px;
  max-width: 620px;
  padding: 18px 0 8px;
  color: var(--muted);
  line-height: 1.55;
}

.question-chat-intro strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.question-chat-message {
  display: grid;
  gap: 6px;
  width: min(86%, 880px);
  min-width: 0;
}

.question-chat-message.is-user {
  align-self: flex-end;
  width: min(76%, 700px);
  padding: 11px 14px;
  border-radius: 14px 14px 3px 14px;
  background: #e9f7f8;
}

.question-chat-message.is-assistant {
  align-self: flex-start;
  padding: 2px 0 4px;
}

.question-chat-message.is-clarification {
  padding: 12px 14px;
  border-left: 3px solid var(--cyan);
  border-radius: 3px 10px 10px 3px;
  background: color-mix(in srgb, var(--cyan) 7%, var(--surface));
}

.question-chat-message.is-error {
  color: var(--danger, #a53030);
}

.question-chat-role {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.question-chat-message > div,
.question-chat-answer {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

.question-chat-answer.has-table {
  width: 100%;
  white-space: normal;
}

.question-answer-intro {
  margin: 0 0 10px;
  color: var(--ink);
}

.question-answer-table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 5%, transparent);
}

.question-answer-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.84rem;
  line-height: 1.45;
}

.question-answer-table th,
.question-answer-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.question-answer-table th {
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 91%, var(--cyan));
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.question-answer-table td {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.question-answer-table tbody tr:last-child td {
  border-bottom: 0;
}

.question-answer-table tbody tr:hover td {
  background: color-mix(in srgb, var(--cyan) 4%, var(--surface));
}

.question-answer-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.question-answer-coverage {
  margin: 10px 0 0;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--warning) 28%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--warning) 7%, var(--surface));
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.question-chat-sources {
  margin-top: 6px;
  border-top: 1px solid var(--line);
}

.question-chat-sources summary {
  width: fit-content;
  padding: 9px 0 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.question-chat-sources > div {
  display: grid;
  gap: 0;
  margin-top: 6px;
  border-top: 1px solid var(--line);
}

.question-chat-sources a {
  display: grid;
  gap: 2px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.question-chat-sources a:hover {
  background: #f2f6f7;
}

.question-chat-sources small {
  color: var(--muted);
  font-size: 0.76rem;
}

.focused-search-panel .question-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 14px 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

@media (max-width: 680px) {
  .question-chat-transcript {
    max-height: 58vh;
  }

  .question-chat-message,
  .question-chat-message.is-user {
    width: 94%;
  }
}

@media (max-width: 920px) {
  .question-interactive-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .question-live-review {
    position: static;
    max-height: none;
  }

  .question-live-review .question-evidence-list {
    max-height: 320px;
  }
}

.question-composer-field {
  position: relative;
  display: block;
  min-width: 0;
}

.question-composer-field > svg {
  position: absolute;
  top: 18px;
  left: 13px;
  z-index: 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  pointer-events: none;
}

.focused-search-panel .question-composer textarea[name="frage"] {
  min-height: 58px;
  max-height: 180px;
  padding: 15px 14px 13px 42px;
  border-color: #cfd8df;
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.94rem;
  line-height: 1.45;
}

.focused-search-panel .question-composer textarea[name="frage"]:focus {
  border-color: rgba(10, 174, 192, 0.72);
  outline: 3px solid rgba(10, 174, 192, 0.12);
}

.question-submit-button {
  width: 42px;
  height: 42px;
  border-color: #087e8c;
  background: #087e8c;
  color: #ffffff;
}

.question-submit-button:hover,
.question-submit-button:focus-visible {
  border-color: #076b77;
  background: #076b77;
  color: #ffffff;
}

.question-submit-button:disabled {
  border-color: #cbd5dc;
  background: #e4e9ed;
  color: #89959e;
  cursor: default;
}

.question-submit-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.question-composer > .empty,
.question-composer .question-progress {
  grid-column: 1 / -1;
}

.question-composer .question-progress {
  margin-top: 4px;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.question-composer .question-progress-track {
  height: 4px;
  border-radius: 2px;
}

.question-composer .question-evidence-list {
  border-top: 1px solid var(--line);
}

.question-composer .question-evidence-item {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.question-composer .question-evidence-item.is-relevant,
.question-composer .question-evidence-item.is-error {
  border-color: var(--line);
  background: transparent;
}

.question-answer-panel {
  margin: 0;
  padding: 2px 0 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.question-section-head,
.question-document-results .document-result-head {
  align-items: center;
  min-height: 46px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.question-section-head h2,
.question-document-results .document-result-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.question-answer-panel .answer-text {
  width: min(960px, 100%);
  padding: 6px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  line-height: 1.7;
}

.question-document-results {
  margin-top: 0;
  padding-top: 14px;
}

.question-document-results .section-note {
  margin-top: 4px;
}

.question-document-results .answer-sources {
  gap: 0;
}

.question-document-results .answer-source-row {
  min-height: 62px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}

.question-document-results .answer-source-row > a:first-child {
  padding: 9px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.question-document-results .answer-source-row > a:first-child:hover {
  background: #f2f6f7;
}

.question-retrieval-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.question-retrieval-signals small {
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.clean-calendar {
  margin-top: 0;
}

.clean-calendar .calendar-workspace-filter {
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.clean-calendar .calendar-workspace-filter > span {
  font-size: 0.74rem;
  text-transform: none;
}

.clean-calendar .workspace-filter-chip {
  min-height: 32px;
  padding: 0 9px;
  border-color: var(--line);
  border-radius: 6px;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 750;
}

.clean-calendar .calendar-filter-row {
  margin: 0;
  padding: 14px 0;
}

.clean-calendar .calendar-filter-row .calendar-filterbar {
  flex-wrap: nowrap;
}

.clean-calendar .calendar-filter-menu summary {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.clean-calendar .calendar-viewbar {
  min-height: 50px;
  margin: 0;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

.calendar-view-switch {
  gap: 20px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.calendar-view-button {
  align-self: stretch;
  min-width: 0;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
}

.calendar-view-button:hover,
.calendar-view-button:focus-visible {
  color: var(--ink);
}

.calendar-view-button.active {
  border-bottom-color: var(--accent-dark);
  background: transparent;
  color: var(--ink);
}

.clean-calendar .calendar-selection-button {
  border-color: transparent;
  background: transparent;
}

.clean-calendar .calendar-selection-button:hover,
.clean-calendar .calendar-selection-button:focus-visible,
.clean-calendar .calendar-selection-button.active {
  border-color: var(--line);
  background: var(--surface);
}

.clean-calendar .calendar-navigation {
  min-height: 52px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.clean-calendar .calendar-navigation .calendar-mini-action {
  border-color: transparent;
  background: transparent;
}

.clean-calendar .calendar-navigation .secondary-button {
  border-color: transparent;
  background: transparent;
}

.clean-calendar .calendar-board {
  margin-top: 12px;
}

.clean-calendar .calendar-weekdays {
  gap: 2px;
  margin-bottom: 4px;
}

.clean-calendar .calendar-month-grid,
.clean-calendar .week-view {
  gap: 3px;
}

.clean-calendar .calendar-cell {
  border-color: #d9e0e5;
  border-radius: 4px;
  box-shadow: none;
}

.clean-calendar .calendar-day-column,
.clean-calendar .calendar-agenda-row {
  border-radius: 4px;
  background: transparent;
}

.clean-calendar .calendar-event-card {
  border: 0;
  border-left: 3px solid var(--workspace-accent);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.clean-calendar .calendar-event-card.overdue {
  background: #fff9f7;
}

.clean-calendar .calendar-event-card.completed {
  background: #f7fbf8;
}

@media (max-width: 720px) {
  .question-page-header,
  .calendar-page-header {
    padding-top: 0;
  }

  .focused-search-panel .question-composer {
    grid-template-columns: minmax(0, 1fr) 42px;
    padding: 12px 0 14px;
  }

  .question-section-head,
  .question-document-results .document-result-head {
    align-items: flex-start;
  }

  .clean-calendar .calendar-workspace-filter {
    align-items: flex-start;
  }

  .clean-calendar .calendar-filter-row {
    gap: 8px;
  }

  .clean-calendar .calendar-filter-row .calendar-filterbar {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .clean-calendar .calendar-viewbar {
    align-items: center;
    flex-wrap: nowrap;
  }

  .calendar-view-switch {
    gap: 12px;
    overflow-x: auto;
  }

  .calendar-view-button {
    flex: 0 0 auto;
  }
}

/* Keep mobile application chrome inside the visual viewport. */
@media (max-width: 720px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
  }

  .mobile-bottom-nav {
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow: hidden;
    overscroll-behavior-x: none;
  }

  .mobile-bottom-nav.authenticated {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-bottom-nav.authenticated.question-enabled {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mobile-bottom-nav.public {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-bottom-nav a {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
}

.calendar-filter-menu-all {
  --calendar-type-color: var(--accent-dark);
}

.calendar-filter-menu-all summary::before {
  display: none;
}

.calendar-filter-menu-all summary > svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.calendar-connect-button svg,
.calendar-provider-option svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.calendar-connection-dialog {
  max-height: min(820px, calc(100dvh - 32px));
  overflow-y: auto;
}

.calendar-connection-shell,
.calendar-wizard-step,
.calendar-credentials-form,
.calendar-connection-existing {
  display: grid;
  gap: 16px;
}

.calendar-connection-existing {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.calendar-connection-existing h3,
.calendar-wizard-step h3,
.calendar-credentials-form h3 {
  margin: 0;
  font-size: 0.96rem;
  letter-spacing: 0;
}

.calendar-connection-list {
  display: grid;
  gap: 2px;
}

.calendar-connection-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(217, 226, 234, 0.72);
}

.calendar-connection-row:last-child {
  border-bottom: 0;
}

.calendar-connection-row > div:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.calendar-connection-row strong,
.calendar-connection-row small {
  overflow-wrap: anywhere;
}

.calendar-connection-row small {
  color: var(--muted);
  font-size: 0.78rem;
}

.calendar-provider-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7fafb;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.calendar-provider-mark.google {
  color: #1769aa;
}

.calendar-provider-mark.microsoft {
  color: #166534;
}

.calendar-provider-mark.caldav {
  color: #79540a;
}

.calendar-connection-actions {
  display: flex;
  gap: 4px;
}

.calendar-provider-choice {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-provider-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 10px;
  min-height: 62px;
  text-align: left;
}

.calendar-provider-option > span:last-child {
  display: grid;
  gap: 2px;
}

.calendar-provider-option small {
  color: var(--muted);
  font-size: 0.72rem;
}

.calendar-wizard-steps {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-filter-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.calendar-filter-row .calendar-filter-controls .calendar-filter-form {
  width: auto;
}

.calendar-source-menu {
  --calendar-type-color: #4f6075;
}

.calendar-source-menu summary > svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.calendar-source-menu-panel {
  right: 0;
  left: auto;
  width: min(360px, calc(100vw - 32px));
  max-height: min(420px, calc(100dvh - 220px));
  overflow-y: auto;
}

@media (max-width: 720px) {
  .calendar-page-header {
    align-items: center;
  }

  .calendar-connect-button span {
    display: none;
  }

  .calendar-connect-button {
    width: 40px;
    padding: 0;
  }

  .calendar-filter-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .calendar-filter-row .calendar-filter-controls .calendar-filter-form,
  .calendar-filter-controls .calendar-filterbar,
  .calendar-filter-controls .calendar-filter-menu {
    min-width: 0;
    width: 100%;
  }

  .calendar-filter-row .calendar-filter-controls .calendar-filter-form {
    margin-bottom: 0;
  }

  .calendar-filter-controls .calendar-filter-menu summary {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
  }

  .calendar-filter-controls .calendar-filter-menu summary small {
    margin-left: auto;
  }

  .calendar-source-menu-panel {
    position: static;
    margin-top: 6px;
    box-shadow: none;
  }

  .calendar-provider-choice {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-connection-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .calendar-connection-actions {
    grid-column: 2;
    justify-content: flex-end;
  }
}

.calendar-filter-menu-panel-grouped {
  right: 0;
  left: auto;
  gap: 0;
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
}

.calendar-filter-menu-heading {
  display: grid;
  gap: 3px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.calendar-filter-menu-heading strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.calendar-filter-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: min(520px, calc(100vh - 210px));
  overflow-y: auto;
  padding: 6px 16px 12px;
}

.calendar-filter-group {
  min-width: 0;
  margin: 0;
  padding: 12px 12px 10px 0;
  border: 0;
  border-bottom: 1px solid #edf0f3;
}

.calendar-filter-group:nth-child(even) {
  padding-right: 0;
  padding-left: 12px;
  border-left: 1px solid #edf0f3;
}

.calendar-filter-group legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 850;
}

.calendar-filter-group legend small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.calendar-filter-options {
  display: grid;
  gap: 3px;
}

.calendar-filter-menu-panel-grouped .calendar-filter-chip {
  min-height: 32px;
  padding: 0 8px;
  border-color: transparent;
  border-radius: 5px;
}

.calendar-filter-menu-panel-grouped .calendar-filter-chip:hover,
.calendar-filter-menu-panel-grouped .calendar-filter-chip:focus-within {
  border-color: var(--line);
  background: var(--soft);
}

@media (max-width: 720px) {
  .calendar-filter-row .calendar-filter-form,
  .calendar-filter-row .calendar-filterbar,
  .calendar-filter-menu-all {
    width: 100%;
  }

  .calendar-filter-menu-all summary {
    width: 100%;
  }

  .calendar-filter-menu-all summary > small {
    margin-left: auto;
  }

  .calendar-filter-menu-panel-grouped {
    position: static;
    width: 100%;
    margin-top: 6px;
    box-shadow: none;
  }

  .calendar-filter-groups {
    grid-template-columns: minmax(0, 1fr);
    max-height: min(440px, calc(100dvh - 260px));
    padding-right: 12px;
    padding-left: 12px;
  }

  .calendar-filter-group,
  .calendar-filter-group:nth-child(even) {
    padding: 11px 0;
    border-left: 0;
  }
}

/* Compact document inventory and view controls on phones. */
@media (max-width: 720px) {
  .document-view-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .document-view-summary > div {
    min-width: 0;
    padding: 8px 9px;
  }

  .document-view-summary > div:nth-child(3n) {
    border-right: 0;
  }

  .document-view-summary > div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .document-view-summary strong {
    font-size: 0.9rem;
  }

  .document-view-summary span {
    overflow: hidden;
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .document-views-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 260px) 36px;
    align-items: end;
    gap: 9px;
    overflow: visible;
  }

  .document-view-preset {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    max-width: 260px;
  }

  .document-view-preset select,
  .document-view-dimension select {
    min-width: 0;
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 0.8rem;
  }

  .document-view-toolbar-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .document-view-toolbar-actions .icon-button {
    width: 36px;
    height: 36px;
  }

  .document-view-manager-dimensions {
    grid-template-columns: minmax(0, 1fr);
  }

  .document-view-manager-dimension > div {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .document-view-manager-dimension > div > label:first-child {
    grid-column: 1 / -1;
  }

  .document-view-manager-sort {
    grid-column: 1;
  }

  .document-view-manager-dimension .document-view-remove-level {
    grid-column: 2;
  }
}

/* Login: quiet, task-focused access screen. */
.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100dvh - 188px);
  padding: clamp(36px, 7vh, 72px) 0;
  place-items: start center;
}

.login-context {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(38px, 5vw, 64px);
  color: #eefaff;
  background:
    radial-gradient(circle at 100% 0%, rgba(18, 179, 195, 0.24), transparent 36%),
    linear-gradient(145deg, #07101f 0%, #0d1b31 70%, #0b2731 100%);
}

.login-context::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  content: "";
  mask-image: linear-gradient(to bottom right, #000, transparent 72%);
  pointer-events: none;
}

.login-context > * {
  position: relative;
  z-index: 1;
}

.login-context .eyebrow {
  color: #70d7e2;
}

.login-context h2 {
  max-width: 560px;
  margin: 13px 0 20px;
  color: #fff;
  font-size: clamp(2.25rem, 4vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.login-context-copy > p:last-child {
  max-width: 560px;
  margin: 0;
  color: #aebed0;
  font-size: 1.03rem;
  line-height: 1.65;
}

.login-flow {
  display: grid;
  gap: 0;
  margin: 42px 0;
}

.login-flow-step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(179, 208, 226, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(8px);
}

.login-flow-step.is-result {
  border-color: rgba(65, 207, 220, 0.34);
  background: rgba(24, 163, 177, 0.12);
}

.login-flow-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
}

.login-flow-icon svg,
.login-context-note svg {
  fill: none;
  stroke: #70d7e2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.login-flow-icon svg {
  width: 22px;
  height: 22px;
}

.login-flow-step > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.login-flow-step strong {
  color: #fff;
  font-size: 0.92rem;
}

.login-flow-step small {
  color: #98adc2;
  font-size: 0.75rem;
}

.login-flow-link {
  display: block;
  width: 1px;
  height: 18px;
  margin-left: 36px;
  background: linear-gradient(#70d7e2, rgba(112, 215, 226, 0.18));
}

.login-context-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #c3d2df;
  font-size: 0.82rem;
  font-weight: 700;
}

.login-context-note svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.login-access {
  display: grid;
  width: min(100%, 500px);
  padding: 0;
  place-items: center;
}

.login-card {
  width: 100%;
  padding: clamp(30px, 5vw, 44px);
  border: 1px solid #d6dee6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(26, 42, 57, 0.08);
}

.login-card-heading h1 {
  margin: 8px 0 10px;
  font-size: 2rem;
  letter-spacing: -0.025em;
}

.login-card-heading .auth-intro {
  margin: 0;
}

.login-form.auth-form {
  gap: 16px;
  margin-top: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.login-form label > span:first-child {
  color: #344054;
  font-size: 0.82rem;
}

.login-form input {
  min-height: 50px;
  border-radius: 6px;
  background: #fbfcfd;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.login-form input:hover {
  border-color: #b5c4d2;
}

.login-form input:focus {
  border-color: var(--accent);
  outline: 0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 179, 195, 0.14);
}

.login-form .primary-button {
  width: 100%;
  min-height: 50px;
  border: 1px solid #087e8c;
  border-radius: 6px;
  background: #087e8c;
  box-shadow: none;
}

.login-form .primary-button:hover,
.login-form .primary-button:focus-visible {
  border-color: #076b77;
  background: #076b77;
}

.login-help {
  margin-top: 18px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.login-help > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.login-help[open] {
  padding-bottom: 16px;
}

.login-create-account {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.login-create-account a {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.login-create-account a:hover,
.login-create-account a:focus-visible {
  text-decoration: underline;
}

.topbar .public-login-action {
  border: 1px solid rgba(79, 211, 224, 0.48);
  background: rgba(10, 174, 192, 0.14);
  color: #f5fdff;
}

.topbar .public-login-action:hover,
.topbar .public-login-action:focus-visible,
.topbar .public-login-action.active,
.topbar .public-login-action[aria-current="page"] {
  border-color: #33c5d4;
  background: #087e8c;
  color: #fff;
}

.topbar .public-login-action.active::after,
.topbar .public-login-action[aria-current="page"]::after {
  display: none;
}

@media (max-width: 900px) {
  .login-page {
    min-height: calc(100dvh - 174px);
    padding: 40px 0;
  }

  .login-access {
    padding: 0;
  }
}

@media (max-width: 600px) {
  .login-page {
    min-height: 0;
    padding: 18px 0 30px;
  }

  .login-access {
    width: 100%;
  }

  .login-card {
    padding: 26px 20px;
    border-radius: 9px;
    box-shadow: none;
  }

  .login-card-heading h1 {
    font-size: 1.8rem;
  }
}
