/* ============================================================================
   PopForge — "Refined Ember on Graphite" design system
   Deep graphite base (#0A0B10) · layered surfaces (#14161D / #1C1F29)
   Molten ember accent (#FF6A1F) · soft amber highlight (#FF9B63)
   Indigo ambient counter-light, used sparingly
   Type: Bricolage Grotesque (display) / Geist (UI) / Geist Mono (labels)
         Instrument Serif italic (headline accent)
   ========================================================================== */

:root {
  /* ---- surface ---- */
  --bg: #0A0B10;
  --bg-deep: #06070B;
  --panel: #14161D;
  --panel-2: #1A1D25;
  --panel-3: #1C1F29;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --line-3: rgba(255, 255, 255, .19);

  /* ---- ink ---- */
  --text: #F5F5F7;
  --text-2: #C9CED6;
  --muted: #979EAA;
  --muted-2: #737A86;

  /* ---- ember ---- */
  --acc: #FF6A1F;
  --acc-hi: #FF9B63;
  --acc-deep: #E4420A;
  --acc-ink: #1A0B02;
  --indigo: #6E7BFF;
  --danger: #FF6A55;
  --ok: #4ADE80;

  /* ---- radius ---- */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;

  /* ---- elevation ---- */
  --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-2: 0 10px 30px -12px rgba(0, 0, 0, .65);
  --sh-3: 0 34px 80px -28px rgba(0, 0, 0, .8);
  --glow-ember: 0 24px 70px -26px rgba(255, 106, 31, .55);

  /* ---- motion ---- */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --fast: .16s var(--ease);
  --mid: .28s var(--ease);

  /* ---- type ---- */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 84% -8%, rgba(110, 123, 255, .045), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 400 15.5px/1.65 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* film grain — the difference between "flat dark" and "rendered" */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  opacity: .024;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
img { max-width: 100%; }
::selection { background: rgba(255, 106, 31, .32); color: #fff; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 6px; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: #262A33; border: 3px solid var(--bg-deep); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #363B46; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 26px; }

/* ---------------------------------------------------------------- nav ---- */
.site-nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(10, 11, 16, .92);
  border-bottom: 1px solid var(--line);
  transition: background var(--mid), border-color var(--mid), box-shadow var(--mid);
}
.site-nav.scrolled {
  background: rgba(8, 9, 13, .97);
  border-bottom-color: var(--line-2);
  box-shadow: 0 14px 40px -26px rgba(0, 0, 0, .9);
}
.site-nav .inner { display: flex; align-items: center; gap: 28px; height: 66px; transition: height var(--mid); }
.site-nav.scrolled .inner { height: 58px; }

.logo {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--font-display); font-weight: 800; font-size: 17.5px;
  letter-spacing: -.03em; text-decoration: none; white-space: nowrap;
}
.logo .mark {
  width: 28px; height: 28px; border-radius: 9px;
  background: linear-gradient(150deg, var(--acc-hi), var(--acc) 55%, var(--acc-deep));
  display: grid; place-items: center; color: var(--acc-ink); font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 16px -6px rgba(255, 106, 31, .8);
}
.logo span i { font-style: normal; color: var(--acc); }

.nav-links { display: flex; gap: 4px; margin-left: 10px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px;
  padding: 7px 12px; border-radius: 9px; transition: color var(--fast), background var(--fast);
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* signed-in account chip + its sign-out menu */
.btn.pf-acct { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; }
.pf-acct-ava {
  width: 22px; height: 22px; border-radius: 999px; overflow: hidden; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--acc); color: var(--acc-ink);
  font: 700 11px/1 var(--font-ui); letter-spacing: .02em;
}
.pf-acct-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-acct-name { font-weight: 700; font-size: 13px; color: var(--text); white-space: nowrap; }
.pf-acct-care { color: var(--muted); font-size: 9px; }
.pf-acct-menu {
  position: fixed; z-index: 9999; min-width: 190px; display: none;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 6px; box-shadow: var(--sh-2);
}
.pf-acct-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  color: var(--text); font: 600 13.5px/1 var(--font-ui); padding: 10px 12px; border-radius: 8px; cursor: pointer;
  text-decoration: none; box-sizing: border-box;
}
.pf-acct-item:hover { background: var(--panel-3); }

