/* Bidit Flower — shared base styles. Round-4 P1-6: extracted from inline
   <style> in _base.html so the browser can cache it once and skip ~22KB on
   every subsequent page-load. Filename-based cache busting: rename to
   app-v2.css when shipping a substantive change.
*/
:root{
  --gold:#D4A842;
  --gold-bright:#F3C969;
  --gold-deep:#8c6a1f;
  --ink:#0c0c10;
  --paper:#fafaf7;
  --muted:#6b6b73;
  --line:#eaeae2;
  --accent:#1e90ff;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font:16px/1.55 -apple-system,BlinkMacSystemFont,"SF Pro Text",Segoe UI,system-ui,sans-serif;color:var(--ink);background:var(--paper)}
/* Wave 27e Bidit P0-3: explicit 16px on form inputs prevents iOS Safari from
   auto-zooming the viewport on focus (causes form layout to jump-zoom on every
   input — most visible mobile-UX rookie bug). Apple HIG threshold = 16px. */
input,select,textarea,button{font-size:16px}
a{color:var(--ink);text-decoration:none;border-bottom:1px solid var(--line)}
a:hover{border-color:var(--gold)}
header{border-bottom:1px solid var(--line);padding:14px 28px;display:flex;justify-content:space-between;align-items:center;background:#fff;position:sticky;top:0;z-index:20}
header .brand{display:flex;align-items:center;gap:10px;font-weight:700;letter-spacing:0.5px;font-size:17px}
header .brand .logo-mark{
  width:36px;height:36px;border-radius:8px;
  background:#0c0c10;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 1px 3px rgba(0,0,0,0.15);
}
header .brand .logo-mark img{width:30px;height:30px;display:block}
header .brand span.dot{color:var(--gold)}
nav a{margin-left:22px;border:0;color:var(--muted)}
nav a:hover{color:var(--ink)}
nav .langpill{display:inline-flex;margin-left:16px;background:#fff;border:1px solid var(--line);border-radius:999px;padding:3px;gap:2px;vertical-align:middle}
nav .langpill a,nav .langpill span{margin:0;padding:5px 12px;border-radius:999px;font-size:12px;font-weight:600;letter-spacing:0.3px;border:0;color:var(--muted)}
nav .langpill .active{background:var(--ink);color:#fff}
nav .langpill a:hover{background:#fff7e0;color:var(--ink)}
main{max-width:980px;margin:0 auto;padding:40px 28px}
h1{font-size:36px;line-height:1.1;margin:0 0 14px;font-weight:700;letter-spacing:-0.02em}
h2{font-size:22px;margin:32px 0 14px;letter-spacing:-0.01em}
.lead{color:var(--muted);font-size:17px;max-width:620px;margin-bottom:28px}
.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px;margin:10px 0}
.card:hover{border-color:var(--gold)}
.grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.btn{display:inline-block;background:var(--ink);color:#fff;padding:10px 18px;border-radius:10px;border:0;font-weight:600;cursor:pointer;font:inherit}
.btn.gold{background:var(--gold);color:var(--ink)}
.btn.ghost{background:transparent;color:var(--ink);border:1px solid var(--line)}
input,select,textarea{width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:#fff;font:inherit}
label{display:block;margin:14px 0 6px;font-weight:600;font-size:13px}
.tag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:11px;font-weight:600;background:#f2f2ec;color:var(--muted);margin-left:6px;letter-spacing:0.4px;text-transform:uppercase}
.tag.live,.tag.success{background:#e6f6ea;color:#237a3f}
.tag.seeding,.tag.active{background:#e0efff;color:#1858a8}
.tag.neutral{background:#f2f2ec;color:#6b6b73}
.tag.muted{background:#efeee8;color:#9b9ba1}
.narrative{font-size:19px;line-height:1.4;padding:18px 20px;background:linear-gradient(180deg,#fffbe8,#fff);border-left:3px solid var(--gold);border-radius:10px;margin:12px 0 24px}
.bid-row{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border:1px solid var(--line);border-radius:12px;margin:8px 0;background:#fff}
.bid-row.top{border-color:var(--gold);background:#fffbe8}
.bid-amount{font-size:22px;font-weight:700}
.muted{color:var(--muted)}
.footer{border-top:1px solid var(--line);padding:30px 28px;text-align:center;color:var(--muted);font-size:12px;margin-top:60px;background:#fff}
.footer strong{color:var(--ink);letter-spacing:0.5px}

/* ───────── HERO: TREE OF LIFE + FLOWER OF LIFE (gold on black) ───────── */
/* Round-5 P1-8: responsive hero — desktop loads 1600px (311KB WebP), tablet
   1024px (170KB), mobile 640px (82KB). Saves ~235KB on phones. Default is the
   1024px variant; media queries override for phones (smaller) and large
   screens (larger). image-set provides JPG fallback for browsers without
   WebP support (mainly older Safari). */
.hero{
  position:relative;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.75) 100%),
    image-set(
      url('/static/hero-tree-of-life-1024.webp') type('image/webp'),
      url('/static/hero-tree-of-life-1024.jpg')  type('image/jpeg')
    ) center 45% / cover no-repeat,
    #000;
  color:#fff;
  padding:90px 28px 120px;
  overflow:hidden;
  border-bottom:1px solid #000;
  min-height:620px;
}
@media (max-width: 720px){
  .hero{
    background:
      linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.75) 100%),
      image-set(
        url('/static/hero-tree-of-life-640.webp') type('image/webp'),
        url('/static/hero-tree-of-life-640.jpg')  type('image/jpeg')
      ) center 45% / cover no-repeat,
      #000;
  }
}
@media (min-width: 1280px){
  .hero{
    background:
      linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.75) 100%),
      image-set(
        url('/static/hero-tree-of-life-1600.webp') type('image/webp'),
        url('/static/hero-tree-of-life-1600.jpg')  type('image/jpeg')
      ) center 45% / cover no-repeat,
      #000;
  }
}
.hero::after{
  content:"";
  position:absolute;inset:-8%;
  background:inherit;
  background-size:cover;
  z-index:0;
  opacity:0;
  pointer-events:none;
}
.hero-inner{position:relative;max-width:980px;margin:0 auto;z-index:2}
.hero h1{
  font-size:52px;line-height:1.05;letter-spacing:-0.025em;font-weight:700;max-width:720px;
  color:#fff;
  text-shadow:0 2px 20px rgba(0,0,0,0.85), 0 0 48px rgba(0,0,0,0.6);
}
.hero h1 em{
  font-style:normal;color:var(--gold-bright);
  text-shadow:0 0 28px rgba(243,201,105,0.55), 0 2px 12px rgba(0,0,0,0.9);
}
.hero .lead{
  color:#eaeaf0;font-size:19px;max-width:580px;margin-top:18px;
  text-shadow:0 2px 12px rgba(0,0,0,0.85);
}
.hero .cta{margin-top:30px;display:flex;gap:12px;flex-wrap:wrap}
.hero .btn.gold{box-shadow:0 8px 30px rgba(212,168,66,0.35)}

.hero-sparkle{
  position:absolute;inset:0;pointer-events:none;z-index:1;
  background:
    radial-gradient(2px 2px at 12% 24%, rgba(243,201,105,0.85), transparent 60%),
    radial-gradient(1.5px 1.5px at 77% 38%, rgba(255,229,160,0.7), transparent 60%),
    radial-gradient(2px 2px at 33% 72%, rgba(243,201,105,0.6), transparent 60%),
    radial-gradient(1px 1px at 88% 82%, rgba(255,229,160,0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 14%, rgba(243,201,105,0.5), transparent 60%);
  animation: sparkleDrift 14s ease-in-out infinite alternate;
  mix-blend-mode:screen;
}
@keyframes sparkleDrift{
  0%   { transform: translate3d(0,0,0) scale(1); opacity:0.7 }
  50%  { transform: translate3d(-6px,4px,0) scale(1.04); opacity:1 }
  100% { transform: translate3d(6px,-3px,0) scale(1); opacity:0.75 }
}

@media (max-width: 820px){
  .hero h1{font-size:38px}
  .hero{padding:60px 22px 80px;min-height:520px}
}

/* ───── MOBILE — transactional pages must be excellent on phones ───── */
@media (max-width: 640px){
  main{padding:24px 16px}
  h1{font-size:28px;line-height:1.2}
  h2{font-size:19px}
  .lead{font-size:16px}
  .card{padding:16px;border-radius:12px}
  .grid{grid-template-columns:1fr !important;gap:10px}
  .btn{width:100%;padding:14px 18px;font-size:16px;min-height:48px}
  .btn.ghost + .btn, .btn.gold + .btn{margin-top:8px}
  input,select,textarea{font-size:16px !important;padding:14px 14px;min-height:48px}
  label{margin-top:16px}
  header{padding:12px 16px}
  header .brand{font-size:15px}
  header .brand img{width:28px;height:28px}
  nav a{margin-left:14px;font-size:13px}
  nav a:first-child{display:none}
  .bid-row{flex-direction:column;align-items:stretch;gap:10px}
  .bid-row > div:last-child{text-align:left}
  .tag{padding:4px 10px;font-size:10.5px}
  .footer{padding:24px 16px;font-size:12px}
  .footer a{display:inline-block;margin:4px 6px !important}
  .hero{padding:50px 18px 70px}
  .hero h1{font-size:30px}
  .hero .lead{font-size:15px}
  .hero .card{padding:16px}
  .narrative{font-size:16px;padding:14px 16px}
}

@media (max-width: 640px){
  .mobile-stack{flex-direction:column !important;align-items:stretch !important}
  .mobile-stack > *{width:100% !important;max-width:none !important}
}

.spin-slow   { animation: spin 42s linear infinite; transform-origin:50% 50%; }
.spin-med    { animation: spin 22s linear infinite reverse; transform-origin:50% 50%; }
.spin-fast   { animation: spin 11s linear infinite; transform-origin:50% 50%; }
.breathe     { animation: breathe 6s ease-in-out infinite; transform-origin:50% 50%; }
.pulse-dot   { animation: pulseDot 2.8s ease-in-out infinite; transform-origin:center; }

@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes breathe { 0%,100% { transform: scale(1); opacity:1 } 50% { transform: scale(1.04); opacity:0.92 } }
@keyframes pulseDot{ 0%,100% { r:3; opacity:.55 } 50% { r:5; opacity:1 } }

.node-label{
  font:600 10px/1 -apple-system,sans-serif;
  fill:#F3C969;
  opacity:0.7;
  letter-spacing:0.5px;
  text-transform:uppercase;
}

/* ───────── New-gen AI-style dashboard ───────── */
.dash-hero{
  border-radius:24px;
  background:linear-gradient(135deg, #111113 0%, #1a1a1e 50%, #252528 100%);
  color:#f5f4ef;
  padding:32px 28px;
  margin:0 0 22px;
  box-shadow:0 12px 40px rgba(0,0,0,0.18);
  position:relative;
  overflow:hidden;
}
.dash-hero::before{
  content:"";position:absolute;inset:-80px -60px auto auto;
  width:320px;height:320px;border-radius:50%;
  background:radial-gradient(circle, rgba(212,168,66,0.30) 0%, rgba(212,168,66,0) 70%);
  pointer-events:none;
}
.dash-hero .hello{font-size:13px;letter-spacing:2px;text-transform:uppercase;color:#d4a842;font-weight:600;margin-bottom:6px}
.dash-hero h1{font-size:32px;margin:0 0 4px;letter-spacing:-0.02em;color:#fff}
.dash-hero .subline{font-size:15px;color:#b8b7b0;margin-bottom:22px}
.ask-box{
  position:relative;background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.12);border-radius:16px;
  padding:4px 4px 4px 20px;display:flex;align-items:center;gap:10px;
  backdrop-filter:blur(8px);transition:border-color 0.2s, box-shadow 0.2s;
}
.ask-box:focus-within{border-color:#D4A842;box-shadow:0 0 0 4px rgba(212,168,66,0.18)}
.ask-box .spark{font-size:18px;color:#D4A842;user-select:none}
.ask-box input{flex:1;background:transparent;border:0;outline:0;color:#fff;font-size:16px;padding:14px 0}
.ask-box input::placeholder{color:#7a7a7a}
.ask-box button{
  background:linear-gradient(135deg,#D4A842,#F3C969);color:#0c0c10;
  border:0;padding:12px 22px;border-radius:12px;font-weight:700;cursor:pointer;font-size:14px;
  transition:transform 0.1s;
}
.ask-box button:hover{transform:translateY(-1px)}
.ask-box button:disabled{opacity:0.5;cursor:wait}
.suggest-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.suggest-chips button{
  background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.12);
  color:#d9d8d2;font-size:12px;padding:7px 13px;border-radius:999px;cursor:pointer;
  transition:background 0.15s,color 0.15s;
}
.suggest-chips button:hover{background:rgba(212,168,66,0.15);color:#fff}
.ai-convo{margin:18px 0 8px}
.ai-msg{
  background:#fff;border:1px solid var(--line);border-radius:16px;
  padding:18px 20px;margin:10px 0;box-shadow:0 2px 10px rgba(12,12,16,0.04);
}
.ai-msg.you{background:#f8f7f2}
.ai-msg.you::before{content:"You asked";display:block;font-size:11px;letter-spacing:1.4px;text-transform:uppercase;color:#8c6a1f;font-weight:600;margin-bottom:6px}
.ai-msg.bidit::before{content:"\2728 Bidit AI";display:block;font-size:11px;letter-spacing:1.4px;text-transform:uppercase;color:#8c6a1f;font-weight:700;margin-bottom:8px}
.ai-msg.bidit{border-left:3px solid #D4A842}
.ai-msg .md p{margin:0 0 10px;line-height:1.55}
.ai-msg .md p:last-child{margin-bottom:0}
.ai-msg .md ul,.ai-msg .md ol{margin:8px 0;padding-left:22px}
.ai-msg .md li{margin:4px 0;line-height:1.5}
.ai-msg .md code{background:#f0ebe0;padding:1px 5px;border-radius:4px;font-size:13px}
.ai-msg .md strong{color:#0c0c10}
.ai-msg.thinking{color:#8c6a1f;font-style:italic}
.ai-msg.error{border-left-color:#c84a3a;background:#fff3f1}
.kpi-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:14px 0 26px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px 18px}
.kpi .k{font-size:11px;letter-spacing:1.4px;text-transform:uppercase;color:var(--muted);font-weight:600}
.kpi .v{font-size:28px;font-weight:800;letter-spacing:-0.02em;margin-top:4px}
.kpi .v.warn{color:#a36a00}
.kpi .v.good{color:#2e7d32}
.kpi .v.bad{color:#c84a3a}
.kpi .sub{font-size:12px;color:var(--muted);margin-top:2px}
.req-card{
  background:#fff;border:1px solid var(--line);border-radius:16px;
  padding:18px 20px;margin:10px 0;display:flex;justify-content:space-between;
  align-items:flex-start;gap:16px;transition:border-color 0.15s, box-shadow 0.15s;
}
.req-card:hover{border-color:#D4A842;box-shadow:0 4px 16px rgba(212,168,66,0.10)}
.req-card .head{display:flex;align-items:center;gap:10px;margin-bottom:4px}
.req-card .emoji{font-size:26px}
.req-card h3{margin:0;font-size:17px;font-weight:700}
.req-card .meta{color:var(--muted);font-size:13px;margin:6px 0 10px}
.req-card .cta-col{text-align:right;white-space:nowrap;display:flex;flex-direction:column;gap:8px;min-width:110px}
.status-chip{display:inline-block;padding:3px 10px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:0.4px;text-transform:uppercase}
.status-chip.open,.status-chip.receiving,.status-chip.reviewing,.status-chip.submitted,.status-chip.in_arena{background:#e0efff;color:#1858a8}
.status-chip.awarded,.status-chip.won{background:#e8f5e9;color:#2e7d32}
.status-chip.expired,.status-chip.cancelled,.status-chip.lost,.status-chip.withdrawn{background:#f3efe8;color:#8c8575}
.section-label{font-size:12px;letter-spacing:1.6px;text-transform:uppercase;color:var(--muted);font-weight:700;margin:28px 0 10px}

@media (max-width: 640px){
  .dash-hero{padding:22px 18px;border-radius:18px}
  .dash-hero h1{font-size:24px}
  .ask-box{padding:4px 4px 4px 14px;flex-wrap:wrap}
  .ask-box input{font-size:15px;padding:12px 0}
  .ask-box button{padding:10px 16px;font-size:13px}
  .req-card{flex-direction:column;align-items:stretch}
  .req-card .cta-col{text-align:left;flex-direction:row;align-items:center;min-width:0}
  .kpi-row{grid-template-columns:1fr 1fr}
  .kpi .v{font-size:22px}
}

/* ───── Global responsive safety net ───── */
html,body{overflow-x:hidden;max-width:100vw}
img,video,svg{max-width:100%;height:auto}
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
.table-wrap table{min-width:520px}
@media (max-width: 640px){
  .btn,button,[role="button"]{min-height:44px}
  body{font-size:15px}
  .muted,.sub,.meta,small{font-size:13px !important}
  small{font-size:12.5px !important}
  table{display:block;overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
}
@media (max-width: 360px){
  main{padding:20px 12px}
  h1{font-size:24px}
  header{padding:10px 12px}
}
