
@font-face { font-family: "Literata"; src: url(/assets/fonts/literata.be07a994cd.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url(/assets/fonts/literata-italic.9175ba2e03.woff2) format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Red Hat Mono"; src: url(/assets/fonts/redhatmono.8f985438dd.woff2) format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
/* Postgres Lab: a workbook that runs.
   Literata for everything you read (including the interface), Red Hat Mono for code and psql output. */
:root {
  --paper: #FFFFFF;
  --rail: #F3F4F1;
  --well: #F7F8F6;
  --gutter: #ECEEEA;
  --ink: #1B222C;
  --ink-2: #4A5462;
  --ink-3: #737D8A;
  --rule: #DADDD6;
  --rule-strong: #B9BEB5;
  --blue: #245B8E;
  --blue-ink: #FFFFFF;
  --blue-hover: #1A4670;
  --blue-wash: #E6EEF6;
  --ok: #1E6E45;
  --ok-wash: #E2F1E8;
  --bad: #A8261B;
  --bad-wash: #FBEAE7;
  --warn: #7C4D00;
  --warn-wash: #FCF1D9;
  --hl-kw: #245B8E;
  --hl-str: #9A3F0C;
  --hl-num: #7A3596;
  --hl-fn: #1E6E45;
  --hl-com: #737D8A;
  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "Red Hat Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --toc-w: 280px;
  --pad-x: clamp(18px, 4vw, 56px);
  --top-h: 56px;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171C22; --rail: #1D232B; --well: #1B2128; --gutter: #222932;
    --ink: #E3E7EC; --ink-2: #AEB7C2; --ink-3: #8A95A2; --rule: #2E3640; --rule-strong: #46505C;
    --blue: #79AEE0; --blue-ink: #10161D; --blue-hover: #A2C7EA; --blue-wash: #1F3247;
    --ok: #73C99A; --ok-wash: #183427; --bad: #F2948A; --bad-wash: #3A1E1B; --warn: #EBC273; --warn-wash: #352A14;
    --hl-kw: #86B9E8; --hl-str: #E8A57C; --hl-num: #D1A3E6; --hl-fn: #86CFA5; --hl-com: #8A95A2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #171C22; --rail: #1D232B; --well: #1B2128; --gutter: #222932;
  --ink: #E3E7EC; --ink-2: #AEB7C2; --ink-3: #8A95A2; --rule: #2E3640; --rule-strong: #46505C;
  --blue: #79AEE0; --blue-ink: #10161D; --blue-hover: #A2C7EA; --blue-wash: #1F3247;
  --ok: #73C99A; --ok-wash: #183427; --bad: #F2948A; --bad-wash: #3A1E1B; --warn: #EBC273; --warn-wash: #352A14;
  --hl-kw: #86B9E8; --hl-str: #E8A57C; --hl-num: #D1A3E6; --hl-fn: #86CFA5; --hl-com: #8A95A2;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--top-h) + 16px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body { overflow-x: clip; }
body { background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 17px; line-height: 1.6; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
code, kbd, pre, textarea { font-family: var(--mono); }
code { font-size: .86em; background: var(--well); border: 1px solid var(--rule); border-radius: 4px; padding: .05em .3em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
kbd { font-size: .78em; padding: 1px 5px; border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--paper); }
.skip { position: absolute; left: -9999px; top: calc(8px + env(safe-area-inset-top, 0px)); z-index: 60; background: var(--paper); padding: 8px 14px; border: 1px solid var(--rule-strong); }
.skip:focus { left: 12px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 6px 14px; border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--rail); color: var(--ink); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.btn.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.btn.text { border-color: transparent; background: transparent; color: var(--blue); padding-inline: 10px; }
.btn.text:hover { background: var(--blue-wash); }
.btn.armed { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn svg { flex: none; }

/* ---------------------------------------------------------------- top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: 6px; padding: 0 var(--pad-x) 0 22px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.brand { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; margin-right: auto; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); margin-right: 10px; white-space: nowrap; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.status[data-mode="ready"] .dot { background: var(--ok); }
.status[data-mode="offline"] .dot { background: var(--bad); }
.status[data-mode="loading"] .dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .2; } }
.topbar .btn { min-height: 36px; }
.menu-btn { display: none; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--toc-w) minmax(0, 1fr); align-items: start; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h)); height: calc(100vh - var(--top-h) - env(safe-area-inset-top, 0px)); height: calc(100dvh - var(--top-h) - env(safe-area-inset-top, 0px)); overflow-y: auto; overscroll-behavior: contain; background: var(--rail); border-right: 1px solid var(--rule); padding: 22px 0 40px; }
.toc-progress { margin: 0 22px 18px; font-size: 14px; color: var(--ink-2); }
.toc-progress .bar { display: block; height: 3px; margin-top: 8px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.toc-progress .bar span { display: block; height: 100%; width: 0; background: var(--ok); }
.toc-part { margin: 22px 22px 6px; font-size: 14px; font-style: italic; color: var(--ink-3); }
.toc a { display: grid; grid-template-columns: 26px minmax(0, 1fr) 14px; gap: 6px; align-items: baseline; padding: 5px 22px 5px 19px; border-left: 3px solid transparent; color: var(--ink); text-decoration: none; font-size: 15.5px; line-height: 1.35; }
.toc a:hover { background: var(--gutter); color: var(--ink); }
.toc a .n { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 14px; }
.toc a .tick { color: var(--ok); font-size: 13px; }
.toc a[aria-current="page"] { border-left-color: var(--blue); background: var(--paper); font-weight: 600; }
.toc a.toc-play { margin-top: 18px; }
.toc-actions, .toc-head { display: none; }

main { min-width: 0; padding: 44px var(--pad-x) 72px; }
#main:focus { outline: none; }
.page { max-width: 1040px; margin: 0 auto; }

/* ---------------------------------------------------------------- type */
.crumb { font-size: 15px; color: var(--ink-3); margin: 0 0 10px; }
.crumb a { color: var(--ink-2); }
.page-title { font-size: clamp(34px, 3.2vw + 16px, 54px); line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 28px; max-width: 18ch; text-wrap: balance; }
.prose { font-size: 18.5px; line-height: 1.68; max-width: 66ch; }
.prose p { margin: 0 0 1.05em; }
.prose ul { margin: 0 0 1.2em; padding-left: 1.25em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--ink-3); }
.prose h3 { font-size: 22px; line-height: 1.3; margin: 1.7em 0 .5em; }
.section-title { font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; margin: 64px 0 8px; }
.section-sub { margin: 0 0 30px; color: var(--ink-2); font-size: 16px; max-width: 60ch; }

/* ---------------------------------------------------------------- code: listings and editor */
.syntax { margin: 0; padding: 16px 20px; background: var(--well); border: 1px solid var(--rule); border-radius: 8px; font-size: 14.5px; line-height: 1.65; white-space: pre; overflow-x: auto; max-width: 700px; }
.tok-kw { color: var(--hl-kw); font-weight: 600; }
.tok-str { color: var(--hl-str); }
.tok-num { color: var(--hl-num); }
.tok-fn { color: var(--hl-fn); }
.tok-com { color: var(--hl-com); font-style: italic; }

.listing { border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--paper); overflow: hidden; min-width: 0; }
.code { display: grid; grid-template-columns: auto minmax(0, 1fr); background: var(--well); font-size: 14.5px; line-height: 24px; }
.gutter { margin: 0; padding: 14px 10px 14px 14px; min-width: 42px; text-align: right; color: var(--ink-3); background: var(--gutter); border-right: 1px solid var(--rule); user-select: none; -webkit-user-select: none; white-space: pre; font-family: var(--mono); font-size: 12.5px; line-height: inherit; font-variant-numeric: tabular-nums; }
.scroller { overflow-x: auto; min-width: 0; }
.editor-inner { display: grid; width: max-content; min-width: 100%; }
.editor-inner > textarea, .editor-inner > pre, .static-code { grid-area: 1 / 1; margin: 0; border: 0; padding: 14px 18px; font-family: var(--mono); font-size: inherit; line-height: inherit; white-space: pre; tab-size: 2; letter-spacing: 0; color: var(--ink); background: transparent; min-height: 56px; }
.editor-inner > pre { pointer-events: none; overflow: hidden; }
.editor-inner > textarea { color: transparent; caret-color: var(--ink); resize: none; outline: none; overflow: hidden; min-width: 100%; -webkit-text-fill-color: transparent; }
.editor-inner > textarea::selection { background: rgba(36, 91, 142, .22); }
.listing:focus-within { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--rule); background: var(--paper); }
.toolbar .keys { margin-left: auto; font-size: 14px; color: var(--ink-3); }

/* psql transcript */
.out { border-top: 1px solid var(--rule); padding: 14px 18px 16px; font-family: var(--mono); font-size: 13.5px; line-height: 1.55; color: var(--ink); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.out > * { min-width: 0; }
.out:empty { display: none; }
.out .wait { color: var(--ink-3); font-family: var(--serif); font-size: 15px; }
.out .tag { white-space: pre-wrap; color: var(--ink-2); }
.out .notice { white-space: pre-wrap; color: var(--warn); }
.out .err { white-space: pre-wrap; color: var(--bad); margin: 0; font: inherit; overflow-x: auto; }
.out .err.pre { white-space: pre; }
.out .saved { font-family: var(--serif); font-size: 15px; color: var(--warn); background: var(--warn-wash); padding: 6px 10px; border-radius: 4px; }
.psql-wrap { overflow: auto; max-height: 460px; min-width: 0; }
table.psql { border-collapse: collapse; font: inherit; white-space: pre; }
table.psql th { font-weight: 600; text-align: center; padding: 0 12px 2px; border-bottom: 1px solid var(--rule-strong); position: sticky; top: 0; background: var(--paper); }
table.psql td { padding: 1px 12px; vertical-align: top; max-width: 560px; overflow: hidden; text-overflow: ellipsis; }
table.psql th + th, table.psql td + td { border-left: 1px solid var(--rule-strong); }
table.psql th:first-child, table.psql td:first-child { padding-left: 2px; }
table.psql td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.psql .null { color: var(--ink-3); }
.psql-foot { color: var(--ink-2); margin-top: 4px; }

/* ---------------------------------------------------------------- examples */
.example { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 40px; margin: 0 0 52px; }
.example-head { margin: 0; font-size: 20px; line-height: 1.35; }
.example-head .n { color: var(--ink-3); font-weight: 400; margin-right: 10px; font-variant-numeric: tabular-nums; }
.note { font-size: 16.5px; line-height: 1.62; color: var(--ink-2); max-width: 66ch; }
.note p { margin: 0 0 .6em; }
.note p:last-child { margin-bottom: 0; }
.note ul { margin: 0; padding-left: 1.15em; }
.note li { margin: .3em 0; }
.note code { color: var(--ink); }

/* ---------------------------------------------------------------- exercises */
.exercise { background: var(--rail); border-radius: 12px; padding: 24px 24px 22px; margin: 0 0 24px; max-width: 760px; }
.exercise-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 6px; font-size: 18px; }
.exercise-head .state { margin-left: auto; font-size: 15px; font-weight: 600; color: var(--ok); display: none; }
.exercise.solved .exercise-head .state { display: inline; }
.exercise .task { font-size: 18px; line-height: 1.6; margin: 0 0 16px; max-width: 62ch; }
.verdict { font-family: var(--serif); font-size: 16px; padding: 10px 14px; border-radius: 6px; overflow-wrap: anywhere; }
.verdict b { display: block; font-size: 17px; }
.verdict.ok { background: var(--ok-wash); color: var(--ok); }
.verdict.no { background: var(--bad-wash); color: var(--bad); }
.verdict span { color: var(--ink-2); }
.out .label { font-family: var(--serif); color: var(--ink-3); font-size: 15px; margin-bottom: -8px; }
.reveal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
.reveal:empty { display: none; }
.hint { font-size: 16.5px; background: var(--paper); border-left: 3px solid var(--blue); padding: 10px 14px; border-radius: 0 6px 6px 0; }
.solution { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.solution .listing { border-color: var(--rule); }
.static-reveal { margin-top: 10px; }
.static-reveal summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.static-reveal > p, .static-reveal > .listing { margin: 10px 0 0; }

/* ---------------------------------------------------------------- lesson footer */
.lesson-foot { margin-top: 72px; padding-top: 26px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; max-width: 760px; }
.lesson-foot .done-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--ink-2); font-size: 16px; margin-bottom: 8px; }
.done-toggle[aria-pressed="true"] { background: var(--ok-wash); border-color: var(--ok); color: var(--ok); }
.pn { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 8px; color: var(--ink); text-decoration: none; min-width: 0; }
.pn:hover { border-color: var(--blue); color: var(--ink); }
.pn small { font-size: 14px; color: var(--ink-3); }
.pn b { font-size: 17px; line-height: 1.35; color: var(--blue); }
.pn.next { text-align: right; grid-column: 2; }

/* ---------------------------------------------------------------- home */
.hero { max-width: 1040px; margin: 0 auto 72px; }
.hero h1 { font-size: clamp(42px, 6.2vw + 8px, 100px); line-height: .98; letter-spacing: -0.035em; font-weight: 700; margin: 4px 0 26px; }
.hero h1 span { display: block; }
.hero .lede { font-size: clamp(19px, .6vw + 15px, 22px); line-height: 1.55; color: var(--ink-2); max-width: 46ch; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 56px; }
.hero-actions .btn { min-height: 46px; padding: 10px 20px; font-size: 16px; }
.contents { border-top: 2px solid var(--ink); padding-top: 16px; }
.contents-cmd { font-family: var(--mono); font-size: 14.5px; margin: 0 0 14px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.contents-cmd .prompt { color: var(--ink-3); }
.contents .psql-wrap { max-height: none; }
.contents table.psql { font-family: var(--mono); font-size: 14.5px; line-height: 1.8; }
.contents table.psql td a { text-decoration: none; }
.contents table.psql td a:hover { text-decoration: underline; }
.contents table.psql td .tick { color: var(--ok); }
.contents .psql-foot { font-family: var(--mono); font-size: 14.5px; }
.contents-note { font-size: 15.5px; color: var(--ink-3); margin: 16px 0 0; max-width: 62ch; }
.faq { max-width: 700px; }
.faq-item { padding: 18px 0; border-top: 1px solid var(--rule); }
.faq-item h3 { margin: 0 0 6px; font-size: 19px; line-height: 1.4; }
.faq-item p { margin: 0; color: var(--ink-2); font-size: 17px; }

/* ---------------------------------------------------------------- playground */
.play { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 36px; align-items: start; }
.play .code { min-height: 240px; }
.play-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; position: sticky; top: calc(var(--top-h) + 24px); min-width: 0; }
.play-side > section { min-width: 0; }
.play > .listing { min-width: 0; }
.play-side h2 { font-size: 17px; margin: 0 0 8px; }
.pick { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--rule); background: none; padding: 9px 2px; cursor: pointer; color: var(--blue); font-size: 15.5px; line-height: 1.35; }
.pick:hover { color: var(--blue-hover); text-decoration: underline; }
.pick.mono { font-family: var(--mono); font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.empty { font-size: 15px; color: var(--ink-3); margin: 0; }
.lead { font-size: 18.5px; line-height: 1.6; color: var(--ink-2); max-width: 62ch; margin: 0 0 28px; }

/* ---------------------------------------------------------------- tables sheet */
.sheet { position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--paper); border-left: 1px solid var(--rule-strong); display: flex; flex-direction: column; transform: translateX(102%); transition: transform .22s ease, visibility 0s .22s; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); visibility: hidden; }
.sheet.open { transform: none; visibility: visible; transition: transform .22s ease; }
.sheet-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px 10px 22px; border-bottom: 1px solid var(--rule); }
.sheet-head h2 { margin: 0 auto 0 0; font-size: 19px; }
.sheet-body { overflow-y: auto; padding: 6px 22px 32px; }
.tbl { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.tbl-head { display: flex; align-items: baseline; gap: 10px; }
.tbl-head b { font-family: var(--mono); font-size: 15px; }
.tbl-head em { font-size: 14px; color: var(--ink-3); }
.tbl-head .btn { margin-left: auto; min-height: 30px; padding: 2px 10px; font-size: 14px; }
.tbl p { margin: 4px 0 8px; font-size: 15px; color: var(--ink-2); }
.cols { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 13px; }
.cols li { display: flex; gap: 8px; padding: 3px 0; }
.cols .ty { margin-left: auto; color: var(--ink-3); }
.cols .key { font-family: var(--serif); font-size: 12.5px; font-style: italic; color: var(--blue); }
.scrim { position: fixed; inset: 0; z-index: 35; background: rgba(20, 26, 34, .4); opacity: 0; pointer-events: none; transition: opacity .22s; }
.scrim.show { opacity: 1; pointer-events: auto; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 6px; font-size: 15px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- footer */
.site-foot { max-width: 1040px; margin: 96px auto 0; padding-top: 22px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--ink-3); }
.site-foot p { margin: 0 0 8px; max-width: 70ch; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; }
.site-foot a { color: var(--ink-2); }
.noscript { background: var(--warn-wash); color: var(--warn); padding: 10px 14px; border-radius: 6px; margin: 0 0 24px; }

/* ---------------------------------------------------------------- wide screens: notes sit in the margin */
@media (min-width: 1320px) {
  .example { grid-template-columns: minmax(0, 1fr) 270px; }
  .example-head { grid-column: 1 / -1; }
  .example .listing { grid-column: 1; grid-row: 2; align-self: start; }
  .example .note { grid-column: 2; grid-row: 2; border-top: 2px solid var(--rule); padding-top: 12px; align-self: start; }
}

/* ---------------------------------------------------------------- tablet */
@media (max-width: 1100px) {
  :root { --toc-w: 250px; }
  .play { grid-template-columns: minmax(0, 1fr); }
  .play-side { position: static; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
}

/* ---------------------------------------------------------------- phones and small tablets */
@media (max-width: 900px) {
  :root { --top-h: 52px; }
  body { font-size: 16.5px; }
  .topbar { padding: 0 10px 0 4px; gap: 2px; }
  .menu-btn { display: inline-flex; }
  .brand { font-size: 18px; margin-left: 2px; }
  .hide-s { display: none !important; }
  .status { margin-right: 6px; }
  .status .label { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .toc { position: fixed; z-index: 38; top: 0; left: 0; bottom: 0; height: auto; width: min(340px, 88vw); transform: translateX(-102%); transition: transform .22s ease, visibility 0s .22s; padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); visibility: hidden; border-right: 1px solid var(--rule-strong); }
  .toc.open { transform: none; visibility: visible; transition: transform .22s ease; }
  .toc-head { display: flex; align-items: center; justify-content: space-between; margin: -6px 12px 10px 22px; font-size: 18px; }
  .toc-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 0 22px 22px; }
  .toc a { padding-top: 8px; padding-bottom: 8px; font-size: 16.5px; }
  main { padding-top: 28px; }
  .prose { font-size: 17.5px; }
  .section-title { font-size: 25px; margin-top: 52px; }
  .exercise { padding: 18px 16px; border-radius: 10px; }
  .toolbar .keys { display: none; }
  .play .code { min-height: 150px; }
}
@media (max-width: 600px) { .hide-xs { display: none !important; } }
@media (max-width: 560px) {
  :root { --pad-x: 16px; }
  .code { font-size: 13.5px; line-height: 22px; }
  .gutter { min-width: 32px; padding-left: 6px; padding-right: 8px; font-size: 11.5px; }
  .editor-inner > textarea, .editor-inner > pre, .static-code { padding: 12px 14px; }
  .out { padding: 12px 12px 14px; font-size: 12.5px; }
  .contents table.psql, .contents-cmd, .contents .psql-foot { font-size: 12.5px; }
  .contents table.psql .col-part { display: none; }
  .toolbar .btn { flex: 1 1 auto; }
  .lesson-foot { grid-template-columns: minmax(0, 1fr); }
  .pn.next { grid-column: 1; }
  .hero-actions .btn { flex: 1 1 100%; }
  .exercise { margin-inline: -6px; padding: 18px 12px; }
  .exercise .task { font-size: 17px; }
  .example-head { font-size: 19px; }
  .page-title { margin-bottom: 22px; }
}
@media (hover: none) { .toolbar .keys { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
