:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --ink: #0e0f10;
  --ink-2: #4b5563;
  --muted: #8a8f97;
  --line: #ececec;
  --line-2: #e3e3e3;
  --accent: #111111;
  --accent-fg: #ffffff;
  --warn-bg: #fff5f3;
  --warn-fg: #b3261e;
  --ok-bg: #effaf2;
  --ok-fg: #126b3a;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 0 rgba(0,0,0,.02), 0 4px 24px -12px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.container { max-width: 980px; margin: 0 auto; padding: 32px 24px 80px; }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-block; width: 14px; height: 14px; border-radius: 4px;
  background: linear-gradient(135deg, #111 0%, #555 100%);
}
.brand-name { letter-spacing: -.01em; }
.site-nav { display: flex; align-items: center; gap: 18px; font-size: 14px; color: var(--ink-2); }
.site-nav a { color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav .cta {
  background: var(--accent); color: var(--accent-fg);
  padding: 8px 14px; border-radius: 999px; font-weight: 600;
}
.site-nav .cta:hover { opacity: .9; text-decoration: none; }

/* Footer */
.site-footer {
  max-width: 1200px; margin: 0 auto; padding: 24px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.site-footer a { color: var(--muted); }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-title {
  font-size: clamp(36px, 6vw, 56px);
  letter-spacing: -.025em;
  line-height: 1.05;
  margin: 16px 0 16px;
  font-weight: 700;
}
.hero-sub {
  font-size: 18px; color: var(--ink-2); max-width: 640px; margin: 0 0 32px;
}
.step-indicator { display: flex; gap: 10px; margin-bottom: 16px; }
.step-indicator .step {
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted);
}
.step-indicator .step.active { color: var(--ink); }

/* Mode tabs (step 1: AI vs paste) */
.mode-tabs {
  display: inline-flex; gap: 4px; padding: 4px;
  background: #f3f3f1; border: 1px solid var(--line);
  border-radius: 999px; margin: 0 0 12px;
}
.mode-tab {
  appearance: none; border: 0; background: transparent;
  padding: 8px 14px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--ink-2); cursor: pointer;
  transition: background .12s, color .12s;
}
.mode-tab:hover { color: var(--ink); }
.mode-tab.active {
  background: var(--surface); color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.mode-pane.hidden { display: none; }

/* PDF upload pane */
.pdf-upload { display: grid; gap: 12px; padding: 16px; }
.pdf-drop {
  display: block; cursor: pointer;
  border: 1.5px dashed #cdcdcd; border-radius: 12px;
  background: #fafaf9; padding: 28px 16px;
  transition: border-color .15s, background .15s;
  position: relative;
}
.pdf-drop:hover { border-color: #999; background: #f5f5f3; }
.pdf-drop input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.pdf-drop-inner {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; pointer-events: none;
}
.pdf-drop-icon { font-size: 28px; line-height: 1; }
.pdf-drop-label { font-weight: 600; }
.pdf-drop-filename:not(:empty) {
  margin-top: 6px;
  background: #fff; border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px;
  color: var(--ink-2);
}
.pdf-upload .field { margin: 0; }
.pdf-upload .field input {
  width: 100%;
  border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px;
  font-family: inherit; font-size: 15px; background: #fff; color: var(--ink);
  outline: 0;
}
.pdf-upload .field input:focus { border-color: #999; }

/* PDF embed on the release page */
.pdf-frame {
  position: relative; width: 100%;
  aspect-ratio: 8.5 / 11;
  max-height: 1100px;
  background: #f5f5f3;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 16px;
}
.pdf-frame object,
.pdf-frame iframe { width: 100%; height: 100%; display: block; border: 0; }
.pdf-fallback { margin-top: 10px; }
.pr-summary {
  font-size: 18px; color: var(--ink-2); line-height: 1.55;
  margin: 0 0 8px;
}

/* Composer (step 1) */
.composer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow);
}
.composer-row {
  display: flex; align-items: center; gap: 0;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.composer-prefix {
  color: var(--muted); font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 15px;
}
.composer-input {
  border: 0; outline: 0; flex: 1; font-size: 18px;
  font-family: inherit; padding: 4px 6px; background: transparent; color: var(--ink);
}
.composer-input::placeholder { color: var(--muted); }
.composer-info {
  width: 100%; border: 0; outline: 0; resize: vertical;
  padding: 16px; font-family: inherit; font-size: 16px; line-height: 1.55;
  background: transparent; color: var(--ink); min-height: 140px;
}
.composer-info::placeholder { color: var(--muted); }
.composer-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: transform .05s ease, background .1s, border-color .1s;
}
.btn:hover { text-decoration: none; border-color: #c7c7c7; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: var(--accent-fg); border-color: var(--accent);
}
.btn-primary:hover { background: #000; border-color: #000; }

/* Step bar (page-level) */
.step-bar { display: flex; gap: 14px; margin: 8px 0 28px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.step-bar .step.done { color: var(--ink-2); }
.step-bar .step.active { color: var(--ink); font-weight: 700; }

/* Editor (step 2) */
.edit-header {
  display: flex; align-items: end; justify-content: space-between; gap: 16px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.edit-host { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.editor {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: 520px; }
.split-pane { display: flex; flex-direction: column; min-width: 0; }
.split-pane + .split-pane { border-left: 1px solid var(--line); }
.pane-label {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fafafa;
}
#md-input {
  flex: 1; width: 100%; border: 0; outline: 0; resize: none;
  padding: 20px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.6; background: var(--surface); color: var(--ink);
}
#md-preview { padding: 20px 24px; overflow: auto; }
.editor-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-top: 1px solid var(--line); gap: 16px; flex-wrap: wrap;
}
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; min-height: auto; }
  .split-pane + .split-pane { border-left: 0; border-top: 1px solid var(--line); }
  #md-input { min-height: 320px; }
}

/* Publish (step 3) */
.publish-grid {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: start;
}
@media (max-width: 800px) { .publish-grid { grid-template-columns: 1fr; } }
.publish-preview {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px 32px; box-shadow: var(--shadow);
  max-height: 680px; overflow: auto;
}
.publish-form {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow);
  position: sticky; top: 80px;
}
.form-title { margin: 0 0 8px; font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 16px 0; font-size: 14px; }
.field span { font-weight: 600; color: var(--ink-2); }
.field input, .field textarea {
  border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px;
  font-family: inherit; font-size: 15px; background: #fff; color: var(--ink);
  outline: 0;
}
.field input:focus, .field textarea:focus { border-color: #999; }
.fineprint { margin-top: 12px; line-height: 1.5; }

/* Postcard (success / status) */
.postcard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 56px 32px; box-shadow: var(--shadow);
  text-align: center; max-width: 560px; margin: 40px auto;
}
.postcard h1 { font-size: 32px; margin: 12px 0; letter-spacing: -.02em; }
.postcard-icon { font-size: 36px; }
.live-url { margin: 18px 0 24px; font-size: 16px; word-break: break-all; }
.live-url a { font-weight: 600; }
.postcard-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Form card (delete) */
.form-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow);
  max-width: 560px; margin: 24px auto;
}
.form-card h1 { margin-top: 0; font-size: 28px; letter-spacing: -.01em; }

