/* Charcoal, mint and locally available type from the original Limited Underground site. */
:root {
  color-scheme: dark;
  --canvas: #1b2326;
  --surface: #253034;
  --sidebar: #131a1d;
  --line: #40514f;
  --text: #edf3f0;
  --muted: #bbc9c4;
  --mint: #a0e6ca;
  --side-width: 246px;
  font: 100%/1.6 "Segoe UI", system-ui, Arial, sans-serif;
  background: var(--canvas);
  color: var(--text);
}

* { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
body { min-height: 100vh; }
a { color: var(--mint); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; }
img { display: block; max-width: 100%; }
h1, h2 { line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: clamp(2.45rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.35rem, 2vw, 1.9rem); }
p { color: var(--muted); }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: clamp(1.25rem, 4.3vw, 4rem); }

.skip { position: fixed; inset: -8rem auto auto 1rem; z-index: 10; padding: .65rem 1rem; background: var(--mint); color: var(--sidebar); }
.skip:focus { top: 1rem; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-width); padding: 2rem 1.3rem; background: var(--sidebar); border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: block; }
.brand img { width: 100%; height: auto; }
.sidebar nav { margin-top: 2.1rem; }
.sidebar nav a, .sidebar summary { display: block; padding: .55rem .7rem; border-radius: 4px; color: var(--muted); text-decoration: none; }
.sidebar nav a:hover, .sidebar summary:hover { color: var(--text); background: var(--surface); }
.sidebar nav [aria-current=page] { color: var(--mint); box-shadow: inset 3px 0 var(--mint); background: #253c35; }
.sidebar summary { cursor: pointer; display: list-item; color: var(--text); }
.sidebar details a { margin-left: .85rem; border-left: 1px solid var(--line); padding-left: 1rem; font-size: .925rem; }

.page-shell { min-height: 100vh; display: flex; flex-direction: column; margin-left: var(--side-width); }
main { flex: 1; }
.site-header, .site-footer { color: var(--text); background: #192124; }
.site-header { display: flex; min-height: 64px; gap: .9rem; align-items: center; justify-content: space-between; padding: .75rem clamp(1.25rem, 3vw, 3rem); border-bottom: 1px solid var(--line); }
.site-header a, .site-footer a { color: inherit; text-decoration: none; }
.site-header a:hover, .site-footer a:hover { text-decoration: underline; }
.site-header nav, .site-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.1rem; }
.header-brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 650; letter-spacing: -.02em; }
.header-brand img { display: none; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1.8rem; }
.footer-inner > a { font-weight: 650; }

.catalog-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; background: var(--sidebar); border-bottom: 1px solid var(--line); }
.hero-copy { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.hero-copy p { max-width: 38ch; font-size: 1.13rem; margin-top: .75rem; }
.catalog-hero > img { width: 100%; height: auto; }
.catalog-section { padding-block: clamp(1.6rem, 4vw, 3.6rem); scroll-margin-top: 1rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr)); gap: 1rem; }
.project-card { display: flex; flex-direction: column; align-items: flex-start; gap: .95rem; padding: clamp(1.15rem, 2.2vw, 1.875rem); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--text); text-decoration: none; }
.project-card:hover, .project-card:focus-visible { border-color: var(--mint); }
.project-card:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.project-card h2 { font-size: clamp(1.45rem, 2.1vw, 1.9rem); }
.project-card p { line-height: 1.5; }
.status { display: inline-block; padding: .22rem .62rem; border-radius: 3px; font-size: .875rem; font-weight: 650; line-height: 1.45; }
.status-released { background: #daebdc; color: #215331; }
.status-in-testing { background: #e2edf2; color: #235165; }
.status-coming-later, .status-paused { background: #eee8e0; color: #614a33; }

.reading-page { padding-block: clamp(2.25rem, 6vw, 5.5rem); }
.reading-page h1 { max-width: 22ch; }
.reading-page h2 { margin-top: 2.1rem; }
.reading-page p { max-width: 60ch; margin-top: 1rem; font-size: 1.075rem; }
.reading-page .lead { color: var(--text); font-size: clamp(1.15rem, 2vw, 1.45rem); }
.reading-page ul { margin-top: .75rem; padding-left: 1.25rem; }
.reading-page li + li { margin-top: .25rem; }
.breadcrumb { display: block; width: fit-content; margin-bottom: 1.5rem; color: var(--muted); }
.project-reading .status { margin-bottom: .85rem; }
.actions { display: flex; gap: .9rem 1.25rem; flex-wrap: wrap; align-items: center; margin-top: 1.5rem; }
.button { display: inline-block; padding: .65rem 1.15rem; font-weight: 650; border-radius: 4px; color: #13291f; background: var(--mint); text-decoration: none; }
.button:hover { background: #c6f2df; }

@media (max-width: 820px) {
  .sidebar { display: none; }
  .page-shell { margin-left: 0; }
  .header-brand img { display: block; }
  .catalog-hero { display: block; }
  .catalog-hero > img { display: none; }
  .hero-copy { padding-block: 2.25rem; }
}
@media (max-width: 400px) {
  .site-header { flex-wrap: wrap; padding-inline: 1rem; gap: .35rem .65rem; }
  .site-header nav { gap: .65rem; }
  .header-brand { font-size: .95rem; }
  .header-brand img { width: 1.65rem; height: 1.65rem; }
  .site-header nav a { font-size: .875rem; }
}
