/* claude.css — shared surface + components for the "designed by Claude" prototypes.
   Builds on colors_and_type.css tokens (cream/paper palette, fonts, easing).
   Design thesis (see each viewer page's doc): numbers are the hero, the home is a
   worklist not a dashboard, settle is deliberate and honours the two-party
   confirm-receipt model, and the first real session is a designed state — never a void. */

/* ============ PAGE BACKDROP (dark stage behind the phone) ============ */
html, body {
  min-height: 100vh;
  background: #2A2520;
  overflow-x: hidden;
}
body {
  display: grid;
  place-items: center;
  padding: 32px 16px;
  margin: 0;
}
body::before { display: none; }

/* ============ PHONE SURFACE ============ */
.screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
.screen::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: .35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0 0.07 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

.scroller {
  position: absolute;
  inset: 0;
  padding-top: 54px;
  padding-bottom: 132px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 2;
  -webkit-overflow-scrolling: touch;
}
.scroller::-webkit-scrollbar { display: none; }

/* ============ TOP BAR ============ */
.c-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 16px;
}
.c-brand { display: flex; align-items: center; gap: 12px; }
.c-logo {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  transform: rotate(-6deg);
  box-shadow: var(--shadow-sm);
}
.c-greeting {
  font-size: 14px;
  color: var(--ink-mute);
  letter-spacing: -0.01em;
}
.c-greeting strong { font-weight: 600; color: var(--ink); }
.c-me {
  width: 34px; height: 34px;
  border-radius: 999px;
  background: var(--teal-pale);
  color: var(--teal-deep);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid rgba(14,124,102,.18);
}

/* ============ BALANCE HERO — typographic, number-first ============ */
.c-hero {
  margin: 0 16px;
  padding: 24px 22px 20px;
  border-radius: var(--r-xl);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.c-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.c-hero-net {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin: 8px 0 2px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 72px;
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-variation-settings: "opsz" 96;
  font-variant-numeric: tabular-nums lining-nums;
}
.c-hero-net .cur {
  font-size: 0.4em;
  font-weight: 500;
  opacity: .72;
  transform: translateY(-0.42em);
  margin-right: 0.04em;
}
.c-hero-net.teal { color: var(--teal); }
.c-hero-net.coral { color: var(--ink); }
.c-hero-sub {
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}
.c-hero-sub .amt { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.c-hero-sub .amt.teal { color: var(--teal); }
.c-hero-sub .amt.coral { color: var(--coral); }
.c-hero-rule { margin: 16px -22px; border-top: 1px dashed var(--line); }
.c-hero-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.c-hero-foot a { color: var(--teal); text-decoration: none; }

/* ============ WORKLIST ============ */
.c-section { margin: 28px 16px 0; }
.c-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 2px 10px;
}
.c-section-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.c-section-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.c-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 4px 14px;
  box-shadow: var(--shadow-sm);
}
.c-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
}
.c-row + .c-row { border-top: 1px dashed var(--line); }
.c-av {
  width: 34px; height: 34px;
  border-radius: 999px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}
.c-av.emoji {
  background: transparent;
  font-family: 'Apple Color Emoji','Segoe UI Emoji', system-ui, sans-serif;
  font-size: 20px; font-weight: 400;
}
.c-row-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.c-row-line { font-size: 14.5px; color: var(--ink); letter-spacing: -0.005em; line-height: 1.3; }
.c-row-line .amt { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.c-row-line .amt.teal { color: var(--teal); }
.c-row-line .amt.coral { color: var(--coral); }
.c-row-meta {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.c-row-meta .gly { font-family: 'Apple Color Emoji','Segoe UI Emoji', system-ui, sans-serif; letter-spacing: 0; text-transform: none; }

/* pending settlement marker — the state the existing prototypes skipped */
.c-pending-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--butter);
  box-shadow: 0 0 0 3px rgba(244,201,78,.22);
  animation: cPulse 2.4s ease-in-out infinite;
}
@keyframes cPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ============ PILLS ============ */
.c-pill {
  flex-shrink: 0;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: none;
  transition: background var(--d-fast) var(--ease-out), transform var(--d-fast) var(--ease-out);
}
.c-pill:active { transform: scale(0.97); }
.c-pill.solid { background: var(--teal); color: var(--paper); }
.c-pill.ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.c-pill.pending { background: rgba(244,201,78,.18); color: #6B5208; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .c-pill.solid:hover { background: var(--teal-deep); }
  .c-pill.ghost:hover { background: rgba(23,21,19,.04); }
}

/* ============ FIRST-RUN / EMPTY STATES ============ */
.c-firstrun { margin: 0 16px; padding: 26px 22px 22px; border-radius: var(--r-xl);
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.c-firstrun h2 { font-family: var(--font-display); font-weight: 600; font-size: 24px;
  letter-spacing: -0.03em; margin: 0 0 6px; }
.c-firstrun p { font-size: 14px; color: var(--ink-soft); line-height: 1.45; margin: 0 0 18px; }
.c-firstrun .chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px;
  background: var(--bg); border: 1px dashed var(--line);
  font-size: 13.5px; color: var(--ink);
}
.c-settled-wrap { margin: 0 16px; padding: 40px 24px; border-radius: var(--r-xl);
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  text-align: center; position: relative; overflow: hidden; }
.c-settled-badge { width: 52px; height: 52px; border-radius: 999px; margin: 0 auto 14px;
  background: var(--butter); color: var(--ink); display: grid; place-items: center;
  font-size: 24px; font-weight: 700; }