/* profile page avatar preview */
.profile-ava {
  width: 64px; height: 64px; border-radius: 999px; overflow: hidden; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--acc); color: var(--acc-ink);
  font: 800 26px/1 var(--font-ui); letter-spacing: .02em;
}
.profile-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* mobile nav: links would overflow — collapse to essentials */
@media (max-width: 860px) {
  .site-nav .inner { gap: 12px; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .nav-cta .btn.ghost { display: none; }         /* keep only the primary CTA */
  .site-nav .inner { height: 60px; }
  .logo { font-size: 16px; }
  .frame { transform: none; }                     /* no 3D tilt on small screens */
  .ftab:not(.active), .ftab-add { display: none; } /* mobile browsers show one tab */
}

/* ------------------------------------------------------------- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); cursor: pointer;
  font-family: var(--font-ui); font-weight: 600; font-size: 14px; letter-spacing: -.01em;
  border-radius: 10px; padding: 10px 18px; text-decoration: none; white-space: nowrap;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, 0) 55%),
    var(--panel-2);
  box-shadow: var(--sh-1);
  transition: transform var(--fast), box-shadow var(--fast), background var(--fast), border-color var(--fast), filter var(--fast);
}
.btn:hover { transform: translateY(-1px); border-color: var(--line-3); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0); box-shadow: var(--sh-1); }

.btn.primary {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--acc-hi), var(--acc) 62%, var(--acc-deep));
  color: var(--acc-ink); border-color: transparent; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 26px -14px rgba(255, 106, 31, .8);
}
/* one controlled sheen on hover — the only ornament these buttons get */
.btn.primary::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -45%; width: 32%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .32), transparent);
  transform: skewX(-16deg); opacity: 0;
  transition: left .55s var(--ease), opacity .2s linear;
  pointer-events: none;
}
.btn.primary:hover::after { left: 120%; opacity: 1; }
.btn.primary:hover {
  filter: brightness(1.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 16px 36px -16px rgba(255, 106, 31, .95);
}
.btn.primary:active { filter: brightness(.97); transform: translateY(0); }

.btn.ghost { background: transparent; box-shadow: none; border-color: var(--line-2); }
.btn.ghost:hover { background: rgba(255, 255, 255, .05); }

.btn.small { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn.danger {
  color: #FFC0B4; border-color: rgba(255, 106, 85, .35);
  background: rgba(255, 106, 85, .09); box-shadow: none;
}
.btn.danger:hover { background: rgba(255, 106, 85, .16); border-color: rgba(255, 106, 85, .6); }

/* ------------------------------------------------------------ headings --- */
h1, h2 {
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: -.035em; line-height: 1.04; margin: 0;
}
h3 { font-weight: 600; letter-spacing: -.02em; }

/* the signature: one serif-italic word, molten */
.h-hero em, .h-sec em, .ser {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  letter-spacing: -.015em; padding-right: .04em;
  color: var(--acc);
  background: linear-gradient(96deg, var(--acc-hi), var(--acc) 55%, var(--acc-deep));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.h-hero { font-size: clamp(46px, 6.6vw, 86px); line-height: .96; letter-spacing: -.042em; font-weight: 800; }
.h-sec { font-size: clamp(31px, 3.7vw, 46px); letter-spacing: -.038em; font-weight: 700; }

.sub { color: var(--muted); font-size: 17px; max-width: 60ch; line-height: 1.68; margin: 16px 0 0; }

.kicker {
  color: var(--acc); font-family: var(--font-mono); font-weight: 500;
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.kicker::before {
  content: ""; width: 30px; height: 1px; flex: none;
  background: linear-gradient(90deg, var(--acc), rgba(255, 106, 31, 0));
}

/* section rhythm */
section { padding: 92px 0; position: relative; }
.sec-head { margin-bottom: 42px; }
.sec-head .sub { margin-top: 18px; font-size: 16px; }
.sec-title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sec-title-actions { margin-left: auto; display: flex; gap: 10px; }

/* ----------------------------------------------------------------- hero --- */
.hero { position: relative; padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 7vw, 92px); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  /* graphite-dominant: warmth is a halo behind the copy, never a wash */
  background:
    radial-gradient(620px 380px at 4% -4%, rgba(255, 106, 31, .09), transparent 60%),
    radial-gradient(760px 460px at 90% 88%, rgba(110, 123, 255, .07), transparent 64%);
}
.hero-lines {
  position: absolute; inset: 0; pointer-events: none; opacity: .38;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(880px 520px at 50% 8%, #000 0%, transparent 76%);
  -webkit-mask-image: radial-gradient(880px 520px at 50% 8%, #000 0%, transparent 76%);
}
.hero .wrap { position: relative; }
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(36px, 5vw, 68px); align-items: center;
}
@media (max-width: 980px) {
  /* minmax(0,…) so wide nowrap children (browser chrome) can't blow out the column */
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
}

.h-hero { margin-bottom: 0; }
.hero-copy .sub { max-width: 52ch; margin-top: 20px; }
.hero-cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.hero-cta .btn { padding: 12px 24px; border-radius: 11px; font-size: 14.5px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px; margin-top: 44px; padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero-stats .stat b {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.hero-stats .stat span {
  display: block; margin-top: 5px; color: var(--muted-2);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase;
}
@media (max-width: 560px) { .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 20px 4px; } }

/* hero product frame */
.hero-visual { position: relative; }
.hero-visual .aura {
  position: absolute; inset: -10% -6%;
  background: radial-gradient(closest-side, rgba(255, 106, 31, .17), transparent 70%);
  filter: blur(36px); pointer-events: none;
}

/* depth: a second surface offset behind the frame reads as stacked layering */
.frame-back {
  position: absolute; inset: 0; z-index: 0;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--panel-2), rgba(20, 22, 29, .35));
  transform: perspective(1600px) rotateY(-4deg) rotateX(1.4deg) translate3d(24px, 26px, -30px);
  opacity: .55;
}
.frame {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 12%), var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3), inset 0 1px 0 rgba(255, 255, 255, .06);
  overflow: hidden;
  transform: perspective(1600px) rotateY(-4deg) rotateX(1.4deg);
}

/* tab strip: traffic lights live here, as they do in a real browser */
.frame-tabs {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  background: rgba(255, 255, 255, .035);
  border-bottom: 1px solid var(--line);
}
.frame-tabs .lights { display: flex; gap: 6px; margin-right: 8px; flex: none; }
.frame-tabs .lights i { width: 10px; height: 10px; border-radius: 99px; background: #2A2E37; }
.frame-tabs .lights i:nth-child(1) { background: #FF5F57; }
.frame-tabs .lights i:nth-child(2) { background: #FEBC2E; }
.frame-tabs .lights i:nth-child(3) { background: #28C840; }
.ftab {
  display: flex; align-items: center; gap: 7px;
  height: 26px; padding: 0 12px; border-radius: 8px;
  font: 500 11.5px/1 var(--font-ui); color: var(--muted-2);
  white-space: nowrap; max-width: 190px; overflow: hidden;
}
.ftab.active {
  background: rgba(255, 255, 255, .06); color: var(--text-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.ftab .fav {
  width: 9px; height: 9px; border-radius: 3px; flex: none;
  background: linear-gradient(135deg, var(--acc-hi), var(--acc-deep));
}
.ftab .ftab-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftab-add { color: var(--muted-2); font-size: 14px; flex: none; }

/* toolbar: history arrows + address pill */
.frame-bar {
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 14px;
  background: rgba(255, 255, 255, .02);
  border-bottom: 1px solid var(--line);
}
.frame-bar .fnav { display: flex; gap: 9px; color: var(--muted-2); font-size: 13px; flex: none; }
.frame-bar .fnav span { cursor: default; }
.frame-bar .url {
  flex: 1; height: 24px;
  display: flex; align-items: center; gap: 7px; padding: 0 11px;
  background: rgba(0, 0, 0, .32); border: 1px solid var(--line);
  border-radius: 7px; color: var(--muted);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em;
  overflow: hidden; white-space: nowrap;
}
.frame-bar .url svg { flex: none; opacity: .7; }
.frame-bar .fdots { color: var(--muted-2); font-size: 12px; letter-spacing: 1px; flex: none; }
.hero-stage { height: clamp(330px, 33vw, 424px); display: block; }

@media (max-width: 980px) { .frame-back { display: none; } }

.float-chip {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(15, 16, 22, .94); border: 1px solid var(--line-2);
  backdrop-filter: blur(8px);
  box-shadow: var(--sh-2);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-2);
}
.float-chip .dot {
  width: 7px; height: 7px; border-radius: 99px; background: var(--ok);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .16);
  animation: pulse 2.4s var(--ease) infinite;
}
.float-chip .spark {
  width: 7px; height: 7px; border-radius: 2px; flex: none;
  background: linear-gradient(135deg, var(--acc-hi), var(--acc-deep));
  box-shadow: 0 0 8px rgba(255, 106, 31, .7);
}
.float-chip.ch-a { left: -16px; bottom: 34px; }
.float-chip.ch-b { right: -14px; top: -30px; color: var(--text-2); }
@media (max-width: 980px) { .float-chip { display: none; } }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74, 222, 128, .16); }
  50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, .05); }
}

