
/*
 * TERMINAL-NATIVE EDITORIAL
 * Swiss International Typographic Style × Unix Terminal
 *
 * Classless, semantic, responsive CSS.
 * No dependencies. No JavaScript.

	Made by AI. Our prompt:

	Use ur "Terminal-native editorial"
	. combin w/ SED 
	. generate a "drop-in" set of css rules like https://watercss.kognise.dev/

	Design brief for designers - "Terminal-native editorial"
	. A minimalist, terminal-inspired developer aesthetic combining Unix interfaces, mission-control dashboards, and contemporary editorial typography.
	. Keywords: Dark UI · Monospace · System logs · Technical editorial · Retro computing · Developer culture · Information density
 *
 */

/* -----------------------------------------------
   01. DESIGN TOKENS
------------------------------------------------ */

:root {
  color-scheme: dark;

  --bg: #101310;
  --surface: #171c18;
  --surface-raised: #1d241e;
  --surface-sunken: #0b0e0c;

  --text: #d7dfd6;
  --text-strong: #f0f5ed;
  --text-muted: #879387;

  --accent: #a3d977;
  --accent-dim: #668d4c;
  --accent-bg: #1b2a19;

  --warning: #e8bd69;
  --danger: #e47d73;
  --info: #82b8d9;

  --border: #303a31;
  --border-strong: #526052;
  --selection: #425d37;

  --font-body:
    "Helvetica Neue", Helvetica, Arial, sans-serif;

  --font-mono:
    "SFMono-Regular", Consolas, "Liberation Mono",
    monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.625rem;
  --text-2xl: 2.25rem;
  --text-3xl: clamp(2.5rem, 6vw, 4.5rem);

  --line: 1.65;
  --measure: 72rem;
  --measure-reading: 68ch;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --radius: 2px;
  --focus: 0 0 0 2px var(--accent);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg: #f4f4ed;
    --surface: #ffffff;
    --surface-raised: #eeefe8;
    --surface-sunken: #e8eae2;

    --text: #343a34;
    --text-strong: #151b16;
    --text-muted: #707970;

    --accent: #376e2b;
    --accent-dim: #648a58;
    --accent-bg: #e4eddf;

    --warning: #94600b;
    --danger: #b33d34;
    --info: #28678b;

    --border: #d4d9d0;
    --border-strong: #9da79b;
    --selection: #c4d9b8;
  }
}

/* -----------------------------------------------
   02. RESET & DOCUMENT
------------------------------------------------ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  background: var(--bg);
}

body {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(1.25rem, 5vw, 4rem);

  background: var(--bg);
  color: var(--text);

  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line);

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--selection);
  color: var(--text-strong);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* -----------------------------------------------
   03. EDITORIAL TYPOGRAPHY
------------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
  color: var(--text-strong);
  font-family: var(--font-body);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h1 {
  max-width: 18ch;
  margin: 0 0 var(--space-7);
  font-size: var(--text-3xl);
  letter-spacing: -0.055em;
}

h2 {
  margin: var(--space-9) 0 var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: var(--text-2xl);
}

h3 {
  margin: var(--space-7) 0 var(--space-3);
  font-size: var(--text-xl);
}

h4 {
  margin: var(--space-6) 0 var(--space-2);
  font-size: var(--text-lg);
}

h5, h6 {
  margin: var(--space-5) 0 var(--space-2);
  font-size: var(--text-base);
}

p {
  max-width: var(--measure-reading);
  margin: 0 0 var(--space-4);
}

small {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

strong, b {
  color: var(--text-strong);
  font-weight: 650;
}

em, i {
  font-style: italic;
}

mark {
  padding: 0.1em 0.25em;
  background: var(--accent-bg);
  color: var(--accent);
}

hr {
  height: 1px;
  margin: var(--space-7) 0;
  border: 0;
  background: var(--border);
}

/* -----------------------------------------------
   04. LINKS & NAVIGATION
------------------------------------------------ */

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-dim);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--text-strong);
  text-decoration-color: currentColor;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-block: 1px solid var(--border);
}

nav a {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-decoration: none;
}

/* -----------------------------------------------
   05. LISTS
------------------------------------------------ */

ul, ol {
  padding-left: 1.5rem;
  margin: 0 0 var(--space-5);
}

li {
  padding-left: 0.25rem;
  margin-bottom: var(--space-2);
}

li::marker {
  color: var(--accent);
}

