/* Variables */
:root {
  --bg: #0f1419;
  --fg: #e1e4e8;
  --muted: #8b949e;
  --accent: #cc342d;
  --line: #30363d;
  --surface: #161b22;
}

/* Base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

main {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
}

h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
}

ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 15px;
}

ul li {
  margin-bottom: 6px;
}

section {
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Detail Headers */
header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 24px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}

.summary {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.hero-image {
  width: 120px;
  height: auto;
}

/* Home */
.hero {
  text-align: center;
  padding: 32px 0 40px;
}

.hero-logo {
  display: block;
  width: 156px;
  height: auto;
  margin: 0 auto 20px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero p {
  max-width: 520px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
}

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

.service h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
}

.service p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
}

.service p:last-child {
  margin-bottom: 0;
}

.current-sources {
  margin-top: 14px;
}

/* Code */
code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

pre {
  margin: 14px 0 0;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
}

pre code {
  display: block;
  padding: 12px 0 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 6px 6px 0;
  color: var(--fg);
}

pre code.hljs {
  padding: 12px 0 12px 14px;
  background: var(--surface);
}

.ssh-console {
  margin: 12px 0 0;
  padding: 11px 14px;
  overflow-x: auto;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.5;
}

.ssh-console code {
  border: none;
  background: none;
  color: inherit;
  padding: 0;
}

/* Tables */
table {
  width: 100%;
  margin: 14px 0 0;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

th:first-child,
td:first-child {
  padding-left: 0;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

th {
  color: var(--fg);
  font-weight: 600;
}

td {
  color: var(--muted);
}

td code {
  color: var(--fg);
  font-size: 13px;
}

/* Try Blocks */
.try-options {
  display: grid;
  gap: 28px;
}

.try-method-label {
  display: inline-block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.try-method p {
  max-width: 680px;
}

/* Showcase */
.showcase {
  display: grid;
  gap: 22px;
}

.project {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.project:first-child {
  border-top: 0;
  padding-top: 0;
}

.project p:last-child {
  margin-bottom: 0;
}

/* llm.rb Page */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-links a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--fg);
  font-size: 14px;
}

.quick-links a:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.examples {
  display: grid;
  gap: 24px;
}

.install-copy {
  margin-bottom: 14px;
}

.example {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.example:first-child {
  border-top: 0;
  padding-top: 0;
}

/* Footer */
footer,
.footer {
  padding-top: 22px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 24px;
  gap: 16px;
}

footer a,
.footer a {
  color: var(--muted);
}

footer a:hover,
.footer a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 720px) {
  main {
    padding: 32px 0 56px;
  }

  header {
    grid-template-columns: minmax(0, 1fr) 90px;
    gap: 16px;
  }

  .hero-image {
    width: 90px;
  }

  .hero-logo {
    width: 122px;
  }

  h1 {
    font-size: 26px;
  }

  .hero h1 {
    font-size: 28px;
  }
}
