/* Penny app — same tokens as the landing (Fluence template): ink #0B0B09,
   accent #FC5725, General Sans for display, Inter for UI. */
@font-face { font-family: "General Sans"; font-weight: 500; font-display: swap;
  src: url("https://framerusercontent.com/third-party-assets/fontshare/wf/3RZHWSNONLLWJK3RLPEKUZOMM56GO4LJ/BPDRY7AHVI3MCDXXVXTQQ76H3UXA63S3/SB2OEB6IKZPRR6JT4GFJ2TFT6HBB6AZN.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("https://framerusercontent.com/assets/GrgcKwrN6d3Uz8EwcLHZxwEfC4.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("https://framerusercontent.com/assets/UjlFhCnUjxhNfep4oYBPqnEssyo.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("https://framerusercontent.com/assets/yDtI2UI8XcEg1W2je9XPN3Noo.woff2") format("woff2"); }

:root {
  --ink: #0B0B09;
  --panel: #0F0F0F;
  --raise: #161614;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);
  --text: #F4F2ED;
  --muted: rgba(244, 242, 237, 0.62);
  --faint: rgba(244, 242, 237, 0.42);
  --accent: #FC5725;
  --ok: #3DBE7A;
  --radius: 16px;
  --col: 760px;
  --gutter: 16px;
}

/* cross-document fade from the landing (same video backdrop on both pages) */
@view-transition { navigation: auto; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--ink);
  color: var(--text);
  font: 400 15px/1.5 "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.backdrop { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: brightness(0.42) saturate(0.9); }
.backdrop-shade { position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11,11,9,0.35) 0%, rgba(11,11,9,0.72) 55%, rgba(11,11,9,0.94) 100%); }
.app[data-state="chat"] ~ .backdrop-shade, body:has(.app[data-state="chat"]) .backdrop-shade { background: rgba(11,11,9,0.9); }

/* ------------------------------------------------------------ top bar */
.bar {
  position: sticky; top: 16px; z-index: 20;
  margin: 16px auto 0; width: min(1240px, calc(100% - 2 * var(--gutter)));
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 10px 10px 12px;
  background: rgba(0, 0, 0, 0.92); backdrop-filter: blur(4px);
  border: 1px solid var(--line-soft); border-radius: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none;
  font: 500 22px/1 "General Sans", sans-serif; letter-spacing: -0.2px; }
.brand img { display: block; }
.bar-right { display: flex; align-items: center; gap: 10px; }
.net { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted);
  padding: 7px 10px; border: 1px solid var(--line-soft); border-radius: 8px; }
.net i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.net.on i { background: var(--ok); }

