/* Reddy Atlas shell -- Reddy design system (light + html[data-theme="dark"]).
   Tokens mirror design/static/design/css/design-system.css. */
@font-face {
  font-family: "Flecha S";
  src: url("/__atlas/brand/flecha.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root,
html[data-theme="dark"] .toastui-editor-defaultUI {
  color-scheme: light;
  --primary: #773d72;
  --primary-dark: #5e3059;
  --primary-light: #f0e1ef;
  --primary-muted: #ecc9e9;
  --on-primary: #ffffff;
  --bg: #ffffff;
  --bg-secondary: #f6f6f6;
  --bg-warm: #fff8ef;
  --bg-sidebar: #fcf8f2;
  --bg-sidebar-hover: #f5eee3;
  --ink: #1a1a1a;
  --body: #474747;
  --muted: #6b6b6b;
  --faint: #999999;
  --line: #e0e0e0;
  --line-warm: #efece4;
  --warning-bg: #fff6d6;
  --warning-ink: #8a5f00;
  --positive-bg: #eaf7da;
  --positive-ink: #3d6b12;
  --negative: #e10b0b;
  --code-bg: #f6f6f6;
  --code-block-bg: #221a21;
  --code-block-ink: #efe6ee;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --display: "Flecha S", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(26, 26, 26, 0.05);
  --shadow-pop: 0 8px 28px rgba(26, 26, 26, 0.14);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--primary);
}
code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--ink);
  background: var(--code-bg);
  border-radius: 5px;
  padding: 2px 6px;
}
button {
  font-family: var(--sans);
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---- topbar ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 11px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line-warm);
  flex-shrink: 0;
  position: relative;
  z-index: 40;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}
.brandlogo {
  height: 17px;
  width: auto;
  display: block;
  align-self: center;
}
.brandsub {
  font-family: var(--display);
  font-size: 17px;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.refpill {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 3px 11px;
}
.refpill.published {
  background: var(--positive-bg);
  color: var(--positive-ink);
}
.refpill.draft {
  background: var(--warning-bg);
  color: var(--warning-ink);
  font-family: var(--mono);
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.whoami {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--sans);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.whomenu {
  position: relative;
}
.whomenu .vsmenu {
  min-width: 220px;
}
.whomenu .vsitem.vsmuted {
  font-family: var(--mono);
  font-size: 11.5px;
  border-bottom: 1px solid var(--line-warm);
  border-radius: 0;
  margin-bottom: 4px;
}

/* search trigger + Cmd-K modal */
kbd {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
}
.searchtrigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: 0 1 360px;
  min-width: 180px;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  color: var(--faint);
  background: var(--bg-secondary);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 9px 7px 13px;
}
.searchtrigger:hover {
  background: var(--bg);
  border-color: var(--line);
}
.cmdk {
  position: fixed;
  inset: 0;
  z-index: 100;
}
.cmdk-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.4);
}
.cmdk-panel {
  position: relative;
  margin: 14vh auto 0;
  width: min(620px, 92vw);
  background: var(--bg);
  border-radius: 14px;
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#cmdk-input {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: none;
  border: none;
  outline: none;
  border-bottom: 1px solid var(--line-warm);
  padding: 16px 20px;
}
#cmdk-results {
  max-height: 46vh;
  overflow-y: auto;
  padding: 6px;
}
#cmdk-results a {
  display: block;
  padding: 9px 13px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--ink);
}
#cmdk-results a:hover {
  background: var(--bg-warm);
}
#cmdk-results a.sel {
  background: var(--primary-light);
}
#cmdk-results .rtitle {
  display: block;
  font-weight: 600;
  font-size: 14px;
}
#cmdk-results .rsnip {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.cmdk-empty {
  padding: 16px;
  font-size: 13.5px;
  color: var(--muted);
}
.cmdk-foot {
  display: flex;
  gap: 18px;
  padding: 9px 16px;
  border-top: 1px solid var(--line-warm);
  font-size: 12px;
  color: var(--faint);
  background: var(--bg-warm);
}

/* buttons */
.btn {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  display: inline-block;
  box-shadow: var(--shadow);
}
.btn:hover {
  background: var(--bg-secondary);
}
.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}
.btn.primary:hover {
  background: var(--primary-dark);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* version switcher */
.vswitch {
  position: relative;
}
.vsbtn {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 15px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.vsbtn:hover {
  background: var(--bg-secondary);
}
.vsbtn .badge {
  color: var(--warning-ink);
}
.vsbtn .caret {
  color: var(--faint);
}
.vsmenu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  min-width: 330px;
  background: var(--bg);
  border: 1px solid var(--line-warm);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  padding: 6px;
  max-height: min(70vh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.vsitem {
  display: block;
  padding: 9px 11px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
}
.vsitem:hover {
  background: var(--bg-warm);
}
.vsitem.current {
  background: var(--primary-light);
}
.vsitem .vstitle {
  display: block;
  font-weight: 600;
}
.vsitem .vsmeta {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.vsitem.vsmuted {
  display: block;
  color: var(--muted);
  cursor: default;
  font-size: 12.5px;
}

/* banners */
.banner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 9px 24px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line-warm);
  flex-shrink: 0;
}
.banner.draft {
  background: var(--warning-bg);
  color: var(--warning-ink);
}
.banner.merged {
  background: var(--positive-bg);
  color: var(--positive-ink);
}
.banner.error {
  background: #ffe5e5;
  color: var(--negative);
}
.banner code {
  background: rgba(255, 255, 255, 0.6);
  color: inherit;
}
.banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.banner .btn.primary {
  background: var(--warning-ink);
  border-color: var(--warning-ink);
}
.muted {
  color: var(--muted);
  font-weight: 400;
}

/* ---- frame: two independent scroll panes ---- */
.frame {
  display: flex;
  flex: 1;
  min-height: 0;
}
.sidenav {
  width: 272px;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 14px 12px 60px 16px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--line-warm);
}
.content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 30px 44px 100px;
}

/* nav */
.navhome {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  margin: 4px 0 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}
.navhome:hover {
  background: var(--bg-sidebar-hover);
}
.navhome.active {
  background: var(--primary-light);
  color: var(--primary);
}
.navactions {
  display: flex;
  gap: 6px;
  padding: 3px 4px 1px;
}
.navactions button {
  flex: 1 1 0;
  text-align: center;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
  background: none;
  border: 1px dashed transparent;
  border-radius: 6px;
  padding: 3px 9px;
  cursor: pointer;
}
.navsection > ul:hover .navactions button,
.navdir > ul:hover .navactions button {
  color: var(--muted);
  border-color: var(--line-warm);
}
.navactions button:hover {
  color: var(--primary);
  border-color: var(--primary-muted);
  background: var(--primary-light);
}
.sidenav a.overview {
  font-style: italic;
  color: var(--muted);
}
.ctxmenu {
  position: fixed;
  z-index: 120;
  background: var(--bg);
  border: 1px solid var(--line-warm);
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
  padding: 4px;
  min-width: 180px;
}
.ctxmenu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  border-radius: 7px;
  padding: 8px 11px;
}
.ctxmenu button:hover {
  background: var(--bg-warm);
}
.navsection {
  margin-bottom: 2px;
}
.navlabel {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px;
}
button.navlabel {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
}
button.navlabel:hover {
  background: var(--bg-sidebar-hover);
  color: var(--ink);
}
.navsection.open > button.navlabel {
  color: var(--ink);
}
.navlabel .ncaret {
  display: inline-block;
  color: var(--faint);
  transition: transform 0.12s;
}
.navsection.collapsible > ul {
  display: none;
}
.navsection.collapsible.open > ul {
  display: block;
}
.navsection.collapsible.open .ncaret {
  transform: rotate(180deg);
}
.sidenav ul {
  list-style: none;
  margin: 0;
  padding-left: 14px;
}
/* An open section's items sit on their own panel, indented under the header,
   so it is always clear which section a page belongs to. */