@keyframes heroIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.hero-copy > * { animation: heroIn .7s var(--ease) both; }
.hero-copy > *:nth-child(2) { animation-delay: .06s; }
.hero-copy > *:nth-child(3) { animation-delay: .13s; }
.hero-copy > *:nth-child(4) { animation-delay: .2s; }
.hero-copy > *:nth-child(5) { animation-delay: .27s; }
.hero-visual { animation: heroIn .8s var(--ease) .18s both; }

/* --------------------------------------------------------- cards & grids - */
.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 130px),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--sh-1);
}
.grid { display: grid; gap: 16px; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g2 { grid-template-columns: 1fr; } }

/* bento rhythm for the feature wall */
.bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bento .feat.wide { grid-column: span 2; }
@media (max-width: 900px) { .bento, .bento .feat.wide { grid-column: auto; grid-template-columns: 1fr; } }

.feat {
  position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 120px),
    var(--panel);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px;
  transition: transform var(--mid), border-color var(--mid), box-shadow var(--mid);
}
.feat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 106, 31, .55), transparent);
  opacity: 0; transition: opacity var(--mid);
}
.feat:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--sh-2); }
.feat:hover::before { opacity: 1; }
.feat h3 { margin: 0 0 9px; font-size: 16.5px; font-weight: 600; }
.feat p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; max-width: 58ch; }
.feat .fnum {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em;
  color: var(--muted-2); display: block; margin-bottom: 14px;
}

