/* Tip Ledger — iOS app demo, embedded on /live-demo section 02.
   Eight iPhone frames sharing one live state model (see tip-ledger.js).
   Scoped under .tl-embed; tokens per the handoff's Tip Ledger visual spec. */

.tl-embed {
  --app-bg: oklch(0.13 0.018 20);
  --card: oklch(0.19 0.024 20);
  --card-2: oklch(0.23 0.028 20);
  --line: color-mix(in srgb, #ede9e9 13%, transparent);
  --accent: oklch(0.62 0.16 22);
  --accent-3: oklch(0.80 0.08 22);
  --accent-2: oklch(0.88 0.05 22);
  --dim: oklch(0.66 0.02 20);
  --dim-2: oklch(0.55 0.02 20);
  --good: oklch(0.72 0.09 155);
  background: linear-gradient(165deg, oklch(0.14 0.02 18) 0%, oklch(0.19 0.04 20) 60%, oklch(0.26 0.08 22) 100%);
  color: oklch(0.94 0.008 20);
  font-family: 'Space Grotesk', sans-serif;
}

.tl-mono { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }

/* — role bar (non-scrolling, above the strip) — */
.tl-rolebar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 20px 24px 0; }
.tl-roleswitch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, #000 25%, transparent); }
.tl-rolebtn {
  padding: 8px 18px; border-radius: 999px; border: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; background: transparent; color: var(--dim);
}
.tl-rolebtn.active { background: color-mix(in srgb, var(--accent) 26%, transparent); color: var(--accent-2); }

/* — horizontal strip of eight frames — */
.tl-scroll { overflow-x: auto; overflow-y: hidden; }
.tl-strip { display: flex; flex-wrap: nowrap; gap: 40px; align-items: flex-start; width: max-content; padding: 24px 24px 16px; }
.tl-strip figure { margin: 0; display: flex; flex-direction: column; gap: 14px; width: 402px; flex-shrink: 0; }
.tl-cap { font-size: 13px; color: var(--dim); line-height: 1.5; }
.tl-cap strong { color: oklch(0.92 0.01 20); font-weight: 500; }

.tl-disclaimer { padding: 8px 24px 24px; font-size: 12.5px; color: var(--dim-2); line-height: 1.6; max-width: 860px; }

/* — iPhone bezel (presentation only) — */
.phone {
  width: 402px; height: 874px; border-radius: 48px; overflow: hidden; position: relative;
  background: #000;
  box-shadow: 0 40px 80px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.12);
  -webkit-font-smoothing: antialiased;
}
.phone-island {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 126px; height: 37px; border-radius: 24px; background: #000; z-index: 50;
}
.phone-status {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; padding: 21px 24px 19px; box-sizing: border-box;
}
.phone-status .t {
  flex: 1; display: flex; align-items: center; justify-content: center; padding-top: 1.5px;
  font-family: -apple-system, 'SF Pro', system-ui, sans-serif; font-weight: 590; font-size: 17px; line-height: 22px; color: #fff;
}
.phone-status .r { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding-top: 1px; }
.phone-home {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 60; height: 34px;
  display: flex; justify-content: center; align-items: flex-end; padding-bottom: 8px; pointer-events: none;
}
.phone-home span { width: 139px; height: 5px; border-radius: 100px; background: rgba(255,255,255,0.7); }

/* — screen scaffolding — */
.phone-screen { height: 100%; background: var(--app-bg); display: flex; flex-direction: column; font-family: 'Space Grotesk', sans-serif; }
.tl-head { padding: 68px 20px 14px; }
.tl-title { font-family: 'Unbounded', sans-serif; font-weight: 500; font-size: 24px; margin: 0 0 2px; }
.tl-sub { font-size: 13.5px; color: var(--dim); }
.tl-stepno { font-size: 12px; font-family: 'IBM Plex Mono', monospace; color: var(--dim-2); letter-spacing: .06em; }
.tl-body { padding: 0 20px; display: flex; flex-direction: column; gap: 12px; overflow: auto; min-height: 0; }
.tl-card { border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.tl-kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim-2); }
.tl-foot {
  margin-top: auto; padding: 14px 20px 34px; border-top: 1px solid var(--line);
  background: color-mix(in srgb, #000 30%, transparent);
}
.tl-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px;
  border-radius: 14px; border: 1px solid var(--accent); color: var(--accent-2); font-size: 16px; font-weight: 500;
}

/* — controls — */
.tl-step {
  width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line);
  background: color-mix(in srgb, #000 30%, transparent); color: oklch(0.9 0.01 20);
  font-size: 22px; line-height: 1; cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.tl-step.sm { width: 38px; height: 38px; font-size: 18px; }
.tl-seg { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, #000 30%, transparent); }
.tl-segbtn {
  flex: 1; padding: 9px 0; border-radius: 8px; border: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; background: transparent; color: var(--dim);
}
.tl-segbtn.active { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--accent-2); }
.tl-bar { flex: 1; height: 6px; border-radius: 999px; background: color-mix(in srgb, #000 40%, transparent); overflow: hidden; }
.tl-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.tl-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  font-family: 'IBM Plex Mono', monospace;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-2);
}
