/* ============================================================
   Portfolio showcase
   ============================================================ */

:root {
  --bg:        #08080a;
  --bg-raise:  #101014;
  --bg-card:   #131317;
  --line:      #24242b;
  --line-soft: #1b1b21;
  --fg:        #f4f4f6;
  --fg-mid:    #a3a3ad;
  --fg-dim:    #6e6e7a;
  --accent:    #ffffff;

  --radius:    16px;
  --radius-sm: 10px;

  --ease: cubic-bezier(.22, 1, .36, 1);

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Helvetica, Arial, sans-serif;
  --font-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;

  --page: 1440px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------- Nav ---------------- */

.nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 44px);
  background: rgba(8, 8, 10, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line-soft); }

.brand { display: inline-flex; align-items: center; gap: 10px; }

/* Sized by height so the 171x96 source keeps its aspect ratio.
   max-height guards against the intrinsic size ever showing through. */
.brand-logo {
  height: 30px;
  width: auto;
  display: block;
}

@media (max-width: 620px) {
  .brand-logo { height: 26px; }
}

.nav-links { display: flex; gap: 28px; }

.nav-links a {
  font-size: 14.5px; color: var(--fg-mid);
  transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--fg); }

/* ---------------- Hero ---------------- */

.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(64px, 12vh, 130px) clamp(20px, 4vw, 44px) clamp(48px, 8vh, 84px);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--fg-mid);
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 100px;
  margin-bottom: 30px;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 7.4vw, 86px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 600;
}

.hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.02em;
}

.hero-sub {
  max-width: 33em;
  margin: 0 auto 36px;
  color: var(--fg-mid);
  font-size: clamp(15px, 1.6vw, 17.5px);
}

.hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--fg); color: #0a0a0c;
  font-weight: 600; font-size: 15.5px;
  padding: 15px 30px;
  border-radius: 100px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(255, 255, 255, .14);
}
.hero-cta span { transition: transform .25s var(--ease); }
.hero-cta:hover span { transform: translateX(4px); }

/* ---------------- Filters ---------------- */

.work {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 44px) clamp(70px, 10vh, 120px);
}

.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}

.filter {
  appearance: none;
  font: inherit; font-size: 14px;
  color: var(--fg-mid);
  background: var(--bg-raise);
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  padding: 9px 19px;
  cursor: pointer;
  transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.filter:hover { color: var(--fg); border-color: var(--line); }
.filter.is-active {
  background: var(--fg); color: #0a0a0c;
  border-color: var(--fg); font-weight: 600;
}

/* ---------------- Grid ---------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: clamp(18px, 2.2vw, 30px);
}

/* Even three-up layout on wide screens — uniform 16:9 cards tile cleanly. */
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  position: relative;
  border: 0; padding: 0; margin: 0;
  background: transparent;
  text-align: left;
  font: inherit; color: inherit;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 14px;
  opacity: 0;
  transform: translateY(18px);
  animation: card-in .6s var(--ease) forwards;
}

@keyframes card-in { to { opacity: 1; transform: none; } }

.card.is-hidden { display: none; }

.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  transition: transform .45s var(--ease), border-color .35s var(--ease), box-shadow .45s var(--ease);
}

.card:hover .card-media,
.card:focus-visible .card-media {
  transform: translateY(-5px);
  border-color: var(--line);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .55);
}

