:root {
  color-scheme: light;
  --bg: #f5f1e8;
  --bg-2: #ebe4d7;
  --ink: #111319;
  --muted: #5f6674;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-border: rgba(17, 19, 25, 0.08);
  --accent: #1f6f63;
  --accent-2: #2457d6;
  --danger: #b92d45;
  --shadow: 0 18px 48px rgba(17, 19, 25, 0.12);
  --radius: 22px;
  --code: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(31, 111, 99, 0.18), transparent 22%),
    radial-gradient(circle at 86% 14%, rgba(36, 87, 214, 0.12), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(17, 19, 25, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 25, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 85%);
}

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

h1,
h2 {
  letter-spacing: -0.045em;
}

h1 {
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 0.92;
  max-width: 10ch;
}

h2 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.1vw, 2.1rem);
}

h3 {
  margin: 0;
}

code,
pre,
textarea,
input {
  font-family: var(--code);
}

code {
  padding: 0.14rem 0.32rem;
  border-radius: 8px;
  background: rgba(17, 19, 25, 0.07);
}

.page {
  width: min(1200px, calc(100% - 24px));
  margin: 0 auto;
  padding: 22px 0 50px;
  display: grid;
  gap: 20px;
}

.hero,
.workspace {
  display: grid;
  gap: 20px;
}

.hero {
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  align-items: stretch;
}

.panel {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.light-panel {
  padding: 22px;
}

.hero-copy {
  display: grid;
  align-content: center;
}

.eyebrow {
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
}

.lede {
  max-width: 64ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.quick-status {
  display: grid;
  gap: 14px;
}

.stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(17, 19, 25, 0.06);
}

.stat-label {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.stat-value {
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.05em;
}

.danger {
  color: var(--danger);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.commands {
  padding-bottom: 18px;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.command-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(17, 19, 25, 0.08);
  background: rgba(255, 255, 255, 0.5);
  display: grid;
  gap: 10px;
}

.command-label,
.field-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.command-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.command-row pre {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(17, 19, 25, 0.1);
  overflow: auto;
}

.command-row code {
  padding: 0;
  background: transparent;
}

.icon-button {
  width: 42px;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(17, 19, 25, 0.1);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background-color 120ms ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 111, 99, 0.35);
  background: rgba(31, 111, 99, 0.06);
}

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

.input-panel {
  display: grid;
  gap: 12px;
}

.field-label {
  margin-bottom: -2px;
}

textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid rgba(17, 19, 25, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 14px;
  line-height: 1.55;
  outline: none;
}

textarea:focus,
.search input:focus {
  border-color: rgba(36, 87, 214, 0.5);
  box-shadow: 0 0 0 4px rgba(36, 87, 214, 0.12);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.actions input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.primary {
  background: linear-gradient(135deg, #1f6f63, #2457d6);
  color: #fff;
}

.secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border-color: rgba(17, 19, 25, 0.1);
}

.ghost {
  background: transparent;
  color: var(--muted);
  border-color: rgba(17, 19, 25, 0.12);
}

.results-panel {
  padding-top: 22px;
  display: grid;
  gap: 12px;
}

.result-list {
  display: grid;
  gap: 10px;
}

.result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(17, 19, 25, 0.08);
}

.pkg-name {
  font-size: 0.98rem;
  margin: 0;
}

.badge {
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 12px;
  color: #7a1730;
  background: rgba(185, 45, 69, 0.12);
  border: 1px solid rgba(185, 45, 69, 0.2);
  font-size: 0.88rem;
}

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

.browser-tools {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.search {
  display: grid;
  gap: 8px;
}

.search span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.search input {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(17, 19, 25, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

.list-shell {
  border-radius: 18px;
  border: 1px solid rgba(17, 19, 25, 0.08);
  background: rgba(255, 255, 255, 0.45);
  overflow: hidden;
}

.package-browser {
  list-style: none;
  margin: 0;
  padding: 10px;
  max-height: 480px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.package-browser li {
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 19, 25, 0.06);
  overflow-wrap: anywhere;
}

.package-browser li mark {
  color: inherit;
  background: rgba(31, 111, 99, 0.16);
  padding: 0 0.15em;
  border-radius: 4px;
}

@media (max-width: 980px) {
  .hero,
  .workspace,
  .command-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 16px, 1200px);
    padding-top: 12px;
  }

  .light-panel {
    padding: 16px;
  }

  .section-heading {
    flex-direction: column;
    align-items: start;
  }

  .package-browser {
    grid-template-columns: 1fr;
  }

  .result-card {
    flex-direction: column;
    align-items: start;
  }
}
