:root {
  color-scheme: dark;
  --drawer-width: clamp(360px, 22vw, 430px);
  --guide-blue: #2f80ed;
  --guide-bg: #061321;
  --guide-bg-2: #0d2946;
  --app-bg: #0c1525;
  --app-panel: #1a2636;
  --app-panel-2: #111c2e;
  --app-line: #3a4b62;
  --app-text: #f4f7fc;
  --app-muted: #a6b6ca;
  --app-blue: #4f8ff4;
  --green: #72dda1;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 1120px; background: var(--guide-bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: #f4f8fd;
  background:
    radial-gradient(circle at 14% 8%, #163f65 0, transparent 29%),
    linear-gradient(145deg, #0a2037 0%, #061321 42%, #050f1b 100%);
}
button, input, select { font: inherit; }
button { color: inherit; }

.guide-page {
  min-height: 100vh;
  padding: 34px calc(var(--drawer-width) + 28px) 48px 28px;
}
.guide-header {
  width: min(1660px, 100%);
  min-height: 92px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin: 0 auto 18px;
}
.guide-title { min-width: 420px; }
.eyebrow {
  margin: 0 0 5px;
  color: #4e9ffc;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.guide-title h1 {
  margin: 0;
  font-size: clamp(2.3rem, 3.2vw, 3.7rem);
  line-height: .98;
  letter-spacing: -.045em;
}
.guide-title > p:last-child {
  max-width: 760px;
  margin: 10px 0 0;
  color: #9eb6d2;
  font-size: .9rem;
  line-height: 1.45;
}
.guide-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 2px;
}
.guide-search {
  position: relative;
  width: min(380px, 28vw);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #35506f;
  border-radius: 8px;
  background: #0b192a;
  box-shadow: 0 12px 30px #0004;
}
.guide-search > span { color: #7f96b2; font-size: 1.3rem; }
.guide-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: .85rem;
}
.guide-search input::placeholder { color: #7a90aa; }
.header-button {
  height: 44px;
  padding: 0 16px;
  border: 1px solid #3c5878;
  border-radius: 8px;
  background: #102139;
  color: #fff;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 750;
}
.header-button:hover, .header-button:focus-visible { border-color: #6cadf5; background: #173254; }
.search-results {
  position: absolute;
  z-index: 500;
  top: 51px;
  right: 0;
  left: 0;
  max-height: 420px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #405a78;
  border-radius: 8px;
  background: #101e31;
  box-shadow: 0 24px 60px #000d;
}
.search-results button {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.search-results button:hover, .search-results button:focus-visible { background: #203b5d; }
.search-results strong { display: block; color: #f3f8ff; font-size: .76rem; }
.search-results em {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #9eb1c8;
  font-size: .68rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-results small {
  color: #79b3f2;
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.search-empty { margin: 0; padding: 16px 10px; color: #9eb1c8; font-size: .75rem; text-align: center; }

.app-viewport {
  width: min(1660px, 100%);
  margin: 0 auto;
  overflow-x: auto;
  padding-bottom: 3px;
}
.app-shell {
  --radius: 7px;
  width: 100%;
  min-width: 1320px;
  height: 910px;
  overflow: hidden;
  border: 1px solid #516279;
  border-radius: 8px;
  background: var(--app-bg);
  color: var(--app-text);
  box-shadow: 0 28px 85px #0007;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10px;
}
.app-titlebar {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  background: #242424;
  color: #f4f4f4;
}
.app-titlebar strong { font-size: 11px; font-weight: 500; }
.overview-trigger { cursor: pointer; }
.overview-trigger:focus-visible { outline: 1px solid #4ba4ff; outline-offset: -2px; }
.app-mark {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1px solid #9eb3ca;
  border-radius: 2px;
  background: #edf6ff;
  color: #17385f;
  font-size: 6px;
  font-weight: 900;
}
.window-controls { height: 100%; display: flex; align-items: center; margin-left: auto; }
.window-controls span { width: 42px; height: 100%; display: grid; place-items: center; font-size: 12px; }
.app-menubar {
  position: relative;
  z-index: 100;
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 7px;
  border-bottom: 1px solid #4b5c72;
  background: #1c293b;
}
.menu-wrap { position: relative; height: 25px; }
.app-menubar .menu-target {
  height: 25px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
}
.app-menubar .menu-target:hover, .app-menubar .menu-target.open { background: #2a3a51; }
.app-dropdown {
  position: absolute;
  z-index: 150;
  top: 25px;
  left: 0;
  width: 218px;
  overflow: hidden;
  padding: 4px 0;
  border: 1px solid #41526a;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  background: #1e2a3a;
  box-shadow: 0 15px 36px #000b;
}
.appearance-dropdown { width: 150px; }
.app-dropdown button {
  width: 100%;
  min-height: 28px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 0 8px 0 3px;
  border: 0;
  background: transparent;
  color: #f2f6fb;
  cursor: pointer;
  font-size: 10px;
  text-align: left;
}
.app-dropdown button:hover, .app-dropdown button:focus-visible, .app-dropdown button.is-active { background: #2e4057; }
.app-dropdown button.divider-before { margin-top: 3px; padding-top: 4px; border-top: 1px solid #4a5b71; }
.app-dropdown small { color: #aab9cc; font-size: 8px; }
.menu-check { color: #dae7f4; font-weight: 900; opacity: 0; }
.appearance-option[data-checked="true"] .menu-check { opacity: 1; }

.app-body {
  height: calc(100% - 66px);
  display: grid;
  grid-template-columns: 338px minmax(520px, 1fr) 400px;
  gap: 0;
}
.left-rail {
  min-height: 0;
  display: grid;
  grid-template-rows: 38px auto auto 30px minmax(0, 1fr);
  gap: 6px;
  padding: 9px 8px;
  border-right: 7px solid #35475e;
  background: #101b2e;
}
.app-heading {
  align-self: center;
  margin: 0;
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1;
}
.right-rail {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border-left: 7px solid #35475e;
  background: #101b2e;
}
.right-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 9px 8px 7px;
  scrollbar-color: #4b5f77 #0b1524;
  scrollbar-width: thin;
}
.production-actions {
  display: grid;
  gap: 6px;
  padding: 6px 8px 9px;
  border-top: 1px solid #35475e;
}
.preview-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 36px;
  padding: 16px 10px 0;
  background: #0e1728;
}
.preview-canvas {
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: safe center;
  justify-content: safe center;
  padding: 12px 20px;
}
.paper {
  position: relative;
  flex: 0 0 auto;
  width: min(78%, 690px);
  aspect-ratio: 8.5 / 11;
  background: #fff;
  color: #111;
  box-shadow: 0 4px 20px #0007;
}
.paper.page-two::before {
  position: absolute;
  inset: 72% 0 0;
  background: #252b36;
  content: '';
  pointer-events: none;
}
.paper-copy { padding: 34px 42px; border-bottom: 1px solid #dedede; font: 9px/1.4 Arial, sans-serif; }
.paper-copy p { margin: 0 0 4px; }
.bates-preview, .extra-stamp-preview {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  color: #000;
  font: 700 10px Helvetica, Arial, sans-serif;
  white-space: pre;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.bates-preview.dragging, .extra-stamp-preview.dragging { cursor: grabbing; }
.image-stamp-preview {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 3px double #315a83;
  color: #315a83;
  font-family: Georgia, serif;
  font-weight: 800;
  white-space: nowrap;
  transform: rotate(-5deg);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.image-stamp-preview.dragging { cursor: grabbing; }
.image-stamp-preview[hidden] { display: none; }
.preview-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  color: #e4ecf6;
  font-size: 10px;
}
.preview-spacer { flex: 1; }
.preview-hint { color: #c3d0df; white-space: nowrap; }

fieldset { min-inline-size: 0; }
.qt-panel {
  min-width: 0;
  margin: 0 0 6px;
  padding: 10px 8px 8px;
  border: 1px solid #3c4e64;
  border-radius: var(--radius);
  background: var(--app-panel);
}
.qt-panel > legend { padding: 0 7px; color: #f5f8fd; background: var(--app-panel); font-size: 10px; }
.import-panel, .project-panel, .documents-panel { margin-bottom: 0; }
.import-panel { padding: 10px 7px; }
.form-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 5px;
}
.form-row > label { padding-right: 2px; }
.project-panel { display: grid; gap: 5px; }
.project-path-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
.select-row { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 4px; }
.field-row {
  min-width: 0;
  min-height: 26px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  margin: 2px 0;
}
.field-row > label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-row output { min-width: 40px; color: #d7e2ef; text-align: right; }
.field-row:has(output) { grid-template-columns: 104px minmax(0, 1fr) auto; }
.sim-input, .app-shell input:not([type="checkbox"]):not([type="range"]), .app-shell select {
  min-width: 0;
  height: 25px;
  padding: 0 7px;
  border: 1px solid #40536a;
  border-radius: calc(var(--radius) - 2px);
  outline: 0;
  background: #0e1829;
  color: #f1f6fc;
  font-size: 10px;
}
.app-shell select { padding-right: 22px; }
.app-shell input:focus, .app-shell select:focus { border-color: #5b9ef2; box-shadow: 0 0 0 1px #5b9ef255; }
.app-shell input[readonly] { color: #aab8ca; }
.color-choice {
  min-width: 0;
  min-height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #40536a;
  border-radius: calc(var(--radius) - 2px);
  background: #0e1829;
  cursor: pointer;
  white-space: nowrap;
}
.app-shell .color-choice input[type="color"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.color-choice span { overflow: hidden; text-overflow: ellipsis; }
.inversion-line { margin-left: 0; }
.sim-button {
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid #3f526a;
  border-radius: calc(var(--radius) - 2px);
  background: #172438;
  color: #f4f8fe;
  cursor: pointer;
  font-size: 9px;
}
.sim-button:hover, .sim-button:focus-visible { border-color: #67aefe; background: #1c3150; }
.sim-button:active { transform: translateY(1px); }
.sim-button.wide { width: 100%; }
.sim-button.primary {
  min-height: 32px;
  border-color: #5b9eff;
  background: #4f87ea;
  color: #fff;
  font-weight: 800;
}
.sim-button.primary:hover { background: #5c96f5; }
.check-line {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #f0f5fb;
  cursor: pointer;
  font-size: 10px;
}
.check-line input {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin: 0;
  accent-color: var(--app-blue);
}
.documents-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}
.document-list {
  min-height: 0;
  overflow: auto;
  border: 1px solid #3b4c62;
  background: #0d1626;
  scrollbar-color: #50637b #09121f;
  scrollbar-width: thin;
}
.document-row {
  width: 100%;
  min-height: 27px;
  display: grid;
  grid-template-columns: 17px 72px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 0 5px;
  border: 0;
  border-bottom: 1px solid #26364a;
  background: transparent;
  color: #f4f7fc;
  cursor: pointer;
  font-size: 9px;
  text-align: left;
}
.document-row:hover { background: #22334b; }
.document-row.selected { background: #245995; box-shadow: inset 3px 0 #64b0ff; }
.document-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fake-check {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: 1px solid #6d8098;
  border-radius: 3px;
  background: #0d1726;
  color: transparent;
  font-size: 10px;
}
.fake-check.checked { border-color: #5b9df7; background: #5593ef; color: #fff; }
.doc-id { color: #d6e6f8; }
.doc-type { color: #97aac1; }
.button-row { display: flex; justify-content: flex-end; gap: 6px; margin-top: 7px; }
.output-folder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  margin: 0;
  padding-top: 9px;
}
.output-folder legend { grid-column: 1 / -1; }
.dependent-options { padding: 3px 0 3px 10px; border-left: 2px solid #344b68; }
.load-fields {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding: 6px;
  border: 1px solid #34475e;
  border-radius: calc(var(--radius) - 2px);
  background: #121d2d;
}
.load-fields button {
  height: 22px;
  border: 1px solid #40536a;
  background: #19273a;
  color: #f0f4f9;
  font-size: 8px;
}
.inline-buttons { display: flex; justify-content: flex-end; gap: 5px; margin: 3px 0; }
.additional-stamp-options { display: grid; gap: 1px; }
.image-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 3px 0 4px 111px;
}
.image-buttons .sim-button { width: 100%; }

.guide-target, .guide-subtarget { position: relative; }
.guide-target {
  cursor: help;
  outline: 1px solid transparent;
  outline-offset: -3px;
  transition: outline-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.guide-subtarget {
  cursor: help;
  border-radius: calc(var(--radius) - 2px);
  transition: box-shadow .16s ease, background-color .16s ease;
}
.guide-target:hover, .guide-target:focus-visible, .guide-target.is-active {
  z-index: 8;
  outline-color: #55a8ff;
  box-shadow: inset 0 0 24px #3b9cff20;
}
.guide-subtarget:hover, .guide-subtarget:focus-within, .guide-subtarget.is-active {
  z-index: 9;
  box-shadow: 0 0 0 1px #68b5ff, inset 0 0 14px #3b9cff22;
}
.guide-target.is-active, .guide-subtarget.is-active { animation: guide-pulse .75s ease-out 1; }
@keyframes guide-pulse {
  0% { box-shadow: 0 0 0 0 #55a8ff99, inset 0 0 28px #3b9cff35; }
  100% { box-shadow: 0 0 0 8px #55a8ff00, inset 0 0 18px #3b9cff1c; }
}

.app-shell.light-mode {
  --app-bg: #e7edf5;
  --app-panel: #d8e1ed;
  --app-panel-2: #eaf0f7;
  --app-line: #99aabd;
  --app-text: #17263a;
  --app-muted: #536a84;
  color: #17263a;
}
.app-shell.light-mode .app-menubar { border-color: #aebccc; background: #d2dce9; }
.app-shell.light-mode .app-menubar .menu-target { color: #17263a; }
.app-shell.light-mode .app-menubar .menu-target:hover, .app-shell.light-mode .app-menubar .menu-target.open { background: #bed0e6; }
.app-shell.light-mode .left-rail, .app-shell.light-mode .right-rail { background: #d6e0ec; }
.app-shell.light-mode .preview-stage { background: #c7d1de; }
.app-shell.light-mode .qt-panel { border-color: #9cadc0; }
.app-shell.light-mode .qt-panel > legend { color: #17304e; }
.app-shell.light-mode .sim-input,
.app-shell.light-mode input:not([type="checkbox"]):not([type="range"]),
.app-shell.light-mode select { border-color: #9aabbd; background: #eef3f8; color: #17263a; }
.app-shell.light-mode .sim-button { border-color: #8fa4ba; background: #e4ebf3; color: #17304e; }
.app-shell.light-mode .check-line, .app-shell.light-mode .preview-footer { color: #17263a; }
.app-shell.light-mode .preview-hint { color: #3e536c; }
.app-shell.light-mode .document-list { border-color: #91a4b8; background: #eef3f8; }
.app-shell.light-mode .document-row { border-color: #cad5e0; color: #17263a; }
.app-shell.light-mode .document-row:hover { background: #d5e2f1; }
.app-shell.light-mode .document-row.selected { background: #b5d5f6; color: #0b3765; }
.app-shell.light-mode .doc-id { color: #214b75; }
.app-shell.light-mode .doc-type { color: #536b84; }
.app-shell.light-mode .dependent-options { border-color: #9db0c4; }
.app-shell.sharp-corners { --radius: 0px; border-radius: 0; }

.guide-drawer {
  position: fixed;
  z-index: 300;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--drawer-width);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 48px 31px 28px;
  border-left: 1px solid #c5d2df;
  background: #f4f8fd;
  color: #152439;
  box-shadow: -14px 0 45px #0008;
  scrollbar-color: #9db1c9 #eef4fa;
}
.drawer-home {
  position: absolute;
  top: 18px;
  right: 19px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #c3d0df;
  border-radius: 50%;
  background: #fff;
  color: #17283d;
  cursor: pointer;
  font-size: 18px;
}
.drawer-home:hover { border-color: #6a9fd3; background: #e8f1fb; }
.drawer-kicker {
  margin: 0;
  color: #2f80ed;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.drawer-content { min-height: 0; padding: 0 0 34px; }
.drawer-content h2 {
  margin: 9px 0 12px;
  color: #102a4a;
  font-size: 31px;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.drawer-content h2.overview-title { margin-top: 14px; font-size: 42px; }
.drawer-content h3 {
  margin: 25px 0 10px;
  padding-top: 18px;
  border-top: 1px solid #ccd9e7;
  color: #2268ac;
  font-size: 17px;
}
.drawer-content h4 { margin: 17px 0 5px; color: #15385d; font-size: 12px; }
.drawer-content p {
  margin: 0 0 13px;
  color: #566e8b;
  font-size: 12.5px;
  line-height: 1.58;
}
.drawer-content ul, .drawer-content ol {
  margin: 0 0 16px;
  padding-left: 20px;
  color: #536b87;
  font-size: 12px;
  line-height: 1.52;
}
.drawer-content li { margin-bottom: 7px; }
.drawer-content strong { color: #173b61; }
.drawer-overview-copy { margin-top: 22px; }
.drawer-overview-copy p { color: #536a82; font-size: 15px; line-height: 1.65; }
.drawer-overview-prompt {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin-top: 28px;
  padding: 15px;
  border-left: 3px solid #397fc8;
  border-radius: 0 7px 7px 0;
  background: #e8f1fb;
}
.drawer-overview-prompt span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2f80ed;
  color: #fff;
  font-size: 16px;
}
.drawer-overview-prompt p { margin: 0; color: #294d72; font-size: 13px; font-weight: 700; line-height: 1.45; }
.drawer-summary { color: #3f5771 !important; font-size: 15px !important; line-height: 1.5 !important; }
.drawer-section {
  margin: 28px 0;
  padding-top: 20px;
  border-top: 1px solid #ccd7e3;
}
.drawer-section.focus-section {
  padding: 16px 12px 12px;
  border-left: 3px solid #397fc8;
  border-radius: 0 5px 5px 0;
  background: #e8f1fb;
}
.drawer-section h3 { margin: 0 0 12px; padding: 0; border: 0; color: #2e6eaa; font-size: 18px; }
.drawer-controls-list { display: grid; gap: 12px; }
.drawer-control-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  scroll-margin-block: 32vh;
}
.drawer-control-row.focus {
  padding: 10px 12px;
  border-left: 3px solid #397fc8;
  border-radius: 0 5px 5px 0;
  background: #e8f1fb;
}
.drawer-control-row strong { display: block; margin: 1px 0 3px; color: #213f61; font-size: 12px; }
.drawer-control-row p { margin: 0; color: #53677f; font-size: 12px; line-height: 1.5; }
.drawer-control-sample {
  min-width: 0;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 7px;
  border: 1px solid #354a67;
  border-radius: 5px;
  background: #152238;
  color: #f4f7fb;
  box-shadow: 0 3px 8px #10233a1f;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}
.drawer-control-sample.primary { border-color: #2f80ed; background: #2f80ed; }
.drawer-control-sample.text {
  justify-content: flex-start;
  padding-inline: 2px;
  border-color: transparent;
  background: transparent;
  color: #405773;
  box-shadow: none;
  text-align: left;
}
.drawer-control-sample.field, .drawer-control-sample.select {
  justify-content: flex-start;
  background: #0d1829;
  color: #a6b5c7;
  font-weight: 550;
  text-align: left;
}
.drawer-control-sample.select { position: relative; padding-right: 22px; }
.drawer-control-sample.select::after { content: "⌄"; position: absolute; right: 8px; color: #9fc5ef; }
.drawer-control-sample.checkbox {
  justify-content: flex-start;
  gap: 7px;
  padding-inline: 2px;
  border-color: transparent;
  background: transparent;
  color: #405773;
  box-shadow: none;
  text-align: left;
}
.drawer-control-sample.checkbox::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 1px solid #647b95;
  border-radius: 3px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #dbe5ef;
}
.callout {
  margin: 17px 0;
  padding: 13px 14px;
  border-left: 3px solid #2f80ed;
  border-radius: 0 6px 6px 0;
  background: #e3eefb;
}
.callout p { margin: 0; color: #3e5a78; }
.reference-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 19px; }
.reference-card {
  min-height: 88px;
  padding: 12px;
  border: 1px solid #c4d3e4;
  border-radius: 8px;
  background: #fff;
  color: #244565;
  cursor: pointer;
  text-align: left;
}
.reference-card:hover { border-color: #4d97e5; background: #edf6ff; }
.reference-card strong { display: block; font-size: 11px; }
.reference-card small { display: block; margin-top: 4px; color: #71849b; font-size: 9px; line-height: 1.35; }
.reference-table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; color: #48617e; font-size: 10px; line-height: 1.4; }
.reference-table th { padding: 7px; background: #15385d; color: #fff; font-size: 9px; text-align: left; }
.reference-table td { padding: 7px; border: 1px solid #c6d4e3; vertical-align: top; }
.reference-table tr:nth-child(even) td { background: #e8f1fa; }
.message-card { margin: 0 0 9px; padding: 10px 11px; border: 1px solid #c9d6e4; border-radius: 6px; background: #fff; }
.message-card strong { display: block; margin-bottom: 4px; color: #164c80; font: 10px Consolas, monospace; }
.message-card p { margin: 0; font-size: 10px; }

.toast {
  position: fixed;
  z-index: 800;
  left: 28px;
  bottom: 28px;
  max-width: 360px;
  padding: 12px 15px;
  border: 1px solid #4e7fb2;
  border-radius: 7px;
  background: #112a44;
  color: #eef6ff;
  box-shadow: 0 16px 42px #0009;
  font-size: 12px;
}

@media (max-width: 1650px) {
  :root { --drawer-width: 360px; }
  .guide-page { padding-left: 16px; padding-right: calc(var(--drawer-width) + 16px); }
  .guide-header { align-items: start; }
  .guide-actions { max-width: 460px; flex-wrap: wrap; justify-content: flex-end; }
  .guide-search { width: 100%; }
}

@media (max-height: 850px) {
  .guide-page { padding-top: 16px; }
  .guide-header { min-height: 76px; margin-bottom: 12px; }
  .guide-title h1 { font-size: 2.5rem; }
  .app-shell { height: 830px; }
}
