:root {
  --bg: #0b0f14;
  --panel: #121924;
  --panel2: #0f151f;
  --border: #273243;
  --text: #e6eef7;
  --muted: #8aa0b6;
  --accent: #20c5d8;
  --good: #2ecc71;
  --warn: #f39c12;
  --bad: #e74c3c;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(32, 197, 216, .12), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(46, 204, 113, .08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding:
    calc(22px + env(safe-area-inset-top))
    18px
    calc(40px + env(safe-area-inset-bottom));
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(32, 197, 216, .35);
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, rgba(32, 197, 216, .9), rgba(32, 197, 216, .15));
}

.title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.title h1 {
  margin: 0;
  font-size: 16px;
  letter-spacing: .2px;
}

.subtitle {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.lang a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(18, 25, 36, .65);
  color: var(--muted);
  font-size: 12px;
}

.lang a.active {
  color: var(--text);
  border-color: rgba(32, 197, 216, .55);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.card {
  grid-column: span 12;
  background: linear-gradient(180deg, rgba(18, 25, 36, .9), rgba(15, 21, 31, .9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
}

@media (min-width: 860px) {
  .card.sidebar { grid-column: span 4; position: sticky; top: 16px; height: fit-content; }
  .card.content { grid-column: span 8; }
}

.card h2 {
  margin: 0 0 10px 0;
  font-size: 16px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav a {
  display: block;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text);
  background: rgba(0, 0, 0, .12);
}

.nav a:hover {
  border-color: rgba(32, 197, 216, .35);
  text-decoration: none;
}

.nav a.active {
  border-color: rgba(32, 197, 216, .55);
  background: rgba(32, 197, 216, .10);
}

.kicker {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.h1 {
  font-size: 22px;
  margin: 0 0 6px 0;
}

.p {
  margin: 0 0 12px 0;
  color: var(--muted);
}

.section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(39, 50, 67, .65);
}

.section h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
}

ol, ul {
  margin: 8px 0 12px 18px;
  padding: 0;
  color: var(--text);
}

li { margin: 6px 0; }

.callout {
  border: 1px solid var(--border);
  background: rgba(18, 25, 36, .55);
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0 12px;
}

.callout.good { border-color: rgba(46, 204, 113, .45); }
.callout.warn { border-color: rgba(243, 156, 18, .45); }
.callout.bad { border-color: rgba(231, 76, 60, .45); }

.callout b {
  color: var(--text);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(39, 50, 67, .85);
  background: rgba(0, 0, 0, .22);
  color: var(--text);
}

.footer {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); text-decoration: none; }

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

@media (max-width: 859px) {
  .wrap {
    padding:
      calc(14px + env(safe-area-inset-top))
      12px
      calc(22px + env(safe-area-inset-bottom));
  }

  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }

  .lang {
    justify-content: flex-end;
  }

  .card {
    padding: 12px;
  }

  .card.sidebar h2 {
    display: none;
  }

  .nav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar { display: none; }

  .nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    border-color: var(--border);
    background: rgba(0, 0, 0, .10);
  }

  .h1 {
    font-size: 20px;
  }
}
