/* sidecat — a green field, a black panel, the statement, the cat. */

:root {
  --green: #06483e;
  --panel: #18221e;
  --ink: #e4eae6;
  --line: rgba(228, 234, 230, 0.18);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(18px, 4.5vw, 68px);   /* the green border */
  background: var(--green);
  display: grid;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

main {
  background: var(--panel);
  border-radius: clamp(16px, 2.8vw, 38px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: clamp(28px, 4vw, 44px);
  padding: clamp(24px, 6vw, 72px);
}

.statement {
  max-width: 34rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(20px, 3.5vw, 32px);
  color: var(--ink);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.6;
}

.statement p { margin: 0 0 1em; }
.statement p:last-child { margin-bottom: 0; }
.statement ul { margin: 0 0 1em; padding-left: 1.2em; }
.statement li { margin-bottom: 0.6em; }
.statement li:last-child { margin-bottom: 0; }

/* The walking cat is a transparent 192x208 PNG, so it sits directly on the
   panel with no tile edge. Sized off its native height to stay sharp. */
main img {
  display: block;
  height: min(280px, 42vmin);
  width: auto;
}

/* The recorded-development page: same green field and dark panel, read as a
   document instead of a poster. */

.more { margin: 0; font-size: 0.95rem; }
.more a { color: var(--ink); }

/* The report column must never be widened by a long digest or identifier. */
body.report-page { grid-template-columns: minmax(0, 1fr); }

main.report {
  place-items: stretch;
  align-content: start;
  gap: clamp(20px, 3vw, 32px);
  width: 100%;
  min-width: 0;              /* long digests must not widen the grid track */
  max-width: 62rem;
  margin: 0 auto;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;   /* record identifiers are long and unbreakable */
}

/* Keep the briefing and authored records readable at normal zoom. */
.report :is(p, ul, ol, dl, .text, h1, h2, h3, h4, summary) { max-width: 70ch; }
.report .operator-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 3vw, 32px);
  min-width: 0;
}
.report .full-development-records[open] > summary { margin-bottom: 1.5rem; }

/* Contents stays in the document flow until there is room for a left rail. */
.report .progress-layout,
.report .progress-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 32px);
  min-width: 0;
}
.report .progress-contents {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  font-size: 1rem;
}
.report .progress-contents h2 { font-size: 1rem; }
.report .progress-contents ul { list-style: none; margin: 0; padding: 0; }
.report .progress-contents li { margin: 0; }
.report .progress-contents .contents-level-3 { padding-left: 0.8rem; }
.report .progress-contents .contents-level-4 { padding-left: 1.6rem; }
.report .progress-contents a { display: block; padding: 0.3rem 0; }
.report :focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.report [id] { scroll-margin-top: 1.5rem; }

@media (min-width: 72rem) {
  main.report { max-width: 88rem; }
  .report .progress-layout { grid-template-columns: 14rem minmax(0, 1fr); }
  .report .progress-contents {
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    max-height: calc(100dvh - 3rem);
    overflow-y: auto;
  }
}

.report a { color: var(--ink); }
.report section {
  min-width: 0;              /* the sources table scrolls inside its wrapper */
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(16px, 2.5vw, 26px);
}
.report h1 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 0 0 0.4em; }
.report h2 {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  margin: 0 0 0.7em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--line);
}
.report h3 { font-size: 1.02rem; line-height: 1.4; margin: 0 0 0.3em; }
.report h4 {
  font-size: 1rem;
  line-height: 1.4;
  margin: 1.1em 0 0.35em;
}
.report details { margin: 0.9em 0 0; border-top: 1px solid var(--line); padding-top: 0.6em; }
.report summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0.35rem 0;
}
.report summary:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.report details[open] > summary { margin-bottom: 0.5em; }
.report details h4:first-of-type { margin-top: 0.2em; }

.report .entry { border-top: 1px solid var(--line); margin-top: 1.2em; padding-top: 1.2em; }
.report .entry:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.report .text { margin: 0; white-space: pre-wrap; }
.report .meta { margin: 0.35em 0; font-size: 1rem; }
.report .empty { margin: 0; }
.report code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1em; }
.report .table-scroll { overflow-x: auto; }
.report table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.report th, .report td {
  padding: 0.35em 0.6em;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.report tr.bad td { color: #ffb4a2; }
