/* noby - Static pages styles */

:root {
  --color-primary: #008060;
  --color-primary-dark: #004c3f;
  --color-text: #1a1a1a;
  --color-text-muted: #616161;
  --color-bg: #ffffff;
  --color-bg-subtle: #f6f6f7;
  --color-border: #e1e3e5;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 720px;
  --max-width-wide: 960px;
  --header-height: 64px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.layout-wide .site-header__inner {
  max-width: var(--max-width-wide);
}

.site-header--logo-only .site-header__inner {
  justify-content: flex-start;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.85;
}

.site-logo img {
  display: block;
  height: 36px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  text-decoration: none;
}

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

/* Main content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

main.content--wide {
  max-width: var(--max-width-wide);
}

.page-title {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.page-lead {
  margin: 0 0 40px;
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* Typography for content pages */
.content h2 {
  margin: 40px 0 16px;
  font-size: 1.25rem;
  font-weight: 600;
}

.content h3 {
  margin: 24px 0 12px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.content p,
.content ul,
.content ol {
  margin: 0 0 16px;
}

.content ul,
.content ol {
  padding-left: 1.5em;
}

.content li {
  margin-bottom: 8px;
}

.content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 40px 0;
}

.content .updated-at {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.content h4 {
  margin: 20px 0 10px;
  font-size: 1rem;
  font-weight: 600;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 0.875rem;
}

.content th,
.content td {
  border: 1px solid var(--color-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.content th {
  background: var(--color-bg-subtle);
  font-weight: 600;
}

.content figure {
  margin: 24px 0;
}

.content figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.content figcaption {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: center;
}

.content code {
  font-size: 0.875em;
  background: var(--color-bg-subtle);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.toc {
  margin: 32px 0 40px;
  padding: 20px 24px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.toc__title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
}

.toc ol {
  margin: 0;
  padding-left: 1.25em;
}

.toc li {
  margin-bottom: 6px;
}

.callout {
  margin: 24px 0;
  padding: 16px 20px;
  border-radius: 8px;
  border-left: 4px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.callout__title {
  margin: 0 0 8px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.callout p,
.callout ul {
  margin: 0 0 8px;
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

.callout--warning {
  border-left-color: #b98900;
  background: #fffbeb;
}

.callout--tip {
  border-left-color: var(--color-primary);
  background: #f0fdf4;
}

.callout--note {
  border-left-color: #616161;
}

/* Home page cards */
.card-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

@media (min-width: 480px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  display: block;
  padding: 24px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

.card__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.card__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.site-footer__inner {
  max-width: calc(var(--max-width) + 48px);
  margin: 0 auto;
  padding: 24px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

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

.site-footer a:hover {
  color: var(--color-primary);
}
