/* The Darkest Hour — simplified brutalist stylesheet */

/* --- Base / reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { line-height: 1.5; }
body {
  margin: 0;
  color: #000;
  background: #fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
  font-size: 18px;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Night mode (manual toggle + prefers-color-scheme) */
body.night { background: #000; color: #e6e6e6; }
body.night a { color: inherit; }
@media (prefers-color-scheme: dark) {
  body:not(.day) { background: #000; color: #e6e6e6; }
  hr, .rule { border-color: currentColor; }
}

/* --- Layout --- */
.wrap { max-width: 80ch; margin: 0 auto; padding: 2rem 1rem 4rem; }

header.site { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 2px solid currentColor; }
header .title {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
}
header .tagline { margin-top: .25rem; max-width: 60ch; }

/* --- Navigation (remove boxes; keep honest underlines) --- */
nav[aria-label="Primary"] { margin-top: 1rem; }
nav a {
  margin-right: 1rem;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .12em;
  text-decoration-thickness: 2px;
}
nav a[aria-current="page"] {
  outline: 2px dashed currentColor; /* clear focus/active affordance without a box */
  outline-offset: 2px;
}

/* --- Links & focus --- */
a { color: inherit; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px dashed currentColor;
  outline-offset: 2px;
}

/* --- Skip link (kept strong for accessibility) --- */
.skip-nav { position: absolute; left: -9999px; top: auto; }
.skip-nav:focus {
  left: 1rem; top: 1rem;
  background: inherit; color: inherit;
  padding: .5rem .75rem;
  outline: 3px dashed currentColor;
  outline-offset: 2px;
  z-index: 999;
}

/* --- Content blocks --- */
/* Notice: from full box -> single vertical rule */
.notice {
  padding-left: .75rem;
  margin: 1rem 0 2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border-left: 4px solid currentColor;
}

/* Posts list: keep simple dividers */
.posts { list-style: decimal-leading-zero; padding-left: 1.75rem; }
.posts > li { border-top: 1px solid currentColor; padding-top: 1rem; margin-top: 1rem; }
.posts article { display: block; }
.posts h2 { font-size: 1.25rem; margin: 0 0 .25rem; }

.meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem;
}

/* Tags: remove rectangles; go light/italic */
.tag {
  margin-right: .75rem;
  font-style: italic;
}
.tag a { text-decoration: none; border-bottom: 2px solid currentColor; }

/* Aside/Index: from full box -> top rule */
.index { border-top: 2px solid currentColor; padding-top: 1rem; }
.index h3 { margin-top: 0; }
.index ul { padding-left: 1rem; }

/* Footer: thinner top rule */
footer { border-top: 1px solid currentColor; margin-top: 3rem; padding-top: 1rem; }

/* Tables (if ever needed): keep honest borders but lighter */
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid currentColor; padding: .4rem; text-align: left; }

/* Forms: remove boxes; keep honest outlines on focus */
input, textarea, button {
  font: inherit; color: inherit; background: transparent;
  border: 1px solid currentColor; padding: .5rem; width: 100%;
}
input:focus, textarea:focus { outline: 2px dashed currentColor; outline-offset: 2px; }


/* Typography niceties */
h1, h2, h3 { letter-spacing: -0.01em; }
.content p { max-width: 70ch; }
.content ul { padding-left: 1.25rem; }

/* Quotes & rules */
blockquote { border-left: 4px solid currentColor; padding-left: .75rem; margin-left: 0; }
hr { border: 0; border-top: 1px solid currentColor; margin: 2rem 0; }

/* ASCII art (optional) */
.ascii-figure{ margin:2rem 0; text-align:center; }
.ascii-pre{
    display:inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    white-space: pre;
    line-height: 1.05;
    letter-spacing: 0;                 /* was 0.02em — can skew diagonals */
    font-variant-ligatures: none;      /* kill ligatures just in case      */
    -webkit-font-smoothing: none;      /* optional: “sharper” terminal look */
    padding: .5rem;
    margin: 0 auto;
    border: none;
    overflow-x: auto;
}
.ascii-figcap{ font-size:.8rem; margin-top:.3rem; text-align:center; }
@media (prefers-color-scheme:dark){
  .ascii-pre{ background:#000; color:#0f0; }
}
@media print{
  .ascii-pre{ color:#000 !important; background:transparent !important; }
}
.fragments {
    list-style: none;
    padding-left: 0;
    max-width: 70ch;
}
.fragments li {
    margin: .75rem 0;
}
.fragments time {
    font-family: ui-monospace, monospace;
    font-size: .9rem;
    margin-right: .5rem;
}