.navsection > ul {
  padding: 4px;
  margin: 1px 2px 8px 10px;
  background: var(--bg);
  border: 1px solid var(--line-warm);
  border-radius: 10px;
}
.sidenav li {
  margin: 1px 0;
}
.sidenav a {
  display: block;
  padding: 5px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--body);
  font-size: 13.5px;
}
.sidenav a:hover {
  background: var(--bg-sidebar-hover);
  color: var(--ink);
}
.sidenav a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.navtoggle {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  padding: 5px 10px;
  border-radius: 8px;
}
.navtoggle:hover {
  background: var(--bg-sidebar-hover);
}
.navtoggle::before {
  content: "\25B8";
  display: inline-block;
  margin-right: 6px;
  color: var(--faint);
  transition: transform 0.12s;
}
.navdir.open > .navtoggle::before {
  transform: rotate(90deg);
}
.navdir > ul {
  display: none;
}
.navdir.open > ul {
  display: block;
}
.isl {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 5px;
  padding: 1px 6px;
  vertical-align: 1px;
}

/* ---- content ---- */
.doc {
  max-width: none;
  overflow-wrap: anywhere;
}
.dochead {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.docmeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-warm);
}
.docmeta .updated {
  font-size: 12.5px;
  color: var(--faint);
}
.dochead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.agent-link-status {
  align-self: center;
  max-width: 280px;
  font-size: 12px;
  color: var(--muted);
}
.agent-link-status:empty {
  display: none;
}
.link-agent {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.link-agent:disabled {
  cursor: default;
  opacity: 0.75;
}
.doctitle,
.doc h1 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.005em;
}
.doctitle {
  font-size: 34px;
  margin: 0;
}
.doc h1 {
  font-size: 32px;
  margin: 6px 0 14px;
}
.doc h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 23px;
  color: var(--ink);
  margin: 36px 0 10px;
}
.doc h3 {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 26px 0 6px;
}
.doc h4 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 20px 0 4px;
}
.doc .hanchor {
  color: inherit;
  text-decoration: none;
}
.doc .hanchor:hover::after {
  content: " #";
  color: var(--primary-muted);
}
.doc p,
.doc li {
  font-size: 15px;
}
.doc pre {
  background: var(--code-block-bg);
  color: var(--code-block-ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  border-radius: 10px;
  padding: 15px 18px;
  overflow-x: auto;
  overflow-wrap: normal;
  position: relative;
}
.codecopy {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  padding: 6px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--code-block-ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0;
  transition:
    opacity 0.12s,
    background 0.12s;
}
.doc pre:hover .codecopy,
.codecopy:focus-visible,
.codecopy.ok {
  opacity: 1;
}
.codecopy:hover {
  background: rgba(255, 255, 255, 0.18);
}
.codecopy.ok {
  color: #8fe388;
  border-color: rgba(143, 227, 136, 0.5);
}
.codecopy.ok svg {
  animation: copypop 0.3s ease-out;
}
@keyframes copypop {
  0% {
    transform: scale(0.5);
  }
  60% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}
.doc pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.doc table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}
.doc th,
.doc td {
  text-align: left;
  padding: 8px 13px;
  border-bottom: 1px solid var(--line-warm);
  vertical-align: top;
  overflow-wrap: normal;
  min-width: 7em;
}
.doc th {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}
.doc tr:hover td {
  background: var(--bg-warm);
}
.doc img,
.doc video {
  max-width: 100%;
  border-radius: 10px;
}
.doc blockquote {
  margin: 14px 0;
  padding: 2px 18px;
  border-left: 3px solid var(--primary-muted);
  color: var(--muted);
}
.admonition {
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  padding: 12px 18px;
  margin: 18px 0;
  background: var(--bg-warm);
}
.admonition.warning,
.admonition.caution {
  border-left-color: var(--warning-ink);
}
.admonition-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  margin: 0 0 4px;
}
.srcnote {
  margin-top: 44px;
  padding-top: 12px;
  border-top: 1px solid var(--line-warm);
  font-size: 12.5px;
  color: var(--faint);
  font-family: var(--mono);
}
.dirlist {
  font-size: 15px;
  line-height: 2.1;
}

/* home page building blocks (used by docs/docs/index.md) */
.home-hero {
  padding: 26px 0 10px;
}
.home-hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 42px;
  color: var(--ink);
  margin: 0 0 10px;
}
.home-sub {
  font-size: 16.5px;
  color: var(--muted);
  max-width: 60ch;
  margin: 0;
}
.home-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 34px 0 12px;
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  max-width: 980px;
}
.home-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--line-warm);
  border-radius: 14px;
  padding: 18px 20px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    border-color 0.12s,
    transform 0.12s;
}
.home-card:hover {
  border-color: var(--primary-muted);
  transform: translateY(-1px);
}
.home-card .hc-title {
  font-family: var(--display);
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 4px;
}
.home-card .hc-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}
.home-card.primary {
  background: var(--primary);
  border-color: var(--primary);
}
.home-card.primary .hc-title {
  color: var(--on-primary);
}
.home-card.primary .hc-desc {
  color: var(--primary-muted);
}
.home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 980px;
}
.home-chips a {
  font-size: 13px;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--line-warm);
  border-radius: 999px;
  padding: 6px 15px;
  box-shadow: var(--shadow);
}
.home-chips a:hover {
  border-color: var(--primary-muted);
  color: var(--ink);
}

/* islands */
.islandwrap {
  display: flex;
  flex-direction: column;
  height: calc(100% - 4px);
}
iframe.island {
  flex: 1;
  width: 100%;
  border: 1px solid var(--line-warm);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

/* ---- editor ---- */
body.editing .sidenav {
  display: none;
}
body.editing .content {
  padding: 18px 28px 24px;
  display: flex;
  flex-direction: column;
}
.editor {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.editorhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  font-size: 13.5px;
  flex-shrink: 0;
}
.editorhead > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#tui-editor {
  flex: 1;
  min-height: 0;
}
/* Toast UI: match Reddy */
.toastui-editor-defaultUI {
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  overflow: hidden;
  font-family: var(--sans) !important;
}
.toastui-editor-defaultUI,
.toastui-editor-contents {
  font-size: 15px;
}
.toastui-editor-contents {
  font-family: var(--sans) !important;
  color: var(--body);
}
.toastui-editor-contents h1,
.toastui-editor-contents h2 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  border-bottom: none;
}
.toastui-editor-contents code {
  background: var(--code-bg);
  color: var(--ink);
}
.toastui-editor-contents pre {
  background: var(--code-block-bg);
}
.toastui-editor-contents pre code {
  color: var(--code-block-ink);
}
.toastui-editor-mode-switch .tab-item.active {
  color: var(--primary) !important;
}

