:root {
  color-scheme: dark;
  --paper: #050505;
  --panel: #0c0c0c;
  --ink: #f5f4ef;
  --muted: #9a9a92;
  --line: #242424;
  --accent: #d9f8e9;
  --accent-strong: #78e6b9;
  --warn: #f4cf7a;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 72px 72px,
    radial-gradient(circle at 76% 22%, rgba(217, 248, 233, .11), transparent 28%),
    var(--paper);
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0a0a0a;
  color: var(--ink);
  text-decoration: none;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.iphone-workspace {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 460px) minmax(360px, 620px);
  align-items: center;
  justify-content: center;
  gap: 42px;
  padding: 42px;
}

.phone-shell {
  width: min(100%, 420px);
  margin: 0 auto;
  border: 1px solid #323232;
  border-radius: 38px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .08), transparent 36%),
    #050505;
  padding: 13px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .48);
}

.phone-screen {
  min-height: 830px;
  max-height: 860px;
  overflow: auto;
  border: 1px solid #171717;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 24%),
    #080808;
  padding: 18px;
}

.mobile-top,
.mobile-brand,
.mobile-card-head,
.approval-actions,
.handoff-actions,
.testflight-head,
.testflight-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-top {
  justify-content: space-between;
  margin-bottom: 18px;
}

.mobile-brand img {
  width: 28px;
  height: 28px;
}

.mobile-brand strong,
.mobile-brand small,
.mobile-card strong,
.mobile-card small,
.mobile-card span,
.mobile-card em {
  display: block;
}

.mobile-brand small,
.mobile-top em,
.quota-tile small,
.mobile-metrics span,
.mobile-card p,
.mobile-card small,
.mobile-card-head em,
.mobile-search span,
.mobile-handoff p,
.handoff-grid span,
.testflight-score small,
.testflight-meta span,
.testflight-files span,
.mobile-focus p,
.mobile-focus-cards span,
.mobile-focus-cards small {
  color: var(--muted);
}

.mobile-top em,
.mobile-card-head em {
  font-size: 12px;
  font-style: normal;
}

.quota-tile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 126px;
  border: 1px solid rgba(217, 248, 233, .45);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(217, 248, 233, .1), transparent 52%),
    #0b0b0b;
  padding: 18px;
}

.quota-tile span {
  color: var(--accent-strong);
  font-size: 12px;
  text-transform: uppercase;
}

.quota-tile strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 48px;
  line-height: .95;
}

.quota-ring {
  width: 76px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #080808 0 54%, transparent 55%),
    conic-gradient(var(--accent-strong) var(--quota), #252525 0);
}

.mobile-metrics,
.mobile-tabs,
.mobile-list,
.handoff-grid,
.mobile-focus-cards {
  display: grid;
  gap: 10px;
}

.mobile-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0;
}

.mobile-metrics article,
.mobile-card,
.mobile-empty,
.mobile-focus,
.mobile-focus-cards article,
.mobile-handoff,
.handoff-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 12, 12, .9);
}

.mobile-focus {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(217, 248, 233, .09), transparent 58%),
    #0b0b0b;
}

.mobile-focus-head,
.mobile-focus-cards article {
  display: grid;
  gap: 8px;
}

.mobile-focus-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.mobile-focus-head h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.08;
}

.mobile-focus-head p:not(.eyebrow) {
  margin: 8px 0 0;
  line-height: 1.45;
}

.mobile-focus-head button {
  min-width: 56px;
  min-height: 38px;
  padding: 8px 10px;
  border-color: var(--accent);
  background: var(--ink);
  color: var(--paper);
}

.mobile-focus-cards {
  grid-template-columns: 1fr;
}

.mobile-focus-cards article {
  min-height: 96px;
  padding: 12px;
  background: rgba(5, 5, 5, .68);
}

.mobile-focus-cards span {
  color: var(--accent-strong);
  font-size: 12px;
}

.mobile-focus-cards strong {
  font-size: 16px;
  line-height: 1.28;
}

.mobile-focus-cards p {
  margin: 0;
  line-height: 1.42;
}

.mobile-focus-cards small {
  font-size: 12px;
}

.mobile-metrics article {
  min-height: 66px;
  padding: 10px;
}