.btn { border: 0; border-radius: 8px; padding: 9px 14px; font-weight: 500; font-size: 14px; line-height: 1.2; white-space: nowrap; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #ff6a3b; }
.btn-light { background: #fff; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.28); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.wide { width: 100%; }
.addr { display: inline-flex; align-items: center; gap: 8px; }
.addr img { width: 18px; height: 18px; }

/* ------------------------------------------------------------ layout */
.app {
  width: min(var(--col), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  min-height: calc(100vh - 90px);
  display: flex; flex-direction: column;
}
.app[data-state="empty"] { justify-content: center; padding: 48px 0 64px; }
.app[data-state="chat"] .intro, .app[data-state="chat"] .chips { display: none; }
.app[data-state="empty"] .thread { display: none; }

.intro { text-align: center; margin-bottom: 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  padding: 6px 12px; border: 1px solid var(--line-soft); border-radius: 99px; background: rgba(0,0,0,0.6);
  font: 500 12px/1 ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: 0.06em; text-transform: uppercase; }
.eyebrow svg { width: 10px; height: 10px; fill: #fff; }
h1 { margin: 0; font: 500 clamp(36px, 6vw, 60px)/1.05 "General Sans", sans-serif; letter-spacing: -0.02em; }
.lede { margin: 16px auto 0; max-width: 520px; color: var(--muted); font-size: 16px; }

/* ------------------------------------------------------------ composer (hero chatbox) */
.composer { position: relative; }
.app[data-state="chat"] .composer { position: sticky; bottom: 0; padding: 12px 0 18px;
  background: linear-gradient(180deg, rgba(11,11,9,0) 0%, rgba(11,11,9,0.95) 28%); }
.panel {
  background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: var(--radius);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
  padding: 14px 14px 12px 18px;
}
.panel textarea {
  display: block; width: 100%; resize: none; border: 0; outline: 0; background: transparent;
  font-size: 16px; line-height: 1.5; min-height: 52px; max-height: 180px; padding: 4px 0 0;
}
.panel textarea::placeholder { color: rgba(244, 242, 237, 0.5); }
.panel-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.agent { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted);
  padding: 6px 10px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 8px; }
.agent svg { width: 10px; height: 10px; }
.send { position: relative; width: 52px; height: 40px; border: 0; border-radius: 12px; background: #1B1B19; color: #fff;
  display: grid; place-items: center; isolation: isolate; }
.send svg { width: 16px; height: 16px; position: relative; }
.send-glow { position: absolute; inset: -2px; border-radius: 14px; z-index: -1;
  background: conic-gradient(from var(--a, 0deg), #ff8a4c, #ff3d1f, #ff9a3d, #ff2d12, #ff8a4c); animation: spin 2.6s linear infinite; }
.send-glow::after { content: ""; position: absolute; inset: 2px; border-radius: 12px; background: #1B1B19; }
.send[disabled] { cursor: default; }
.send[disabled] .send-glow { animation-play-state: paused; opacity: 0.4; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --a: 360deg; } }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.chip { border: 1px solid var(--line-soft); background: rgba(0,0,0,0.55); color: var(--text);
  padding: 8px 12px; border-radius: 99px; font-size: 13px; }
.chip:hover { border-color: rgba(255,255,255,0.25); }
.demo-note { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--faint); }

/* ------------------------------------------------------------ thread */
.thread { flex: 1; display: flex; flex-direction: column; gap: 22px; padding: 36px 0 12px; }
.msg-user { align-self: flex-end; max-width: 80%; background: #1D1D1B; border: 1px solid var(--line-soft);
  padding: 10px 14px; border-radius: 14px 14px 4px 14px; }
.msg-bot { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.avatar { width: 28px; height: 28px; }
.bot-body { min-width: 0; }
.bot-text { margin: 3px 0 0; }
.bot-text strong { font-weight: 600; }

.steps { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--faint); }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0.6; }
.steps li.active { color: var(--text); }
.steps li.active::before { border-color: var(--accent); border-right-color: transparent; animation: turn 0.8s linear infinite; opacity: 1; }
.steps li.done { color: var(--muted); }
.steps li.done::before { border: 0; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.2 6.2l1.8 1.8 3.8-4' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; opacity: 1; }
@keyframes turn { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ products */
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.card { background: var(--raise); border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.card.best { border-color: rgba(252, 87, 37, 0.55); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #F4F2ED; display: grid; place-items: center; color: #2A2A27; }
.thumb { overflow: hidden; }
.thumb svg { width: 22%; height: auto; }
.thumb.has-img { background: #fff; }
.thumb img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; }
.card-why { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.store-link { text-align: center; font-size: 13px; color: var(--muted); text-decoration: none; padding: 4px 0; }
.store-link:hover { color: var(--text); }
.source-note { margin: 10px 0 0; font-size: 12px; color: var(--faint); }
.badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 8px; border-radius: 6px; letter-spacing: 0.01em; }
.card-body { padding: 12px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { margin: 0; font-weight: 500; font-size: 15px; line-height: 1.3; }
.card-meta { margin: 0; font-size: 12.5px; color: var(--muted); }
.card-meta b { font-weight: 500; color: var(--text); }
.price { margin: 4px 0 0; font: 500 20px/1.1 "General Sans", sans-serif; letter-spacing: -0.01em; }
.price small { font: 400 12px "Inter", sans-serif; color: var(--faint); margin-left: 4px; letter-spacing: 0; }
.card .btn { margin-top: auto; }
.card-actions { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 10px; }

.bundle { margin-top: 14px; background: var(--raise); border: 1px solid var(--line-soft); border-radius: 14px; }
.bundle-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line-soft); }
.bundle-row:first-child { border-top: 0; }
.bundle-row .mini { width: 44px; height: 44px; border-radius: 8px; background: #F4F2ED; color: #2A2A27; display: grid; place-items: center; }
.bundle-row .mini svg { width: 70%; }
.bundle-row p { margin: 0; }
.bundle-row .card-meta { margin-top: 2px; }
.bundle-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-top: 1px solid var(--line); }
.bundle-foot .price { margin: 0; }

.followups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.followups .chip { font-size: 12.5px; padding: 6px 10px; }

.receipt { margin-top: 10px; display: flex; align-items: center; gap: 10px; background: rgba(61, 190, 122, 0.08);
  border: 1px solid rgba(61, 190, 122, 0.35); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.receipt svg { width: 18px; height: 18px; flex: none; color: var(--ok); }

/* ------------------------------------------------------------ sheets */
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--gutter);
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.sheet-card { width: min(420px, 100%); background: #121210; border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { margin: 0; font: 500 22px/1.2 "General Sans", sans-serif; }
.x { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-soft); background: transparent; font-size: 20px; line-height: 1; color: var(--muted); }
.sheet-sub { margin: 8px 0 16px; color: var(--muted); font-size: 14px; }
.wallets { display: grid; gap: 8px; }
.wallet-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: 12px;
  background: var(--raise); border: 1px solid var(--line-soft); }
.wallet-opt:hover { border-color: rgba(255,255,255,0.25); }
.wallet-opt img, .wallet-opt .wicon { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.wallet-opt .wicon { display: grid; place-items: center; background: #242421; color: var(--muted); font-weight: 600; }
.wallet-opt span { flex: 1; font-weight: 500; }
.wallet-opt em { font-style: normal; font-size: 12px; color: var(--faint); }
.wallet-empty { padding: 14px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
.wallet-empty a { color: var(--text); }
.sheet-error { margin: 12px 0 0; color: #FF8A6B; font-size: 13px; }
#demo-wallet { margin-top: 12px; }

.pay-item { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; margin: 16px 0; }
.pay-item .mini { width: 56px; height: 56px; border-radius: 10px; background: #F4F2ED; color: #2A2A27; display: grid; place-items: center; }
.pay-item .mini svg { width: 70%; }
.pay-item .mini { overflow: hidden; }
.pay-item .mini img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pay-item p { margin: 0; }
.rows { border-top: 1px solid var(--line-soft); margin: 0 0 16px; }
.rows div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; text-align: right; }
.rows .total dt, .rows .total dd { color: var(--text); font-weight: 600; }
.field { display: grid; gap: 6px; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.field input { background: var(--raise); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: 0; }
.field input:focus { border-color: rgba(255,255,255,0.35); }
.pay-status { text-align: center; padding: 18px 0 6px; }
.pay-status .ring { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: turn 0.8s linear infinite; }
.pay-status .tick { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; }
.pay-status .tick svg { width: 22px; height: 22px; color: #fff; }
.pay-status h3 { margin: 0; font: 500 20px/1.2 "General Sans", sans-serif; }
.pay-status p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.fine { margin: 10px 0 0; font-size: 12px; color: var(--faint); text-align: center; }

@media (max-width: 640px) {
  .net { display: none; }
  .brand { font-size: 20px; }
  .app[data-state="empty"] { padding-top: 28px; }
  .lede { font-size: 15px; }
  .chips { justify-content: flex-start; }
  .results { grid-template-columns: 1fr 1fr; }
  .card-body { padding: 10px; }
  .price { font-size: 17px; }
  .msg-bot { grid-template-columns: 24px 1fr; gap: 10px; }
  .avatar { width: 24px; height: 24px; }
}
@media (max-width: 380px) { .results { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .send-glow, .steps li.active::before, .pay-status .ring { animation: none; } }
