:root {
  --bg: #0e0f11;
  --surface: #16181b;
  --surface-2: #1d2023;
  --line: #2a2e33;
  --text: #eceef0;
  --text-dim: #9ba1a8;
  --accent: #eab308;
  --accent-ink: #1a1503;
  --radius: 10px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header ---------------------------------------------------------------- */
header.site {
  border-bottom: 1px solid var(--line);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand .mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

nav.site a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  margin-left: 22px;
}

nav.site a:hover,
nav.site a[aria-current="page"] { color: var(--text); }

/* Layout ---------------------------------------------------------------- */
main { padding: 56px 0 0; }

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  max-width: 22ch;
}

p.lede {
  color: var(--text-dim);
  max-width: 65ch;
  margin: 0 0 40px;
}

/* Tool entries: asymmetric two-up, not equal thirds -------------------- */
.tools {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.tool {
  background: var(--surface);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tool.primary { background: var(--surface-2); }

/* Third tool spans the full grid width so the layout stays asymmetric
   (2fr / 1fr row, then a wide row) rather than three equal cards. */
.tool.wide { grid-column: 1 / -1; }

h2.section {
  margin: 56px 0 8px;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

p.lede.small { margin-bottom: 28px; font-size: 15px; }

.tool h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.tool p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
  max-width: 52ch;
}

.tool .url {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--text-dim);
  word-break: break-all;
}

.tool .spacer { flex: 1; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.btn:active { transform: translateY(1px); }

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

.btn-primary:hover { background: #f2c020; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover { border-color: #3b4046; background: #1b1e21; }

/* Detail page ----------------------------------------------------------- */
.detail { max-width: 720px; }

.detail h1 { max-width: 100%; }

.facts {
  margin: 32px 0 36px;
  border-top: 1px solid var(--line);
}

.facts div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.facts dt { color: var(--text-dim); }

.facts dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  word-break: break-all;
}

a.inline { color: var(--accent); }

/* Footer ---------------------------------------------------------------- */
footer.site {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  color: var(--text-dim);
  font-size: 13.5px;
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

footer.site a { color: var(--text-dim); }

/* Mobile ---------------------------------------------------------------- */
@media (max-width: 768px) {
  main { padding-top: 40px; }
  .tools { grid-template-columns: 1fr; }
  .tool { padding: 22px; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  header.site .wrap { height: auto; padding-top: 14px; padding-bottom: 14px; }
  nav.site a { margin-left: 0; margin-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}
