/* Carryall site styles, following docs/STYLE-GUIDE.md: Arial, 16px base, red accent, 44px targets,
   visible focus, light and dark modes. */
:root {
  --red: #e61e28; --slate: #50697d; --grey-light: #f1ede9;
  --bg: var(--grey-light); --surface: #ffffff; --surface-2: #f8f6f4; --text: #000000; --muted: var(--slate);
  --border: #d8d2cb; --border-strong: var(--slate); --focus: var(--red);
  --code-bg: #f8f6f4;
  color-scheme: light;
}
@media screen and (prefers-color-scheme: dark) {
  :root {
    --bg: #121212; --surface: #1c1c1c; --surface-2: #262626; --text: #ffffff; --muted: #c3cbd2;
    --border: #3a3a3a; --border-strong: #8d99a3; --code-bg: #232323;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.5 Arial, "Helvetica Neue", Helvetica, system-ui, sans-serif; }
a { color: var(--text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: 0.5rem; top: -4rem; background: var(--surface); padding: 0.625rem 1rem; border: 2px solid var(--focus); z-index: 10; }
.skip:focus { top: 0.5rem; }
.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1rem; }

header { background: var(--surface); border-top: 4px solid var(--red); border-bottom: 1px solid var(--border); }
header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.brand { font-weight: 700; font-size: 1.25rem; text-decoration: none; display: inline-flex; align-items: center; min-height: 2.75rem; }
nav.site ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 0.25rem; margin: 0; padding: 0; }
nav.site a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.625rem; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; }
nav.site a:hover { color: var(--text); }
nav.site a[aria-current="page"] { color: var(--text); font-weight: 700; border-bottom-color: var(--red); }

main { padding-bottom: 2rem; }
h1 { font-size: 1.75rem; margin: 1.5rem 0 0.75rem; line-height: 1.25; }
h2 { font-size: 1.375rem; margin: 2.25rem 0 0.75rem; line-height: 1.25; }
h3 { font-size: 1.125rem; margin: 1.5rem 0 0.5rem; line-height: 1.25; }
p, li { max-width: 46rem; }
.lead { font-size: 1.125rem; max-width: 44rem; margin: 1.25rem 0 0; }
.muted { color: var(--muted); }
ol, ul { padding-left: 1.5rem; }
li { margin-bottom: 0.375rem; }
hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0 0; }
code { font-family: "SF Mono", Menlo, Consolas, "Roboto Mono", monospace; font-size: 0.9em; background: var(--code-bg); border: 1px solid var(--border); border-radius: 0.1875rem; padding: 0 0.25rem; }

.codeblock { position: relative; margin: 0.75rem 0 1rem; max-width: 62rem; }
.codeblock pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 0.25rem; padding: 0.875rem 1rem; overflow-x: auto; margin: 0; font-size: 0.875rem; line-height: 1.45; }
.codeblock pre code { background: none; border: none; padding: 0; font-size: inherit; }
.codeblock .copy { position: absolute; top: 0.375rem; right: 0.375rem; }
.codeblock pre { padding-top: 2.75rem; }
.codeblock.prose pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.8125rem; }

.table-wrap { overflow-x: auto; margin: 0.75rem 0 1rem; border: 1px solid var(--border); border-radius: 0.25rem; background: var(--surface); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); font-size: 0.9375rem; }
tbody tr:last-child td { border-bottom: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1rem; border-radius: 0.25rem; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); text-decoration: none; font: inherit; cursor: pointer; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--red); border-color: var(--red); color: #ffffff; font-weight: 700; }
.btn.small { min-height: 2.25rem; padding: 0 0.75rem; font-size: 0.875rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; padding-top: 0.5rem; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--red); border-radius: 0.25rem; padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.card h3 { margin: 0; }
.card p { margin: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); max-width: none; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: 0.25rem; padding: 0.875rem 1rem; max-width: none; margin: 0; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--red); color: #ffffff; font-weight: 700; margin-bottom: 0.375rem; }
.steps strong { display: block; }

nav.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 0.25rem; padding: 0.75rem 1rem; margin: 1rem 0 0; max-width: 46rem; }
nav.toc h2 { font-size: 1rem; margin: 0 0 0.375rem; }
nav.toc ul { margin: 0; columns: 2 14rem; }
nav.toc li { margin-bottom: 0.125rem; break-inside: avoid; }

footer { margin-top: 3rem; background: var(--surface); border-top: 1px solid var(--border); color: var(--muted); font-size: 0.875rem; }
footer .wrap { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media print { header nav, .copy, .skip, footer { display: none; } body { background: #ffffff; } }