/* Flash */
.flash { padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-size: 14px; }
.flash-error { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid #f5c2bd; }
.flash-ok { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid #b9e6c8; }

/* Recent / search results */
.section-title { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 56px 0 16px; }
.release-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.release-item { border-bottom: 1px solid var(--line); }
.release-link { display: block; padding: 18px 4px; }
.release-link:hover { text-decoration: none; background: #f6f6f5; }
.release-meta { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.release-title { margin: 4px 0 6px; font-size: 19px; letter-spacing: -.01em; }
.release-excerpt { margin: 0; color: var(--ink-2); font-size: 14px; }

/* Search */
.search-section h1 { font-size: 32px; letter-spacing: -.02em; margin: 8px 0 18px; }
.search-form { display: flex; gap: 8px; margin-bottom: 12px; }
.search-input {
  flex: 1; border: 1px solid var(--line-2); background: var(--surface);
  border-radius: 12px; padding: 14px 16px; font-size: 16px;
}

/* PR page */
.pr-page { max-width: 720px; margin: 24px auto; }
.pr-header { margin-bottom: 24px; }
.pr-meta { font-size: 13px; color: var(--muted); }
.pr-title {
  font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em;
  line-height: 1.15; margin: 8px 0 0;
}
.pr-foot { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 24px; }
.pr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tag {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: #f3f3f1; color: var(--ink-2); border: 1px solid var(--line);
}
.tag:hover { text-decoration: none; background: #ececea; }
.pr-share { font-size: 14px; color: var(--ink-2); }

/* Prose (rendered markdown) */
.prose { color: var(--ink); font-size: 17px; line-height: 1.7; }
.prose h1 { font-size: 28px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.02em; }
.prose h2 { font-size: 22px; margin: 32px 0 8px; letter-spacing: -.01em; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose p { margin: 12px 0; }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #cfcfcf; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; margin: 12px 0; }
.prose li { margin: 6px 0; }
.prose blockquote {
  margin: 20px 0; padding: 12px 18px; border-left: 3px solid var(--ink);
  color: var(--ink-2); font-style: italic; background: #fafaf9;
}
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92em;
  background: #f3f3f1; padding: 1px 6px; border-radius: 4px;
}
.prose pre {
  background: #0e0f10; color: #f3f3f1; padding: 16px; border-radius: 10px;
  overflow: auto; font-size: 13px; line-height: 1.6;
}
.prose pre code { background: transparent; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* Built for AI Agents */
.agents { margin: 64px 0 16px; }
.agents-card {
  background: #0e0f10;
  color: #f3f3f1;
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid #1a1b1d;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.agents-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 200px at 90% -20%, rgba(255,255,255,.06), transparent 60%),
    radial-gradient(600px 180px at 0% 110%,  rgba(255,255,255,.04), transparent 60%);
  pointer-events: none;
}
.agents-title {
  margin: 0 0 8px; font-size: 22px; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 10px;
}
.agents-sub { color: #b4b8be; max-width: 640px; margin: 0 0 22px; font-size: 15px; }
.agents-steps {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: grid; gap: 10px;
}
.agents-steps li {
  display: flex; align-items: center; gap: 12px;
  background: #161719; border: 1px solid #1f2023; border-radius: 10px;
  padding: 12px 14px; flex-wrap: wrap;
}
.agents-num { font-size: 18px; line-height: 1; }
.agents-steps code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px;
  background: #0a0b0c; color: #e8eaed; padding: 4px 8px; border-radius: 6px;
  border: 1px solid #25262a;
}
.agents-desc { color: #9aa0a6; font-size: 14px; }
.agents-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.agents-actions .btn {
  background: #1d1e20; color: #f3f3f1; border-color: #2a2b2e;
}
.agents-actions .btn:hover { background: #25262a; border-color: #3a3b3f; }
.agents-actions .btn-primary {
  background: #f3f3f1; color: #0e0f10; border-color: #f3f3f1;
}
.agents-actions .btn-primary:hover { background: #fff; border-color: #fff; }

/* Skills page */
.skills-page { max-width: 760px; margin: 16px auto 24px; }
.skills-header { margin-bottom: 24px; }
.skills-header h1 { font-size: 36px; letter-spacing: -.02em; margin: 6px 0 8px; }
.skills-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* Misc */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
