:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #262b36;
  --text: #e6e8ec;
  --muted: #8b93a3;
  --accent: #4f7cff;
  --accent-press: #3a64e0;
  --user: #1f2a44;
  --error: #ff6b6b;
  --radius: 10px;
  --topbar-h: 58px;
  font-family:
    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.subtitle {
  color: var(--muted);
  font-size: 0.85rem;
}

.hint {
  opacity: 0.6;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* ---- Form controls ---- */

label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  padding: 0.55rem 0.9rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: var(--accent-press);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

button.secondary:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--error);
  color: var(--error);
}

.status {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 1.2em;
}

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

/* ---- Stage 1: setup ---- */

.setup {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.setup-card {
  width: 100%;
  max-width: 360px;
}

.setup-card h1 {
  font-size: 1.25rem;
  margin: 0;
}

.setup-card .subtitle {
  margin: 0.25rem 0 1.25rem;
}

.setup-card button[type="submit"],
#github-login,
#find-sessions {
  width: 100%;
}

#find-sessions {
  margin-top: 0.5rem;
}

/* Signed-in status + sign-out link on one row, divided from the form below. */
.auth-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.auth-who {
  font-size: 0.85rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Text-link styled button (overrides the default filled button). */
.linkbtn {
  flex: none;
  width: auto;
  padding: 0;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

.linkbtn:hover:not(:disabled) {
  background: none;
  text-decoration: underline;
}

/* Onboarding empty-state (register page): a member with no products yet. */
.empty-state {
  text-align: center;
  margin: 0.5rem 0 1.5rem;
}

.empty-icon {
  font-size: 2rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.empty-state h1 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.empty-state .subtitle {
  margin: 0;
}

#create-product {
  width: 100%;
  margin-top: 0.25rem;
}

/* ---- Stage 2: app shell ---- */

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.view {
  flex: 1;
  min-height: 0;
}

.footer {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: var(--topbar-h);
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
  flex: none;
}

.topbar h1 {
  font-size: 1.05rem;
  margin: 0;
}

.burger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
}

.burger:hover:not(:disabled) {
  background: var(--panel);
}

.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1.25rem;
}

.messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-right: 0.25rem;
}

.msg {
  max-width: 80%;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  white-space: pre-wrap;
  line-height: 1.45;
}

.msg.user {
  align-self: flex-end;
  background: var(--user);
}

.msg.assistant {
  align-self: flex-start;
  background: var(--panel);
  border: 1px solid var(--border);
}

.msg.error {
  align-self: flex-start;
  border: 1px solid var(--error);
  color: var(--error);
}

/* Resume-a-session list (setup page + chat side menu). */
.session-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.session-row {
  display: flex;
  gap: 0.3rem;
  align-items: stretch;
}

.session-item {
  flex: 1;
  min-width: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.6rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
}

.session-item:hover {
  border-color: var(--accent);
}

.session-delete {
  flex: 0 0 auto;
  padding: 0 0.55rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.session-delete:hover {
  border-color: var(--error);
  color: var(--error);
}

.session-title {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-meta-row {
  font-size: 0.72rem;
  color: var(--muted);
}

.sidemenu-sessions {
  margin-top: 1rem;
}

.sidemenu-sessions h3 {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.3rem;
}

.session-more {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--accent);
}

/* Keep the End session button clear of the past-sessions section above it. */
#end-session {
  margin-top: 1.5rem;
}

/* Dedicated "all past sessions" page. */
.sessions {
  padding: 1rem;
  overflow-y: auto;
}

.sessions h2 {
  margin-top: 0;
}

.sessions .session-list {
  max-width: 640px;
}

/* ---- Admin / settings page ---- */
.admin {
  padding: 1rem;
  overflow-y: auto;
}

.admin-section {
  max-width: 720px;
  margin-bottom: 2rem;
}

.admin-section h2 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}

.admin-card {
  padding: 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

.members-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}

.members-table th,
.members-table td {
  text-align: left;
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 0.85rem;
}

.members-table th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.member-action {
  text-align: right;
  white-space: nowrap;
}

.owner-badge {
  font-size: 0.78rem;
  color: var(--accent);
}

.perm-check {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 0.6rem 0.25rem 0;
  font-size: 0.78rem;
  color: var(--text);
}

.perm-check input {
  width: auto;
  margin: 0;
}

