:root {
  --bg: #f4efe6;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #fffaf2;
  --ink: #1f1b17;
  --muted: #665d55;
  --line: rgba(76, 59, 42, 0.14);
  --accent: #bc5f20;
  --accent-strong: #8d3e0f;
  --accent-soft: rgba(188, 95, 32, 0.12);
  --danger: #9d2d1f;
  --success: #19543a;
  --shadow: 0 24px 60px rgba(65, 42, 17, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-body: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  --font-mono: "SFMono-Regular", "Menlo", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(188, 95, 32, 0.14), transparent 34%),
    radial-gradient(circle at bottom right, rgba(21, 84, 58, 0.12), transparent 28%),
    linear-gradient(180deg, #f7f1e9 0%, #efe7dc 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

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

.brand {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 40rem;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.topnav a,
.ghost-button,
.primary-button,
.danger-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.topnav a,
.ghost-button {
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, #d67f32 100%);
  color: white;
  box-shadow: 0 18px 30px rgba(188, 95, 32, 0.24);
}

.danger-button {
  background: rgba(157, 45, 31, 0.12);
  color: var(--danger);
  box-shadow: inset 0 0 0 1px rgba(157, 45, 31, 0.22);
}

.topnav a:hover,
.ghost-button:hover,
.primary-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

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

.page {
  display: grid;
  gap: 22px;
}

.hero-card,
.table-card,
.content-card,
.meta-card,
.detail-hero {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.hero-card,
.detail-hero {
  display: grid;
  grid-template-columns: 1.5fr minmax(220px, 0.7fr);
  gap: 24px;
  padding: 28px;
}

.login-card {
  max-width: 760px;
  margin: 48px auto 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.lede {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 58rem;
}

.hero-stat {
  align-self: start;
  justify-self: end;
  background: linear-gradient(180deg, rgba(188, 95, 32, 0.14), rgba(255, 255, 255, 0.72));
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  min-width: 180px;
}

.hero-stat-label {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.hero-stat strong {
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-bar input,
.stack-form input {
  width: 100%;
  border: 1px solid rgba(77, 60, 42, 0.16);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 16px 18px;
  font: inherit;
  color: var(--ink);
}

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form label span {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.table-card,
.content-card {
  padding: 24px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.section-head span {
  color: var(--muted);
}

.results-table-wrap {
  overflow: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.results-table th,
.results-table td {
  padding: 16px 14px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.results-table th {
  text-align: left;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.row-title {
  display: inline-block;
  font-weight: 800;
  margin-bottom: 8px;
}

.row-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.metric {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.meta-card {
  padding: 20px;
}

.meta-card dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.meta-card dt {
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.meta-card dd {
  margin: 6px 0 0;
  font-weight: 700;
}

.inline-button {
  display: inline-block;
  margin-top: 18px;
}

.details-markup {
  display: grid;
  gap: 16px;
}

.detail-block {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(77, 60, 42, 0.1);
  padding: 18px 20px;
}

.detail-block p,
.detail-block li {
  color: var(--muted);
  line-height: 1.65;
}

.detail-block code,
.path-cell {
  font-family: var(--font-mono);
  font-size: 0.92rem;
}

.flash {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.flash-success {
  color: var(--success);
  background: rgba(25, 84, 58, 0.1);
  border-color: rgba(25, 84, 58, 0.16);
}

.flash-error {
  color: var(--danger);
  background: rgba(157, 45, 31, 0.1);
  border-color: rgba(157, 45, 31, 0.16);
}

.flash-info {
  color: var(--accent-strong);
  background: rgba(188, 95, 32, 0.1);
  border-color: rgba(188, 95, 32, 0.16);
}

.progress-shell {
  width: 180px;
  max-width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(77, 60, 42, 0.08);
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #f0aa5a 100%);
  border-radius: 999px;
}

.progress-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state {
  padding: 34px 16px 16px;
  text-align: center;
}

.empty-state p {
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-stat {
    justify-self: start;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100vw - 20px, 100%);
    padding-top: 18px;
  }

  .topbar,
  .search-bar,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .topnav {
    justify-content: flex-start;
  }

  .table-card,
  .content-card,
  .hero-card,
  .detail-hero {
    padding: 20px;
    border-radius: 22px;
  }
}
