:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --paper: #ffffff;
  --ink: #171717;
  --muted: #65625d;
  --line: #ddd8cc;
  --accent: #171717;
  --accent-soft: #ede8dc;
  --danger: #8d2f24;
}

* {
  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;
}

a {
  color: inherit;
}

code,
pre,
textarea {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.home {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.hero {
  max-width: 820px;
  margin-bottom: 32px;
}

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

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.lede {
  max-width: 720px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.45;
}

.tool,
.install-card,
.code-card,
.files-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(23, 23, 23, 0.04);
}

.tool {
  padding: 24px;
}

.tool-header,
.skill-header,
.section-heading,
.upload-row,
.copy-line {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.tool-header p {
  margin: 0;
  color: var(--muted);
}

form label {
  display: block;
  margin: 18px 0 8px;
  font-weight: 750;
}

textarea {
  width: 100%;
  min-height: 330px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--ink);
  background: #fffdf8;
  font-size: 14px;
  line-height: 1.55;
}

.file-input {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fffdf8;
  cursor: pointer;
}

.file-input input {
  max-width: 240px;
}

.upload-row {
  align-items: flex-end;
  margin: 16px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

button,
.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.primary {
  min-height: 48px;
  padding: 0 22px;
  background: var(--accent);
  color: white;
}

.ghost {
  border-color: var(--line);
}

.error {
  margin: 18px 0;
  border: 1px solid #d9968e;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff1ef;
  color: var(--danger);
}

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

.agent-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1.2fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--paper);
}

.agent-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.agent-card pre {
  max-height: none;
  padding: 14px;
  font-size: 12px;
}

.principles div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.principles strong,
.principles span {
  display: block;
}

.principles span {
  margin-top: 6px;
  color: var(--muted);
}

.skill-page,
.narrow {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.narrow {
  max-width: 680px;
}

.skill-header {
  margin-bottom: 48px;
}

.brand {
  font-size: 20px;
  font-weight: 850;
  text-decoration: none;
}

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

.skill-title {
  max-width: 780px;
  margin-bottom: 24px;
}

.skill-title h1 {
  font-size: clamp(38px, 6vw, 68px);
}

.skill-title p {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.45;
}

.install-card,
.code-card,
.files-card {
  margin-top: 16px;
  padding: 20px;
}

.copy-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fffdf8;
  overflow: hidden;
}

.copy-line code {
  overflow: auto;
  white-space: nowrap;
}

dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

dl div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
}

dt {
  color: var(--muted);
  font-weight: 750;
}

dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

pre {
  max-height: 720px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 18px;
  background: #fffdf8;
  font-size: 13px;
  line-height: 1.55;
}

.files-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.files-card li {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 9px 0 0;
}

.files-card li:first-child {
  border-top: 0;
  padding-top: 0;
}

.files-card span {
  color: var(--muted);
}

.abuse {
  margin-top: 26px;
  color: var(--muted);
}

.abuse div {
  display: flex;
  gap: 8px;
}

.abuse input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
}

@media (max-width: 720px) {
  .home {
    padding-top: 32px;
  }

  .tool-header,
  .skill-header,
  .section-heading,
  .upload-row,
  .copy-line,
  .agent-card,
  .abuse div {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-card {
    display: flex;
  }

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

  h1 {
    font-size: 44px;
  }

  .actions {
    width: 100%;
  }

  .actions > * {
    flex: 1;
  }

  dl div {
    grid-template-columns: 1fr;
  }
}
