/* Canopy — shared mockup chrome. Gold on charcoal. TestFlight, not a slide. */

:root {
  --ink: #f3ead3;
  --ink-dim: #c9bda0;
  --gold: #c4a35a;
  --gold-2: #d4b56a;
  --gold-dim: #8a7340;
  --charcoal: #12100c;
  --void: #0c0b09;
  --card: #1c1814;
  --card-2: #241f19;
  --card-3: #2c261e;
  --muted: #8a8070;
  --rule: #3e3426;
  --ok: #8aaa62;
  --ok-dim: #3d4a2c;
  --hold: #d4a84b;
  --warn: #c46a4a;
  --dock: #6a6560;
  --wheat: #8a9444;
  --vine: #3f5a3c;
  --sun: #b08a2a;
  --bezel: #161410;
  --titanium: #2e2a24;
  --safe-top: 54px;
  --tab-h: 72px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
  --serif: "IBM Plex Serif", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  height: 100%;
  overflow: hidden;
}
button, input { font-family: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; user-select: none; touch-action: manipulation; }
a { color: var(--gold); text-decoration: none; }

/* ——— Link bar (outside the device) ——— */
.linkbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: #0a0908;
  border-bottom: 1px solid var(--rule);
  position: relative;
  z-index: 20;
  flex-shrink: 0;
}
.linkbar a, .linkbar span {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 14px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color .15s;
}
.linkbar a:hover { color: var(--ink); }
.linkbar a.on, .linkbar span.on { color: var(--gold); }
.linkbar .dot { color: var(--rule); padding: 0 2px; pointer-events: none; }

/* ——— Stage ——— */
.stage {
  height: calc(100vh - 44px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 40%, #1a1610 0%, var(--void) 70%);
}
.device-wrap {
  transform-origin: center center;
  will-change: transform;
}

/* ——— Phone chrome (iPhone 15 Pro, 393×852 screen) ——— */
.phone-frame {
  background: linear-gradient(180deg, #3a3630 0%, #1c1a16 40%, #0e0d0b 100%);
  border-radius: 58px;
  padding: 11px;
  box-shadow:
    0 0 0 1px #4a453c,
    0 0 0 2px #1a1814,
    0 30px 80px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.08);
  position: relative;
}
.phone-frame::before,
.phone-frame::after {
  content: "";
  position: absolute;
  width: 3px;
  background: #2a2620;
  border-radius: 2px;
}
.phone-frame::before { /* silent + volume */
  left: -3px; top: 118px; height: 28px;
  box-shadow: 0 42px 0 #2a2620, 0 80px 0 #2a2620;
}
.phone-frame::after { /* power */
  right: -3px; top: 168px; height: 72px;
}
.phone-screen {
  width: 393px;
  height: 852px;
  border-radius: 47px;
  overflow: hidden;
  background: var(--charcoal);
  position: relative;
  isolation: isolate;
}

.island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 36px;
  background: #000;
  border-radius: 20px;
  z-index: 40;
  box-shadow: 0 0 0 3px #000;
}

.statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 54px;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 28px 8px;
  pointer-events: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.statusbar .sb-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.statusbar svg { display: block; }

.home-ind {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 138px;
  height: 5px;
  background: var(--ink);
  border-radius: 100px;
  opacity: .85;
  z-index: 40;
  pointer-events: none;
}

