:root {
  /* Light theme (default – matches are.na) */
  --bg: #ffffff;
  --bg-subtle: #f8f8f8;
  --bg-hover: #f0f0f0;
  --text: #000000;
  --text-muted: #666666;
  --text-faint: #999999;
  --border: #e5e5e5;
  --border-strong: #000000;
  --accent: #000000;          /* are.na is mostly monochrome */
  --link: #000000;
  --link-hover: #666666;

  /* Spacing (generous) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Typography */
  --font-sans: "Areal", Arial, Helvetica, system-ui, -apple-system, sans-serif;
  --font-mono: "Areal Mono", "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --font-size: 15px;
  --font-size-sm: 13px;
  --font-size-xs: 12px;
  --line-height: 1.5;
  --letter-spacing: -0.01em;

  /* Radius & borders – almost none */
  --radius: 0px;              /* signature are.na flatness */
  --radius-sm: 2px;
  --border-width: 1px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --bg-subtle: #1a1a1a;
    --bg-hover: #222222;
    --text: #f5f5f5;
    --text-muted: #aaaaaa;
    --text-faint: #777777;
    --border: #333333;
    --border-strong: #ffffff;
    --accent: #ffffff;
    --link: #ffffff;
    --link-hover: #cccccc;
  }
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size);
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  font-weight: 400;                 /* are.na stays light */
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 22px; line-height: 1.25; }
h3 { font-size: 18px; }
h4, h5, h6 { font-size: 15px; font-weight: 500; }

p {
  margin: 0 0 var(--space-4);
  color: var(--text);
}

.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.small { font-size: var(--font-size-sm); }
.xs { font-size: var(--font-size-xs); }

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
a:hover {
  color: var(--link-hover);
  border-bottom-color: currentColor;
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Blocks / Cards (are.na style) */
.block,
.card,
.channel-item {
  background: var(--bg);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.block:hover,
.card:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.block-title,
.card-title {
  font-size: var(--font-size);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.block-meta {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* Buttons – extremely minimal */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 var(--space-4);
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: 400;
  line-height: 1;
  color: var(--text);
  background: transparent;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  user-select: none;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover {
  background: var(--text-muted);
  border-color: var(--text-muted);
  color: var(--bg);
}

.btn-ghost {
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: transparent;
}

/* Inputs */
.input,
input[type="text"],
input[type="search"],
input[type="email"],
textarea,
select {
  width: 100%;
  min-height: 36px;
  padding: 0 var(--space-3);
  font-family: inherit;
  font-size: var(--font-size-sm);
  color: var(--text);
  background: var(--bg);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s ease;
}

.input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--border-strong);
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--border-width) solid var(--border);
  background: var(--bg);
}

.nav-link {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: none;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

/* Grid of blocks (classic are.na layout) */
.blocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
  padding: var(--space-5);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-5) 0;
  border: none;
}

/* Utility */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.spacer {
  height: var(--space-6);
}