:root {
  color-scheme: light;
  --bg: #f3faf6;
  --card: #ffffff;
  --ink: #17312a;
  --ink-soft: #365149;
  --muted: #5b7169;
  --edge: #dcebe3;
  --edge-strong: #bed7ca;
  --green: #0d8a5f;
  --green-deep: #0a6b4a;
  --aqua: #d3f1e4;
  --aqua-soft: #e8f7ef;
  --slate: #1c2822;
  --slate-edge: #31413a;
  --slate-text: #d8e4dd;
  --gutter: #667b71;
  --str: #92cbaa;
  --num: #b9abe4;
  --com: #7e9288;
  --unit: #7fc4e8;
  --interp: #f0c978;
  --planned: #4d9ec8;
  --danger: #b9504e;
  --cta: #0d8a5f;
  --cta-hover: #0a6b4a;
  --on-cta: #fff;
  --header-bg: rgba(243, 250, 246, .92);
  --code-out-bg: #f7fcf9;
  --shadow: rgba(23, 49, 42, .1);
  --drop-end: #bce9d4;
  --badge-planned-bg: #e3f2fa;
  --badge-planned-fg: #276c8e;
  --sans: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --content: 70rem;
  --reading: 48rem;
  --radius: 18px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e241b;
  --card: #17352a;
  --ink: #e8f3ed;
  --ink-soft: #c5d6ce;
  --muted: #93a89e;
  --edge: #2c4a3e;
  --edge-strong: #3e6153;
  --green: #7ee8c0;
  --green-deep: #9af0d0;
  --aqua: #1e4337;
  --aqua-soft: #16382d;
  --slate: #07140f;
  --slate-edge: #1a3329;
  --slate-text: #d5e8dd;
  --gutter: #6e857b;
  --cta: #7ee8c0;
  --cta-hover: #9af0d0;
  --on-cta: #082018;
  --header-bg: rgba(14, 36, 27, .92);
  --code-out-bg: #123028;
  --shadow: rgba(3, 12, 8, .5);
  --drop-end: #1f4a3c;
  --badge-planned-bg: #173544;
  --badge-planned-fg: #8ecdee;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-deep); text-decoration-thickness: .07em; text-underline-offset: .18em; }
a:hover { color: var(--green); }
img { max-width: 100%; }
code, pre, kbd { font-family: var(--mono); }
:not(pre) > code { padding: .08em .35em; border-radius: 6px; background: var(--aqua); color: var(--green-deep); font-size: .86em; }
code.dewy-hl .ln {
  color: var(--gutter) !important;
  font-style: normal !important;
  font-weight: 400 !important;
  text-decoration: none !important;
}
a:focus-visible, button:focus-visible, .skip-link:focus { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: .5rem;
  left: .5rem;
  padding: .5rem .8rem;
  border-radius: 8px;
  background: var(--cta);
  color: var(--on-cta);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--edge);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-wrap, .page-wrap, .footer-wrap {
  width: min(var(--content), calc(100% - 3rem));
  margin-inline: auto;
}
.nav-wrap {
  min-height: 4.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 850;
  letter-spacing: -.025em;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand img { width: 28px; height: 28px; }
.nav-end { display: flex; align-items: center; gap: 1rem; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; font-size: .9rem; font-weight: 650; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links .nav-cta {
  padding: .5rem 1.1rem;
  border-radius: 999px;
  background: var(--cta);
  color: var(--on-cta);
}
.nav-links .nav-cta:hover { background: var(--cta-hover); color: var(--on-cta); }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  min-height: 2.4rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: 600 1.2rem/1 var(--sans);
}
.theme-toggle::after { content: "☀"; }
[data-theme="dark"] .theme-toggle::after { content: "☾"; }
.theme-toggle:hover { color: var(--green-deep); }
.nav-toggle {
  display: none;
  padding: .45rem .8rem;
  border: 1px solid var(--edge-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: 700 .82rem var(--sans);
}

/* The home page's one signature motion: the hero identity becomes the header identity. */
.home-page .site-header { border-bottom-color: transparent; transition: border-color .25s ease; }
.home-page .site-header.show-brand { border-bottom-color: var(--edge); }
.home-page .site-header.brand-watch .brand { opacity: 0; transform: translateY(6px); pointer-events: none; }
.home-page .site-header.brand-ready .brand { transition: opacity .3s ease, transform .3s ease; }
.home-page .site-header.brand-watch.show-brand .brand { opacity: 1; transform: none; pointer-events: auto; }

/* Home */
.home-hero {
  position: relative;
  width: min(var(--content), calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(2.4rem, 5.5vw, 4.5rem) 0 clamp(2.8rem, 6vw, 4.5rem);
  text-align: center;
}
.drop {
  position: absolute;
  z-index: -1;
  border-radius: 46% 54% 52% 48% / 58% 44% 56% 42%;
  background: linear-gradient(160deg, var(--aqua), var(--drop-end));
  opacity: .8;
}
.drop-a { top: 1rem; left: 4%; width: 7.5rem; height: 7.5rem; }
.drop-b { top: 9rem; right: 7%; width: 4.5rem; height: 4.5rem; }
.drop-c { top: 3rem; right: 22%; width: 2.4rem; height: 2.4rem; }
.hero-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(.8rem, 2vw, 1.2rem);
  margin: 0 auto 1.8rem;
  transform: translateX(-.45rem);
}
.hero-brand img { width: clamp(3.4rem, 8vw, 5rem); height: auto; }
.hero-brand span { font-size: clamp(3rem, 8vw, 4.8rem); font-weight: 850; letter-spacing: -.045em; line-height: 1; }
.home-hero h1 {
  max-width: 22ch;
  margin: 0 auto;
  color: var(--green-deep);
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.1;
}
.lead { max-width: 42rem; margin: 1.5rem auto 0; color: var(--muted); font-size: clamp(1.02rem, 2vw, 1.18rem); }
.dewline {
  display: flex;
  align-items: center;
  gap: .8rem;
  max-width: 42rem;
  margin: 2.4rem auto 0;
  padding: .78rem .8rem .78rem 1.15rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 16px 40px var(--shadow);
  text-align: left;
}
.prompt {
  flex: none;
  color: var(--green);
  font: 650 .9rem/1 var(--mono);
  user-select: none;
}
.dewline code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  color: var(--ink);
  padding: 0;
  border-radius: 0;
  background: transparent;
  font: .78rem/1.5 var(--mono);
  scrollbar-width: thin;
  transition: background-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.dewline:has(.copy.copied) code {
  border-radius: 4px;
  background: var(--aqua);
  box-shadow: 0 0 0 3px var(--aqua);
}
.copy, .copy-button {
  flex: none;
  padding: .48rem 1.05rem;
  border: 0;
  border-radius: 999px;
  background: var(--cta);
  color: var(--on-cta);
  cursor: pointer;
  font: 750 .8rem var(--sans);
  transition: background .15s ease, transform .15s ease;
}
.copy:hover, .copy-button:hover, .copy.copied, .copy-button.copied { background: var(--cta-hover); color: var(--on-cta); }
.copy.copied, .copy-button.copied { transform: scale(1.03); }
.copy.copy-failed, .copy-button.copy-failed { background: var(--danger); }
.dewline-note { margin: .9rem auto 0; color: var(--muted); font-size: .87rem; }
[data-theme="dark"] .dewline { border-color: var(--green); }
.hero-code {
  max-width: 32rem;
  margin: 2.6rem auto 0;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 44px var(--shadow);
  text-align: left;
}
.code-top { display: flex; justify-content: space-between; padding: .7rem 1.2rem; border-bottom: 1px solid var(--edge); color: var(--muted); font: .74rem var(--mono); }
.runs { color: var(--green); font-weight: 650; }
.hero-code-body { display: grid; grid-template-columns: 20rem minmax(10rem, 1fr); }
.hero-code .hero-source { margin: 0; padding: 1.05rem 1.15rem; overflow-x: auto; background: var(--slate); color: var(--slate-text); font: .85rem/1.8 var(--mono); }
.hero-code b, .code-pane b { font-weight: 400; }
.hero-code .s { color: var(--str); }
.hero-code .n { color: var(--num); }
.hero-code .u { color: var(--unit); }
.hero-code .interp-brace { color: var(--slate-text); }
.code-out { display: flex; flex-direction: column; gap: .6rem; min-width: 0; padding: 1.05rem 1.15rem; border-left: 1px solid var(--edge); background: var(--code-out-bg); color: var(--green-deep); }
.code-out .output-label { color: var(--muted); font: 750 .62rem var(--sans); letter-spacing: .07em; text-transform: uppercase; }
.code-out .output-lines { margin: 0; padding: 0; overflow-x: auto; background: transparent; color: var(--green-deep); font: .8rem/1.8 var(--mono); white-space: pre; }
.code-out code { padding: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; }
.caveat { max-width: 38rem; margin: 2.4rem auto 0; color: var(--muted); font-size: .87rem; }

.showcase { margin-top: clamp(1.5rem, 4vw, 3rem); }
.showcase-intro { width: min(var(--content), calc(100% - 3rem)); margin: 0 auto; padding: 0 0 2.2rem; text-align: center; }
.showcase-intro h2 { margin: 0; font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; letter-spacing: -.035em; }
.showcase-intro p { max-width: 38rem; margin: .6rem auto 0; color: var(--muted); font-size: .95rem; }
.showcase-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--slate-edge); }
.showcase-row:last-of-type { border-bottom: 1px solid var(--slate-edge); }
.showcase-pane { min-width: 0; }
.code-pane { display: flex; flex-direction: column; justify-content: center; background: var(--slate); }
.pane-top { display: flex; justify-content: space-between; align-items: center; padding: .8rem clamp(1.3rem, 4vw, 3rem) 0; color: var(--gutter); font: .74rem var(--mono); }
.tag { padding: .12rem .7rem; border-radius: 999px; font: 650 .7rem var(--sans); letter-spacing: .02em; }
.tag.implemented { background: rgba(146, 203, 170, .16); color: var(--str); }
.tag.partial {
  background: #f0c978;
  color: #34270c;
  box-shadow: inset 0 0 0 1px rgba(52, 39, 12, .12);
}
.tag.planned { background: rgba(127, 196, 232, .13); color: var(--unit); }
.code-pane pre {
  margin: 0;
  padding: clamp(1.2rem, 3vw, 2.2rem) clamp(1.3rem, 4vw, 3rem) clamp(1.7rem, 4vw, 2.8rem);
  overflow-x: auto;
  background: transparent;
  color: var(--slate-text);
  font: .84rem/1.95 var(--mono);
}
.next-row .code-pane pre { padding-top: clamp(1.7rem, 4vw, 2.8rem); }
.ln { display: inline-block; min-width: 1.7em; margin-right: 1.2em; color: var(--gutter); text-align: right; user-select: none; }
.code-pane .s { color: var(--str); }
.code-pane .n { color: var(--num); }
.code-pane .c { color: var(--com); font-style: italic; }
.code-pane .u { color: var(--unit); }
.code-pane .interp, .hero-code .interp { color: var(--interp); font-style: normal; }
.code-pane .interp-brace, .hero-code .interp-brace { color: var(--slate-text); }
.u-declaration, .u-meta, .u-numeric_prefix { color: #8ec8ff; }
.u-keyword { color: #d4a8e8; }
.u-function { color: var(--interp); }
.u-type { color: #7ee0c0; }
.u-string { color: var(--str); }
.u-number { color: var(--num); }
.u-comment { color: var(--com); font-style: italic; }
.u-punctuation { color: #9bb8c0; }
.u-brace { color: var(--interp); }
.u-identifier { color: var(--slate-text); }
.u-operator { color: #c5d4d8; }
.prose-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 3.8rem) clamp(1.5rem, 4vw, 3.5rem);
  background: var(--card);
}
.showcase-row:nth-of-type(even) .prose-pane { background: var(--bg); }
.chip { align-self: start; display: inline-block; padding: .18rem .75rem; border-radius: 999px; background: var(--aqua); color: var(--green-deep); font-size: .72rem; font-weight: 750; letter-spacing: .03em; }
.prose-pane h2 { margin: .9rem 0 .6rem; font-size: clamp(1.3rem, 2.6vw, 1.65rem); font-weight: 800; letter-spacing: -.03em; }
.prose-pane p { max-width: 32rem; margin: 0; color: var(--muted); font-size: .95rem; }
.next-list { max-width: 32rem; margin: 0; padding: 0; list-style: none; }
.next-list li { padding: .55rem 0; border-bottom: 1px dashed var(--edge); color: var(--muted); font-size: .93rem; }
.next-list li:last-child { border-bottom: 0; }
.next-list a { font-weight: 750; text-decoration: none; }
.next-list a:hover { text-decoration: underline; }
.next-row { border-bottom: 1px solid var(--slate-edge); }

html:has(.lost-page),
html:has(.lost-page) body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
.lost-page {
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
}
.lost-page::before,
.lost-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.lost-page::before {
  z-index: -2;
  inset: -1.5rem;
  background: url("../images/404-background.jpg") center / cover no-repeat;
  filter: blur(1px) saturate(.68) hue-rotate(24deg) brightness(.88) contrast(1.08);
}
.lost-page::after {
  z-index: -1;
  background: var(--green-deep);
  mix-blend-mode: multiply;
  opacity: .38;
}
[data-theme="dark"] .lost-page::before {
  filter: blur(1px) saturate(.7) hue-rotate(14deg) brightness(.62);
}
[data-theme="dark"] .lost-page::after {
  background: color-mix(in srgb, var(--bg) 48%, transparent);
  mix-blend-mode: normal;
  opacity: 1;
}
.lost-page .site-header {
  flex: none;
  position: relative;
}
.lost-main {
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 0;
  padding: 1.5rem 0;
  overflow: auto;
  overscroll-behavior: none;
}
.lost-card {
  width: min(var(--reading), calc(100% - 3rem));
  padding: clamp(2rem, 5vw, 3.2rem) clamp(1.4rem, 4vw, 2.6rem);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 44px var(--shadow);
}
.lost-card h1 {
  margin: 0;
  color: var(--green-deep);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 850;
  letter-spacing: -.045em;
  line-height: 1.05;
}
.lost-card p:not(.eyebrow) {
  max-width: 32rem;
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.15rem);
}
.lost-card .button:not(.primary) {
  border-color: var(--green);
  background: var(--aqua-soft);
  color: var(--green-deep);
}
.lost-card .button:not(.primary):hover {
  border-color: var(--green-deep);
  background: var(--aqua);
}
.lost-page .site-footer { display: none; }

/* Interior pages */
.page-hero { max-width: var(--reading); padding: clamp(4rem, 9vw, 7rem) 0 3.8rem; }
.eyebrow { margin: 0 0 .85rem; color: var(--green); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.page-hero h1 { margin: 0; color: var(--green-deep); font-size: clamp(2.7rem, 6vw, 5rem); font-weight: 850; letter-spacing: -.055em; line-height: .95; }
.page-hero p { max-width: 42rem; margin: 1.4rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.2rem); }
.section { padding: 2rem 0 5rem; }
.content-section { max-width: var(--reading); padding: 2.8rem 0; border-top: 1px solid var(--edge-strong); }
.content-section h2 { margin: 0 0 1rem; font-size: 1.35rem; font-weight: 800; letter-spacing: -.025em; }
.content-section h3 { margin: 2rem 0 .6rem; font-size: 1.08rem; }
.content-section p, .content-section li { color: var(--ink-soft); }
.content-section ul:not(.meta-list) { padding-left: 1.25rem; }
.content-section li + li { margin-top: .45rem; }
.content-section pre, .example-card pre {
  margin: 1.25rem 0;
  padding: 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--slate-edge);
  border-radius: 12px;
  background: var(--slate);
  color: var(--slate-text);
  font: .82rem/1.75 var(--mono);
}
.route-grid, .example-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.route-card, .example-card {
  min-width: 0;
  padding: 1.4rem;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 34px var(--shadow);
}
.route-card h2, .route-card h3, .example-card h2, .example-card h3 { margin: .8rem 0 .55rem; font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.route-card p, .example-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.example-card { display: flex; flex-direction: column; }
.example-card pre { width: 100%; }
.example-card .button-row { margin-top: auto; padding-top: 1.2rem; }
.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 1.5rem;
  padding: .12rem .6rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.badge .mu { text-transform: none; }
.badge.works { background: var(--aqua); color: var(--green-deep); }
.badge.planned { background: var(--badge-planned-bg); color: var(--badge-planned-fg); }
.button-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: .55rem 1rem;
  border: 1px solid var(--edge-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--green-deep);
  font-size: .82rem;
  font-weight: 750;
  text-decoration: none;
}
.button:hover { border-color: var(--green); background: var(--aqua-soft); color: var(--green-deep); }
.button.primary { border-color: var(--cta); background: var(--cta); color: var(--on-cta); }
.button.primary:hover { background: var(--cta-hover); color: var(--on-cta); }
.notice { padding: 1rem 1.1rem; border-left: 3px solid var(--green); border-radius: 0 12px 12px 0; background: var(--aqua-soft); color: var(--ink-soft); }
.notice strong { color: var(--ink); }
.install-box { max-width: 50rem; overflow: hidden; border: 1px solid var(--edge-strong); border-radius: var(--radius); background: var(--card); box-shadow: 0 12px 34px var(--shadow); }
.install-head { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--edge); color: var(--muted); font: .72rem var(--mono); }
.install-box pre { margin: 0; border: 0; border-radius: 0; }
.meta-list, .plain-list { margin: 1rem 0; padding: 0; list-style: none; }
.meta-list li { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px dashed var(--edge-strong); }
.meta-list strong { color: var(--ink); font-size: .82rem; }
.future-features { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px dashed var(--edge-strong); }
.future-features h3 { margin: 0 0 1rem; font-size: 1.1rem; }
.future-features ul { columns: 2; column-gap: 2.5rem; margin: 0; padding-left: 1.25rem; }
.future-features li { break-inside: avoid; margin: 0 0 .75rem; color: var(--ink-soft); }

.udewy-page {
  --bg: #eef7fa;
  --card: #ffffff;
  --ink: #16323a;
  --ink-soft: #2f4d56;
  --muted: #5b737b;
  --edge: #d4e6ec;
  --edge-strong: #b7d4de;
  --green: #2aa8c9;
  --green-deep: #157a94;
  --aqua: #cceaf2;
  --aqua-soft: #e4f3f7;
  --slate: #12262c;
  --slate-edge: #27454e;
  --slate-text: #d5e6eb;
  --gutter: #6a838c;
  --str: #7ee0f0;
  --num: #c4b4ee;
  --com: #7e969e;
  --unit: #7fc4e8;
  --interp: #f0c978;
  --cta: #157a94;
  --cta-hover: #0f6278;
  --on-cta: #fff;
  --header-bg: rgba(238, 247, 250, .92);
  --code-out-bg: #f5fbfd;
  --shadow: rgba(22, 50, 58, .1);
  --drop-end: #b7e4ef;
}

.udewy-page .hero-code {
  max-width: 38rem;
  margin-top: 4.2rem;
}
.udewy-page .home-hero {
  padding-bottom: clamp(3.6rem, 8vw, 6rem);
}
/* both home pages run their last example row straight into the footer */
.home-page .site-footer {
  margin-top: 0;
}
.home-page .showcase-row:last-of-type {
  border-bottom: 0;
}

html[data-site="udewy"][data-theme="dark"] .udewy-page,
html[data-site="udewy"][data-theme="dark"] {
  --bg: #0c1c22;
  --card: #143039;
  --ink: #e6f3f6;
  --ink-soft: #c5d8de;
  --muted: #8ea4ab;
  --edge: #27454e;
  --edge-strong: #3a5b66;
  --green: #7ee0f0;
  --green-deep: #8ee6f4;
  --aqua: #1a3d47;
  --aqua-soft: #12323a;
  --slate: #071216;
  --slate-edge: #1a3d47;
  --slate-text: #d5e8ed;
  --gutter: #6e858c;
  --cta: #7ee0f0;
  --cta-hover: #8ee6f4;
  --on-cta: #082026;
  --header-bg: rgba(12, 28, 34, .92);
  --code-out-bg: #102830;
  --shadow: rgba(4, 12, 16, .5);
  --drop-end: #1a3d47;
}

.showcase-stage {
  margin: 0 0 5rem;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 44px var(--shadow);
  overflow: hidden;
}
.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .75rem .85rem;
  border-bottom: 1px solid var(--edge);
  background: var(--aqua-soft);
}
.demo-tab {
  padding: .45rem .9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 750 .82rem var(--sans);
}
.demo-tab:hover { color: var(--ink); }
.demo-tab[aria-selected="true"] {
  border-color: var(--edge-strong);
  background: var(--card);
  color: var(--green-deep);
}
.demo-frame {
  position: relative;
  min-height: min(70vh, 44rem);
  background: var(--slate);
}
.demo-iframe {
  display: block;
  width: 100%;
  height: min(70vh, 44rem);
  border: 0;
  background: #000;
}
.demo-iframe:focus,
.demo-iframe:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: -3px;
}
.demo-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .6rem 1.2rem;
  margin: 0;
  padding: .9rem 1.15rem 1.05rem;
  color: var(--muted);
  font-size: .9rem;
}
.demo-meta a { font-weight: 750; }

