:root {
  color-scheme: light;
  --app-bg: #f2f5f9;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --line: #d8e0ea;
  --text: #111827;
  --muted: #536174;
  --blue: #1c6fe8;
  --blue-dark: #0f4ea9;
  --cyan: #0ea5d7;
  --red: #c52b2b;
  --orange: #c84b12;
  --green: #178a4b;
  --shadow: 0 16px 38px rgba(26, 47, 79, 0.16);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  background: var(--app-bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}
button { font: inherit; }
.app-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 0;
}
.phone-frame {
  width: min(100%, 430px);
  height: min(850px, 100vh);
  min-height: 640px;
  overflow: hidden;
  background: var(--app-bg);
  border-inline: 1px solid #c4d0de;
  display: flex;
  flex-direction: column;
}
.status-bar {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: #1856ac;
  color: #ffffff;
  font-size: 0.82rem;
}
.status-icons { letter-spacing: 0.02em; }
.hero-card {
  margin: 14px 14px 10px;
  padding: 20px 18px 17px;
  border-radius: 7px;
  color: #ffffff;
  background: linear-gradient(135deg, #114c9c 0%, #1d75ee 100%);
  box-shadow: var(--shadow);
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 38px;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.logo-mark span {
  width: 16px;
  height: 9px;
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(135deg, #8be7ff, #ffffff);
  transform: skewX(-18deg);
  box-shadow: 4px 6px 0 -2px #0c2f65;
}
h1 {
  margin: 0;
  font-size: 1.38rem;
  line-height: 1.05;
}
.hero-card p { margin: 0; }
.brand-row p { margin-top: 2px; color: rgba(255,255,255,0.86); font-size: 0.75rem; }
.score-value {
  display: block;
  margin: 18px 0 4px;
  font-size: 2.4rem;
  line-height: 1;
}
.hero-meta {
  color: rgba(255,255,255,0.9);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}
.hero-copy {
  margin-top: 12px !important;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.38;
}
.tab-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 0 14px 9px;
}
.tab-button {
  min-height: 48px;
  border: 1px solid #ccd6e3;
  border-radius: 7px;
  background: #ffffff;
  color: #172033;
  cursor: pointer;
  font-size: 0.82rem;
  box-shadow: 0 2px 5px rgba(29, 50, 81, 0.08);
}
.tab-button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
}
.screen-stack {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-top: 10px solid #eef3f8;
}
.screen-panel {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 14px 14px 18px;
}
.screen-panel.active { display: block; }
.card {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(24, 47, 81, 0.05);
}
.panel-card {
  margin-bottom: 14px;
  padding: 14px;
}
.section-chip {
  display: block;
  margin: 0 0 11px;
  border-radius: 999px;
  background: #e8f1fc;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  text-transform: uppercase;
}
h2 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.2;
}
.subtle, .empty-state, .legend {
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}
.metric-card {
  min-height: 86px;
  border: 1px solid #d3dce8;
  border-radius: 7px;
  background: #f8faff;
  padding: 12px;
}
.metric-card span {
  display: block;
  color: #4e5c70;
  font-size: 0.78rem;
}
.metric-card strong {
  display: block;
  margin-top: 12px;
  font-size: 1.5rem;
}
.blue { color: var(--blue); }
.cyan { color: var(--cyan); }
.red { color: var(--red); }
.orange { color: var(--orange); }
.summary-list {
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}
.summary-list div { min-width: 0; }
dt {
  font-weight: 900;
  font-size: 0.86rem;
}
dd {
  margin: 2px 0 0;
  color: #1f2937;
  font-size: 0.86rem;
  line-height: 1.32;
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.action-button {
  min-height: 48px;
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(29, 50, 81, 0.12);
}
.action-button.primary { background: var(--blue); }
.action-button.danger { background: #c92828; }
.action-button.sky { background: #14a7d8; }
.action-button.green { background: var(--green); }
.action-button.muted { background: #e8eef5; color: #172033; border: 1px solid #ccd6e3; }
.next-list {
  display: grid;
  gap: 10px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}
.next-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
}
.next-list span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  font-weight: 900;
}
.next-list strong, .next-list p { display: block; margin: 0; }
.next-list p { color: var(--muted); font-size: 0.82rem; line-height: 1.3; }
.finding-list { margin-top: 12px; display: grid; }
.finding-list div {
  border-bottom: 1px solid #d8e0ea;
  padding: 6px 0;
}
.finding-list div:last-child { border-bottom: 0; }
.finding-list strong { display: block; font-size: 0.84rem; }
.finding-list span { display: block; color: #253244; font-size: 0.82rem; line-height: 1.28; }
.good { color: #146c43 !important; }
.risk { color: #9a3412 !important; }
.notification-preview {
  margin-bottom: 14px;
  border-radius: 25px;
  background: #f7f7fb;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(24, 47, 81, 0.08);
}
.quick-toggles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.quick-toggles span {
  border-radius: 18px;
  background: #d7ecff;
  padding: 12px 10px;
  color: #1d2b3f;
  font-size: 0.82rem;
}
.quick-toggles span:nth-child(3) { background: #2f3338; color: #ffffff; }
.notification-card {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  border-radius: 20px;
  background: #ffffff;
  padding: 13px;
}
.notif-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #0a77bd;
  color: #ffffff;
  font-weight: 900;
}
.notification-card strong, .notification-card p { margin: 0; }
.notification-card p { margin-top: 6px; color: #2d3748; font-size: 0.82rem; line-height: 1.34; }
.connection-card, .input-preview {
  border: 1px solid #d8e0ea;
  border-radius: 7px;
  background: #f9fbfe;
  padding: 12px;
}
.connection-card span { display: block; color: #344054; font-size: 0.82rem; line-height: 1.25; }
.input-preview {
  color: #42526a;
  font-size: 1rem;
}
.app-list { display: grid; gap: 9px; margin-top: 14px; }
.app-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #d8e0ea;
  border-radius: 9px;
  background: #f9fbfe;
  padding: 10px;
}
.app-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  font-weight: 900;
}
.blue-bg { background: #2563eb; }
.green-bg { background: #16a34a; }
.orange-bg { background: #ea580c; }
.app-row strong, .app-row small { display: block; }
.app-row small { color: var(--muted); margin-top: 2px; }
.app-row em { color: var(--green); font-style: normal; font-weight: 900; }
@media (max-width: 380px) {
  .hero-card { margin-inline: 10px; padding: 17px 14px; }
  .tab-row { padding-inline: 10px; gap: 5px; }
  .tab-button { font-size: 0.72rem; }
  .screen-panel { padding-inline: 10px; }
  .metric-grid, .action-grid { gap: 7px; }
}