.perms {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem;
  margin: 0 0 0.75rem;
}

.perms legend {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0 0.3rem;
}

/* One-time API key reveal. */
.apikey-reveal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.apikey-reveal strong {
  flex-basis: 100%;
  font-size: 0.82rem;
  font-weight: 600;
}

.apikey-secret {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  padding: 0.35rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.apikey-reveal .secondary {
  width: auto;
  flex: none;
}

/* Meta caption above a regenerated (escalated) answer - deliberately styled as
 * a system note (muted, italic, separated by a rule) so it doesn't read as part
 * of the answer content. */
.escalation-note {
  margin: 0 0 0.55rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--border);
  font-size: 0.72rem;
  font-style: italic;
  color: var(--muted);
}

.escalation-note::before {
  content: "↻ ";
  font-style: normal;
}

/* Rendered Markdown answer body. Overrides the bubble's pre-wrap (block
 * elements bring their own spacing) and gives lists/code sensible defaults. */
.answer-body {
  white-space: normal;
}

.answer-body > :first-child {
  margin-top: 0;
}

.answer-body > :last-child {
  margin-bottom: 0;
}

.answer-body p,
.answer-body ul,
.answer-body ol {
  margin: 0.5rem 0;
}

.answer-body ul,
.answer-body ol {
  padding-left: 1.4rem;
}

.answer-body li {
  margin: 0.2rem 0;
}

.answer-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
}

.answer-body pre {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  overflow-x: auto;
}

/* Code inside a fenced block: let the <pre> own the framing. */
.answer-body pre code {
  background: none;
  border: none;
  padding: 0;
}

.citations {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

.citations li {
  margin-bottom: 0.2rem;
}

/* Tools the model invoked, expandable under the references. */
.tools-used {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.tools-used > summary {
  cursor: pointer;
}

.tools-used ul {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
}

.tools-used li {
  margin: 0.15rem 0;
}

.tool-name {
  color: var(--accent);
}

.tool-args {
  margin-left: 0.4rem;
  color: var(--muted);
  word-break: break-word;
}

.citation-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.citation-link::before {
  content: "📄";
  font-size: 0.85em;
  opacity: 0.7;
}

.citation-link:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.citation-link:hover::before {
  opacity: 1;
}

.citation-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.answer-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.flag-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.flag-btn:hover:not(:disabled) {
  border-color: var(--error);
  color: var(--error);
  background: transparent;
}

.flag-btn.flagged {
  border-color: var(--error);
  color: var(--error);
  opacity: 1;
}

.confidence {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.ask {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex: none;
}

.ask textarea {
  flex: 1;
  resize: vertical;
}

.ask-hint {
  flex-basis: 100%;
  margin: 0;
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted);
}

.ask-hint kbd {
  font-family: inherit;
  font-size: 0.92em;
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}

/* ---- Side menu (drawer) ---- */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.sidemenu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 280px;
  max-width: 85vw;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 1.25rem;
  z-index: 11;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.sidemenu.open {
  transform: translateX(0);
}

.sidemenu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.sidemenu-head h2 {
  margin: 0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0 0.25rem;
}

.icon-btn:hover {
  color: var(--text);
  background: transparent;
}

.session-info {
  margin: 0 0 auto;
  font-size: 0.85rem;
}

.session-info dt {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.9rem;
}

.session-info dd {
  margin: 0.15rem 0 0;
  word-break: break-all;
}

/* hidden must win over the flex/block display set on views & panes */
[hidden] {
  display: none !important;
}

/* ---- Side menu nav ---- */

.sidemenu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.nav-item {
  display: block;
  text-align: left;
  text-decoration: none;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
}

.nav-item:hover:not(:disabled) {
  background: var(--bg);
}

.nav-item.active {
  background: var(--bg);
  border-color: var(--border);
  color: var(--accent);
}

/* ---- Documents view ---- */

.docs {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 1.25rem;
}

.docs-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.docs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.docs-toolbar h2 {
  margin: 0;
  font-size: 1rem;
}

.toolbar-spacer {
  flex: 1;
}

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 0.5rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: var(--user);
  color: var(--text);
}

.dropzone p {
  margin: 0.15rem 0;
  font-size: 0.85rem;
}

.dropzone code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 0.25rem;
}