/* recent-pages list ({{atlas:recent ...}}) */
.recent-list {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin: 14px 0;
}
.recent-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--line-warm);
  border-radius: 10px;
  padding: 11px 16px;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.recent-item:hover {
  border-color: var(--primary-muted);
}
.recent-item .ri-title {
  font-weight: 600;
  color: var(--ink);
  font-size: 14.5px;
}
.recent-item .ri-meta {
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
}

/* new page: one big input, centered */
.npx {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 220px);
}
.npx-body {
  width: min(680px, 92vw);
  display: grid;
  gap: 26px;
}
/* Block is centered; the label and the text you type stay left-aligned on
   that centered line, so nothing shifts as you type (the Typeform look). */
.npx-where {
  font-size: 13px;
  font-weight: 500;
  color: var(--faint);
  letter-spacing: 0.02em;
  text-align: left;
  padding-left: 4px;
}
.npx-where b {
  color: var(--muted);
  font-weight: 600;
}
.npx-input {
  font-family: var(--display);
  font-size: clamp(24px, 5vw, 38px);
  color: var(--ink);
  background: none;
  border: none;
  outline: none;
  text-align: left;
  width: 100%;
  border-bottom: 2px solid var(--line-warm);
  padding: 6px 4px 14px;
  transition: border-color 0.15s;
}
.npx-actions {
  text-align: center;
}
.npx-input:focus {
  border-bottom-color: var(--primary);
}
.npx-input::placeholder {
  color: var(--faint);
  opacity: 0.7;
}
.npx-actions {
  display: grid;
  gap: 12px;
  justify-items: center;
}
.npx-actions .btn.primary {
  padding: 9px 26px;
  font-size: 14px;
  border-radius: 999px;
}
.npx-hint {
  font-size: 12px;
  color: var(--faint);
}

.slotfields {
  display: grid;
  gap: 14px;
  max-width: 800px;
}
.slotfield {
  display: grid;
  gap: 4px;
}
.slotname {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.slotfield textarea {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  resize: vertical;
}

/* mobile: sidebar becomes a slide-in drawer behind the burger */
.navburger {
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  background: var(--bg-secondary);
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.sidenav-backdrop {
  display: none;
}
@media (max-width: 860px) {
  .navburger {
    display: inline-flex;
  }
  .sidenav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    width: min(310px, 86vw);
    transform: translateX(-102%);
    transition: transform 0.18s ease-out;
    box-shadow: var(--shadow-pop);
  }
  body.sidenav-open .sidenav {
    transform: none;
  }
  body.sidenav-open .sidenav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 85;
    background: rgba(26, 26, 26, 0.4);
  }
  .content {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* analytics (avatar -> /__atlas/analytics) */
a.whoami {
  text-decoration: none;
}
a.whoami:hover {
  background: var(--primary-dark);
}
.anx {
  max-width: 980px;
}
.anx-back {
  font-size: 13.5px;
}
.anx-audience {
  display: inline-flex;
  border: 1px solid var(--line-warm);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  font-size: 13px;
  margin: 4px 0 6px;
}
.anx-audience a {
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--body);
  text-decoration: none;
}
.anx-audience a:hover {
  background: var(--line-warm);
}
.anx-audience a.on {
  background: var(--primary);
  color: #fff;
}
.anx-tiles {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.anx-tile {
  background: var(--bg);
  border: 1px solid var(--line-warm);
  border-radius: 12px;
  padding: 14px 22px;
  box-shadow: var(--shadow);
  min-width: 140px;
}
.anx-num {
  font-family: var(--display);
  font-size: 30px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.anx-cap {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.anx-chart {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line-warm);
  border-radius: 12px;
  padding: 14px 16px 8px;
  box-shadow: var(--shadow);
  margin: 10px 0 26px;
}
.anx-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--body);
  margin: 0 0 8px 4px;
}
.anx-legend i,
.anx-tip i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}
.anx-tip {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow-pop);
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--body);
  font-variant-numeric: tabular-nums;
}
.anx-tip-day {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}
.anx-boards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 6px;
}
.anx-board {
  background: var(--bg);
  border: 1px solid var(--line-warm);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
}
.anx-board h3 {
  margin: 2px 0 8px;
}
.anx-board table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  display: table;
}
.anx-board td {
  padding: 5px 8px 5px 0;
  border-bottom: 1px solid var(--line-warm);
}
.anx-board tr:last-child td {
  border-bottom: none;
}
.anx-board tr:hover td {
  background: var(--bg-warm);
}
.anx-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  width: 48px;
}
.anx-barcell {
  width: 30%;
}
.anx-bar {
  height: 8px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
  min-width: 2px;
}

