:root {
  --bg: #f6f3ed;
  --ink: #171717;
  --muted: #68645d;
  --line: #d7d0c4;
  --panel: #fffaf1;
  --panel-2: #ebe6dc;
  --accent: #176b5c;
  --accent-ink: #ffffff;
  --warn: #9d3f2d;
  --shadow: 0 18px 60px rgba(23, 23, 23, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
  background: rgba(246, 243, 237, 0.88);
  border-bottom: 1px solid rgba(23, 23, 23, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-weight: 760;
}

.brand em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 560;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar nav a {
  min-height: 38px;
  padding: 10px 13px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}

.topbar nav a:hover,
.topbar nav a.active {
  background: rgba(23, 23, 23, 0.06);
  color: var(--ink);
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 48px;
  min-height: calc(100svh - 64px);
  padding: clamp(44px, 7vw, 96px) clamp(24px, 5vw, 84px);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  align-self: center;
  max-width: 760px;
  animation: rise 500ms ease-out both;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.lead {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.38;
}

.search-box {
  display: flex;
  width: min(720px, 100%);
  margin-top: 34px;
  border: 1px solid var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-box.small {
  width: min(540px, 100%);
  margin-top: 0;
  box-shadow: none;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  padding: 18px 18px;
  color: var(--ink);
  outline: none;
}

.search-box button,
.copy-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--ink);
  background: var(--panel);
  color: var(--ink);
  padding: 0 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.search-box button {
  border-width: 0 0 0 1px;
  border-radius: 0;
  background: var(--ink);
  color: #fff;
}

.copy-btn:hover,
.ghost-btn:hover,
.search-box button:hover {
  transform: translateY(-1px);
}

.copy-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.task-tags a {
  border: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.68);
  padding: 10px 12px;
  border-radius: 999px;
  color: #38352f;
  font-size: 14px;
}

.hero-plane {
  position: relative;
  align-self: center;
  min-height: 520px;
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    #e0dbd0;
  background-size: 34px 34px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.hero-plane::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(23, 107, 92, 0.15), transparent 48%);
}

.prompt-sheet {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 21%;
  padding: clamp(22px, 4vw, 42px);
  background: rgba(255, 250, 241, 0.94);
  border: 1px solid var(--ink);
  box-shadow: 18px 18px 0 rgba(23, 23, 23, 0.12);
  animation: floatIn 800ms 120ms ease-out both;
}

.prompt-sheet span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.prompt-sheet strong {
  display: block;
  margin-top: 18px;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 0.96;
  letter-spacing: 0;
}

.prompt-sheet p {
  margin: 24px 0 0;
  color: var(--muted);
}

.surface,
.workspace,
.prompt-page {
  padding: clamp(30px, 5vw, 74px) clamp(20px, 5vw, 84px);
}

.surface.muted {
  background: var(--panel-2);
}

.section-head,
.command,
.prompt-hero,
.related {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-head a,
.section-head span {
  color: var(--accent);
  font-weight: 760;
}

.asset-list {
  display: grid;
  gap: 12px;
}

.asset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.asset-row:last-child {
  border-bottom: 1px solid var(--line);
}

.asset-title {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 22px;
  font-weight: 800;
}

.asset-row p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #514d47;
  font-size: 13px;
}

.meta span {
  padding-right: 9px;
  border-right: 1px solid var(--line);
}

.meta span:last-child {
  border-right: 0;
}

.row-actions,
.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

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

.workspace {
  min-height: calc(100svh - 64px);
}

.command {
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.command h1,
.prompt-hero h1 {
  font-size: clamp(42px, 7vw, 86px);
}

.local-filter {
  display: grid;
  gap: 8px;
  min-width: min(420px, 100%);
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

.local-filter input {
  width: 100%;
  border: 1px solid var(--ink);
  background: var(--panel);
  padding: 15px 14px;
  outline: none;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 50px;
  margin-top: 44px;
}

.inbox {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.big-number {
  margin: 20px 0 0;
  font-size: 76px;
  font-weight: 850;
  line-height: 1;
}

.small {
  color: var(--muted);
  font-size: 14px;
}

.prompt-hero {
  align-items: flex-start;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 1px;
  min-width: min(420px, 100%);
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.trust div {
  background: var(--panel);
  padding: 16px;
}

.trust dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.trust dd {
  margin: 7px 0 0;
  font-weight: 820;
}

.compiler,
.blocks,
.related {
  margin-top: 46px;
}

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

.field-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

textarea {
  min-height: 118px;
  resize: vertical;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px;
  color: var(--ink);
  outline: none;
}

.block {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.block:last-child {
  border-bottom: 1px solid var(--line);
}

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

.block-head span {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

pre {
  max-height: 380px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fcf8ef;
  color: #25231f;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.related {
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}

.empty {
  color: var(--muted);
  font-size: 18px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  transform: translateY(20px);
  opacity: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 15px;
  border-radius: 6px;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-1deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-plane {
    min-height: 360px;
  }

  .section-head,
  .command,
  .prompt-hero,
  .related,
  .asset-row {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  .row-actions,
  .prompt-actions {
    justify-content: flex-start;
  }

  .compact-grid,
  .two-col,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .trust {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 44px;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    border-width: 1px 0 0;
    min-height: 50px;
  }

  .topbar nav {
    width: 100%;
    justify-content: space-between;
  }

  .copy-btn,
  .ghost-btn {
    width: 100%;
  }
}

