/* Talk and Track — Design system tokens & primitives */

:root {
  /* Type */
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Brand */
  --blue-50:  #EEF3FF;
  --blue-100: #DCE6FF;
  --blue-200: #B7CBFF;
  --blue-400: #6A93FB;
  --blue-500: #3B6EF6;   /* primary */
  --blue-600: #2A5AE8;
  --blue-700: #1E47C7;
  --blue-900: #14266B;

  /* Accents */
  --green-50:  #ECFDF5;
  --green-100: #D1FAE5;
  --green-500: #10B981;
  --green-600: #059669;

  --amber-50:  #FFF8EB;
  --amber-100: #FEF2D2;
  --amber-500: #F59E0B;
  --amber-600: #D97706;

  --rose-100: #FFE4E6;
  --rose-500: #F43F5E;

  /* Surfaces & ink */
  --bg:        #F6F7FB;
  --bg-soft:   #F0F3FA;
  --surface:   #FFFFFF;
  --surface-2: #FAFBFD;
  --line:      #E4E8EF;
  --line-2:    #EEF1F6;

  --ink-900: #0F172A;
  --ink-800: #1E293B;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748B;
  --ink-400: #94A3B8;
  --ink-300: #CBD2DC;

  /* Radius / shadow */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-2xl: 28px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 1px 1px rgba(15,23,42,.03);
  --shadow-md: 0 6px 18px -8px rgba(30,71,199,.18), 0 2px 6px rgba(15,23,42,.04);
  --shadow-lg: 0 20px 48px -16px rgba(30,71,199,.25), 0 4px 12px rgba(15,23,42,.06);
}

/* Reset within frames */
.tt, .tt * { box-sizing: border-box; }
.tt {
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  line-height: 1.4;
  height: 100%;
  width: 100%;
}

/* ===== Type ===== */
.tt-h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.tt-h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.tt-h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.tt-h4 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.tt-body { font-size: 14px; color: var(--ink-700); }
.tt-small { font-size: 12.5px; color: var(--ink-500); }
.tt-tiny { font-size: 11px; color: var(--ink-500); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.tt-num { font-family: var(--font-mono); font-feature-settings: "tnum"; }

.tt a { color: var(--blue-600); text-decoration: none; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-md); font: inherit; font-size: 14px;
  font-weight: 600; border: 1px solid transparent; cursor: pointer; transition: all .15s; white-space: nowrap; }
.btn-primary { background: var(--blue-500); color: #fff; box-shadow: 0 1px 2px rgba(30,71,199,.3), inset 0 1px 0 rgba(255,255,255,.15); }
.btn-primary:hover { background: var(--blue-600); }
.btn-secondary { background: var(--surface); color: var(--ink-800); border-color: var(--line); }
.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; height: 36px; }

/* ===== Card ===== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-soft { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); }

/* ===== Pills / chips / badges ===== */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--bg-soft); color: var(--ink-700); }
.pill-blue   { background: var(--blue-50);  color: var(--blue-700); }
.pill-green  { background: var(--green-50); color: var(--green-600); }
.pill-amber  { background: var(--amber-50); color: var(--amber-600); }
.pill-rose   { background: var(--rose-100); color: var(--rose-500); }
.pill-ink    { background: var(--ink-900);  color: #fff; }
.pill-outline{ background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-700); }
.dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

/* ===== Inputs ===== */
.input { height: 44px; width: 100%; padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 14px; color: var(--ink-900); }
.input:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 4px var(--blue-50); }
.input-lg { height: 52px; font-size: 15px; }
.label { font-size: 12.5px; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; display: block; }

/* ===== Avatar ===== */
.av { width: 36px; height: 36px; border-radius: 999px; background: var(--blue-100);
  color: var(--blue-700); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }

/* ===== Progress bar ===== */
.bar { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--blue-500); border-radius: 999px; }
.bar-green > i { background: var(--green-500); }
.bar-amber > i { background: var(--amber-500); }
.bar-sm { height: 5px; }

/* ===== Brand mark ===== */
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px;
  letter-spacing: -0.02em; color: var(--ink-900); }
.brand-dot {
  width: 22px; height: 22px; border-radius: 7px;
  background:
    radial-gradient(circle at 30% 30%, #6A93FB 0%, var(--blue-500) 55%, var(--blue-700) 100%);
  position: relative; box-shadow: inset 0 -2px 4px rgba(0,0,0,.18), 0 2px 6px rgba(59,110,246,.4);
}
.brand-dot::after {
  content: ""; position: absolute; right: -3px; bottom: -2px;
  width: 9px; height: 9px; border-radius: 999px; background: var(--green-500);
  box-shadow: 0 0 0 2px #fff;
}

/* ===== Misc ===== */
.divider { height: 1px; background: var(--line-2); }
.kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border-radius: 5px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-600); }

/* Soft striped placeholder (for images we don't have) */
.placeholder {
  background:
    repeating-linear-gradient(135deg, #E4E8EF 0 8px, #EEF1F6 8px 16px);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-500); font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .04em; border-radius: var(--r-md);
  text-align: center;
}

/* Layout helpers */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.center { align-items: center; justify-content: center; }
.aic { align-items: center; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-14 { gap: 14px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

/* Soundwave bars */
.wave { display: inline-flex; align-items: end; gap: 3px; }
.wave > span { width: 3px; background: var(--blue-500); border-radius: 999px; display: block; animation: tt-wave 1.2s ease-in-out infinite; }
.wave > span:nth-child(1) { height: 30%; animation-delay: 0s; }
.wave > span:nth-child(2) { height: 60%; animation-delay: .1s; }
.wave > span:nth-child(3) { height: 90%; animation-delay: .2s; }
.wave > span:nth-child(4) { height: 70%; animation-delay: .3s; }
.wave > span:nth-child(5) { height: 45%; animation-delay: .4s; }
.wave > span:nth-child(6) { height: 75%; animation-delay: .5s; }
.wave > span:nth-child(7) { height: 50%; animation-delay: .6s; }
@keyframes tt-wave {
  0%,100% { transform: scaleY(.55); }
  50% { transform: scaleY(1.4); }
}

/* Mock browser chrome */
.window { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-md); }
.window-bar { height: 36px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); display: flex; align-items: center; padding: 0 14px; gap: 6px; }
.window-bar i { width: 11px; height: 11px; border-radius: 999px; background: #E4E8EF; display: inline-block; }
.window-bar i:nth-child(1){ background:#FF5F57; }
.window-bar i:nth-child(2){ background:#FEBC2E; }
.window-bar i:nth-child(3){ background:#28C840; }
.window-bar .url { margin-left: 18px; flex: 1; height: 22px; background: var(--bg); border-radius: 999px;
  display: flex; align-items: center; padding: 0 10px; font: 500 11px/1 var(--font-mono); color: var(--ink-500); }

/* iOS status bar */
.ios-bar { height: 44px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between;
  font: 600 14px var(--font-sans); color: var(--ink-900); background: transparent; }
.ios-bar .right { display: flex; gap: 6px; align-items: center; }