.card:focus-visible { outline: none; }
.card:focus-visible .card-media { outline: 2px solid #7d7dff; outline-offset: 3px; }

.card-media video,
.card-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.card-media video {
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.card-media video.is-ready { opacity: 1; }

.card-badge {
  position: absolute; left: 12px; top: 12px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 100px;
  background: rgba(10, 10, 12, .6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
}

.card-foot {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px;
  padding: 0 2px;
}

.card-title {
  margin: 0;
  font-size: 17px; font-weight: 600;
  letter-spacing: -.015em;
}

.card-cat { margin: 2px 0 0; font-size: 13.5px; color: var(--fg-dim); }

.card-likes {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--fg-dim);
  flex-shrink: 0;
}
.card-likes svg { width: 14px; height: 14px; }
.card-likes svg path {
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linejoin: round;
}
.card-likes.is-liked { color: #ff5a7a; }
.card-likes.is-liked svg path { fill: #ff5a7a; stroke: #ff5a7a; }

/* ---------------- Footer ---------------- */

.footer {
  border-top: 1px solid var(--line-soft);
  padding: clamp(56px, 9vh, 96px) clamp(20px, 4vw, 44px);
}
.footer-inner { max-width: var(--page); margin: 0 auto; text-align: center; }
.footer-lead {
  margin: 0 0 12px;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 600; letter-spacing: -.03em;
}
.footer-mail {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--fg-mid);
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.footer-mail:hover { color: var(--fg); border-color: var(--fg); }
.footer-meta { margin: 40px 0 0; font-size: 13px; color: var(--fg-dim); }

/* ============================================================
   Modal
   ============================================================ */

.modal { position: fixed; inset: 0; z-index: 100; }
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 4, 6, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.modal.is-open .modal-backdrop { opacity: 1; }

.modal-panel {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(1180px, calc(100vw - 40px));
  height: fit-content;
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.modal.is-open .modal-panel { opacity: 1; transform: none; }

.modal-video {
  position: relative;
  background: #000;
  min-height: 0;
  display: flex;
}
.modal-video video {
  width: 100%;
  max-height: calc(100vh - 48px);
  object-fit: contain;
  display: block;
}

.modal-close {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(16, 16, 20, .72);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.modal-close:hover { background: rgba(40, 40, 48, .9); transform: scale(1.06); }
.modal-close svg {
  width: 16px; height: 16px;
  fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round;
}

.modal-info {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 28px;
  padding: 30px 26px;
  border-left: 1px solid var(--line-soft);
  overflow-y: auto;
}

.modal-cat {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 10px;
}

.modal-info h2 {
  margin: 0 0 14px;
  font-size: 27px; font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.15;
}

.modal-blurb {
  margin: 0;
  font-size: 14.5px;
  color: var(--fg-mid);
}

.modal-info-bottom { display: flex; flex-direction: column; gap: 12px; }

/* Like button */
.like-btn {
  display: inline-flex; align-items: center; gap: 9px;
  align-self: flex-start;
  font: inherit; font-size: 14.5px; font-weight: 500;
  color: var(--fg-mid);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  padding: 9px 17px;
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.like-btn:hover { color: var(--fg); border-color: var(--line); }
.like-btn .heart {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round;
  transition: transform .3s var(--ease);
}
.like-btn[aria-pressed="true"] { color: #ff5a7a; border-color: rgba(255, 90, 122, .4); }
.like-btn[aria-pressed="true"] .heart { fill: #ff5a7a; stroke: #ff5a7a; }
.like-btn.is-bumping .heart { animation: heart-pop .42s var(--ease); }

@keyframes heart-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.32); }
  60%  { transform: scale(.92); }
  100% { transform: scale(1); }
}

/* Prompt button */
.prompt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--fg); color: #0a0a0c;
  font-weight: 600; font-size: 14.5px;
  padding: 13px 20px;
  border-radius: 100px;
  border: 1px solid var(--fg);
  cursor: pointer;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), opacity .2s var(--ease);
}
.prompt-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255, 255, 255, .13); }
.prompt-btn svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Secondary CTA — live demo. Outlined so it sits below the prompt button. */
.live-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: transparent;
  color: var(--fg);
  font-weight: 600; font-size: 14.5px;
  padding: 12px 20px;
  border-radius: 100px;
  border: 1px solid var(--line);
  transition: border-color .22s var(--ease), background .22s var(--ease), transform .22s var(--ease);
}
.live-btn:hover {
  background: var(--bg-card);
  border-color: var(--fg-dim);
  transform: translateY(-2px);
}
.live-btn[hidden] { display: none; }

/* When there's no prompt link yet, the live demo is the only real CTA —
   give it the solid treatment so the disabled button isn't the loudest thing. */
.live-btn.is-primary {
  background: var(--fg);
  color: #0a0a0c;
  border-color: var(--fg);
}
.live-btn.is-primary:hover {
  background: #fff;
  box-shadow: 0 10px 26px rgba(255, 255, 255, .13);
}
.live-btn svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Disabled state — no artifact URL yet */
.prompt-btn.is-disabled {
  background: var(--bg-card);
  color: var(--fg-dim);
  border-color: var(--line-soft);
  pointer-events: none;
}

.prompt-note { margin: 0; font-size: 12.5px; color: var(--fg-dim); text-align: center; }

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .modal-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    top: 0; bottom: 0;
    height: auto;
    max-height: calc(100vh - 24px);
    width: calc(100vw - 24px);
  }
  .modal-video video { max-height: 46vh; }
  .modal-info { border-left: 0; border-top: 1px solid var(--line-soft); padding: 22px 20px; }
  .modal-info h2 { font-size: 23px; }
}

@media (max-width: 620px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 13.5px; }
  .grid { grid-template-columns: 1fr; }
  .filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex-shrink: 0; }
}

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

/* ============================================================
   Pricing page
   ============================================================ */

.price-hero {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(56px, 10vh, 104px) clamp(20px, 4vw, 44px) clamp(36px, 6vh, 60px);
  text-align: center;
}

.price-hero h1 {
  margin: 0 0 22px;
  font-size: clamp(38px, 6.4vw, 74px);
  line-height: 1.03;
  letter-spacing: -.035em;
  font-weight: 600;
}