/* comments */
/* edge pill: the only trace of comments while the panel is closed */
.cpill {
  position: fixed;
  right: 0;
  top: 170px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 999px 0 0 999px;
  padding: 7px 12px 7px 13px;
  cursor: pointer;
  box-shadow: var(--shadow-pop);
}
.cpill[hidden] {
  display: none;
}
.cpill:hover {
  background: var(--primary-light);
}
.cpill svg {
  color: var(--primary);
}
.cpill #ccount {
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* the column itself */
.cpanel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}
.cpanel-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 8px;
}
.cpanel-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 17px;
  color: var(--ink);
}
.cpanel-close {
  display: block;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
}
.cpanel-close:hover {
  color: var(--ink);
}
.cstatic {
  padding: 4px 0 0;
}
.cthreads {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 14px;
}
.cthread {
  border: 1px solid var(--line-warm);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.cthread.cactive,
.cthread.chover {
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(119, 61, 114, 0.18);
}
.cthread.cresolved {
  background: var(--bg-secondary);
  box-shadow: none;
}
.cquote {
  font-size: 12px;
  color: var(--muted);
  background: var(--primary-light);
  border-left: 3px solid var(--primary-muted);
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.corphan {
  color: var(--faint);
  font-style: italic;
}
.ccomment {
  padding: 10px;
  border: 1px solid var(--line-warm);
  border-radius: 8px;
  background: var(--bg);
}
.creplies {
  display: grid;
  gap: 8px;
  margin: 10px 0 0 8px;
  padding-left: 8px;
  border-left: 2px solid var(--primary-muted);
}
.creplies[hidden], .creplies-toggle[hidden] { display: none; }
.creplies .ccomment { background: var(--bg-secondary); }
.creplies-toggle { display: block; margin-top: 8px; min-height: 28px; }
.chead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 6px;
}
.cavatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 10px;
  font-weight: 600;
}
.cauthor {
  font-weight: 600;
  color: var(--ink);
}
.cdeleted .cauthor {
  font-weight: 400;
  color: var(--faint);
}
.cwhen {
  color: var(--faint);
}
.cbody {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13.5px;
  color: var(--body);
  margin-top: 2px;
}
.cattachments {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
}
.cattachment {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line-warm);
  border-radius: 8px;
  background: var(--bg);
  font-size: 12px;
}
.cattachment-name {
  display: block;
  overflow-wrap: anywhere;
  font-weight: 500;
}
.cattachment-image img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 8px;
}
.cattachment-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  color: var(--muted);
}
.cattachment-pdf { margin-top: 8px; }
.cattachment-pdf summary { cursor: pointer; color: var(--primary); }
.cattachment-pdf canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  border: 0;
  margin: 8px 0;
  border-radius: 4px;
}
.cattachment-pdf canvas[hidden] { display: none; }
.cattachment-pdf-status { margin: 6px 0; color: var(--muted); }
.cattach-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
}
.cattach { min-height: 32px; }
.cstaged-files { display: grid; gap: 6px; }
.cstaged-files:empty,
.cattachment-status:empty { display: none; }
.cstaged-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--bg-sidebar);
  font-size: 12px;
}
.cstaged-file span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cstaged-file button { min-height: 32px; }
.cattachment-status { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.cdragging { outline: 2px dashed var(--primary); outline-offset: 4px; }
.cfoot {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}
.clink {
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.clink:hover {
  color: var(--primary);
}
.chead .clink {
  margin-left: auto;
}
.cdraftform,
.creply {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.creply {
  margin: 8px 0 4px 12px;
}
.cdraftform textarea,
.creply textarea {
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
}
.cdraftform textarea:focus,
.creply textarea:focus {
  outline: 2px solid var(--primary-muted);
  border-color: var(--primary);
}
.cdraft {
  border-color: var(--primary);
}
.cdraft-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.creply .btn {
  align-self: flex-end;
}
.cpanel-head { gap: 10px; }
.cresolved-button { margin-left: auto; white-space: nowrap; min-height: 32px; }
.cresolved-button:disabled { opacity: 0.5; cursor: default; text-decoration: none; }
.cresolved-dialog {
  box-sizing: border-box;
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-warm);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.cresolved-dialog[open] { display: flex; flex-direction: column; }
.cresolved-dialog::backdrop { background: rgba(26, 26, 26, 0.3); }
.cresolved-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-warm);
}
.cresolved-head h2 { margin: 0; font-size: 18px; }
.cresolved-head .btn { min-height: 40px; }
.cresolved-threads {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
}
.cempty {
  padding: 8px 4px;
}

/* inline highlights + selection button */
.cmark {
  background: var(--primary-light);
  border-bottom: 2px solid var(--primary-muted);
  cursor: pointer;
}
.cmark.cactive,
.cmark.chover {
  background: var(--primary-muted);
}
.cmark[data-t="new"] {
  background: var(--primary-muted);
}
.cselbtn {
  position: absolute;
  z-index: 80;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bg);
  background: var(--primary);
  border: none;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  box-shadow: var(--shadow-pop);
}
.cselbtn:hover {
  background: var(--primary-dark);
}

/* desktop comments sidebar */
@media (min-width: 1280px) {
  .frame.has-comments .cpanel {
    display: none;
  }
  .frame.has-comments.comments-open .cpanel {
    display: flex;
    width: 336px;
    flex-shrink: 0;
    border-left: 1px solid var(--line-warm);
    min-height: 0;
  }
}

/* mobile / narrow: toggle drawer */
@media (max-width: 1279.98px) {
  .cpanel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    width: min(400px, 92vw);
    border-left: 1px solid var(--line-warm);
    box-shadow: var(--shadow-pop);
    transform: translateX(105%);
    transition: transform 0.18s ease;
  }
  .cpanel.open {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cpanel {
    transition: none;
  }
}

/* In the editor, a video (stored as image markdown) displays as a play
   tile -- the real player renders on the published page. */
.toastui-editor-contents img[src$=".mp4"],
.toastui-editor-contents img[src$=".mov"],
.toastui-editor-contents img[src$=".webm"],
.toastui-editor-contents img[src$=".m4v"] {
  content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="480" height="200"><rect width="480" height="200" rx="12" fill="%23221A21"/><circle cx="240" cy="86" r="30" fill="%23773D72"/><path d="M230 71l32 15-32 15z" fill="%23FFFFFF"/><text x="240" y="166" font-family="sans-serif" font-size="15" fill="%23EFE6EE" text-anchor="middle">video -- plays on the published page</text></svg>');
  max-width: 480px;
}

/* public share shell (/~share/) */
.btn.copyshare {
  color: #23616f;
}
.btn.copyshare.copyshare-warn,
html[data-theme="dark"] .btn.copyshare.copyshare-warn {
  background: var(--warning-bg);
  color: var(--warning-ink);
}
body.pub {
  overflow: auto;
}
.pubmain {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 34px 28px 100px;
}
body.pub-island {
  overflow: hidden;
}
body.pub-island .pubmain {
  max-width: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-height: 0;
  display: flex;
}
.pubisland {
  flex: 1;
  width: 100%;
  border: none;
}

.doc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  flex-shrink: 0;
}
.fs-toggle .fs-exit,
body.fullscreen .fs-toggle .fs-enter {
  display: none;
}
body.fullscreen .fs-toggle .fs-exit {
  display: block;
}

/* Full screen (presenting): hide the chrome, keep the doc and its action row. */
body.fullscreen .topbar,
body.fullscreen .sidenav,
body.fullscreen .banner {
  display: none;
}
body.fullscreen .content {
  padding: 36px 7vw 100px;
}

