/* Tip Ledger (twitpay.me). Fonts: Alexandria (headings), Spline Sans (text). Self-hosted, SIL OFL. */
@font-face { font-family: "Alexandria"; font-weight: 600; font-display: swap; src: url(/s/fonts/alexandria-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Alexandria"; font-weight: 800; font-display: swap; src: url(/s/fonts/alexandria-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Spline Sans"; font-weight: 400; font-display: swap; src: url(/s/fonts/spline-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Spline Sans"; font-weight: 600; font-display: swap; src: url(/s/fonts/spline-sans-latin-600-normal.woff2) format("woff2"); }

:root {
  --ink: #1e1b2e; --ink2: #3a3550; --muted: #6b6478; --paper: #fbf7ef; --slip: #fffdf8; --line: #e6dfd2;
  --orange: #e4572e; --orange-d: #b83f1c; --green: #2f7d5b; --plum: #5c4078; --amber: #f2b134; --red: #b3261e;
  --head: "Alexandria", "Segoe UI", system-ui, sans-serif; --text: "Spline Sans", "Segoe UI", system-ui, sans-serif;
  --r: 6px; --w: 46rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f1ece2; --ink2: #d6cfc2; --muted: #a59eb3; --paper: #17141f; --slip: #211d2c; --line: #3a3448;
          --orange: #ff7a52; --orange-d: #ff9a7a; --green: #5cc493; --plum: #c3a6e6; --red: #ff8a80; }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--text); overflow-wrap: break-word; }
h1, h2, h3 { font-family: var(--head); line-height: 1.18; letter-spacing: -.01em; }
h1 { font-weight: 800; font-size: clamp(1.9rem, 4.6vw, 3rem); margin: .2em 0 .4em; }
h2 { font-weight: 800; font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 2em 0 .6em; }
h3 { font-weight: 600; font-size: 1.15rem; margin: 1.6em 0 .4em; }
a { color: var(--orange-d); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 9; }
.skip:focus { left: .5rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* header */
.top { border-bottom: 2px dashed var(--line); background: var(--paper); }
.top-in { max-width: 72rem; margin: 0 auto; padding: .8rem 1.25rem; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; }
.brand-mark { color: var(--ink); flex: none; }
.brand-name { font: 800 1.2rem/1 var(--head); }
.brand-dom { font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: .1rem .5rem; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .95rem; }
.nav a { color: var(--ink2); text-decoration: none; padding: .2rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-color: var(--orange); color: var(--ink); }

main { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem 3rem; }
.crumbs ol { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .3rem; color: var(--line); }
.crumbs a { color: var(--muted); }

.kicker { font: 600 .8rem/1.2 var(--text); text-transform: uppercase; letter-spacing: .12em; color: var(--green); margin: 1.5rem 0 0; }
.lede { font-size: 1.15rem; color: var(--ink2); max-width: 40rem; }
.btn { display: inline-block; font: 600 .98rem/1 var(--text); background: var(--ink); color: var(--paper); border: 2px solid var(--ink);
       border-radius: var(--r); padding: .75rem 1.1rem; text-decoration: none; cursor: pointer; margin: .2rem .3rem .2rem 0; }
.btn:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn.disabled, .btn:disabled { opacity: .45; cursor: not-allowed; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; padding: 2rem 0 1rem; }
.hero-slip, .slip, .tool, .receipt, .answer, .takeaways, .toolnote {
  background: var(--slip); border: 1px solid var(--line); border-radius: var(--r); position: relative; }
.hero-slip { padding: 1.4rem 1.4rem 1rem; transform: rotate(-1.2deg); box-shadow: 0 10px 30px -18px rgba(30,27,46,.5); }
.hero-slip::after, .receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px;
  background: radial-gradient(circle at 7px -2px, transparent 7px, var(--slip) 7.5px) 0 0 / 14px 10px repeat-x; }
.slip-head { font: 800 1rem/1.2 var(--head); margin: 0 0 .6rem; text-transform: uppercase; letter-spacing: .06em; }
.ticks { margin: 0; padding-left: 1.2rem; }
.ticks li { padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.slip-total { display: flex; justify-content: space-between; align-items: baseline; margin: .8rem 0 0; font-weight: 600; }
.slip-total b { font: 800 1.5rem/1 var(--head); color: var(--orange); }

.band { margin-top: 2.5rem; }
.band-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.band-head h2 { margin-bottom: .4rem; }
.step-row { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.step-row li { counter-increment: s; border-top: 3px solid var(--ink); padding-top: .7rem; display: flex; flex-direction: column; gap: .2rem; }
.step-row li::before { content: "0" counter(s); font: 800 .9rem/1 var(--head); color: var(--orange); }
.step-row span { color: var(--ink2); }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.tool-card { display: flex; flex-direction: column; gap: .4rem; padding: 1.1rem; border: 2px solid var(--ink); border-radius: var(--r); color: var(--ink);
             text-decoration: none; background: var(--slip); transition: transform .15s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 4px 4px 0 var(--orange); }
.tool-card span:last-child { color: var(--ink2); font-size: .95rem; }
.tool-mark { font: 800 1.2rem/1 var(--head); width: 2.4rem; height: 2.4rem; display: grid; place-items: center; background: var(--orange); color: #fff; border-radius: 50%; }

.slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.slip { padding: 1rem 1.1rem; border-left: 5px solid var(--plum); }
.slip h3 { margin: .3rem 0; font-size: 1.08rem; }
.slip h3 a { color: var(--ink); text-decoration: none; }
.slip h3 a:hover { color: var(--orange-d); }
.slip p { margin: .3rem 0 0; color: var(--ink2); font-size: .95rem; }
.slip-k { font-size: .78rem !important; text-transform: uppercase; letter-spacing: .08em; color: var(--plum) !important; display: flex; justify-content: space-between; }
.slip-k span { color: var(--muted); }

/* X box */
.xbox { background: var(--ink); color: var(--paper); border-radius: 10px; padding: 1.5rem; }
.xbox h2 { margin-top: 0; }
.xbox a { color: var(--amber); }
.xbox .muted { color: #c9c2d6; }
@media (prefers-color-scheme: dark) { .xbox { background: #0c0a12; color: var(--ink); } .xbox .muted { color: var(--muted); } }
.xsearch { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.xsearch a { display: inline-block; border: 1px solid currentColor; border-radius: 99px; padding: .3rem .8rem; text-decoration: none; font-size: .92rem; }
.compose { background: var(--slip); color: var(--ink); border-radius: var(--r); padding: 1rem; margin: 1rem 0; }
.compose .muted { color: var(--muted); }
.compose a.btn { color: var(--paper); }
.xtips { padding-left: 1.2rem; }

label { display: block; font-weight: 600; font-size: .95rem; margin: .6rem 0 .3rem; }
label.inline { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
textarea, input[type=text], select { width: 100%; font: 400 1rem/1.5 var(--text); color: var(--ink); background: var(--paper); border: 2px solid var(--line);
  border-radius: var(--r); padding: .6rem .7rem; }
textarea:focus, input:focus, select:focus { border-color: var(--ink); outline: none; }
input[type=text], select { margin-top: .25rem; }
.compose-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }
.counter { font: 600 .95rem/1 var(--head); }
.counter.over { color: var(--red); }

/* documents */
.doc { max-width: var(--w); }
.doc.wide { max-width: none; }
.doc-head { margin-bottom: 1.2rem; }
.meta { font-size: .88rem; color: var(--muted); margin: 1.2rem 0 0; }
.tag { background: var(--plum); color: #fff; border-radius: 3px; padding: .1rem .45rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-right: .3rem; }
.answer, .takeaways, .toolnote { padding: 1rem 1.2rem; margin: 1rem 0; }
.answer { border-left: 5px solid var(--orange); }
.answer p:last-child { margin-bottom: 0; font-size: 1.08rem; }
.answer-k { font: 800 .78rem/1 var(--head) !important; text-transform: uppercase; letter-spacing: .12em; color: var(--green); margin: 0 0 .5rem; }
.takeaways ul { margin: 0; padding-left: 1.2rem; }
.toolnote { border-style: dashed; }
.toc ol { padding-left: 1.2rem; margin: 0; columns: 2 16rem; }
.toc { border-top: 2px dashed var(--line); border-bottom: 2px dashed var(--line); padding: 1rem 0; margin: 1.5rem 0; }
.prose h2 { scroll-margin-top: 1rem; }
.prose li { margin: .25rem 0; }
.prose blockquote { margin: 1rem 0; padding: .2rem 1rem; border-left: 4px solid var(--line); color: var(--ink2); }
.tbl { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--slip); }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--head); font-weight: 600; background: var(--paper); }
.faq details { border-bottom: 1px dashed var(--line); padding: .6rem 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq-a p { margin: .5rem 0 0; color: var(--ink2); }
.sources ol { padding-left: 1.2rem; }
.author { border-top: 2px solid var(--ink); margin-top: 2rem; }
.author h2 { font-size: 1.1rem; margin-top: 1rem; }
.note-ymyl { margin: 2rem 0 1rem; padding: .9rem 1.1rem; border: 2px dashed var(--amber); border-radius: var(--r); font-size: .92rem; }
.share { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .92rem; margin: 1rem 0; }
.plain { padding-left: 1.2rem; }
.gloss div { padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.gloss dt { font: 600 1.05rem/1.3 var(--head); }
.gloss dd { margin: .25rem 0 0; color: var(--ink2); }

/* tools */
.widget { margin: 1rem 0; }
.tool { padding: 1.2rem; border: 2px solid var(--ink); }
.checks { border: 1px dashed var(--line); border-radius: var(--r); margin: 1rem 0; padding: .4rem .9rem .7rem; }
.checks label { font-weight: 400; display: flex; gap: .5rem; align-items: flex-start; }
.checks input { margin-top: .35rem; }
.row { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .6rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }
.seg { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.seg label { font-weight: 400; display: flex; gap: .4rem; align-items: center; }
.result { margin-top: 1rem; }
.verdict { font: 800 1.1rem/1.35 var(--head); padding: .7rem .9rem; border-radius: var(--r); margin: 0 0 .6rem; }
.lvl-high { background: var(--red); color: #fff; }
.lvl-medium { background: var(--amber); color: #1e1b2e; }
.lvl-low { background: var(--line); color: var(--ink); }
.lvl-none { background: var(--green); color: #fff; }
.flags { list-style: none; padding: 0; margin: 0; }
.flags li { border-left: 4px solid var(--amber); padding: .4rem .8rem; margin: .5rem 0; display: flex; flex-direction: column; }
.flags li.w3 { border-color: var(--red); }
.flags li span { color: var(--ink2); font-size: .95rem; }
.receipt { padding: 1rem 1.2rem; font-family: var(--head); max-width: 26rem; }
.receipt div { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.receipt .total { font-size: 1.25rem; font-weight: 800; color: var(--green); border-bottom: 2px solid var(--ink); }
.error { color: var(--red); font-weight: 600; }
.checklist h2 { margin-top: .5rem; }
.boxes { list-style: none; padding: 0; }
.boxes li { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.boxes input { margin-top: .35rem; flex: none; }
.boxes label { font-weight: 400; margin: 0; }
.privacy-line { font-size: .9rem; color: var(--green); font-weight: 600; }

/* footer */
.foot { background: var(--ink); color: #d9d3e4; margin-top: 3rem; }
@media (prefers-color-scheme: dark) { .foot { background: #0c0a12; } }
.foot-in { max-width: 72rem; margin: 0 auto; padding: 2rem 1.25rem; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem; }
.foot a { color: #fff; }
.foot-name { font: 800 1.2rem/1 var(--head); color: #fff; }
.foot-name span { font: 400 .8rem var(--text); color: #b0a8bf; margin-left: .3rem; }
.foot-brand p { font-size: .88rem; }
.foot .ymyl { color: var(--amber); }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.foot-cols a { display: block; font-size: .9rem; padding: .15rem 0; text-decoration: none; }
.foot-cols a:hover { text-decoration: underline; }
.foot-h { font: 600 .75rem/1 var(--head); text-transform: uppercase; letter-spacing: .12em; color: #b0a8bf; }
.foot-copy { grid-column: 1 / -1; font-size: .85rem; border-top: 1px dashed #4a4360; padding-top: 1rem; margin: 0; }

@media (max-width: 820px) {
  .hero, .foot-in { grid-template-columns: minmax(0, 1fr); }
  .hero-slip { transform: none; }
  .step-row, .grid3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .foot-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .brand-dom { display: none; }
}
@media print {
  .top, .foot, .crumbs, .row, .privacy-line, .prose, .faq, .sources, .note-ymyl, .band, .doc-head .lede, .kicker { display: none !important; }
  body { background: #fff; color: #000; }
  .tool { border: 0; padding: 0; }
  .tool > :not(.result) { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