.c-settled-wrap h2 { font-family: var(--font-display); font-weight: 600; font-size: 26px;
  letter-spacing: -0.03em; margin: 0 0 4px; }
.c-settled-wrap p { font-size: 14px; color: var(--ink-mute); margin: 0; }

/* ============ CONFIRM SHEET (deliberate settle) ============ */
.c-sheet-scrim {
  position: absolute; inset: 0; z-index: 90;
  background: rgba(23,21,19,.32);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 220ms var(--ease-out);
}
.c-sheet-scrim.show { opacity: 1; pointer-events: auto; }
.c-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 91;
  background: var(--paper);
  border-radius: 26px 26px 0 0;
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-float);
  padding: 10px 22px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 360ms var(--ease-spring);
}
.c-sheet.show { transform: translateY(0); }
.c-sheet-grab { width: 38px; height: 4px; border-radius: 999px; background: var(--line);
  margin: 4px auto 16px; }
.c-sheet h3 { font-family: var(--font-display); font-weight: 600; font-size: 20px;
  letter-spacing: -0.02em; margin: 0 0 4px; }
.c-sheet .lede { font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; margin: 0 0 16px; }
.c-sheet .pay-amt { font-family: var(--font-display); font-weight: 600; font-size: 40px;
  letter-spacing: -0.04em; color: var(--ink); margin: 2px 0 2px; font-variant-numeric: tabular-nums; }
.c-sheet .pay-amt .cur { font-size: 0.45em; opacity: .7; font-weight: 500; }
.c-sheet-note {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 12px; color: var(--ink-mute); line-height: 1.4;
  background: var(--bg); border: 1px dashed var(--line); border-radius: 12px;
  padding: 10px 12px; margin: 14px 0 16px;
}
.c-sheet-actions { display: flex; gap: 10px; }
.c-btn {
  flex: 1; height: 48px; border-radius: 14px; border: none;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  cursor: pointer; letter-spacing: -0.01em;
  transition: background var(--d-fast) var(--ease-out), transform var(--d-fast) var(--ease-out);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.c-btn:active { transform: scale(0.98); }
.c-btn.primary { background: var(--teal); color: var(--paper); }
.c-btn.secondary { background: var(--bg); color: var(--ink-soft); border: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { .c-btn.primary:hover { background: var(--teal-deep); } }

/* ============ TAB BAR (frosted, thumb-zone add) ============ */
.c-tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 10px 16px 28px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.15); backdrop-filter: blur(18px) saturate(1.15);
  border-top: 1px solid var(--glass-border);
}
.c-tabrow { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; }
.c-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0;
  cursor: pointer; color: var(--ink-mute); }
.c-tab.active { color: var(--ink); }
.c-tab .glyph { width: 22px; height: 22px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.04em; }
.c-tab .lbl { font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; }
.c-tab.add .add-btn {
  width: 52px; height: 52px; border-radius: 999px;
  background: var(--teal); color: var(--paper);
  display: grid; place-items: center;
  box-shadow: 0 1px 0 rgba(23,21,19,.04), 0 10px 20px -6px rgba(14,124,102,.45), 0 0 0 1px rgba(255,255,255,.55) inset;
  font-family: var(--font-display); font-weight: 500; font-size: 28px; letter-spacing: -0.04em;
  transition: transform var(--d-fast) var(--ease-out), background var(--d-fast) var(--ease-out);
  cursor: pointer; transform: translateY(-4px);
}
.c-tab.add .add-btn:active { transform: translateY(-4px) scale(0.94); }
@media (hover: hover) and (pointer: fine) { .c-tab.add .add-btn:hover { background: var(--teal-deep); } }

/* ============ TOAST ============ */
.c-toast {
  position: absolute; left: 50%; bottom: 108px; z-index: 95;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink); color: var(--paper);
  font-size: 13px; font-weight: 500; letter-spacing: -0.005em;
  padding: 11px 16px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-float);
  opacity: 0; pointer-events: none;
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
  white-space: nowrap;
}
.c-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ STAGGERED REVEAL ============ */
.c-reveal { opacity: 0; transform: translateY(8px); animation: cRise var(--d-med) var(--ease-out) forwards; }
.c-reveal.r1 { animation-delay: 40ms; }
.c-reveal.r2 { animation-delay: 110ms; }
.c-reveal.r3 { animation-delay: 180ms; }
.c-reveal.r4 { animation-delay: 250ms; }
@keyframes cRise { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .c-reveal, .c-reveal * { animation: none !important; opacity: 1 !important; transform: none !important; }
  .c-pending-dot { animation: none !important; }
}