/* -------------------------------------------------------- template gallery */
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--muted);
  padding: 8px 15px; border-radius: 999px; font: 600 13.5px/1 var(--font-ui); letter-spacing: -.01em;
  cursor: pointer;
  transition: color var(--fast), background var(--fast), border-color var(--fast), transform var(--fast), box-shadow var(--fast);
}
.cat-chip:hover {
  color: var(--text); border-color: rgba(255, 106, 31, .45);
  transform: translateY(-1px); box-shadow: 0 8px 20px -12px rgba(255, 106, 31, .8);
}
.cat-chip.on {
  background: linear-gradient(180deg, var(--acc-hi), var(--acc));
  color: var(--acc-ink); border-color: transparent; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 24px -14px rgba(255, 106, 31, .7);
}
.cat-chip .n { opacity: .6; font-weight: 500; margin-left: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.cat-chip.on .n { opacity: .72; }

.journey-note { color: var(--muted); font-size: 14px; margin: 0 0 30px; min-height: 22px; }
/* journey blocks are <section> elements — neutralise the global section padding */
.journey-block { margin-bottom: 54px; padding: 0; }
.journey-block.hide { display: none; }
.journey-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.journey-kicker {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--acc); margin-bottom: 7px;
}
.journey-head h3 {
  margin: 0; font-size: 16px; font-weight: 400; color: var(--muted);
  letter-spacing: -.01em; font-family: var(--font-serif); font-style: italic;
}
.journey-count {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 5px 11px; white-space: nowrap; flex-shrink: 0;
}
.tpl-best {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 500; color: var(--acc-ink);
  background: linear-gradient(180deg, var(--acc-hi), var(--acc));
  padding: 5px 8px; border-radius: 6px; flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
@media (max-width: 700px) { .journey-head { align-items: flex-start; flex-direction: column; gap: 10px; } }

.tpl-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0) 140px),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform var(--mid), border-color var(--mid), box-shadow var(--mid);
}
.tpl-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 106, 31, .4);
  box-shadow: var(--sh-2), 0 0 0 1px rgba(255, 106, 31, .12);
}
.tpl-stage {
  height: 280px; position: relative; overflow: hidden;
  margin: 10px 10px 0; border-radius: 10px;
  background: linear-gradient(180deg, #171A21, #0F1116);
  border: 1px solid rgba(255, 255, 255, .05);
}
.tpl-card.hide { display: none; }
.tpl-meta { padding: 15px 17px 11px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tpl-name { font-weight: 600; font-size: 15.5px; letter-spacing: -.02em; }
.tpl-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 6px; background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line); color: var(--muted); margin-left: auto; flex-shrink: 0;
}
.tpl-blurb { padding: 0 17px 15px; color: var(--muted); font-size: 13.5px; line-height: 1.58; flex: 1; }
.tpl-actions {
  padding: 0 17px 16px; display: flex; gap: 8px;
  border-top: 1px solid var(--line); padding-top: 14px; margin-top: 2px;
}
.tpl-actions .btn { flex: 1; }