/* ——— iPad chrome (11" landscape, 1194×834 screen) ——— */
.ipad-frame {
  background: linear-gradient(180deg, #3a3630 0%, #1c1a16 50%, #0e0d0b 100%);
  border-radius: 28px;
  padding: 14px;
  box-shadow:
    0 0 0 1px #4a453c,
    0 0 0 2px #1a1814,
    0 24px 70px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.08);
  position: relative;
}
.ipad-cam {
  position: absolute;
  top: 50%;
  left: 6px;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #1a2230;
  box-shadow: inset 0 0 0 2px #0a0c10, 0 0 0 1px #3a3630;
}
.ipad-screen {
  width: 1194px;
  height: 834px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--charcoal);
  position: relative;
}
.ipad-statusbar {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--rule);
  background: #14120e;
}
.ipad-statusbar .brand {
  color: var(--gold);
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 600;
}
.ipad-statusbar .mid { color: var(--ink); font-weight: 600; }
.ipad-home {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  width: 220px;
  height: 5px;
  background: var(--ink);
  border-radius: 100px;
  opacity: .7;
  z-index: 20;
  pointer-events: none;
}

/* ——— App shells ——— */
.app {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.phone-screen .app { padding-top: 54px; padding-bottom: var(--tab-h); }
.view {
  flex: 1;
  overflow: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.view::-webkit-scrollbar { width: 0; }

/* Tab bar */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--tab-h);
  background: rgba(18,16,12,.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--rule);
  display: flex;
  padding: 6px 4px 18px;
  z-index: 25;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  min-height: 44px;
  position: relative;
}
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--gold); }
.tab .live-dot {
  position: absolute;
  top: 2px; right: 22px;
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(196,163,90,.7);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(196,163,90,.55); }
  70% { box-shadow: 0 0 0 8px rgba(196,163,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(196,163,90,0); }
}

