/* cycletime.com — one stylesheet, no build step. Provisional design:
   readable type, one accent, light and dark. */
:root {
  --bg: #fdfcfa;
  --fg: #1d1d1b;
  --muted: #5f5e5a;
  --rule: #e4e1da;
  --accent: #1b654a;   /* Terrapin logo green */
  --accent-fg: #ffffff;
  --mark: #fff3c4;
  --measure: 40rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161714;
    --fg: #e9e7e1;
    --muted: #a3a19a;
    --rule: #33342f;
    --accent: #7cc4a6;   /* logo green, lightened for dark backgrounds */
    --accent-fg: #10120f;
    --mark: #3d3820;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: calc(var(--measure) + 2rem);
  padding: 0 1rem;
  background: var(--bg);
  color: var(--fg);
  font: 1.125rem/1.6 var(--serif);
}
a { color: var(--accent); text-underline-offset: 0.15em; }
img { max-width: 100%; height: auto; }
h1, h2, h3, nav, .byline, .button, .site-footer, time, .tags {
  font-family: var(--sans);
}
h1 { font-size: clamp(1.6rem, 4vw + 0.6rem, 2rem); line-height: 1.2; margin: 0 0 0.5rem; }
h2 { font-size: 1.3rem; margin-top: 2.5rem; }
h3 { font-size: 1.1rem; margin-top: 2rem; }
pre, code { font-size: 0.9em; }
pre { overflow-x: auto; padding: 1rem; border: 1px solid var(--rule); }
blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 3px solid var(--rule); color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.skip { position: absolute; left: -999px; }
/* Present for screen readers and search engines, not drawn. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: 0.5rem; }

.site-header {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  align-items: flex-end; justify-content: space-between;
  padding: 1.25rem 0; border-bottom: 1px solid var(--rule); margin-bottom: 2.5rem;
}
.logo img { display: block; }


/* Logo renders are black ink and #1B654A on transparent. In dark mode,
   invert + hue-rotate turns the ink light and keeps the green green. */
@media (prefers-color-scheme: dark) {
  img.ink { filter: invert(1) hue-rotate(180deg); }
}
nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
nav a { color: var(--fg); text-decoration: none; }
nav a[aria-current="page"] { text-decoration: underline; }

.button {
  display: inline-block; padding: 0.6rem 1.1rem; border-radius: 4px;
  background: var(--accent); color: var(--accent-fg); text-decoration: none; font-weight: 600;
}

.intro p { font-size: clamp(1.1rem, 2.5vw + 0.5rem, 1.3rem); }
.lede { font-size: 1.2rem; }
.muted, time, .byline { color: var(--muted); }
.byline { font-size: 0.95rem; margin: 0 0 2rem; }
.cover { display: block; margin: 0 0 2rem; }

.article-list { list-style: none; padding: 0; }
.article-list li { margin: 0 0 1.75rem; }
.article-list a { font: 600 1.15rem var(--sans); }
.article-list time { display: block; font-size: 0.85rem; }
.article-list p { margin: 0.25rem 0 0; }

.article-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.tags span { font-size: 0.8rem; margin-right: 0.5rem; color: var(--muted); }
.tags span::before { content: "#"; }

.placeholder {
  background: var(--mark); border-left: 4px solid #c9a227;
  padding: 0.5rem 1rem; margin: 1rem 0; font-family: var(--sans); font-size: 0.95rem;
}
.placeholder::before { content: "Placeholder"; display: block; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; }

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem;
  margin-top: 4rem; padding: 1.5rem 0; border-top: 1px solid var(--rule);
  font-size: 0.85rem; color: var(--muted);
}
.site-footer p { margin: 0; }


.contact { margin: 1.5rem 0; }
.contact label { display: block; font: 600 0.95rem var(--sans); margin-bottom: 0.25rem; }
.contact input, .contact textarea {
  width: 100%; padding: 0.55rem 0.65rem; font: 1rem var(--sans);
  color: var(--fg); background: var(--bg); border: 1px solid var(--muted); border-radius: 4px;
}
.contact input:focus, .contact textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.contact button { border: 0; cursor: pointer; font-size: 1rem; }
.contact .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin: 0.5rem 0 1rem; min-height: 65px; }