.site-footer { margin-top: 4rem; border-top: 1px solid var(--edge-strong); background: var(--card); }
.footer-wrap { display: grid; grid-template-columns: 1fr auto; gap: 2rem; padding: 2.5rem 0 3.5rem; }
.footer-brand p { max-width: 30rem; margin: .65rem 0 0; color: var(--muted); font-size: .85rem; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(7rem, auto)); gap: .4rem 2rem; align-content: start; font-size: .8rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

@media (min-width: 721px) {
  .udewy-page .hero-code-body {
    grid-template-columns: minmax(0, 1fr) 12.5rem;
  }
}
@media (min-width: 881px) {
  .udewy-page .showcase-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

@media (max-width: 880px) {
  .showcase-row { grid-template-columns: 1fr; }
  .showcase-row .prose-pane { order: 1; }
  .showcase-row .code-pane { order: 2; }
  .code-pane pre { font-size: .78rem; }
  [data-theme="dark"] .prose-pane,
  [data-theme="dark"] .showcase-row:nth-of-type(even) .prose-pane { background: var(--bg); }
}

@media (max-width: 720px) {
  .site-header { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tag[id^="badge-"] { scroll-margin-top: 1.5rem; }
  .nav-wrap, .page-wrap, .footer-wrap { width: min(var(--content), calc(100% - 1.5rem)); }
  .nav-wrap { position: relative; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% - .2rem);
    right: 0;
    left: 0;
    z-index: 25;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem;
    border: 1px solid var(--edge-strong);
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 18px 42px var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .65rem .75rem; }
  .nav-links .nav-cta { margin-top: .25rem; text-align: center; }
  .home-page .site-header .brand {
    visibility: hidden;
    pointer-events: none;
  }
  .route-grid, .example-grid, .footer-wrap { grid-template-columns: 1fr !important; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .meta-list li { grid-template-columns: 1fr; gap: .15rem; }
  .future-features ul { columns: 1; }
  .hero-code-body { grid-template-columns: 1fr; }
  .code-out { border-top: 1px dashed var(--edge); border-left: 0; }
}

@media (max-width: 600px) {
  .home-hero, .showcase-intro { width: calc(100% - 1.5rem); }
  .hero-brand { transform: translateX(-.25rem); }
  .drop-b, .drop-c { display: none; }
  .dewline { flex-wrap: wrap; padding: .9rem 1.05rem; border-radius: 18px; }
  .dewline code { flex-basis: 100%; order: 3; }
  .prose-pane { padding-inline: 1.25rem; }
  .code-pane pre { padding-inline: .85rem; }
  .pane-top { padding-inline: .85rem; }
  .ln { margin-right: .65em; }
  .page-hero { padding-top: 3.5rem; }
  .lost-card { width: calc(100% - 1.5rem); }
  .footer-links { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