/* Detail grid (List view): a row per doc with metadata columns. */
.docs-list {
  overflow-x: auto;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.docs-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.docs-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.docs-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.docs-table .chips {
  margin: 0;
}

.col-muted {
  color: var(--muted);
  white-space: nowrap;
}

.doc-row-title {
  display: inline-block;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

.doc-row-title:hover {
  text-decoration: underline;
  background: transparent;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.chip {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.chip-cat {
  background: var(--bg);
}

.chip-tag {
  color: var(--accent);
  border-color: var(--accent);
}

/* Click-to-add taxonomy suggestions under the category/tag inputs. */
.suggest {
  margin-top: 0.35rem;
}

.chip-suggest {
  cursor: pointer;
  background: var(--bg);
  color: var(--muted);
}

.chip-suggest:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Docs list search + live markdown preview. */
.docs-search {
  width: 100%;
  margin: 0.25rem 0 0.5rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

.doc-preview-bar {
  margin: 0.25rem 0;
}

.doc-preview {
  margin: 0 0 0.5rem;
  padding: 0.6rem 0.8rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.audience-help {
  margin: 0.1rem 0 0.5rem;
}

/* GitHub import panel. */
.gh-import {
  margin: 0.25rem 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.gh-import > summary {
  cursor: pointer;
  padding: 0.5rem 0.7rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.gh-import-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 0.7rem 0.7rem;
}

.gh-import-body input[type="text"],
.gh-import-body input[type="password"] {
  width: 100%;
}

/* List/Tree segmented toggle. */
.docs-viewtoggle {
  display: inline-flex;
  margin: 0.25rem 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.seg {
  background: var(--bg);
  color: var(--muted);
  border: none;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.4;
}

.seg:first-child {
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}

.seg:last-child {
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.seg + .seg {
  border-left: 1px solid var(--border);
}

.seg.active {
  background: var(--accent);
  color: #fff;
}

/* Virtual directory tree (audience → category → docs). */
.docs-tree {
  margin-top: 0.25rem;
}

.tree-aud > summary,
.tree-cat > summary {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem;
  cursor: pointer;
  border-radius: 6px;
}

.tree-aud > summary:hover,
.tree-cat > summary:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.tree-aud > summary {
  font-weight: 600;
}

.tree-cat {
  margin-left: 1rem;
}

.tree-count {
  font-size: 0.72rem;
  color: var(--muted);
}

.tree-docs {
  list-style: none;
  margin: 0 0 0.3rem;
  padding-left: 1.9rem;
}

.tree-docs li {
  margin: 0.12rem 0;
}

/* audience tier - the access boundary; visually distinct from cat/tag hints */
.chip-aud {
  color: #b45309;
  border-color: #f59e0b;
  background: #fffbeb;
  font-weight: 600;
}

/* doc detail */

.doc-detail h2 {
  margin: 0.25rem 0 0.5rem;
}

.doc-detail-meta {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.doc-body {
  margin-top: 1rem;
  line-height: 1.6;
  max-width: 90ch;
}

.doc-body h1,
.doc-body h2,
.doc-body h3,
.doc-body h4,
.doc-body h5,
.doc-body h6 {
  line-height: 1.3;
  margin: 1.2rem 0 0.5rem;
  /* Breathing room when a citation deep link scrolls a heading to the top. */
  scroll-margin-top: 1rem;
}

/* Briefly flag the section a citation deep link points at. */
.doc-body :target {
  animation: cite-target 2s ease-out 1;
}

@keyframes cite-target {
  0%,
  40% {
    background: color-mix(in srgb, var(--accent) 22%, transparent);
    box-shadow: -0.5rem 0 0 color-mix(in srgb, var(--accent) 22%, transparent);
  }
  100% {
    background: transparent;
    box-shadow: -0.5rem 0 0 transparent;
  }
}

/* Base link style for the whole app. Chrome anchors that shouldn't look like
 * text links (nav tabs `.nav-item`, citation pills `.citation-link`) opt out by
 * setting their own color + `text-decoration: none`. */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.doc-body code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
  font-size: 0.9em;
}

.doc-body ul {
  padding-left: 1.25rem;
}

/* new document form */

.doc-form {
  max-width: 640px;
}

.doc-form h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.doc-form-row {
  display: flex;
  gap: 0.75rem;
}

.doc-form-row > label {
  flex: 1;
}