.price-hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.02em;
}

.plans {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 44px) clamp(70px, 10vh, 120px);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(18px, 2.4vw, 26px);
  align-items: start;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 34px);
}

/* Featured plan gets a subtle lift, not a different language. */
.plan.is-featured {
  border-color: var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

.plan-head { display: flex; flex-direction: column; gap: 7px; }

.plan-name {
  margin: 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 20px; font-weight: 600; letter-spacing: -.02em;
}

.plan-badge {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 100px;
  color: #0a0a0c;
  background: linear-gradient(100deg, #f0a878 0%, #a9a2ff 55%, #7ad3ef 100%);
}

.plan-sub { margin: 0; font-size: 14.5px; color: var(--fg-mid); }

.plan-rule {
  margin: 0;
  border: 0;
  border-top: 1px dashed var(--line);
}

.plan-price { display: flex; flex-direction: column; gap: 6px; }

.price-was {
  margin: 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 15px;
}
.price-was s { color: var(--fg-dim); text-decoration-thickness: 2px; }

.price-tag {
  font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: #f0a878;
  border: 1px solid rgba(240, 168, 120, .35);
  border-radius: 100px;
  padding: 3px 9px;
}

.price-now {
  font-size: clamp(38px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.05;
}

.price-note { margin: 0; font-size: 14px; color: var(--fg-mid); }

.plan-btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-align: center;
  background: var(--fg); color: #0a0a0c;
  font-weight: 600; font-size: 15px;
  padding: 14px 22px;
  border-radius: 100px;
  border: 1px solid var(--fg);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.plan-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255, 255, 255, .13); }

.plan-btn.is-primary {
  color: #0a0a0c;
  border-color: transparent;
  background: linear-gradient(100deg, #f0a878 0%, #a9a2ff 55%, #7ad3ef 100%);
}
.plan-btn.is-primary:hover { box-shadow: 0 12px 30px rgba(169, 162, 255, .28); }

/* Shown while no checkout URL is wired up. */
.plan-btn.is-pending { position: relative; }
.plan-btn.is-pending::after {
  content: 'Checkout coming soon';
  position: absolute; left: 50%; top: calc(100% + 9px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12.5px; font-weight: 500;
  color: var(--fg-mid);
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 13px;
}

.plan-features {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 12px;
  font-size: 14.5px;
  color: var(--fg-mid);
}

.plan-features li {
  position: relative;
  padding-left: 26px;
}

/* Check mark drawn in CSS so the page pulls no extra assets. */
.plan-features li::before {
  content: '';
  position: absolute; left: 3px; top: 7px;
  width: 11px; height: 6px;
  border-left: 1.8px solid var(--fg);
  border-bottom: 1.8px solid var(--fg);
  transform: rotate(-45deg);
}

.plan-features strong { color: var(--fg); font-weight: 600; }

.plan-foot {
  margin: clamp(32px, 5vh, 48px) 0 0;
  text-align: center;
  font-size: 14.5px;
  color: var(--fg-mid);
}
.plan-foot a { color: var(--fg); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.plan-foot a:hover { border-color: var(--fg); }

@media (max-width: 620px) {
  .plan-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Contact form
   ============================================================ */

.contact {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 44px) clamp(70px, 10vh, 120px);
}

.contact-head { text-align: center; margin-bottom: clamp(32px, 5vh, 48px); }

.contact-head h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.contact-head p {
  margin: 0;
  color: var(--fg-mid);
  font-size: clamp(15px, 1.6vw, 17px);
}

.contact-form { display: flex; flex-direction: column; gap: 22px; }

.field { display: flex; flex-direction: column; gap: 9px; }

.field label {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--fg);
}

/* Underline inputs rather than filled pills — quieter, and it lets the
   focus state carry the emphasis. */
.field input,
.field textarea {
  font: inherit;
  font-size: 15.5px;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 11px 2px;
  width: 100%;
  transition: border-color .25s var(--ease);
}

.field textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.field input::placeholder,
.field textarea::placeholder { color: var(--fg-dim); }

.field input:hover,
.field textarea:hover { border-bottom-color: var(--fg-dim); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--fg);
}

/* Invalid only after a submit attempt, never while the user is still typing. */
.field.is-invalid input,
.field.is-invalid textarea { border-bottom-color: #ff5a7a; }

.field-error {
  margin: 0;
  font-size: 12.5px;
  color: #ff5a7a;
}
.field-error[hidden] { display: none; }

.contact-submit {
  appearance: none;
  font: inherit;
  font-weight: 600;
  font-size: 15.5px;
  color: #0a0a0c;
  background: var(--fg);
  border: 1px solid var(--fg);
  border-radius: 100px;
  padding: 15px 30px;
  margin-top: 6px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), opacity .2s var(--ease);
}
.contact-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 255, 255, .13);
}
.contact-submit:disabled {
  opacity: .55;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.contact-status {
  margin: 0;
  font-size: 14px;
  color: var(--fg-mid);
  min-height: 1.4em;
}
.contact-status.is-error { color: #ff5a7a; }


/* Homepage footer carries only the copyright line now that the contact form
   holds the CTA — pull the padding in so it doesn't read as an empty band. */
.footer.is-slim {
  padding-top: clamp(28px, 4vh, 44px);
  padding-bottom: clamp(28px, 4vh, 44px);
}
.footer.is-slim .footer-meta { margin: 0; }

/* Honeypot — visually gone but still fillable by bots. Not display:none,
   since some bots skip those; this keeps it off-screen instead. */
.cf-botcheck {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   Build-notes viewer (prompt.html)
   ============================================================ */

.doc-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 32px) 96px;
}

.doc-back {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--fg-dim);
  font-size: 14px;
  padding: 6px 0;
  transition: color .2s var(--ease);
}
.doc-back:hover { color: var(--fg); }

