/* Paid in Pixels: "Paycheck" brand (brand/style-guide.md). Fonts are self-hosted, so no third-party requests. */
@font-face { font-family: "Young Serif"; src: url("fonts/YoungSerif-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --mint: #E3EFE6; --ink: #1B2B4B; --red: #D2402F; --sage: #9DB8A7; --white: #FFFFFF;
  --ink-soft: #3C4A66;
  --serif: "Young Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1080px; --text: 680px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--mint); color: var(--ink);
  font: 18px/1.65 var(--sans);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='24'%3E%3Cpath d='M0 12 Q30 4 60 12 T120 12 T180 12 T240 12' fill='none' stroke='%239DB8A7' stroke-opacity='.28' stroke-width='1.2'/%3E%3C/svg%3E");
}
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.text { max-width: var(--text); }

/* header + footer */
.site-head { padding: 20px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 22px/1 var(--serif); }
.brand img { width: 44px; height: 44px; }
.nav { display: flex; gap: 20px; font: 600 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.nav a { text-decoration: none; }
.nav a[aria-current="page"] { text-decoration: underline; }
.site-foot { margin-top: 96px; padding: 32px 0 48px; border-top: 3px double var(--ink); font: 13px/1.7 var(--mono); }
.site-foot p { margin: 0 0 6px; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }

/* type */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(38px, 7vw, 68px); letter-spacing: -.01em; }
h2 { font-size: clamp(28px, 4.2vw, 38px); margin-top: 1.6em; }
h3 { font-size: 23px; margin-top: 1.4em; }
.label { font: 600 13px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px; }
.rule { height: 9px; border-top: 5px solid var(--ink); border-bottom: 2px solid var(--ink); width: 220px; margin: 22px 0 24px; }
.sub { font: 16px/1.6 var(--mono); max-width: 620px; }
code, .mono { font-family: var(--mono); font-size: .9em; }
pre { background: var(--ink); color: var(--mint); padding: 16px 18px; border-radius: 6px; overflow-x: auto; font: 14px/1.55 var(--mono); }
.amount { font-family: var(--mono); }

/* buttons */
.btn { display: inline-block; padding: 14px 22px; border: 2px solid var(--ink); border-radius: 4px; font: 600 15px/1 var(--mono); text-decoration: none; background: var(--white); }
.btn:hover { background: var(--ink); color: var(--mint); }
.btn-red { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-red:hover { background: var(--ink); border-color: var(--ink); color: var(--mint); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0; }

/* home */
.hero { padding-top: 48px; padding-bottom: 24px; position: relative; }
.stamp { position: absolute; right: 16px; top: 40px; transform: rotate(-12deg); border: 5px solid var(--red); color: var(--red); font: 600 34px/1 var(--mono); letter-spacing: .14em; padding: 10px 16px 8px; opacity: .9; }
.shot { background: var(--white); border-radius: 8px; padding: 8px; box-shadow: 0 1px 0 var(--sage), 0 12px 32px rgba(27, 43, 75, .12); }
.shot img { border-radius: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 28px 0; }
.card { background: var(--white); border-radius: 8px; padding: 22px; }
.card h3 { margin-top: 0; }
.card p { margin: 0; font-size: 16px; }
.compare { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 8px; overflow: hidden; font-size: 16px; }
.compare th, .compare td { padding: 11px 14px; border-bottom: 1px solid var(--mint); text-align: left; }
.compare th { font: 600 12px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.compare td + td, .compare th + th { text-align: center; width: 22%; }

/* article */
.post-head { padding: 40px 0 8px; }
.meta { font: 13px/1.6 var(--mono); color: var(--ink-soft); }
article p, article li { max-width: var(--text); }
article figure { margin: 32px 0; }
article figcaption { font: 13px/1.5 var(--mono); margin-top: 10px; color: var(--ink-soft); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll-x img { max-width: none; width: 1600px; }
.compare.stages td + td, .compare.stages th + th { text-align: left; width: auto; }
.compare.stages td:first-child { white-space: nowrap; width: 1%; }
.callout { background: var(--white); border-left: 5px solid var(--red); padding: 18px 22px; border-radius: 0 8px 8px 0; margin: 32px 0; max-width: var(--text); }
.callout p { margin: 0 0 10px; }
.toc { font: 15px/1.8 var(--mono); padding-left: 1.2em; }
.post-list { list-style: none; padding: 0; margin: 24px 0; }
.post-list li { background: var(--white); border-radius: 8px; padding: 22px; margin-bottom: 16px; }
.post-list h2 { font-size: 27px; margin: 6px 0 8px; }
.post-list a { text-decoration: none; }
.small { font-size: 15px; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .stamp { display: none; }
  .nav { gap: 14px; }
}