.comment-notices {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  top: max(16px, env(safe-area-inset-top));
  z-index: 90;
  width: min(360px, calc(100vw - 72px));
  display: grid;
  gap: 8px;
  pointer-events: none;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.comment-notice {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--line-warm);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  pointer-events: auto;
}
.comment-notice-open {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.comment-notice-open strong,
.comment-notice-preview {
  display: block;
  overflow-wrap: anywhere;
}
.comment-notice-preview {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}
.comment-notice-dismiss {
  flex: none;
  align-self: flex-start;
  width: 40px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}
.comment-notice button:focus-visible,
.ccomment.cactive {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.agent-speech {
  display: grid;
  gap: 10px;
  padding: 14px;
  font-size: 13px;
}
.agent-speech p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.agent-speech-actions {
  display: flex;
  gap: 8px;
}
.agent-speech-actions .btn {
  min-height: 44px;
}
.agent-speech-status {
  color: var(--muted);
}
.agent-speech-status:empty {
  display: none;
}

/* ---- live page update toast (pinned under the topbar) ---- */
.live-toast {
  position: fixed;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: max-content;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
  padding: 6px 6px 6px 14px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.4;
  animation: live-toast-in 160ms ease-out;
}
.live-toast-msg {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.live-toast.paused .live-toast-msg {
  color: var(--muted);
}
.live-toast-refresh {
  flex: none;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.live-toast-refresh:hover {
  background: var(--bg-secondary);
}
.live-toast-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@keyframes live-toast-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .live-toast {
    animation: none;
  }
}

.island-comment-highlight, .island-comment-draft-highlight {
  position: fixed;
  z-index: 65;
  pointer-events: none;
  border: 2px solid var(--primary);
  background: rgb(119 61 114 / 10%);
  border-radius: 4px;
  box-sizing: border-box;
}
.island-comment-status {
  position: fixed;
  z-index: 85;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow-pop);
  font-size: 13px;
}
.island-comment-status[hidden], .island-comment-highlight[hidden], .island-comment-draft-highlight[hidden] { display: none; }
body.html-doc .content { min-width: 0; }
body.html-doc iframe.island { min-height: 180px; }
body.html-doc.fullscreen .content { padding: 0; }
body.html-doc.fullscreen .islandwrap { height: 100%; }
body.html-doc.fullscreen .islandwrap > .dochead { display: none; }
body.html-doc.fullscreen .islandwrap > .docmeta { padding: 8px 16px; margin: 0; }
body.html-doc.fullscreen iframe.island { border: 0; border-radius: 0; box-shadow: none; }
button.cquote { display: block; width: 100%; text-align: left; font-family: inherit; cursor: pointer; border: 0; border-left: 3px solid var(--primary-muted); }
button.cquote:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }


body.html-doc .cpill { min-width: 44px; min-height: 44px; }

.comment-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.comment-mode-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.comment-mode-track { width: 34px; height: 20px; flex-shrink: 0; padding: 2px; border-radius: 12px; background: #d5cfd6; transition: background 120ms; }
.comment-mode-track::before { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0002; transition: transform 120ms; }
.comment-mode-toggle[aria-checked="true"] .comment-mode-track { background: var(--primary); }
.comment-mode-toggle[aria-checked="true"] .comment-mode-track::before { transform: translateX(14px); }
.island-comment-outline {
  position: fixed;
  pointer-events: none;
  z-index: 64;
  border: 1px solid var(--primary);
  border-radius: 4px;
}
.island-comment-marker {
  position: fixed;
  z-index: 66;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.island-comment-marker::after {
  content: "";
  display: block;
  width: 8px;
  height: 16px;
  margin: auto;
  border-radius: 8px;
  background: var(--primary);
  box-shadow: 0 0 0 2px white;
}
.island-comment-outline[hidden], .island-comment-marker[hidden] { display: none; }
@media (max-width: 1279.98px) {
  body.html-doc .frame.comments-open {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(180px, 42%);
  }
  body.html-doc .frame.comments-open .sidenav { grid-column: 1; grid-row: 1 / 3; }
  body.html-doc .frame.comments-open .content {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    padding-bottom: 12px;
  }
  body.html-doc .frame.comments-open .cpanel.open {
    position: relative;
    inset: auto;
    width: 100%;
    grid-column: 2;
    grid-row: 2;
    height: auto;
    min-height: 0;
    flex-shrink: 0;
    transform: none;
    border-left: 0;
    border-top: 1px solid var(--line);
    box-shadow: none;
    transition: none;
  }
}

@media (max-width: 860px) {
  body.html-doc .frame.comments-open { grid-template-columns: minmax(0, 1fr); }
  body.html-doc .frame.comments-open .content,
  body.html-doc .frame.comments-open .cpanel.open { grid-column: 1; }
}
@media (max-width: 1279.98px) {
  body.html-doc.fullscreen .frame.comments-open { grid-template-columns: minmax(0, 1fr); }
  body.html-doc.fullscreen .frame.comments-open .content,
  body.html-doc.fullscreen .frame.comments-open .cpanel.open { grid-column: 1; }
}

.doc-voice {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 140;
  width: max-content;
  max-width: calc(100% - 24px);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 6px 10px;
  background: #fff;
  color: #26232b;
  border: 1px solid #e8e2e6;
  border-radius: 14px;
  box-shadow: 0 4px 24px #26232b1a;
  font-size: 13px;
}
.doc-voice .btn {
  min-height: 44px;
}
.doc-voice.is-connecting,
.doc-voice.is-recording {
  bottom: calc(max(12px, env(safe-area-inset-bottom)) + 52px);
}
.doc-voice.is-connecting {
  width: 122px;
  height: 58px;
  justify-content: center;
}
.doc-voice.is-connecting > :not(.doc-voice-connecting) { display: none !important; }
.doc-voice-connecting { display: flex; align-items: center; gap: 6px; height: 44px; }
.doc-voice-connecting span { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: voice-connecting 1.2s ease-in-out infinite; }
.doc-voice-connecting span:nth-child(2) { animation-delay: .15s; }
.doc-voice-connecting span:nth-child(3) { animation-delay: .3s; }
@keyframes voice-connecting { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .doc-voice-connecting span { animation: none; } }
.doc-voice-status {
  flex-basis: 100%;
  color: #736c76;
  max-width: 320px;
}
.doc-voice-status:empty {
  display: none;
}
.doc-voice .record-stop,
.doc-voice-mute {
  width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.doc-voice .record-stop,
.doc-voice-mute[aria-pressed="true"] {
  color: #b91c1c;
  background: #fff1f2;
}
.doc-voice-mute .mic-slash {
  display: none;
}
.doc-voice-mute[aria-pressed="true"] .mic-slash {
  display: initial;
}
.doc-voice-preview {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, calc(100vw - 24px));
  max-height: calc(2.8em + 8px);
  padding: 4px 10px;
  border-radius: 12px;
  background: rgb(255 255 255 / 65%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.doc-voice-recording { display: inline-flex; align-items: center; min-height: 44px; color: var(--primary); }

.doc-voice [hidden] {
  display: none !important;
}

.agent-link-dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 22px;
  border: 1px solid var(--line-warm);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-pop);
}
.agent-link-dialog::backdrop { background: #26232b66; }
.agent-link-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.agent-link-heading h2 { margin: 0; font: inherit; font-size: 20px; font-weight: 650; }
.agent-link-close { border: 0; background: transparent; }
.agent-link-options { display: grid; gap: 10px; padding: 0; margin: 0; border: 0; }
.agent-link-options legend { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.agent-option { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color 120ms, background 120ms; }
.agent-option:has(input:checked) { border-color: var(--primary); background: #f6edf6; box-shadow: inset 0 0 0 1px var(--primary); }
.agent-option:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 3px; }
.agent-option:has(input:disabled) { opacity: .55; cursor: default; }
.agent-option input { appearance: auto; accent-color: var(--primary); flex: 0 0 18px; width: 18px; height: 18px; margin: 1px 0 0; cursor: inherit; }
.agent-option strong { display: block; margin-bottom: 4px; font-size: 14px; line-height: 20px; }
.agent-option span span { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }
.agent-link-footer { display: flex; justify-content: flex-end; margin-top: 18px; }
.agent-link-footer .btn { min-height: 44px; }
.agent-link-dialog .agent-recording { width: 100%; margin-top: 14px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); padding: 8px; }
.agent-link-status { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.agent-link-status:empty { display: none; }
.agent-link-dialog [hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .agent-option, .comment-mode-track, .comment-mode-track::before { transition: none; } }

.docmeta-info { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.reading-time { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.voice-transfer-dialog h2 { margin: 0 0 12px; font-size: 20px; }
.voice-transfer-dialog p { margin: 0; color: var(--muted); line-height: 1.5; }
.voice-transfer-dialog .agent-link-footer { gap: 8px; }

.chead .ccopy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 4px;
}

/* ---- client docs (/ext/) and the components converted from Mintlify ---- */
.doc .lead {
  font-size: 17px;
  color: var(--muted);
  margin: -6px 0 22px;
}
.doc .admonition.tip,
.doc .admonition.success {
  border-left-color: var(--positive-ink);
  background: var(--positive-bg);
}
.doc .admonition.info,
.doc .admonition.note {
  border-left-color: var(--primary);
}
.doc .admonition.warning {
  background: var(--warning-bg);
}
.doc .admonition > :last-child {
  margin-bottom: 0;
}
.doc .steps {
  counter-reset: step;
  margin: 18px 0;
  padding: 0;
}
.doc .step {
  position: relative;
  padding: 0 0 22px 44px;
  border-left: 2px solid var(--line-warm);
  margin-left: 15px;
}
.doc .step:last-child {
  border-left-color: transparent;
  padding-bottom: 4px;
}
.doc .step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -16px;
  top: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 13px;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg);
}
.doc .step-title {
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  margin: 2px 0 8px;
}
.doc .step > :last-child {
  margin-bottom: 0;
}
.doc .accordions {
  margin: 16px 0;
  border: 1px solid var(--line-warm);
  border-radius: 10px;
  overflow: hidden;
}
.doc details.accordion {
  border-top: 1px solid var(--line-warm);
  padding: 0 16px;
}
.doc .accordions > details.accordion:first-child,
.doc details.accordion:first-child {
  border-top: 0;
}
.doc details.accordion:not(.accordions > *) {
  border: 1px solid var(--line-warm);
  border-radius: 10px;
  margin: 12px 0;
}
.doc details.accordion > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.doc details.accordion > summary::-webkit-details-marker {
  display: none;
}
.doc details.accordion > summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s;
  flex: none;
}
.doc details.accordion[open] > summary::before {
  transform: rotate(45deg);
}
.doc details.accordion[open] > summary {
  border-bottom: 1px solid var(--line-warm);
  margin-bottom: 12px;
}
.doc details.accordion > :last-child {
  margin-bottom: 14px;
}
.doc .tabs {
  margin: 16px 0;
}
.doc .tabs .tab-title {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 18px 0 8px;
}
.doc .tabs-enhanced .tab {
  display: none;
}
.doc .tabs-enhanced .tab.tab-active {
  display: block;
}
.doc .tabs-enhanced .tab-title {
  display: none;
}
.doc .tabstrip {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line-warm);
  margin-bottom: 14px;
}
.doc .tabbtn {
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 12px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.doc .tabbtn:hover {
  color: var(--ink);
}
.doc .tabbtn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.doc figure.frame {
  margin: 18px 0;
  padding: 10px;
  border: 1px solid var(--line-warm);
  border-radius: 12px;
  background: var(--bg-secondary);
  text-align: center;
}
.doc figure.frame img {
  max-width: 100%;
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.doc figure.frame > p {
  margin: 0;
}
.doc .cards,
.doc .columns {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.doc .cards.cols-3,
.doc .columns.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.doc .cards.cols-1 {
  grid-template-columns: 1fr;
}
.doc .card {
  display: block;
  border: 1px solid var(--line-warm);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--body);
  text-decoration: none;
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.doc a.card:hover {
  border-color: var(--primary-muted);
  box-shadow: var(--shadow-pop);
  text-decoration: none;
}
.doc .card .card-title {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.doc .card > p {
  margin: 0 0 8px;
  font-size: 14px;
}
.doc .card > :last-child {
  margin-bottom: 0;
}
.doc .endpoint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line-warm);
  border-radius: 8px;
  background: var(--bg-secondary);
  font-family: var(--mono);
  font-size: 14px;
}
.doc .endpoint code {
  background: none;
  padding: 0;
}
.doc .method {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--on-primary);
  background: var(--primary);
}
.doc .method-get {
  background: #2f7d4f;
}
.doc .method-post {
  background: #2a63b8;
}
.doc .method-put {
  background: #b06a1a;
}
.doc .method-delete {
  background: #b83232;
}
.doc .field {
  border-top: 1px solid var(--line-warm);
  padding: 12px 0;
}
.doc .field:last-child {
  border-bottom: 1px solid var(--line-warm);
}
.doc .field-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.doc .field-head code {
  font-weight: 600;
}
.doc .field-type,
.doc .field-where {
  font-size: 12.5px;
  color: var(--muted);
  font-family: var(--mono);
}
.doc .field-req {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--negative);
}
.doc .field > p {
  margin: 0 0 6px;
  font-size: 14px;
}
.doc .field > :last-child {
  margin-bottom: 0;
}
.doc .field-variant {
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 4px;
}
.doc details.field-children {
  margin: 8px 0 0 14px;
  padding-left: 14px;
  border-left: 2px solid var(--line-warm);
}
.doc details.field-children > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 4px;
}
.doc .codegroup {
  margin: 18px 0;
}
.doc .codegroup-label {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
}
.doc .codetitle {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--code-block-ink);
  background: var(--code-block-bg);
  opacity: 0.85;
  padding: 7px 14px 0;
  border-radius: 10px 10px 0 0;
  margin: 14px 0 0;
}
.doc .codetitle + pre {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.doc .codegroup-enhanced > pre {
  display: none;
  margin-top: 0;
}
.doc .codegroup-enhanced > pre.code-active {
  display: block;
}
.doc .codestrip {
  background: var(--code-block-bg);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  padding: 4px 8px 0;
  margin-bottom: 0;
}
.doc .codestrip .tabbtn {
  color: var(--code-block-ink);
  opacity: 0.6;
  font-family: var(--mono);
  font-size: 12.5px;
}
.doc .codestrip .tabbtn.active {
  opacity: 1;
  color: var(--code-block-ink);
  border-bottom-color: var(--code-block-ink);
}
.doc .codegroup-enhanced > pre.code-active {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line-warm);
}
.pager a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  max-width: 48%;
}
.pager-next {
  text-align: right;
  margin-left: auto;
}
.pager-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pager-title {
  font-weight: 600;
}
.pager a:hover .pager-title {
  color: var(--primary);
}
body.ext .sidenav .ext-links {
  padding: 14px 10px;
  border-top: 1px solid var(--line-warm);
  margin-top: 12px;
}
body.ext .sidenav .ext-links a {
  display: block;
  font-size: 13px;
  color: var(--muted);
  padding: 4px 8px;
}
body.ext .sidenav .ext-links a:hover {
  color: var(--primary);
}
body.ext-login {
  background: var(--bg-sidebar);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ext-login-main {
  width: 100%;
  padding: 24px;
}
.ext-login-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--line-warm);
  border-radius: 16px;
  padding: 36px 36px 28px;
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ext-login-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px;
}
.ext-login-logo {
  width: 110px;
}
.ext-login-sub {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.ext-login-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14.5px;
}
.ext-login-card label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.ext-login-card input[type="password"] {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.ext-login-card input[type="password"]:focus {
  outline: 2px solid var(--primary-muted);
  border-color: var(--primary);
}
.ext-login-card .btn.primary {
  margin-top: 6px;
  padding: 10px 14px;
  font-size: 15px;
}
.ext-login-error {
  color: var(--negative);
  font-size: 14px;
}
.ext-login-foot {
  margin-top: 10px;
  font-size: 13px;
}
.xp-new {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin: 18px 0 30px;
  padding: 18px;
  border: 1px solid var(--line-warm);
  border-radius: 12px;
  background: var(--bg-secondary);
}
.xp-new label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.xp-new input {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 220px;
}
.xp-passfield {
  display: flex;
  gap: 6px;
}
.xp-passfield input {
  font-family: var(--mono);
  font-size: 14px;
}
.xp-table {
  width: 100%;
}
.xp-pass {
  font-size: 14px;
}
.xp-meta {
  font-size: 12.5px;
  color: var(--muted);
}
.xp-actions {
  text-align: right;
  white-space: nowrap;
}
.xp-revoked .xp-pass,
.xp-revoked .xp-client {
  color: var(--faint);
  text-decoration: line-through;
}
.xp-copy.ok {
  color: var(--positive-ink);
}
.xp-error {
  color: var(--negative);
}
.xp-revoked-list {
  margin-top: 24px;
}
.xp-revoked-list > summary {
  cursor: pointer;
  font-weight: 600;
}
@media (max-width: 700px) {
  .doc .cards,
  .doc .columns,
  .doc .cards.cols-3,
  .doc .columns.cols-3 {
    grid-template-columns: 1fr;
  }
}

/* ---- callout, card and accordion icons ---- */
.doc .admonition-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.doc .admonition-title::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: none;
  background-repeat: no-repeat;
  background-size: contain;
}
.doc .admonition.note .admonition-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23773d72%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z%22 /%3E %3Cpath d=%22M15 3v5a1 1 0 0 0 1 1h5%22 /%3E%3C/svg%3E");
}
.doc .admonition.info .admonition-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23773d72%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%2210%22 /%3E %3Cpath d=%22M12 16v-4%22 /%3E %3Cpath d=%22M12 8h.01%22 /%3E%3C/svg%3E");
}
.doc .admonition.tip .admonition-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%233d6b12%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5%22 /%3E %3Cpath d=%22M9 18h6%22 /%3E %3Cpath d=%22M10 22h4%22 /%3E%3C/svg%3E");
}
.doc .admonition.success .admonition-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%233d6b12%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%2210%22 /%3E %3Cpath d=%22m16 9-5.5 5.5L8 12%22 /%3E%3C/svg%3E");
}
.doc .admonition.warning .admonition-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%238a5f00%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3%22 /%3E %3Cpath d=%22M12 9v4%22 /%3E %3Cpath d=%22M12 17h.01%22 /%3E%3C/svg%3E");
}
.doc .admonition.caution .admonition-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%238a5f00%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3%22 /%3E %3Cpath d=%22M12 9v4%22 /%3E %3Cpath d=%22M12 17h.01%22 /%3E%3C/svg%3E");
}
.doc .card .card-title,
.doc .card .card-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}
.doc .card .card-icon {
  margin-bottom: 8px;
}
.doc .card svg.icon,
.doc details.accordion > summary svg.icon {
  color: var(--primary);
  flex: none;
}
.ext-login-or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font-size: 12px;
  margin: 6px 0 2px;
}
.ext-login-or::before,
.ext-login-or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line-warm);
}
.ext-login-reddy {
  text-align: center;
  padding: 10px 14px;
  font-size: 15px;
}