/* ---------------------------------------------------------------- steps --- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; overflow: hidden; padding-top: 26px; }
.step b {
  font-family: var(--font-display); font-weight: 800; font-size: 62px; line-height: .8;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 106, 31, .5);
  display: block; margin-bottom: 16px; letter-spacing: -.05em;
}
.step h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.62; }

/* ------------------------------------------------------------ dashboard --- */
.dash { padding: 6px 4px; }
.dash table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash th {
  text-align: left; color: var(--muted-2); font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  padding: 14px 14px; border-bottom: 1px solid var(--line);
}
.dash td { padding: 14px; border-bottom: 1px solid rgba(255, 255, 255, .045); vertical-align: middle; }
.dash tbody tr { transition: background var(--fast); }
.dash tbody tr:hover { background: rgba(255, 255, 255, .028); }
.dash tr:last-child td { border-bottom: 0; }
.dash td b { font-weight: 600; letter-spacing: -.01em; }
.dash td:nth-child(4), .dash td:nth-child(5) { font-variant-numeric: tabular-nums; }

.pill {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.pill.live { color: var(--acc-hi); border-color: rgba(255, 106, 31, .4); background: rgba(255, 106, 31, .1); }
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .big16 { font-size: 30px; margin-bottom: 10px; }

/* ------------------------------------------------------------- codebox ---- */
.codebox {
  background: #0B0C10; border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 18px 20px; font: 13px/1.7 var(--font-mono); color: #D6DBE4;
  overflow-x: auto; position: relative; white-space: pre;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), var(--sh-1);
}
.codebox .cbtn { position: sticky; float: right; top: 0; }

