/*
 * Relational Database Systems - protected web edition.
 * Generated by build_web.py - do not edit by hand; re-run the build instead.
 *
 * Copy deterrent: text selection is disabled everywhere (user-select: none).
 * Print disabled: printing any page yields only a "printing disabled" notice.
 */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Cambria, Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.65;
  color: #21262e;
  background: #fdfdfd;
  text-align: justify;
}

/* ---- copy deterrent: selection disabled ---- */
body, body * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
::selection { background: transparent; }
::-moz-selection { background: transparent; }
img { -webkit-user-drag: none; }

/* ---- print disabled ---- */
.print-notice { display: none; }
@media print {
  body * { display: none !important; }
  body .print-notice {
    display: block !important;
    font-family: Cambria, Georgia, serif;
    font-size: 15pt;
    color: #21262e;
    text-align: center;
    padding: 30vh 2in 0;
  }
}

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  height: 48px; padding: 0 18px;
  background: #1f3864; color: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .25);
}
.topbar-title { color: #fff; font-weight: 700; font-size: 1.02rem; white-space: nowrap; }
.topbar-title:hover { color: #dce6f7; }
.topbar-sub {
  color: #b9c6de; font-style: italic; font-size: .84rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-home { justify-content: center; }
.menu-btn {
  display: none; width: 36px; height: 32px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 6px;
  color: #fff; font-size: 1rem; cursor: pointer; flex: none;
}

.skip { position: absolute; left: -9999px; top: 0; z-index: 60; }
.skip:focus { left: 8px; top: 8px; background: #fff; color: #1f3864; padding: 6px 12px; border-radius: 4px; }

/* ---- layout ---- */
.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); max-width: 1280px; margin: 0 auto; }

.sidebar {
  position: sticky; top: 48px;
  height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 18px 10px 40px 18px;
  background: #f7f8fa;
  border-right: 1px solid #e2e6ec;
  font-size: .9rem;
}
.nav-group { margin: 0 0 16px; }
.nav-home-group { margin-bottom: 20px; }
.nav-home-group a { display: block; font-weight: 700; color: #1f3864; padding: 4px 8px; }
.nav-group h3 {
  margin: 0 0 5px; padding-bottom: 4px;
  font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: #595959; border-bottom: 1px solid #dfe3ea;
}
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group a {
  display: block; padding: 3px 8px;
  color: #2f3e4e; border-left: 3px solid transparent; border-radius: 0 4px 4px 0;
}
.nav-group a:hover { background: #eef2f8; color: #1f3864; }
.nav-group a.active { background: #e7edf7; border-left-color: #1f3864; color: #1f3864; font-weight: 700; }

/* ---- content ---- */
.content { min-width: 0; max-width: 900px; margin: 0 auto; padding: 34px 48px 90px; }

.part-label { margin: 0 0 6px; font-style: italic; font-size: .92rem; color: #595959; text-align: left; }
.chapter h1 {
  margin: 0 0 20px; padding-bottom: 10px;
  font-size: 1.85rem; line-height: 1.25; color: #1f3864;
  border-bottom: 2px solid #1f3864; text-align: left;
}
.chapter h2 { margin: 32px 0 10px; font-size: 1.32rem; color: #1f3864; text-align: left; }
.chapter h2.endblock {
  margin-top: 42px; padding: 8px 12px;
  background: #eef2f8; border-left: 4px solid #1f3864; border-radius: 0 4px 4px 0;
}
.chapter h3 { margin: 24px 0 8px; font-size: 1.12rem; color: #2f3e4e; text-align: left; }
.chapter h4 { margin: 20px 0 6px; font-size: 1rem; font-style: italic; color: #2f3e4e; text-align: left; }
.chapter p { margin: 0 0 12px; }
.chapter hr { margin: 28px 0; border: 0; border-top: 1px solid #d5dae2; }
.chapter blockquote {
  margin: 14px 0; padding: 4px 16px;
  border-left: 4px solid #9ca3af; color: #2f3e4e; font-style: italic;
}

/* code */
code, pre { font-family: Consolas, "SFMono-Regular", Menlo, "Courier New", monospace; }
code {
  padding: 1px 5px; border-radius: 4px;
  background: #f4f0ef; color: #8b2f2f; font-size: .88em;
}
pre {
  position: relative;
  margin: 14px 0 18px; padding: 12px 16px;
  background: #f2f4f7; border: 1px solid #e3e7ee; border-left: 3px solid #1f3864;
  border-radius: 6px;
  overflow-x: auto;
  font-size: .88rem; line-height: 1.45; white-space: pre;
}
pre code { padding: 0; background: transparent; color: #1a1a1a; font-size: inherit; border-radius: 0; }
pre[data-lang]::before {
  content: attr(data-lang);
  position: absolute; top: 5px; right: 9px;
  font-size: .6rem; letter-spacing: .09em; text-transform: uppercase;
  color: #9aa3b2;
}

/* tables */
.table-wrap { overflow-x: auto; margin: 16px 0 22px; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; line-height: 1.45; }
th, td { padding: 6px 10px; border: 1px solid #b9c1cd; text-align: left; vertical-align: top; }
thead th { background: #d9e2f3; color: #1f3864; font-weight: 700; }
tbody tr:nth-child(even) { background: #f6f8fb; }

/* lists */
.chapter ul, .chapter ol { margin: 0 0 14px; padding-left: 28px; }
.chapter li { margin: 0 0 6px; }
.chapter li > ul, .chapter li > ol { margin: 6px 0 2px; }
.chapter li > pre { margin: 10px 0 12px; }

/* pager + footer */
.pager {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 48px; padding-top: 16px; border-top: 1px solid #d5dae2;
}
.pager a {
  display: inline-block; max-width: 46%;
  padding: 8px 14px;
  color: #1f3864; background: #fbfcfe;
  border: 1px solid #d5dae2; border-radius: 6px;
}
.pager a:hover { background: #eef2f8; border-color: #1f3864; }
.pager a small { display: block; color: #595959; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.pager a.next { margin-left: auto; text-align: right; }
.page-foot { margin-top: 26px; padding-top: 12px; border-top: 1px solid #d5dae2; color: #595959; font-size: .85rem; text-align: left; }
.protect-note { font-style: italic; }

/* ---- home page ---- */
.hero { max-width: 900px; margin: 0 auto; padding: 48px 20px 26px; text-align: center; }
.hero .cover {
  width: min(430px, 80vw);
  border: 1px solid #d5dae2; border-radius: 5px;
  box-shadow: 0 12px 34px rgba(31, 56, 100, .32);
}
.hero h1 { margin: 30px 0 6px; font-size: 2.15rem; color: #1f3864; text-align: center; }
.hero .subtitle { margin: 0 0 10px; font-style: italic; font-size: 1.12rem; color: #2f3e4e; }
.hero .publisher { margin: 0 0 4px; color: #595959; }
.hero .meta { margin: 0 0 18px; color: #595959; font-size: .9rem; }
.hero .cta a {
  display: inline-block; padding: 10px 26px;
  background: #1f3864; color: #fff; border-radius: 6px;
  font-weight: 700; letter-spacing: .02em;
}
.hero .cta a:hover { background: #2a4d8a; }
.hero .protect-note { margin: 18px auto 0; color: #595959; font-size: .9rem; }

.toc { max-width: 900px; margin: 0 auto; padding: 8px 24px 40px; }
.toc h2 { margin: 0 0 6px; font-size: 1.55rem; color: #1f3864; border-bottom: 2px solid #1f3864; padding-bottom: 8px; text-align: left; }
.toc-part { margin: 26px 0 6px; font-weight: 700; font-size: 1.02rem; color: #1f3864; text-align: left; }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc li { margin: 3px 0; }
.toc a { color: #2f3e4e; }
.toc a:hover { color: #1f3864; text-decoration: underline; }
.home-foot { max-width: 900px; margin: 0 auto; padding: 0 24px 60px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 70;
  transform: translateX(-50%) translateY(10px);
  max-width: 80vw; padding: 10px 18px;
  background: #1f3864; color: #fff;
  border-radius: 6px; box-shadow: 0 6px 18px rgba(15, 23, 42, .35);
  font-size: .9rem; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* scrim */
.scrim { display: none; }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-block; }
  .topbar-sub { display: none; }
  .content { padding: 24px 18px 70px; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100vh;
    width: min(330px, 84vw); z-index: 55;
    padding-top: 58px;
    transform: translateX(-104%);
    transition: transform .24s ease;
    box-shadow: 0 0 44px rgba(15, 23, 42, .3);
  }
  .sidebar.open { transform: translateX(0); }
  .scrim {
    display: block; position: fixed; inset: 0; z-index: 54;
    background: rgba(15, 23, 42, .45);
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease;
  }
  .scrim.show { opacity: 1; visibility: visible; }
}