.mobile-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.mobile-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.mobile-tabs button {
  min-height: 42px;
  padding: 8px 6px;
  color: var(--muted);
}

.mobile-tabs button.active {
  border-color: var(--accent);
  background: var(--ink);
  color: var(--paper);
}

.mobile-search {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #050505;
  color: var(--ink);
  padding: 11px 12px;
}

.mobile-card,
.mobile-empty {
  padding: 14px;
}

.mobile-card.completed,
.mobile-card.approved {
  border-color: rgba(120, 230, 185, .48);
}

.mobile-card.rejected {
  border-color: rgba(244, 207, 122, .48);
}

.mobile-card-head {
  justify-content: space-between;
  margin-bottom: 10px;
}

.mobile-card-head span {
  color: var(--accent-strong);
  font-size: 12px;
}

.mobile-card strong {
  font-size: 17px;
}

.mobile-card p {
  margin: 9px 0;
  line-height: 1.55;
}

.mobile-card button {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
}

.approval-actions button {
  flex: 1;
}

.progress-line {
  height: 8px;
  margin: 12px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #252525;
}

.progress-line span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.reminder-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  align-items: center;
}

.switch-button {
  width: 54px;
  height: 32px;
  margin: 0;
  border-radius: 999px;
  padding: 3px;
}

.switch-button span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .18s ease, background .18s ease;
}

.switch-button.on span {
  transform: translateX(20px);
  background: var(--accent-strong);
}

.mobile-handoff {
  display: grid;
  gap: 20px;
  padding: 26px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.mobile-handoff h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(44px, 7vw, 84px);
  line-height: .92;
}

.mobile-handoff p {
  max-width: 58ch;
  line-height: 1.7;
}

.handoff-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.handoff-grid article {
  min-height: 120px;
  padding: 16px;
}

.handoff-grid strong {
  display: block;
  margin-top: 12px;
}

.handoff-actions {
  flex-wrap: wrap;
}

.handoff-actions a {
  padding: 11px 14px;
}

.testflight-panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.testflight-head {
  justify-content: space-between;
}

.testflight-head h2 {
  margin: 0;
  font-size: 22px;
}

.testflight-head button,
.testflight-check button {
  min-height: 36px;
  padding: 8px 11px;
}

.testflight-score {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(217, 248, 233, .36);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(217, 248, 233, .08), transparent 60%),
    #080808;
  padding: 12px;
}

.testflight-score.ready {
  border-color: rgba(120, 230, 185, .65);
}

.testflight-score span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.testflight-score strong {
  font-size: 30px;
  line-height: 1;
}

.testflight-note {
  margin: 0;
  border-left: 2px solid rgba(120, 230, 185, .62);
  color: var(--muted);
  line-height: 1.55;
  padding-left: 10px;
}

.testflight-meta,
.testflight-files {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.testflight-meta article,
.testflight-files article {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 5, 5, .68);
  padding: 10px;
}

.testflight-meta strong,
.testflight-files code {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.testflight-files code {
  color: var(--ink);
  font-size: 11px;
}

.testflight-checks {
  display: grid;
  gap: 8px;
}

.testflight-check {
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 5, 5, .54);
  padding: 10px;
}

.testflight-check.done {
  border-color: rgba(120, 230, 185, .38);
}

.testflight-check span {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.testflight-check strong {
  flex: 1;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .iphone-workspace {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .mobile-handoff h1 {
    max-width: none;
    font-size: 42px;
  }
}

@media (max-width: 520px) {
  body {
    background: #050505;
  }

  .iphone-workspace {
    min-height: 100vh;
    padding: 0;
  }

  .phone-shell {
    width: 100%;
    border: 0;
    border-radius: 0;
    padding: 0;
  }

  .phone-screen {
    min-height: 100vh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .mobile-handoff {
    border-radius: 0;
  }

  .handoff-grid,
  .mobile-focus-cards,
  .mobile-metrics,
  .testflight-meta,
  .testflight-files {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .testflight-score,
  .testflight-check {
    grid-template-columns: 1fr;
  }

  .testflight-check {
    align-items: stretch;
    flex-direction: column;
  }
}
