:root {
  color-scheme: light;
  font: 100%/1.6 system-ui, sans-serif;
  color: #182125;
  background: #f7f8fa;
}

body {
  --ink: #263b58;
  --wash: #edf3fa;
  --rule: #d9e0e6;
  --surface: #fff;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.theme-1  { --ink: #065a61; --wash: #e9f6f4; }
.theme-2  { --ink: #305673; --wash: #eaf1f5; }
.theme-3  { --ink: #793444; --wash: #faedf0; }
.theme-4  { --ink: #5c4176; --wash: #f4effa; }
.theme-5  { --ink: #5c4d10; --wash: #faf3d9; }
.theme-6  { --ink: #22513c; --wash: #edf5eb; }
.theme-7  { --ink: #7d3722; --wash: #fff0e8; }
.theme-8  { --ink: #1c527e; --wash: #ebf4fb; }
.theme-9  { --ink: #603171; --wash: #f6ebf9; }
.theme-10 { --ink: #435f25; --wash: #f0f5e7; }
.theme-11 { --ink: #353773; --wash: #eeeffb; }
.theme-12 { --ink: #8b392f; --wash: #fff0eb; }
.theme-13 { --ink: #15584c; --wash: #e5f5ec; }
.theme-14 { --ink: #654230; --wash: #f6eee8; }
.theme-15 { --ink: #154c69; --wash: #e7f2f6; }

*, *::before, *::after { box-sizing: border-box; }
a { color: var(--ink); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .15em; }
:focus-visible { outline: .18rem solid var(--ink); outline-offset: .22rem; }
p { margin-block: 0 1rem; }
:where(ul, ol) { padding-inline-start: 1.4rem; }
li { margin-block: .3rem; }
:where(h1, h2, h3, h4) { line-height: 1.2; margin-block: 0 .7rem; }
:where(h2, h3, h4) { margin-block-start: 1.8rem; }
h1 { font-size: clamp(2.1rem, 6vw, 4rem); letter-spacing: -.04em; text-wrap: balance; }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
.shell { width: min(74rem, calc(100% - clamp(2rem, 8vw, 7rem))); margin-inline: auto; }
.skip-link { position: absolute; top: .5rem; left: .5rem; transform: translateY(-150%); padding: .5rem 1rem; background: white; z-index: 1; }
.skip-link:focus { transform: none; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem 2rem; flex-wrap: wrap; padding-block: 1rem; }
.site-brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 750; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: .75rem; height: .75rem; border-radius: 25% 65% 30% 50%; background: var(--ink); transform: rotate(-12deg); }
main { flex: 1; padding-block: clamp(1rem, 5vw, 3.8rem) clamp(2rem, 6vw, 5rem); }
.hero { margin-block-end: clamp(1.25rem, 4vw, 2.5rem); padding: clamp(1.4rem, 6vw, 4rem); background: var(--wash); border-block-start: .25rem solid var(--ink); border-radius: .25rem 1rem 1rem 1rem; color: var(--ink); }
.hero p { font-size: clamp(1.03rem, 2.1vw, 1.2rem); max-width: 60ch; margin: .75rem 0 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; padding-inline-start: 0; }
.resource-grid { list-style: none; margin: 0; }
.resource-grid > li { margin: 0; }
.card { min-width: 0; padding: clamp(1rem, 3vw, 1.45rem); border-radius: .75rem; border: 1px solid var(--rule); background: var(--surface); }
.card > :first-child, .resource > :first-child { margin-block-start: 0; }
.card > :last-child, .callout > :last-child { margin-block-end: 0; }
.resource-type { font-size: .875rem; font-weight: 650; color: var(--ink); margin: 0 0 .5rem; }
.resource-grid h2 { font-size: 1.25rem; margin-block-start: 0; }
.resource-grid h2 a { font-weight: 730; }
.resource { max-width: 76ch; min-width: 0; overflow-wrap: anywhere; }
.resource section + section { margin-block-start: 2rem; }
.card, .callout, .related { overflow-wrap: anywhere; }
.callout, .related { background: var(--wash); border-inline-start: .2rem solid var(--ink); border-radius: .3rem; padding: 1rem; margin-block: 1.5rem; max-width: 76ch; }
.related h2 { margin-block-start: 0; font-size: 1.2rem; }
.related ul { margin-bottom: 0; }
.stack > * + * { margin-block-start: .8rem; }
.site-footer { padding-block: 1.25rem; border-top: 1px solid var(--rule); background: var(--surface); }
.site-footer ul { display: flex; flex-wrap: wrap; gap: .5rem 1rem; list-style: none; padding: 0; margin-block: 0 .6rem; }
.site-footer p { margin: 0; color: #3e4b55; }
:where(fieldset) { min-inline-size: 0; border: 1px solid var(--rule); border-radius: .5rem; padding: .75rem 1rem; }
:where(legend, label) { font-weight: 650; }
form { margin-block: 1rem; }
form > label { display: block; margin-block-start: .5rem; }
:where(input:not([type=checkbox], [type=radio]), select, textarea) {
  border: 1px solid #71808b;
  border-radius: .4rem;
  background: white;
  color: #182125;
  width: min(100%, 27rem);
  padding: .6rem .7rem;
  font: inherit;
}
:where(input[type=checkbox], input[type=radio]) { accent-color: var(--ink); inline-size: 1.1rem; block-size: 1.1rem; vertical-align: -.15em; }
:where(button) { border: 1px solid var(--ink); border-radius: .45rem; background: var(--ink); color: white; font: inherit; font-weight: 660; padding: .55rem .95rem; cursor: pointer; }
:where(button:hover) { filter: brightness(.88); }
:where(button:disabled) { opacity: .65; cursor: default; }
:where(output) { display: block; color: var(--ink); margin-block-start: .5rem; font-weight: 660; }
:where(table) { width: 100%; border-collapse: collapse; margin-block: 1rem; background: white; font-size: .925rem; }
:where(td, th) { padding: .45rem .55rem; border-bottom: 1px solid var(--rule); text-align: start; vertical-align: top; }
:where(th) { color: var(--ink); background: var(--wash); }
:where(caption) { text-align: start; font-weight: 650; margin-block-end: .35rem; }
:where(pre) { padding: .75rem; background: var(--wash); overflow: auto; }
:where(img, canvas) { max-inline-size: 100%; block-size: auto; }
@media (max-width: 35rem) {
  .shell { width: calc(100% - 2rem); }
  .resource table { display: block; overflow-x: auto; }
}