.doc-head {
  padding: 18px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.doc-eyebrow {
  margin: 0 0 10px;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--fg-dim);
}

.doc-title {
  margin: 0 0 14px;
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.1;
  letter-spacing: -.02em;
}

.doc-lede {
  margin: 0 0 26px;
  max-width: 60ch;
  color: var(--fg-mid);
}

.doc-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* The two buttons reuse .prompt-btn / .live-btn from the modal so the
   copy and download CTAs match the rest of the site exactly. */
.doc-actions .prompt-btn,
.doc-actions .live-btn { width: auto; padding-inline: 22px; }

.prompt-btn.is-copied,
.live-btn.is-copied { border-color: #4ea87a; color: #7fd6a6; }

.prompt-btn[disabled] { opacity: .45; pointer-events: none; }

/* ---- Rendered markdown ---- */

.doc-body { font-size: 16.5px; line-height: 1.72; color: var(--fg-mid); }

.doc-body h1, .doc-body h2, .doc-body h3,
.doc-body h4, .doc-body h5, .doc-body h6 {
  color: var(--fg);
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 2.2em 0 .7em;
  scroll-margin-top: 84px;
}
.doc-body > :first-child { margin-top: 0; }

.doc-body h1 { font-size: 28px; }
.doc-body h2 {
  font-size: 23px;
  padding-bottom: .4em;
  border-bottom: 1px solid var(--line-soft);
}
.doc-body h3 { font-size: 19px; }
.doc-body h4 { font-size: 17px; color: var(--fg-mid); }

.doc-body p { margin: 0 0 1.1em; }

.doc-body strong { color: var(--fg); font-weight: 600; }

.doc-inline-link {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--fg-dim);
}
.doc-inline-link:hover { text-decoration-color: var(--fg); }

.doc-body ul, .doc-body ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.doc-body li { margin-bottom: .45em; }
.doc-body li::marker { color: var(--fg-dim); }

.doc-body hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 2.4em 0;
}

.doc-body blockquote {
  margin: 0 0 1.3em;
  padding: 2px 0 2px 18px;
  border-left: 2px solid var(--line);
  color: var(--fg-dim);
}

.doc-body :not(pre) > code {
  background: var(--bg-raise);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: .12em .4em;
  font-size: .89em;
  color: #d8d8e2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: break-word;
}

.doc-body pre {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 18px 18px;
  margin: 0 0 1.4em;
  overflow-x: auto;
}

.doc-body pre code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.6;
  color: #d8d8e2;
  white-space: pre;
}

/* Language tag sits top-right, out of the way of the copy button. */
.doc-body pre[data-lang]::before {
  content: attr(data-lang);
  position: absolute; top: 10px; right: 74px;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg-dim);
  pointer-events: none;
}

.code-copy {
  position: absolute; top: 8px; right: 8px;
  padding: 5px 11px;
  font: inherit; font-size: 12px;
  color: var(--fg-mid);
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.doc-body pre:hover .code-copy,
.code-copy:focus-visible { opacity: 1; }
.code-copy:hover { color: var(--fg); border-color: var(--fg-dim); }
.code-copy.is-copied { opacity: 1; color: #7fd6a6; border-color: #4ea87a; }

/* Touch devices have no hover, so keep the button visible. */
@media (hover: none) {
  .code-copy { opacity: 1; }
}

.doc-table-wrap { overflow-x: auto; margin: 0 0 1.4em; }

.doc-body table { border-collapse: collapse; width: 100%; font-size: 15px; }
.doc-body th, .doc-body td {
  border: 1px solid var(--line);
  padding: 9px 13px;
  text-align: left;
  vertical-align: top;
}
.doc-body th { background: var(--bg-raise); color: var(--fg); font-weight: 600; }

.doc-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

.doc-status { color: var(--fg-dim); }
