:root {
  --ink: #20201e;
  --paper: #fffdf4;
  --cream: #f4f0e5;
  --orange: #ff6b45;
  --orange-dark: #dc4f2e;
  --yellow: #f4d35e;
  --line: #cbc5b7;
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background-image: radial-gradient(#d5cfc1 0.7px, transparent 0.7px); background-size: 12px 12px; }
.site-header { min-height: 72px; padding: 0 max(24px, calc((100% - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--orange); border-bottom: 2px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.08rem; font-weight: 900; letter-spacing: -.03em; }
.brand-face { display: grid; place-items: center; width: 39px; height: 32px; background: var(--paper); border: 2px solid var(--ink); border-radius: 3px 3px 8px 8px; font-family: monospace; font-size: .85rem; }
main { max-width: 1120px; margin: 0 auto; padding: 48px 24px 90px; }
.site-footer { padding: 28px 24px; border-top: 1px solid var(--line); text-align: center; font-size: .82rem; font-weight: 700; letter-spacing: .04em; background: rgba(255,253,244,.72); }
h1, h2, h3 { margin-top: 0; line-height: 1; letter-spacing: -.045em; }
h1 { font-size: clamp(3rem, 8vw, 6.4rem); }
h2 { font-size: 2rem; }
h3 { margin-bottom: 8px; font-size: 1.5rem; }
p { margin-top: 0; }
a { color: inherit; }
.back { display: inline-block; margin-bottom: 35px; font-weight: 800; text-decoration: none; }
.back:hover, .text-link:hover { text-decoration-thickness: 3px; }
.hero { margin-bottom: 54px; }
.home-hero { min-height: 420px; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 50px; }
.home-hero h1 { margin: 12px 0 22px; }
.lede { max-width: 620px; font-family: Georgia, serif; font-size: 1.25rem; line-height: 1.55; }
.eyebrow, .card-number { margin-bottom: 7px; color: var(--orange-dark); font-size: .75rem; font-weight: 950; letter-spacing: .13em; text-transform: uppercase; }
.card-number { float: right; color: #9a958b; }
.little-printer-art { position: relative; width: 260px; height: 300px; margin: auto; filter: drop-shadow(11px 14px 0 rgba(32,32,30,.14)); }
.paper { position: absolute; z-index: 2; top: 2px; left: 45px; width: 170px; height: 180px; display: flex; justify-content: center; align-items: center; gap: 13px; padding-top: 30px; background: var(--paper); border: 3px solid var(--ink); border-radius: 7px 7px 0 0; font: 900 2rem/1 monospace; }
.paper span:nth-child(2) { font-size: 3rem; transform: translateY(7px); }
.printer-body { position: absolute; z-index: 1; left: 17px; bottom: 30px; width: 226px; height: 150px; background: #deddd7; border: 3px solid var(--ink); border-radius: 18px 18px 25px 25px; }
.little-printer-art i { position: absolute; bottom: 6px; width: 60px; height: 58px; border: 3px solid var(--ink); background: var(--orange); border-radius: 7px 7px 19px 19px; }
.little-printer-art i:nth-of-type(1) { left: 34px; transform: rotate(5deg); }
.little-printer-art i:nth-of-type(2) { right: 34px; transform: rotate(-5deg); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading p { margin: 8px 0 0; }
.section-heading > span { flex: none; padding: 5px 10px; border: 1px solid var(--ink); border-radius: 999px; font-size: .75rem; font-weight: 800; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 22px; }
.card { display: block; margin-bottom: 24px; padding: 26px; background: var(--paper); border: 2px solid var(--ink); border-radius: 9px; box-shadow: 6px 6px 0 var(--ink); }
.printer-card { position: relative; display: flex; align-items: center; gap: 20px; min-height: 150px; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.printer-card:hover { transform: translate(-3px,-3px); box-shadow: 9px 9px 0 var(--ink); }
.printer-card p { margin-bottom: 0; }
.printer-card .arrow { position: absolute; right: 23px; top: 21px; font-size: 1.6rem; }
.mini-face { width: 82px; height: 92px; flex: none; position: relative; background: white; border: 2px solid var(--ink); border-radius: 3px 3px 10px 10px; }
.mini-face b { position: absolute; top: 31px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.mini-face b:first-child { left: 21px; }.mini-face b:nth-child(2) { right: 21px; }
.mini-face i { position: absolute; left: 25px; top: 48px; width: 30px; height: 17px; border-bottom: 3px solid; border-radius: 50%; }
.face-surprised i { left: 34px; width: 13px; height: 16px; border: 3px solid; border-radius: 50%; }
.face-wink b:nth-child(2), .face-sleepy b { height: 2px; border-radius: 0; transform: rotate(-10deg); }
.face-sleepy b:first-child { transform: rotate(10deg); }
.add-card { border-style: dashed; background: rgba(255,253,244,.52); }
.printer-hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.printer-hero h1 { margin: 5px 0 15px; font-size: clamp(3rem, 7vw, 5.5rem); }
.button-large { min-width: 270px; display: flex; align-items: center; justify-content: space-between; border-radius: 7px; padding: 18px 20px; text-align: left; }
.button-large span { font-size: 1.5rem; }
.settings-grid { align-items: start; }
label { display: block; margin: 14px 0; font-size: .82rem; font-weight: 850; letter-spacing: .02em; }
input, textarea, select { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border: 1.5px solid #99948a; border-radius: 5px; background: white; color: var(--ink); font: inherit; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(255,107,69,.25); border-color: var(--orange-dark); }
textarea { resize: vertical; }
button, .button { display: inline-block; padding: 11px 18px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: white; cursor: pointer; font: inherit; font-weight: 850; text-decoration: none; }
button:hover, .button:hover { background: var(--orange); color: var(--ink); }
.link { padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink); text-decoration: underline; }
.link:hover { background: none; color: var(--orange-dark); }
.text-link { margin-left: 12px; font-size: .88rem; font-weight: 800; }
.narrow { max-width: 480px; margin: 30px auto; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; margin: 0; }
.flash { margin-bottom: 22px; padding: 12px 16px; border: 2px solid; border-radius: 7px; font-weight: 700; }
.error { background: #ffd5d0; }.success { background: #d8f1d0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.face-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 20px 0; }
.face-picker label { margin: 0; }
.face-picker input { position: absolute; opacity: 0; pointer-events: none; }
.face-picker span { min-height: 79px; display: grid; place-items: center; padding: 8px 3px; border: 2px solid var(--line); border-radius: 6px; background: white; font: 800 1rem monospace; cursor: pointer; }
.face-picker small { display: block; font: 700 .66rem system-ui; }
.face-picker input:checked + span { border-color: var(--ink); background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); }
.publications-card { margin-top: 0; }
.sources { margin: 8px -10px 24px; }
.sources > div { display: flex; align-items: center; gap: 13px; min-height: 67px; padding: 10px; border-bottom: 1px solid var(--line); }
.source-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border: 2px solid var(--ink); border-radius: 50%; font-family: Georgia, serif; font-weight: 900; }
.sources strong, .sources small { display: block; }.sources small { color: #6e6a62; }
.sources form { margin-left: auto; }
.danger { color: #a42618; }
.empty-state { padding: 22px; border: 1px dashed #99948a; background: white; color: #6e6a62; }
.add-publication { margin-top: 24px; }
.add-publication summary { width: fit-content; padding: 10px 17px; border: 2px solid var(--ink); border-radius: 999px; cursor: pointer; font-weight: 850; list-style: none; }
.add-publication[open] summary { margin-bottom: 18px; background: var(--yellow); }
.hint { margin-top: -6px; color: #6e6a62; font-size: .8rem; }
.job-list { margin: 0; padding: 0; list-style: none; }
.job-list li { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; border-bottom: 1px solid var(--line); }
.job-list small { grid-row: 2; color: #6e6a62; }
.job-list b { grid-column: 2; grid-row: 1 / 3; align-self: center; padding: 2px 8px; border-radius: 999px; background: #e5e0d5; font-size: .7rem; text-transform: uppercase; }
.job-printed { background: #d8f1d0 !important; }.job-failed { background: #ffd5d0 !important; }.job-queued { background: #fff0ad !important; }
code { padding: 3px 6px; border-radius: 4px; background: #e8e2d5; }
.wrap { word-break: break-all; } dt { margin-top: 12px; font-weight: 800; } dd { margin: 5px 0; }

@media (max-width: 760px) {
  main { padding-top: 30px; }
  .home-hero { min-height: 0; grid-template-columns: 1fr; }
  .little-printer-art { display: none; }
  .printer-hero { align-items: start; flex-direction: column; }
  .button-large { width: 100%; }
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .grid { grid-template-columns: 1fr; }
  .face-picker { grid-template-columns: repeat(2,1fr); }
  .section-heading { align-items: start; flex-direction: column; }
  h1 { font-size: 3.15rem; }
}