/* ——— Type + chrome inside apps ——— */
.kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.h1 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.dim { color: var(--ink-dim); }
.tiny { font-size: 12px; line-height: 1.35; }
.pad { padding: 8px 20px 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 14px 16px;
  position: relative;
}
.card.gold-edge::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 16px 16px 0 0;
}
.card + .card { margin-top: 10px; }
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.stack { display: flex; flex-direction: column; gap: 10px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform .12s, opacity .12s, background .15s;
}
.btn:active { transform: scale(0.98); }
.btn-gold { background: var(--gold); color: #1a1408; }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost {
  background: var(--card-2);
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-hold { background: #3a3020; color: var(--hold); border: 1px solid #5a4a28; }
.btn-ok { background: var(--ok-dim); color: #d4e8b0; border: 1px solid #5a6a3a; }
.btn-warn { background: #3a201c; color: #e8b0a4; border: 1px solid #6a3a30; }
.btn:disabled, .btn.disabled {
  opacity: .4;
  pointer-events: none;
}
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-row-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill-gold { background: #2a2418; color: var(--gold); }
.pill-ok { background: var(--ok-dim); color: #c8e090; }
.pill-hold { background: #3a3020; color: var(--hold); }
.pill-mute { background: var(--card-3); color: var(--muted); }
.pill-live { background: #2a2418; color: var(--gold); }
.pill-live::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 1.8s ease-out infinite;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--card-2);
  color: var(--ink-dim);
  font-size: 14px;
  font-weight: 500;
}
.chip.on { border-color: var(--gold); color: var(--ink); background: #2a2418; }
.chip.locked { opacity: .45; position: relative; }

.fineprint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  text-align: center;
}

/* Map */
.map {
  position: relative;
  background: #16140f;
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
}
.map svg { display: block; width: 100%; height: 100%; }
.map-label {
  font-size: 9px;
  fill: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Sheets / overlays */
.sheet {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(8,7,5,.62);
  display: flex;
  align-items: flex-end;
  animation: fade .2s ease;
}
.sheet-card {
  width: 100%;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  padding: 12px 20px 36px;
  border-top: 1px solid var(--rule);
  animation: up .28s ease;
}
.sheet-handle {
  width: 40px; height: 4px;
  background: var(--rule);
  border-radius: 4px;
  margin: 4px auto 14px;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

.toast {
  position: absolute;
  left: 16px; right: 16px;
  bottom: calc(var(--tab-h) + 12px);
  background: var(--card-3);
  border: 1px solid var(--gold-dim);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  z-index: 45;
  animation: up .25s ease;
}

/* Receipt paper */
.paper {
  background: #f6eed8;
  color: #1a140c;
  border-radius: 8px;
  padding: 16px 16px 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.paper .kicker { color: #8a7340; }
.paper h1 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  margin: 2px 0 2px;
}
.paper .meta { font-size: 11px; color: #6a5e48; letter-spacing: 0.04em; }
.paper table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.paper th {
  text-align: left;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a7340;
  font-weight: 600;
  padding: 3px 0 0;
  width: 36%;
  vertical-align: top;
}
.paper td { font-size: 12px; padding: 2px 0 3px; border-bottom: 1px solid #e0d4b4; }
.paper .stamp {
  margin-top: 10px;
  display: inline-block;
  border: 2px solid #8a7340;
  color: #8a7340;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  transform: rotate(-4deg);
}

/* Matching */
.match-orb {
  width: 72px; height: 72px;
  margin: 8px auto 16px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  position: relative;
}
.match-orb::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  opacity: .4;
  animation: pulse 1.6s ease-out infinite;
}

/* Live bottom sheet inside phone */
.live-sheet {
  background: linear-gradient(180deg, transparent, var(--charcoal) 18px);
  padding: 8px 16px 10px;
}

/* iPad split */
.split {
  display: flex;
  height: calc(100% - 36px);
  padding-bottom: 18px;
}
.split-left {
  width: 380px;
  flex-shrink: 0;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  background: #14120e;
}
.split-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: auto;
}
.job-list { flex: 1; overflow: auto; padding: 10px 12px; }
.job-list::-webkit-scrollbar { width: 0; }

.job-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 8px;
  min-height: 72px;
  text-align: left;
  width: 100%;
  transition: border-color .15s, background .15s;
}
.job-card.on { border-color: var(--gold); background: #221c14; }
.job-card.dock {
  background: #1a1a1a;
  border-color: #3a3a3a;
  color: var(--dock);
}
.job-card.dock.on { border-color: #6a6560; background: #222; }

.actions {
  padding: 10px 12px 8px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.actions .btn { min-height: 56px; font-size: 15px; }

.right-map { height: 268px; margin: 10px 14px 0; flex-shrink: 0; }
.right-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px 8px;
  flex: 1;
  min-height: 0;
}
.tele-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.tele {
  background: var(--card-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 10px 10px 8px;
}
.tele .v {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.tele .l {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 36px;
  font-size: 13px;
  color: var(--ink-dim);
  text-align: left;
  width: 100%;
  padding: 4px 0;
}
.check .box {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1px solid var(--rule);
  background: var(--card-2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.check.on .box { background: var(--gold); border-color: var(--gold); color: #1a1408; }
.check.on { color: var(--ink); }

/* Banner */
.banner {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
}
.banner-hold { background: #3a3020; color: var(--hold); border: 1px solid #5a4a28; }
.banner-ok { background: var(--ok-dim); color: #d4e8b0; border: 1px solid #5a6a3a; }
.banner-live { background: #2a2418; color: var(--gold); border: 1px solid #5a4a28; }

/* Modal on iPad */
.modal {
  position: absolute;
  inset: 0;
  background: rgba(8,7,5,.55);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade .2s ease;
}
.modal-card {
  width: 560px;
  max-height: 86%;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 22px 24px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

/* Hub / desktop pages */
.page {
  height: 100%;
  overflow: auto;
  background: var(--void);
}
.page-inner { max-width: 1080px; margin: 0 auto; padding: 48px 28px 80px; }
.wordmark {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.gold-rule { width: 56px; height: 2px; background: var(--gold); margin: 16px 0 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.plot-hit { cursor: pointer; }
.plot-hit:hover path { filter: brightness(1.12); }
.phone-screen, .ipad-screen { -webkit-user-select: none; user-select: none; }
.paper { -webkit-user-select: text; user-select: text; }
