/* Reader presentation adapted to the Archone document layout; content is unchanged. */
:root {
  color-scheme: light;
  --ink: #212529;
  --muted: #5c6670;
  --accent: #175ea8;
  --line: #dee2e6;
  --soft: #f8f9fa;
  --canvas: #f1f3f5;
  --sidebar-width: 264px;
  --bs-primary: #175ea8;
  --bs-link-color: #175ea8;
  --bs-link-hover-color: #174f88;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding-left: var(--sidebar-width);
  background: var(--canvas);
  color: var(--ink);
  font: 17px/1.9 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
  font-synthesis: none;
  overflow-wrap: anywhere;
}
a { color: var(--accent); text-underline-offset: 3px; }
button, a, summary { touch-action: manipulation; }
[id] { scroll-margin-top: 95px; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  width: var(--sidebar-width);
  overflow: auto;
  padding: 30px 20px;
  background: var(--soft);
  border-right: 1px solid #d7dde3;
}
.sidebar-title { margin: 0 12px 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.brand-name { display: block; color: #293e53; font-size: 24px; line-height: 1.5; font-weight: 650; }
.brand-caption { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.nav-caption { color: #65778a; font-size: 13px; margin: 0 12px 12px; }
.sidebar nav ol, .mobile-nav ol { list-style: none; padding: 0; margin: 0; }
.sidebar nav a {
  display: block;
  min-height: 48px;
  padding: 12px;
  margin: 4px 0;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #44515e;
  font-size: 16px;
  line-height: 1.6;
  text-decoration: none;
}
.sidebar nav a:hover { background: #edf0f3; }
.sidebar nav a[aria-current=page] { background: #e7f0fc; color: #174f88; border-color: #d2e2f7; font-weight: 650; }
.sidebar .bdd-child a { min-height: 0; padding: 8px 12px 8px 24px; font-size: 14px; }
.mobile-nav { display: none; }
.reader-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 68px;
  padding: 12px 40px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px #21374d08;
  color: var(--muted);
  font-size: 13px;
}
.reader-topbar span:last-child { text-align: right; flex-shrink: 0; }
main {
  width: calc(100% - 48px);
  max-width: 1160px;
  min-width: 0;
  margin: 24px auto 28px;
  padding: 36px 40px 24px;
  border: 1px solid #e1e5ea;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 7px #273e5610;
}
h1 { margin: 0 0 30px; padding-bottom: 20px; border-bottom: 1px solid var(--line); color: #263b50; font-size: 32px; font-weight: 650; line-height: 1.5; }
h2 { margin: 44px 0 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: #263b50; font-size: 28px; font-weight: 650; line-height: 1.6; }
h3 { margin: 32px 0 16px; color: #334c65; font-size: 22px; font-weight: 650; line-height: 1.65; }
h4 { margin: 24px 0 12px; font-size: 18px; font-weight: 650; }
p, li { max-width: 90ch; }
p { margin: 18px 0; }
main ul, main ol { margin: 18px 0; padding-left: 26px; }
main li { margin: 6px 0; }
code, pre, kbd { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
code { color: inherit; font-size: .92em; overflow-wrap: anywhere; }
:not(pre) > code { background: #f3f3f3; padding: 2px 4px; border-radius: 3px; }
pre { margin: 22px 0; padding: 20px; border: 1px solid var(--line); border-radius: 3px; background: var(--soft); overflow: auto; font-size: 15px; line-height: 1.8; tab-size: 4; }
pre code { color: var(--ink); font-size: inherit; overflow-wrap: normal; }
.table-scroll { width: 100%; overflow: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 3px; overscroll-behavior-x: contain; }
table { border-collapse: collapse; min-width: 680px; width: 100%; margin: 0 !important; font-size: 15px; line-height: 1.8; }
th, td { min-width: 120px; padding: 12px 15px !important; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #edf1f5 !important; color: var(--ink) !important; font-weight: 650; }
tbody tr:nth-child(even) td { background: var(--soft) !important; }
tbody tr:hover td { background: #f0f4f8 !important; }
.table-scroll tr:last-child td { border-bottom: 0; }
.table-scroll code { font-size: 14px; }
main img { max-width: 100%; height: auto; background: white; cursor: zoom-in; }
main a:has(> img) { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 3px; background: white; }
main a > img { display: block; margin: auto; }
figure { margin: 24px 0; }
figcaption { padding: 10px 14px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 3px 3px; background: var(--soft); color: #365d83; font-size: 14px; }
blockquote { margin: 22px 0; padding: 10px 20px; border-left: 3px solid #aaa; color: #444; }
blockquote p:last-child { margin-bottom: 0; }
summary { cursor: pointer; }
footer { margin-top: 35px; padding: 24px 0 0; border-top: 1px solid var(--line); font-size: 15px; }
.source-link { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; font-size: 14px; }
.source-link a:first-child:not(.btn) { padding: 5px 10px; border: 1px solid #ced4da; border-radius: 3px; color: #52606d; background: var(--soft); text-decoration: none; }
.eyebrow { margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.spec-notice { background: var(--soft); border: 1px solid var(--line); color: #354b61; border-radius: 4px; font-size: 15px; }
.scenario-card { margin: 24px 0; border: 1px solid #dce4ec; border-radius: 4px; }
.scenario-card .card-body { padding: 22px; }
.scenario-card h2 { margin: 18px 0 22px; padding: 16px 18px; border: 1px solid #dce4ec; border-left: 4px solid #7896b5; border-radius: 4px; color: #334c65; background: #f6f8fb; font-size: 22px; }
.scenario-card h3 { margin: 24px 0 0; font-size: 18px; }
.scenario-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.scenario-tags .badge { padding: 6px 9px; background: #edf1f5; color: #52606d; font-size: 12px; font-weight: 550; }
.scenario-tags .tag-target { background: #e7f0fc; color: #174f88; }
.scenario-tags .tag-known_gap { background: #f4ead9; color: #725421; }
main .gherkin-steps { list-style: none; padding: 0; margin: 0; }
.gherkin-steps li { display: grid; grid-template-columns: 65px minmax(0, 1fr); gap: 9px; margin: 13px 0; line-height: 1.9; }
.step-keyword { color: #315f8f; font-size: 16px; font-weight: 650; }
.gherkin-steps .table-scroll { grid-column: 1/-1; }
.source-details { padding: 14px 18px; border: 1px solid var(--line); border-radius: 4px; background: var(--soft); }
.source-details pre { margin: 16px 0 0; background: white; }
.feature-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.feature-index a { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 4px; background: var(--soft); text-decoration: none; }
.feature-index a:hover { background: #edf0f3; }
.feature-index small { display: block; color: var(--muted); margin-top: 5px; }
.image-modal .modal-dialog { max-width: min(1600px, calc(100vw - 40px)); width: calc(100vw - 40px); height: calc(100dvh - 40px); margin: 20px auto; }
.image-modal .modal-content { height: 100%; background: #eef1f4; border: 1px solid #ccc; border-radius: 6px; box-shadow: 0 20px 80px #0004; }
.image-modal .modal-header { background: #fff; gap: 15px; padding: 16px 20px; flex-wrap: wrap; }
.image-modal .modal-title { font-size: 18px; line-height: 1.6; color: var(--ink); font-weight: 650; margin: 0; border: 0; padding: 0; flex: 1; min-width: 120px; }
.image-toolbar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.image-toolbar .btn { font-size: 15px; min-height: 42px; border-radius: 3px; }
.image-toolbar output { font-size: 15px; min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.image-stage { flex: 1; min-height: 0; overflow: auto; padding: 20px; display: flex; flex-direction: column; text-align: left; overscroll-behavior: contain; }
.image-stage img { display: block; flex: none; max-width: none !important; height: auto; object-fit: contain; margin: auto; background: white; box-shadow: 0 0 0 1px var(--line); }
.image-modal .modal-footer { padding: 10px 20px; font-size: 14px; color: var(--muted); justify-content: space-between; background: white; }
.image-modal .modal-footer p { margin: 0; }
.image-error { color: #8f2828; padding: 24px; }
.btn-outline-secondary { --bs-btn-color: #52606d; --bs-btn-border-color: #ced4da; --bs-btn-hover-color: #212529; --bs-btn-hover-bg: #e9ecef; --bs-btn-hover-border-color: #adb5bd; }
.btn:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid #3274bb; outline-offset: 3px; box-shadow: none; }
@media (max-width: 1200px) {
  :root { --sidebar-width: 246px; }
  .sidebar { padding: 28px 14px; }
  main { width: calc(100% - 36px); padding: 30px 28px 24px; }
  .reader-topbar { padding-right: 25px; padding-left: 25px; }
}
@media (max-width: 800px) {
  body { padding-left: 0; }
  .sidebar { display: none; }
  .mobile-nav { display: block; padding: 15px 20px; background: var(--soft); color: #293e53; border-bottom: 1px solid var(--line); }
  .mobile-nav a { display: block; padding: 9px 10px; margin-top: 4px; font-size: 16px; color: #44515e; text-decoration: none; border: 1px solid transparent; border-radius: 4px; }
  .mobile-nav [aria-current=page] { background: #e7f0fc; color: #174f88; border-color: #d2e2f7; font-weight: 650; }
  .mobile-nav .bdd-child a { padding-left: 24px; font-size: 14px; }
  .reader-topbar { min-height: 56px; padding: 10px 20px; font-size: 12px; }
  .feature-index { grid-template-columns: 1fr; }
  .image-modal .modal-dialog { margin: 0; width: 100vw; max-width: 100vw; height: 100dvh; }
  .image-modal .modal-content { border: 0; border-radius: 0; }
  .image-modal .modal-header { padding: 12px; gap: 12px; }
  .image-modal .modal-title { width: calc(100% - 48px); flex: auto; font-size: 17px; }
  .image-toolbar { order: 3; width: 100%; gap: 5px; }
  .image-stage { padding: 12px; }
  .image-toolbar .btn { min-height: 44px; font-size: 14px; padding: 5px 7px; }
  .image-toolbar output { min-width: 42px; font-size: 14px; }
  .image-modal .modal-footer p { display: none; }
}
@media (max-width: 600px) {
  main { width: calc(100% - 24px); margin-top: 14px; padding: 24px 18px; border-radius: 5px; }
  h1 { font-size: 28px; }
  h2 { font-size: 25px; margin-top: 36px; }
  h3 { font-size: 21px; }
  th, td { padding: 12px !important; }
  main a:has(> img) { padding: 12px; }
  .scenario-card .card-body { padding: 16px; }
  .scenario-card h2 { padding: 13px; font-size: 20px; }
  .gherkin-steps li { grid-template-columns: 60px minmax(0, 1fr); gap: 6px; }
  pre { padding: 14px; font-size: 14px; }
}
@media (max-width: 360px) {
  main { width: calc(100% - 16px); padding-right: 14px; padding-left: 14px; }
  .image-toolbar { gap: 3px; }
  .image-toolbar .btn { padding: 5px; font-size: 13px; }
  .image-toolbar output { min-width: 37px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  body { padding-left: 0; background: white; }
  .sidebar, .mobile-nav, .reader-topbar, footer, .source-link, .image-modal, .modal-backdrop { display: none !important; }
  main { width: 100%; max-width: none; border: 0; box-shadow: none; margin: 0; padding: 0; }
  pre { white-space: pre-wrap; }
  table { min-width: 0; font-size: 10px; }
  .table-scroll { overflow: visible; }
  h2 { break-after: avoid; }
  .scenario-card, figure { break-inside: avoid; }
}

/* Swagger UI owns its styles inside this embedded reference. */
.openapi-reference { display: block; width: 100%; height: 1000px; border: 0; margin: 24px 0; }