/* ---- client docs: Reddy design system alignment (design/) ---- */
body.ext .topbar {
  padding: 12px 24px;
  border-bottom: 1px solid var(--line-warm);
}
body.ext .searchtrigger {
  border-radius: 12px;
  padding: 9px 10px 9px 14px;
  font-size: 14px;
}
body.ext .sidenav {
  background: var(--bg-warm);
  padding: 16px 12px 24px;
}
body.ext .navhome,
body.ext .sidenav a,
body.ext .navtoggle {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.62;
  border-radius: 10px;
  padding: 8px 10px;
  letter-spacing: -0.01em;
}
body.ext .sidenav a:hover,
body.ext .navhome:hover,
body.ext .navtoggle:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.04);
}
body.ext .sidenav a.active,
body.ext .navhome.active {
  opacity: 1;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}
body.ext .navlabel {
  font-size: 11px;
  letter-spacing: 0.8px;
  color: var(--ink);
  opacity: 0.55;
  padding: 10px 10px 6px;
}
body.ext button.navlabel:hover {
  opacity: 1;
}
body.ext .navsection > ul {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0 0 6px;
  margin: 0;
}
body.ext .navtoggle::before,
body.ext .navlabel .ncaret {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  margin: 0 8px 1px 2px;
  display: inline-block;
  font-size: 0;
}
body.ext .navlabel .ncaret {
  margin: 0 0 2px 6px;
  transform: rotate(45deg);
}
body.ext .navdir.open > .navtoggle::before {
  transform: rotate(45deg);
}
body.ext .navsection.collapsible.open .ncaret {
  transform: rotate(225deg);
  margin-bottom: -2px;
}
body.ext .sidenav .ext-links {
  border-top: 1px solid var(--line-warm);
}
body.ext .content {
  padding: 36px 56px 120px;
}
body.ext .doc {
  max-width: 880px;
}
body.ext .doc .lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
}
body.ext .btn {
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  box-shadow: none;
}
body.ext .btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
body.ext .btn.primary:hover {
  background: var(--primary-dark);
}
.doc .admonition {
  border: 1px solid var(--line);
  border-left-width: 1px;
  border-radius: 12px;
  background: var(--bg);
  padding: 16px 18px 16px 48px;
  position: relative;
  margin: 20px 0;
}
.doc .admonition.tip,
.doc .admonition.success,
.doc .admonition.info,
.doc .admonition.note,
.doc .admonition.warning {
  border-color: var(--line);
  background: var(--bg);
}
.doc .admonition-title {
  font-size: 14px;
  margin-bottom: 4px;
}
.doc .admonition-title::before {
  position: absolute;
  left: 18px;
  top: 16px;
  width: 20px;
  height: 20px;
}
.doc .admonition p,
.doc .admonition li {
  font-size: 14.5px;
  line-height: 1.5;
}
.doc .cards,
.doc .columns {
  gap: 12px;
}
.doc .card {
  background: var(--bg-secondary);
  border: 0;
  border-radius: 12px;
  padding: 20px 24px;
}
.doc a.card:hover {
  background: var(--primary-light);
  box-shadow: none;
}
.doc .card .card-title {
  font-size: 14px;
}
.doc .card > p {
  color: var(--muted);
  line-height: 1.5;
}
.doc .accordions {
  border: 1px solid var(--line);
  border-radius: 12px;
}
.doc details.accordion:not(.accordions > *) {
  border: 1px solid var(--line);
  border-radius: 12px;
}
.doc details.accordion > summary {
  font-size: 14px;
  padding: 14px 4px;
}
.doc .step::before {
  width: 28px;
  height: 28px;
  left: -15px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 12px;
  border: 0;
}
.doc .step {
  border-left-color: var(--line);
}
.doc .step-title {
  font-size: 15px;
}
.doc figure.frame {
  border: 0;
  border-radius: 12px;
  background: var(--bg-secondary);
  padding: 16px;
}
.doc figure.frame img {
  border-radius: 8px;
  box-shadow: none;
}
.doc pre,
.doc .codetitle,
.doc .codestrip {
  border-radius: 12px;
}
.doc .codetitle + pre,
.doc .codegroup-enhanced > pre.code-active {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.doc .codetitle,
.doc .codestrip {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.doc .endpoint {
  border: 0;
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 8px 14px 8px 8px;
}
.doc .method {
  border-radius: 8px;
}
.doc .field {
  border-top-color: var(--line-warm);
}
.doc .field:last-child {
  border-bottom-color: var(--line-warm);
}
.pager {
  border-top: 0;
  gap: 12px;
}
.pager a {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 16px 20px;
  flex: 1;
  max-width: none;
}
.pager a:hover {
  background: var(--primary-light);
}
.pager a:hover .pager-title {
  color: var(--primary-dark);
}
.pager-label {
  margin-bottom: 2px;
}
body.ext-login {
  background: var(--bg-warm);
}
.ext-login-card {
  max-width: 440px;
  border: 0;
  border-radius: 16px;
  padding: 40px 40px 32px;
  box-shadow: 0 10px 40px rgba(26, 26, 26, 0.08);
  gap: 8px;
}
.ext-login-brand {
  margin: 0 0 16px;
}
.ext-login-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
  margin: 0 0 16px;
}
.ext-login-card label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.ext-login-card input[type="password"] {
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  background: var(--bg);
}
.ext-login-card input[type="password"]:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.ext-login-card .btn.primary {
  height: 48px;
  margin-top: 12px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  background: var(--primary);
  border: 0;
  color: var(--on-primary);
  box-shadow: none;
}
.ext-login-card .btn.primary:hover {
  background: var(--primary-dark);
}
.ext-login-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffe5e5;
  color: #c62828;
  font-size: 14px;
  line-height: 1.4;
}
.ext-login-error svg {
  flex: none;
  margin-top: 1px;
}
.ext-login-or {
  margin: 14px 0 6px;
}
.ext-login-reddy {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  box-shadow: none;
}
.ext-login-reddy:hover {
  background: var(--bg-secondary);
}
.ext-login-foot {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.xp-new {
  border: 0;
  border-radius: 12px;
  background: var(--bg-secondary);
  padding: 20px 24px;
  gap: 16px;
}
.xp-new input {
  height: 44px;
  border-radius: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.xp-new input:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.xp-new .btn {
  height: 44px;
  border-radius: 12px;
  padding: 0 20px;
  font-size: 14px;
  box-shadow: none;
}
.xp-new .btn.primary {
  background: var(--primary);
  border-color: var(--primary);
}
.xp-table .btn {
  border-radius: 10px;
  box-shadow: none;
}
.xp-table th {
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}
.ext-login-brand {
  align-items: center;
}
.ext-login-sub {
  font-size: 28px;
  line-height: 1;
  position: relative;
  top: 3px;
}
.xp-passfield input {
  min-width: 260px;
}

/* ---- dark theme ---- */
html[data-theme="dark"] {
  color-scheme: dark;
  --primary: #cf9fca;
  --primary-dark: #e2c0de;
  --primary-light: #3a2638;
  --primary-muted: #5c3d59;
  --on-primary: #221520;
  --bg: #18161a;
  --bg-secondary: #242127;
  --bg-warm: #221e20;
  --bg-sidebar: #1c1a1d;
  --bg-sidebar-hover: #2a262b;
  --ink: #f2eef1;
  --body: #d0cacf;
  --muted: #a39ba1;
  --faint: #7b7479;
  --line: #36323a;
  --line-warm: #2f2b2f;
  --warning-bg: #3a2f12;
  --warning-ink: #f0c869;
  --positive-bg: #1f3317;
  --positive-ink: #a9d98a;
  --negative: #ff7b7b;
  --code-bg: #2a262c;
  --code-block-bg: #0f0d10;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-pop: 0 8px 28px rgba(0, 0, 0, 0.55);
}
html[data-theme="dark"] .brandlogo,
html[data-theme="dark"] .ext-login-logo {
  filter: brightness(2.1) saturate(0.7);
}
html[data-theme="dark"] .banner.error,
html[data-theme="dark"] .ext-login-error {
  background: #3d1a1c;
  color: #ff8f8f;
}
html[data-theme="dark"] .banner code {
  background: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] iframe.island {
  background: var(--bg);
}
html[data-theme="dark"].theme-frames iframe.island:not([data-themed]),
html[data-theme="dark"].theme-frames iframe.pubisland:not([data-themed]) {
  visibility: hidden;
}
html[data-theme="dark"] .btn.copyshare {
  color: #7cc3d1;
}
html[data-theme="dark"] .comment-mode-track {
  background: #4a444c;
}
html[data-theme="dark"] .island-comment-marker {
  box-shadow: 0 0 0 2px var(--bg);
}
html[data-theme="dark"] .doc-voice,
html[data-theme="dark"] .agent-link-dialog {
  background: var(--bg-secondary);
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .doc-voice-status {
  color: var(--muted);
}
html[data-theme="dark"] .doc-voice .record-stop,
html[data-theme="dark"] .doc-voice-mute[aria-pressed="true"] {
  color: #ff9b9b;
  background: #3d1a1d;
}
html[data-theme="dark"] .doc-voice-preview {
  background: rgb(36 33 39 / 75%);
}
html[data-theme="dark"] .agent-option:has(input:checked) {
  background: var(--primary-light);
}
html[data-theme="dark"] .agent-link-dialog .agent-recording {
  background: var(--bg);
}
html[data-theme="dark"] body.ext .navhome:hover,
html[data-theme="dark"] body.ext .navtoggle:hover {
  background: rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .mermaid svg,
html[data-theme="dark"] .toastui-editor-defaultUI {
  filter: invert(0.9) hue-rotate(180deg);
}
html[data-theme="dark"] .toastui-editor-defaultUI {
  --code-block-bg: #f4eff3;
  --code-block-ink: #221a21;
}
html[data-theme="dark"] .toastui-editor-defaultUI img {
  filter: invert(1) hue-rotate(180deg);
}

.themetoggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
}
.themetoggle:hover {
  color: var(--ink);
  background: var(--bg-secondary);
}
.themetoggle svg {
  display: none;
}
html:not([data-theme-pref]) .themetoggle .system,
html[data-theme-pref="system"] .themetoggle .system,
html[data-theme-pref="light"] .themetoggle .sun,
html[data-theme-pref="dark"] .themetoggle .moon {
  display: block;
}

.banner.banner-leaving {
  opacity: 0;
  transition: opacity 300ms;
}
@media (prefers-reduced-motion: reduce) {
  .banner.banner-leaving {
    transition: none;
  }
}

.pdfframe {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 8.5in;
  height: 11in;
  border: 0;
}
.pdf-download.busy {
  cursor: progress;
  opacity: 0.6;
}
.pdf-download.busy svg {
  animation: pdf-busy 0.9s ease-in-out infinite alternate;
}
@keyframes pdf-busy {
  to {
    transform: translateY(3px);
  }
}

/* draft diff toggle */
.diff-toggle { min-height: 32px; color: inherit; text-decoration: none; }
.diff-nav { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70; display: flex; gap: 6px; padding: 6px; border: 1px solid var(--line-warm); border-radius: 12px; background: var(--bg, #fff); box-shadow: 0 6px 24px #0002; }
.diff-nav[hidden] { display: none; }
.diff-nav .btn { font-size: 13px; }
.diff-nav .btn[hidden], .diff-message[hidden] { display: none; }
.diff-message { padding: 6px 10px; font-size: 13px; }