/* ---------------------------------------------------------------- footer -- */
.foot {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 40px 0 56px; color: var(--muted); font-size: 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .35));
}
.foot .cols { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.foot .logo { margin-bottom: 10px; font-size: 16px; }

/* ---------------------------------------------------------------- toast --- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(8px);
  z-index: 9999; display: flex; align-items: center; gap: 9px;
  background: rgba(16, 18, 23, .96); border: 1px solid var(--line-2);
  color: var(--text); backdrop-filter: blur(10px);
  padding: 12px 18px; border-radius: 12px; font-weight: 500; font-size: 14px;
  box-shadow: var(--sh-3); opacity: 0; pointer-events: none;
  transition: opacity .24s var(--ease), transform .24s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(74, 222, 128, .4); }
.toast.ok::before { content: "✓"; color: var(--ok); font-weight: 700; }

/* ---------------------------------------------------------------- modal --- */
.modal {
  display: none; position: fixed; inset: 0; z-index: 9998;
  background: rgba(4, 5, 7, .7); backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 140px),
    var(--panel-2);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 30px; width: min(400px, 94vw);
  box-shadow: var(--sh-3), 0 0 60px -34px rgba(255, 106, 31, .35);
  animation: modalIn .3s var(--ease) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-card h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.03em; }

/* ------------------------------------------------------- reveal on scroll -
   guarded by .js on <html> so content is never invisible without scripting */
.js .rv { opacity: 0; transform: translateY(22px); }
.js .rv.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

/* ============================================================================
   STUDIO (editor) — inherits the same tokens
   ========================================================================== */
.studio-body { background: var(--bg-deep); }
.studio-nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(9, 10, 13, .9); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(150%);
}
.studio-nav .inner { display: flex; align-items: center; gap: 14px; height: 60px; }
.crumbs { color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 9px; }
.name-input {
  background: transparent; border: 1px solid transparent; color: var(--text);
  font-family: var(--font-ui); font-weight: 600; font-size: 15.5px; letter-spacing: -.02em;
  padding: 8px 11px; border-radius: 9px; width: 250px; outline: none;
  transition: border-color var(--fast), background var(--fast);
}
.name-input::placeholder { color: var(--muted-2); }
.name-input:hover, .name-input:focus { border-color: var(--line-2); background: var(--panel); }

.studio-grid { display: grid; grid-template-columns: 404px 1fr; gap: 0; min-height: calc(100vh - 61px); }
@media (max-width: 1020px) { .studio-grid { grid-template-columns: 1fr; } }
@media (max-width: 1020px) {
  .studio-nav .inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 8px; }
  .studio-nav .name-input { flex: 1 1 100%; order: 9; width: 100%; }
  .studio-nav .inner > div:last-child { margin-left: 0 !important; width: 100%; flex-wrap: wrap; justify-content: flex-end; }
}

.rail { border-right: 1px solid var(--line); padding: 22px 20px 48px; background: var(--bg); }
.tabs {
  display: flex; gap: 5px; margin-bottom: 22px;
  background: var(--panel); border: 1px solid var(--line); padding: 5px; border-radius: 11px;
}
.tab {
  flex: 1; text-align: center; padding: 9px 6px; border-radius: 8px; cursor: pointer;
  font: 600 13px/1 var(--font-ui); letter-spacing: -.01em; color: var(--muted);
  border: 0; background: transparent;
  transition: background var(--fast), color var(--fast), box-shadow var(--fast);
}
.tab.on {
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)), var(--panel-3);
  color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), var(--sh-1);
}
.tab:hover { color: var(--text); }

/* Simple mode: advanced fields stay hidden until the toggle is on */
.studio-body.simple .adv { display: none !important; }
.advbar {
  display: flex; align-items: center; gap: 10px;
  margin: -8px 0 18px; padding: 10px 12px;
  border: 1px dashed var(--line-2); border-radius: 10px;
}

