/* rubric-md site. Identity: a teacher's desk. Cool blue-grey paper, navy ink, one red grading pen.
   Instrument Serif for headlines, Instrument Sans for text, JetBrains Mono for code. */
:root {
  --paper: #f3f5fa;
  --sheet: #ffffff;
  --ink: #0d1a33;
  --muted: #475776;
  --line: #cfd7e6;
  --rule: #dde3f0;
  --pen: #d42b2b;
  --pen-ink: #ffffff;
  --blue: #1d4fd0;
  --display: "Instrument Serif", "Iowan Old Style", "Charter", Georgia, serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--text); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
body > .foot { flex: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.04; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h2 { font-size: clamp(34px, 4.6vw, 56px); }
h3 { font-size: 26px; }
p { margin: 0; }
code, pre { font-family: var(--mono); font-size: .86em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 4px; z-index: 10; }
.skip:focus { top: 12px; }

/* top bar */
.top { border-bottom: 1px solid var(--line); background: var(--sheet); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 600 18px/1 var(--mono); color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.wordmark .mark { width: 28px; height: 28px; }
.nav { display: flex; gap: 6px 22px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; padding: 0 2px; display: inline-flex; align-items: center; min-height: 44px; }
.nav a:hover { color: var(--pen); text-decoration: underline; text-underline-offset: .3em; }

/* hero */
.hero { padding: 64px 0 72px; background:
  repeating-linear-gradient(to bottom, transparent 0 39px, var(--rule) 39px 40px), var(--paper); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; top: 0; bottom: 0; left: max(24px, calc((100vw - var(--wrap)) / 2 - 18px)); width: 2px; background: rgba(212, 43, 43, .35); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow { font: 500 13px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--pen); margin-bottom: 20px; }
.hero h1 { font-size: clamp(42px, 4.5vw, 66px); line-height: 1; }
.hero h1 .pen { position: relative; white-space: nowrap; }
.hero h1 .pen::after { content: ""; position: absolute; left: -4%; right: -4%; bottom: -.12em; height: .22em; background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C40 2 90 11 130 5 S185 6 198 4' fill='none' stroke='%23d42b2b' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.lede { margin-top: 24px; font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-block; padding: 13px 22px; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; border: 2px solid var(--ink); }
.btn { min-height: 48px; transition: background-color .15s, border-color .15s, color .15s, transform .15s; }
.btn:hover { background: var(--pen); border-color: var(--pen); }
.btn:active { transform: translateY(1px); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.one-liner { margin-top: 22px; }
.one-liner code { display: inline-block; max-width: 100%; background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; padding: 9px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

.desk { position: relative; padding: 0 0 18% 0; }
.desk a { display: block; position: relative; background: var(--sheet); box-shadow: 0 1px 2px rgba(13, 26, 51, .12), 0 22px 50px rgba(13, 26, 51, .22); }
.desk img { width: 100%; }
.desk .back { width: 88%; transform: rotate(-1.4deg); }
.desk .mid { position: absolute; width: 56%; right: 0; bottom: 0; transform: rotate(2.6deg); }
.desk .low { position: absolute; width: 46%; left: -2%; bottom: 3%; transform: rotate(-3deg); }
.stamp { position: absolute; z-index: 2; top: -46px; right: -12px; width: 118px; height: 118px; border: 3px solid var(--pen); border-radius: 50%; color: var(--pen); display: grid; place-content: center; text-align: center; transform: rotate(-12deg); background: rgba(255, 255, 255, .55); font-family: var(--display); line-height: .95; }
.stamp b { font-weight: 400; font-size: 44px; display: block; }
.stamp span { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }

/* sections */
section { padding: 88px 0; }
.band { background: var(--sheet); border-block: 1px solid var(--line); }
.kicker { font: 500 13px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--pen); margin-bottom: 14px; }
.section-lede { margin-top: 16px; font-size: 19px; color: var(--muted); max-width: 40em; }

.four { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 36px; margin-top: 44px; }
.four figure { margin: 0; }
.four a { display: block; background: var(--paper); box-shadow: 0 1px 2px rgba(13, 26, 51, .1), 0 14px 34px rgba(13, 26, 51, .16); border: 1px solid var(--line); }
.four figcaption { margin-top: 16px; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.four figcaption b { font: 500 13px/1.7 var(--mono); color: var(--pen); grid-row: span 2; }
.four figcaption strong { font: 400 28px/1.1 var(--display); }
.four figcaption span { color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 44px; counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 14px; min-width: 0; position: relative; }
.steps > li::before { content: counter(step); font: 400 54px/1 var(--display); color: var(--pen); }
.steps h3 { font-size: 30px; }
.steps p { color: var(--muted); }
.code { margin: 6px 0 0; background: #0d1a33; color: #e8edf8; border-radius: 6px; padding: 16px 18px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.code .c { color: #8fa3cf; }
.code .g { color: #7fd6a0; }
.code .r { color: #ff8f8f; }
.code .y { color: #f3d27a; }
.code code { font-size: inherit; }

.gallery { columns: 3 320px; column-gap: 32px; margin-top: 44px; }
.gallery figure { margin: 0 0 40px; break-inside: avoid; }
.gallery a { display: block; background: var(--paper); box-shadow: 0 1px 2px rgba(13, 26, 51, .1), 0 14px 34px rgba(13, 26, 51, .16); border: 1px solid var(--line); }
.gallery figcaption { margin-top: 14px; }
.gallery figcaption b { font: 400 30px/1.1 var(--display); display: block; }
.gallery figcaption span { color: var(--muted); display: block; margin-top: 2px; }
.gallery figcaption i { font: 500 12px/1.4 var(--mono); font-style: normal; color: var(--pen); letter-spacing: .06em; text-transform: uppercase; display: block; margin-top: 8px; }

.ask { margin: 32px 0 0; padding: 24px 28px; background: var(--sheet); border-inline-start: 4px solid var(--pen); font: 400 26px/1.3 var(--display); max-width: 30em; }

.install { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.install > div { min-width: 0; }
.install h3 { font-size: 26px; margin-bottom: 12px; }
.install pre { margin: 0; background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.65; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(1.65em - 1px), var(--rule) calc(1.65em - 1px), var(--rule) 1.65em); background-position: 0 16px; }
.note { margin-top: 22px; color: var(--muted); }

.list { list-style: none; margin: 40px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.list li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto; gap: 8px 32px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); }
.list b { font: 400 30px/1.1 var(--display); }
.list span { color: var(--muted); }
.list .links { display: flex; gap: 0 20px; flex-wrap: wrap; font-size: 15px; }
.list .links a, .foot-skills a, .foot-row a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-row p:not(.foot-skills) a { display: inline; min-height: 0; }
.wordmark { min-height: 44px; }
.list .tag { display: inline-block; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--pen); margin-right: 10px; }

.foot { background: var(--ink); color: #c9d3ea; padding: 48px 0 56px; }
.foot a { color: #fff; }
.foot-row { display: grid; gap: 14px; }
.foot .wordmark { color: #fff; }
.foot-skills { display: flex; flex-wrap: wrap; gap: 6px 20px; }

.lost { padding: 96px 0; display: flex; align-items: center; }
.lost .wrap { width: 100%; }
.lost h1 { font-size: clamp(44px, 6vw, 80px); margin: 10px 0 18px; }

@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .steps, .install { grid-template-columns: minmax(0, 1fr); }
  .list li { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  section { padding: 64px 0; }
  .hero { padding: 40px 0 56px; }
  .hero::before { left: 10px; }
  .four { grid-template-columns: minmax(0, 1fr); }
  .lede { font-size: 18px; }
  .stamp { width: 88px; height: 88px; top: -14px; }
  .stamp b { font-size: 32px; }
  .hero h1 .pen { white-space: normal; }
}
