:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #152033;
  --muted: #64748b;
  --line: #d8e0ea;
  --blue: #1766d1;
  --blue-strong: #0f4ea6;
  --green: #0d7a5f;
  --amber: #a15c00;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 10px;
  min-width: min(420px, 100%);
}

.summary-strip div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.summary-strip strong,
.summary-strip span {
  display: block;
}

.summary-strip strong {
  font-size: 1.4rem;
  line-height: 1;
}

.summary-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.shell {
  padding: 28px clamp(18px, 4vw, 48px) 44px;
}

.app-grid {
  display: grid;
  gap: 22px;
}

.app-card {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

h2 {
  margin-bottom: 6px;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
}

.path {
  max-width: 100%;
  margin-bottom: 0;
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.meta-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.meta-line a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.meta-line a:hover {
  text-decoration: underline;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-link,
.secondary-link,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.primary-link {
  background: var(--blue);
  color: #ffffff;
  text-decoration: none;
}

.primary-link:hover {
  background: var(--blue-strong);
}

.secondary-link {
  border: 1px solid var(--blue);
  color: var(--blue);
  background: var(--surface);
  text-decoration: none;
}

.secondary-link:hover {
  color: var(--blue-strong);
  border-color: var(--blue-strong);
  background: var(--surface-soft);
}

.status-pill {
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-soft);
}

.fetch-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #f0c8c8;
  border-radius: 8px;
  background: #fdf2f2;
  color: #9a3434;
  font-size: 0.9rem;
}

.snapshot {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.snapshot > div,
.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.snapshot > div {
  padding: 16px;
}

.label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.snapshot p,
.item-list p,
.empty-state {
  margin-bottom: 0;
  color: #314158;
  line-height: 1.5;
}

.content-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  padding: 16px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-heading h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.panel-heading span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  border-radius: 8px;
  background: #e7eef8;
  color: var(--blue-strong);
  font-weight: 800;
}

.issues-panel .panel-heading span {
  background: #fff0da;
  color: var(--amber);
}

.features-panel .panel-heading span {
  background: #def5ec;
  color: var(--green);
}

.item-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.item-list li {
  min-width: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.item-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.item-list strong {
  display: block;
  margin-bottom: 5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.meta {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.files {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

summary small {
  color: var(--muted);
  font-weight: 700;
}

pre {
  max-height: 520px;
  margin: 0;
  padding: 16px;
  border-top: 1px solid var(--line);
  overflow: auto;
  color: #1f2937;
  background: #f8fafc;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.login-card {
  width: min(380px, calc(100vw - 36px));
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.login-hint {
  color: var(--muted);
  margin-bottom: 18px;
}

.login-card form {
  display: grid;
  gap: 10px;
}

.login-card input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
}

.login-card button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.login-card button:hover {
  background: var(--blue-strong);
}

.login-error {
  margin: 14px 0 0;
  color: #9a3434;
  font-weight: 700;
}

@media (max-width: 860px) {
  .topbar,
  .card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-strip,
  .snapshot,
  .content-columns {
    grid-template-columns: 1fr;
  }

  .card-links {
    width: 100%;
  }

  .primary-link,
  .secondary-link,
  .status-pill {
    justify-content: center;
    flex: 1;
  }
}