.panel { display: none; }
.panel.on { display: block; animation: panelIn .3s var(--ease) both; }
@keyframes panelIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

.fieldset { margin-bottom: 20px; }
.label {
  display: block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px;
}
.inp, .sel, .ta {
  width: 100%; background: var(--panel); border: 1px solid var(--line-2); color: var(--text);
  border-radius: 10px; padding: 11px 13px; font: 400 14px/1.5 var(--font-ui);
  outline: none; font-family: var(--font-ui);
  transition: border-color var(--fast), box-shadow var(--fast), background var(--fast);
}
.inp::placeholder, .ta::placeholder { color: var(--muted-2); }
.inp:hover, .sel:hover, .ta:hover { border-color: var(--line-3); }
.inp:focus, .sel:focus, .ta:focus {
  border-color: rgba(255, 106, 31, .65);
  box-shadow: 0 0 0 3px rgba(255, 106, 31, .14);
  background: var(--panel-2);
}
.ta { resize: vertical; min-height: 78px; line-height: 1.55; }
.sel {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238F97A3' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 32px;
}
.hintline { font-size: 12.5px; color: var(--muted-2); margin-top: 7px; line-height: 1.5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.check {
  display: flex; align-items: center; gap: 11px; padding: 12px 13px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; margin-bottom: 9px; font-size: 14px;
  transition: border-color var(--fast), background var(--fast);
}
.check:hover { border-color: var(--line-2); background: var(--panel-2); }
.check input { accent-color: var(--acc); width: 15px; height: 15px; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.sw {
  position: relative; height: 36px; border-radius: 9px;
  border: 2px solid var(--line-2); cursor: pointer; overflow: hidden;
  transition: transform var(--fast), box-shadow var(--fast);
}
.sw:hover { transform: translateY(-2px); }
.sw.on { border-color: var(--text); box-shadow: 0 0 0 2px rgba(255, 106, 31, .6), var(--sh-1); }
.sw input { position: absolute; inset: 6px 999px 6px 999px; width: 0; height: 0; opacity: 0; }
.colorrow { display: flex; gap: 8px; align-items: center; }
.colorrow input[type="color"] {
  width: 44px; height: 36px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--panel); padding: 3px; cursor: pointer;
}
.rangebox input[type="range"] { width: 100%; accent-color: var(--acc); }
.toggle { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; user-select: none; }
.toggle .track {
  width: 42px; height: 24px; border-radius: 999px; background: var(--panel-3);
  border: 1px solid var(--line-2); position: relative; transition: .18s var(--ease); flex: none;
}
.toggle .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 999px; background: var(--muted); transition: .18s var(--ease);
}
.toggle.on .track { background: rgba(255, 106, 31, .24); border-color: rgba(255, 106, 31, .6); }
.toggle.on .track::after { transform: translateX(18px); background: var(--acc); box-shadow: 0 0 12px rgba(255, 106, 31, .8); }

