:root {
  color-scheme: light;
  --ink: #1b2521;
  --muted: #596860;
  --line: #e3e9e4;
  --green: #245c4b;
  --sidebar: #f6f8f6;
  --font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font: 15px/1.6 var(--font);
  color: var(--ink);
  background: #fff;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; height: 100dvh; display: grid; grid-template-rows: 68px minmax(0, 1fr); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid #347960; outline-offset: 3px; }
svg { display: block; width: 18px; height: 18px; flex: none; }
.skip { position: fixed; left: 12px; top: -50px; z-index: 3; background: white; padding: 8px; }
.skip:focus { top: 8px; }
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 0 29px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; font-weight: 720; font-size: 19px; letter-spacing: -.035em; }
.top nav { display: flex; align-items: stretch; gap: 12px; height: 100%; }
.top nav a { position: relative; display: flex; gap: 8px; align-items: center; color: var(--muted); font-weight: 540; padding: 0 14px; }
.top nav a[aria-current] { color: var(--green); font-weight: 680; }
.top nav a[aria-current]::after { content: ''; position: absolute; inset: auto 9px -1px; height: 2px; background: var(--green); border-radius: 2px 2px 0 0; }
.top nav a:hover { background: #f8faf8; }
.tools { justify-self: end; display: flex; gap: 16px; align-items: center; }
#status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
#status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #87988d; flex: none; }
#status.connected::before { background: #338367; }
#status.error::before { background: #bd6638; }
#language { border: 1px solid var(--line); background: white; padding: 5px 8px; font-size: 12px; border-radius: 7px; }
.routing { position: relative; font-size: 13px; }
.routing summary { list-style: none; cursor: pointer; white-space: nowrap; border: 1px solid var(--line); border-radius: 7px; padding: 5px 9px; }
.routing summary::-webkit-details-marker { display: none; }
.routing[data-ready=true] summary { color: var(--green); background: #edf4ee; }
.routing-card { position: absolute; z-index: 4; top: calc(100% + 10px); right: 0; width: min(295px, 85vw); padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: white; box-shadow: 0 8px 25px #23342b20; }
.routing-card p { margin: 5px 0 10px; color: var(--muted); line-height: 1.45; }
.routing-card button { padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--sidebar); }
.routing-card button:disabled { cursor: default; opacity: .6; }
.routing-card p[data-error=true] { color: #983d26; }
.workspace { display: grid; grid-template-columns: minmax(240px, 330px) minmax(0, 1fr); min-height: 0; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); display: grid; grid-template-rows: auto auto minmax(0, 1fr); padding: 25px 19px 0; min-height: 0; }
.list-header { padding: 0 5px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 9px; }
.list-header h2 { margin: 0; font-size: 19px; letter-spacing: -.035em; line-height: 1.3; }
#count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; min-width: 22px; text-align: right; }
#search { width: 100%; background: #fff; padding: 8px 11px; border: 1px solid #dfe7df; border-radius: 8px; margin-bottom: 17px; font-size: 13px; }
#search::placeholder { color: var(--muted); }
#records { overflow: auto; padding: 2px 3px 20px; scrollbar-width: thin; }
.record { display: flex; align-items: start; gap: 11px; padding: 10px 9px; border: 1px solid transparent; border-radius: 9px; margin-bottom: 3px; }
.record:hover { background: #eef2ee; }
.record[aria-current] { background: #e6efe8; border-color: #d7e5da; }
.record-icon { margin-top: 2px; color: var(--green); }
.record-label { display: grid; min-width: 0; }
.record strong { font-size: 13px; font-weight: 650; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record small, .list-empty { color: var(--muted); font-size: 12px; }
.record small { margin-top: 3px; }
.list-empty { padding-left: 9px; }
.detail { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; min-width: 0; }
.detail:has(.detail-header[hidden]) { grid-template-rows: minmax(0, 1fr); }
.detail-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 33px; border-bottom: 1px solid var(--line); min-height: 77px; }
.detail-header h1 { font-size: 19px; line-height: 1.35; letter-spacing: -.025em; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#related { font-size: 13px; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.switch { display: flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--sidebar); flex: none; }
.switch button { border: 1px solid transparent; font-size: 13px; padding: 5px 12px; border-radius: 6px; background: transparent; color: var(--muted); }
.switch button[aria-pressed=true] { border-color: #dce5df; background: white; color: var(--green); font-weight: 680; box-shadow: 0 1px 2px #23342b0d; }
.reading-pane { min-height: 0; overflow: auto; padding: 33px 38px 55px; }
#content { max-width: 850px; margin: 0 auto; min-height: 100%; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: max(360px, calc(100dvh - 200px)); text-align: center; }
.empty > span { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid #dce8df; border-radius: 17px; background: #eff5ef; color: var(--green); margin-bottom: 17px; }
.empty svg { width: 23px; height: 23px; }
.empty h1 { margin: 0; font-size: 23px; line-height: 1.25; letter-spacing: -.04em; }
.empty p { margin: 9px 0 0; color: var(--muted); max-width: 350px; }
.message { margin: 0 0 32px; }
.message.user { width: fit-content; max-width: min(94%, 690px); min-width: 140px; margin-left: auto; }
.author { display: flex; gap: 8px; align-items: center; font-weight: 650; font-size: 13px; margin-bottom: 9px; }
.user .author { justify-content: flex-end; }
.author span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #eaf3ec; color: var(--green); }
.user .author span { background: #f0f3f0; color: #53675b; }
.author svg { width: 16px; height: 16px; }
.message-body { overflow-wrap: anywhere; }
.user .message-body { padding: 12px 17px; background: #edf4ee; border-radius: 15px 4px 15px 15px; }
.message-body > :first-child { margin-top: 0; }
.message-body > :last-child { margin-bottom: 0; }
.message-body p, .message-body ul, .message-body ol { margin: 0 0 13px; }
.message-body h3, .message-body h4, .message-body h5, .message-body h6 { margin: 16px 0 7px; font-size: 16px; }
.message-body li + li { margin-top: 4px; }
.message-body :not(pre) > code { font-size: .88em; border-radius: 4px; padding: 1px 4px; background: #edf0ed; }
.code, .document-text { font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; background: #f8faf8; padding: 16px; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 13px; overflow: auto; }
.document-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 23px 26px; }
.document-kind, .attachment { display: flex; width: fit-content; gap: 7px; align-items: center; color: var(--muted); font-size: 13px; }
.attachment { margin: 7px 0 0; }
.notice, .unavailable { color: var(--muted); }
.unavailable { font-size: 14px; font-style: italic; }
mark { color: #26574a; background: #dff0e5; border-radius: 4px; padding: 1px 3px; }
@media (max-width: 800px) {
  .top { padding: 0 13px; gap: 8px; }
  .top nav { gap: 0; }
  .top nav a { padding: 0 7px; }
  .top nav svg, #status { display: none; }
  .workspace { grid-template-columns: minmax(155px, 30%) minmax(0, 1fr); }
  .sidebar { padding: 18px 9px 0; }
  .detail-header { padding: 13px 15px; flex-wrap: wrap; }
  .reading-pane { padding: 20px 15px 35px; }
}
@media (max-width: 520px) {
  body { grid-template-rows: 52px minmax(0, 1fr); }
  .top nav a { font-size: 12px; }
  .brand { font-size: 14px; gap: 4px; }
  .brand img { width: 24px; height: 24px; }
  .tools { gap: 5px; }
  .workspace { grid-template-columns: 1fr; grid-template-rows: minmax(125px, 28%) minmax(0, 1fr); }
  .sidebar { border-right: none; border-bottom: 1px solid var(--line); padding-top: 9px; }
  .list-header, #search { margin-bottom: 6px; }
  .record { padding: 6px 8px; }
}