dl {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) 2fr;
  gap: var(--space-2) var(--space-5);
}

dt {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

dd {
  margin: 0;
}

/* -----------------------------------------------
   06. TERMINAL & CODE
------------------------------------------------ */

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

code, kbd, samp {
  padding: 0.15em 0.35em;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
}

pre {
  overflow-x: auto;
  margin: var(--space-5) 0;
  padding: var(--space-5);

  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);

  background: var(--surface-sunken);
  color: var(--text);

  line-height: 1.65;
  tab-size: 2;
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

kbd {
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 2px;
  color: var(--text-strong);
}

samp {
  color: var(--accent);
}

/* -----------------------------------------------
   07. BLOCKQUOTES & TECHNICAL OUTPUT
------------------------------------------------ */

blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-3) var(--space-5);

  border-left: 2px solid var(--accent);
  background: var(--surface);

  color: var(--text-muted);
}

blockquote p:last-child {
  margin-bottom: 0;
}

address {
  color: var(--text-muted);
  font-style: normal;
}

output {
  display: block;
  margin: var(--space-4) 0;
  padding: var(--space-4);

  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);

  font-family: var(--font-mono);
}

details {
  margin: var(--space-4) 0;
  border-block: 1px solid var(--border);
}

summary {
  padding: var(--space-3) 0;
  color: var(--text-strong);
  cursor: pointer;
  font-weight: 600;
}

details > :not(summary) {
  margin-inline: var(--space-3);
}

/* -----------------------------------------------
   08. TABLES — SWISS INFORMATION DESIGN
------------------------------------------------ */

table {
  width: 100%;
  margin: var(--space-5) 0;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--text-sm);
}

caption {
  margin-bottom: var(--space-3);
  color: var(--text-muted);
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

th {
  padding: var(--space-3) var(--space-4);
  border-block: 1px solid var(--border-strong);

  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:hover {
  background: var(--surface);
}

/* -----------------------------------------------
   09. FORMS & CONTROLS
------------------------------------------------ */

input, textarea, select, button {
  max-width: 100%;
  font: inherit;
}

input, textarea, select {
  width: 100%;
  padding: 0.7rem 0.85rem;

  border: 1px solid var(--border-strong);
  border-radius: var(--radius);

  background: var(--surface);
  color: var(--text-strong);
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  accent-color: var(--accent);
}

button, input[type="button"],
input[type="submit"], input[type="reset"] {
  padding: 0.7rem 1.2rem;

  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);

  background: var(--accent-bg);
  color: var(--accent);

  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;

  cursor: pointer;
}

button:hover, input[type="submit"]:hover {
  background: var(--accent);
  color: var(--bg);
}

button:disabled, input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

fieldset {
  margin: var(--space-5) 0;
  padding: var(--space-5);
  border: 1px solid var(--border);
}

legend, label {
  color: var(--text-strong);
  font-size: var(--text-sm);
  font-weight: 600;
}

label {
  display: block;
  margin-bottom: var(--space-2);
}

/* -----------------------------------------------
   10. MEDIA
------------------------------------------------ */

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

figure {
  margin: var(--space-6) 0;
}

figcaption {
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

/* -----------------------------------------------
   11. SEMANTIC STATUS & METADATA
------------------------------------------------ */

time, abbr, cite {
  color: var(--text-muted);
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

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

del {
  color: var(--danger);
}

progress, meter {
  accent-color: var(--accent);
}

:target {
  scroll-margin-block: 2rem;
}

/* -----------------------------------------------
   12. RESPONSIVE
------------------------------------------------ */

@media (max-width: 640px) {
  body {
    padding: 1.25rem;
  }

  h1 {
    font-size: clamp(2.25rem, 12vw, 3.5rem);
  }

  h2 {
    margin-top: var(--space-7);
  }

  dl {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }

  dd {
    margin-bottom: var(--space-3);
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  pre {
    padding: var(--space-3);
  }
}

/* -----------------------------------------------
   13. ACCESSIBILITY & MOTION
------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    color-scheme: light;
    --bg: white;
    --surface: white;
    --surface-sunken: white;
    --text: black;
    --text-strong: black;
    --text-muted: #555;
    --border: #ccc;
    --accent: #285c20;
  }

  body {
    max-width: none;
    padding: 0;
  }

  a {
    color: inherit;
  }

  pre, blockquote {
    break-inside: avoid;
  }
}