.stage-col { padding: 26px 24px 46px; background: linear-gradient(180deg, var(--bg-deep), #0C0E12); }
.stage-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; flex-wrap: wrap; }
.device-pill { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.device-pill button {
  border: 0; background: transparent; color: var(--muted);
  font: 600 12.5px/1 var(--font-ui); padding: 7px 15px; border-radius: 7px; cursor: pointer;
  transition: background var(--fast), color var(--fast);
}
.device-pill button:hover { color: var(--text); }
.device-pill button.on { background: var(--panel-3); color: var(--text); box-shadow: var(--sh-1); }
.stage {
  position: relative; height: 560px; border: 1px solid var(--line-2);
  border-radius: var(--r-lg); overflow: hidden;
  background-color: #10121A;
  background-image: radial-gradient(rgba(255, 255, 255, .075) 1px, transparent 1px);
  background-size: 22px 22px;
  transition: width var(--mid); transform-origin: center;
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.stage.mobile { width: 375px; }
.stage-faux-page {
  position: absolute; inset: 30px 44px; border-radius: 10px; background: #EDEFF3;
  overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.stage.mobile .stage-faux-page { inset: 22px 6px; }
.tpl-stage .stage-faux-page { inset: 0; border-radius: 0; box-shadow: none; }

/* faux website chrome (shared by studio stage + gallery minis) */
.fx-nav {
  position: absolute; top: 0; left: 0; right: 0; height: 40px; background: #FFFFFF;
  border-bottom: 1px solid rgba(16, 20, 26, .07); display: flex; align-items: center; gap: 10px; padding: 0 18px;
}
.fx-nav i { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--acc-hi), var(--acc-deep)); flex-shrink: 0; }
.fx-nav span { display: block; width: 42px; height: 7px; border-radius: 4px; background: #DFE4EA; }
.fx-nav em { display: block; margin-left: auto; width: 74px; height: 24px; border-radius: 999px; background: #232A33; }
.fx-hero { padding: 64px 18px 0; }
.fx-hero b { display: block; height: 16px; border-radius: 5px; background: #CDD3DB; margin-bottom: 9px; }
.fx-hero b:first-child { width: 68%; height: 22px; background: #B9C1CC; }
.fx-hero b:nth-child(2) { width: 48%; }
.fx-hero u { display: block; width: 36%; height: 9px; border-radius: 5px; background: #E2E6EB; margin-bottom: 20px; text-decoration: none; }
.fx-hero a { display: block; width: 96px; height: 30px; border-radius: 8px; background: #232A33; margin-bottom: 24px; }
.fx-cards { position: absolute; left: 18px; right: 18px; bottom: 16px; display: flex; gap: 12px; }
.fx-cards div { flex: 1; height: 96px; background: #FFFFFF; border: 1px solid rgba(16, 20, 26, .05); border-radius: 8px; }

/* mini variant inside template cards */
.tpl-stage .fx-nav { height: 34px; padding: 0 12px; gap: 8px; }
.tpl-stage .fx-nav span { width: 34px; height: 6px; }
.tpl-stage .fx-nav em { width: 56px; height: 18px; }
.tpl-stage .fx-hero { padding: 50px 12px 0; }
.tpl-stage .fx-hero u, .tpl-stage .fx-hero a, .tpl-stage .fx-cards { display: none; }

/* scaled popup inside mini stages */
.tpl-stage .pf-card, .hero-stage .pf-card { transform: scale(var(--mz, 1)); transform-origin: center; }
.tpl-stage .pf-holder.br .pf-card, .hero-stage .pf-holder.br .pf-card { transform-origin: right bottom; }
.tpl-stage .pf-holder.tr .pf-card, .hero-stage .pf-holder.tr .pf-card { transform-origin: right top; }
.tpl-stage .pf-holder.bl .pf-card, .hero-stage .pf-holder.bl .pf-card { transform-origin: left bottom; }
.tpl-stage .pf-holder.tl .pf-card, .hero-stage .pf-holder.tl .pf-card { transform-origin: left top; }
.tpl-stage .pf-holder.pf-bar .pf-card, .hero-stage .pf-holder.pf-bar .pf-card { transform-origin: top center; }

/* publish tab */
.pub-list { margin: 0; padding: 0 0 0 18px; color: var(--muted); font-size: 13.5px; line-height: 1.9; }
.pf-snippet-wrap .codebox { min-height: 210px; }
.checkline { display: block; font-size: 13.5px; color: var(--muted); padding: 8px 0; line-height: 1.6; }
.checkline > b + span { margin-left: 8px; }
.checkline b { color: var(--text); font-weight: 600; }
.bigsave { width: 100%; margin-top: 8px; }
.mono { font-family: var(--font-mono); font-size: .93em; }
.mut { color: var(--muted); }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; } .mt16 { margin-top: 16px; }

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