/* netray.info guide pages — shared styles */

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

:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-tertiary: #0f3460;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --text-muted: #888888;
  --accent: #00d4ff;
  --accent-dim: #0088aa;
  --accent-glow: rgba(0, 212, 255, 0.15);
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --border: #2a2a4a;
  --border-subtle: #222240;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius: 8px;
  --radius-lg: 10px;
  --transition: 150ms ease;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #edf0f5;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888a0;
    --accent: #0077cc;
    --accent-dim: #005599;
    --accent-glow: rgba(0, 119, 204, 0.12);
    --success: #008800;
    --warning: #b86e00;
    --error: #cc0000;
    --border: #d0d4dc;
    --border-subtle: #e4e8ee;
    color-scheme: light;
  }
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* ── SuiteNav ───────────────────────────────────────────────── */

.suite-nav {
  width: 100%;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  flex-wrap: wrap;
  row-gap: 0.25rem;
}

.suite-nav__brand {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.2rem 0.5rem 0.2rem 0;
  letter-spacing: -0.01em;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.suite-nav__brand:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.suite-nav__sep {
  color: var(--border);
  padding: 0 0.5rem;
  user-select: none;
}

.suite-nav__link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  transition: color var(--transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.suite-nav__link:hover {
  color: var(--text-primary);
  text-decoration: none;
}

@media (max-width: 400px) {
  .suite-nav {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
  }
}

/* ── Page layout ────────────────────────────────────────────── */

.page-wrapper {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.page-title {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ── Article content ────────────────────────────────────────── */

article h2 {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

article h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

article p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

article ul,
article ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

article li {
  margin-bottom: 0.35rem;
}

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

article a:hover {
  text-decoration: underline;
}

article code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-tertiary);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
}

article pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  max-width: 100%;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

article pre code,
article table code {
  font-size: inherit;
}

article pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

article strong {
  font-weight: 600;
  color: var(--text-primary);
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

article th,
article td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

article th {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Tool entry section ─────────────────────────────────────── */

.tool-entry {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2.5rem;
}

.tool-entry__heading {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.tool-entry__form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tool-entry__input {
  flex: 1 1 220px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  min-height: 44px;
  outline: none;
  transition: border-color var(--transition);
}

.tool-entry__input::placeholder {
  color: var(--text-muted);
}

.tool-entry__input:focus {
  border-color: var(--accent);
}

.tool-entry__submit {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  background: var(--accent);
  color: #0f1117;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  white-space: nowrap;
  transition: background var(--transition);
}

.tool-entry__submit:hover {
  background: var(--accent-dim);
}

.tool-entry__hint {
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ── Footer ─────────────────────────────────────────────────── */

.page-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.page-footer__heading {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.page-footer__links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.page-footer__links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.page-footer__links a:hover {
  text-decoration: underline;
}

.page-footer__suite {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.page-footer__suite a {
  color: var(--text-secondary);
  text-decoration: none;
}

.page-footer__suite a:hover {
  color: var(--text-primary);
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 600px) {
  .page-wrapper {
    padding: 1.25rem 1rem 3rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  article h2 {
    font-size: 1.15rem;
  }

  article pre {
    font-size: 0.78rem;
    padding: 0.75rem;
  }

  article table {
    font-size: 0.82rem;
  }

  article th,
  article td {
    padding: 0.4rem 0.5rem;
  }
}
