:root {
  --bg: #f6f5ff;
  --surface: #ffffff;
  --text: #1a1633;
  --muted: #5c5878;
  --border: #e6e2f7;
  --accent: #5b3df5;
  --accent-2: #ff4f8b;
  --accent-3: #12c2a5;
  --accent-soft: #efebff;
  --danger: #d6264f;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(40,20,120,.05), 0 8px 24px rgba(40,20,120,.07);
  --shadow-lg: 0 18px 40px -12px rgba(91,61,245,.35);
  --grad: linear-gradient(120deg, #5b3df5 0%, #a83cf0 45%, #ff4f8b 100%);
  --c: var(--accent);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0c1d;
    --surface: #17142b;
    --text: #ece9ff;
    --muted: #a9a3c9;
    --border: #2a2547;
    --accent: #9d8bff;
    --accent-2: #ff7aa8;
    --accent-3: #3ee0c3;
    --accent-soft: #221d40;
    --danger: #ff8aa5;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
    --shadow-lg: 0 18px 40px -12px rgba(157,139,255,.35);
    --grad: linear-gradient(120deg, #9d8bff 0%, #d18bff 45%, #ff7aa8 100%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--text); letter-spacing: -.01em; }
.logo span { color: var(--accent); }
.site-header nav a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.site-header nav a:hover { color: var(--text); }

.site-footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 28px 0; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* Headings */
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.2; letter-spacing: -.02em; margin: 36px 0 8px; }
h2 { font-size: 1.3rem; margin: 40px 0 10px; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; margin: 22px 0 6px; }
.lede { color: var(--muted); font-size: 1.08rem; margin: 0 0 24px; }

/* Tool card */
.tool {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; min-height: 70px; }

button, .btn {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  display: inline-block;
}
@media (prefers-color-scheme: dark) { button, .btn { color: #0d1a16; } }
button.secondary { background: var(--accent-soft); color: var(--accent); }
button.ghost { background: transparent; color: var(--danger); padding: 6px 10px; }

/* Results */
.results {
  margin-top: 20px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.stat {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 14px 16px;
}
.stat .label { font-size: .82rem; color: var(--muted); }
.stat .value { font-size: 1.45rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.note { font-size: .88rem; color: var(--muted); margin-top: 14px; }

/* Content */
.content p, .content li { color: var(--text); }
.faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; color: var(--muted); }

/* Tool directory */
.tool-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding: 0; list-style: none; }
.tool-list a {
  display: block; height: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow);
  transition: border-color .15s;
}
.tool-list a:hover { border-color: var(--accent); }
.tool-list strong { display: block; margin-bottom: 4px; }
.tool-list span { color: var(--muted); font-size: .92rem; }

.related { margin-top: 48px; }

/* Ad slots: hidden until you add ad code (see README) */
.ad-slot { display: none; margin: 28px 0; min-height: 90px; }
/* Auto ads place themselves; placeholder slots stay hidden */

/* Invoice */
.items { width: 100%; border-collapse: collapse; margin-top: 8px; }
.items th { text-align: left; font-size: .82rem; color: var(--muted); font-weight: 600; padding: 6px 4px; }
.items td { padding: 4px; vertical-align: top; }
.items td.num, .items th.num { text-align: right; }
.items input { padding: 8px; }
.inv-totals { margin-left: auto; max-width: 300px; margin-top: 16px; }
.inv-totals div { display: flex; justify-content: space-between; padding: 4px 0; font-variant-numeric: tabular-nums; }
.inv-totals .grand { font-weight: 700; font-size: 1.2rem; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

@media (max-width: 600px) {
  .tool { padding: 16px; }
  .items thead { display: none; }
  .items tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .items td:first-child { grid-column: 1 / -1; }
  .items td.num { text-align: left; }
}

@media print {
  .site-header, .site-footer, .no-print, .ad-slot, .content, h1, .lede, .related, ins.adsbygoogle, .google-auto-placed, iframe { display: none !important; }
  body { background: #fff; color: #000; }
  .tool { border: 0; box-shadow: none; padding: 0; }
  input, textarea, select { border: 0; background: transparent; padding: 2px 0; color: #000; resize: none; }
  .items th { color: #000; }
}

/* ---- v2 additions ---- */
.field.full { grid-column: 1 / -1; }
.sec-h { margin: 28px 0 12px; padding-top: 20px; border-top: 1px solid var(--border); }
.tool > .sec-h:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc-title { margin-top: 0; font-size: 1.8rem; letter-spacing: .04em; }
.items td.amount { padding-top: 12px; font-variant-numeric: tabular-nums; }

.crumbs { font-size: .85rem; color: var(--muted); margin-top: 20px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 4px; }
.crumbs + h1 { margin-top: 10px; }

.hero { padding: 12px 0 8px; }
.search input { font-size: 1.05rem; padding: 14px 16px; border-radius: 10px; background: var(--surface); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cat-block h2 a { color: var(--text); text-decoration: none; }
.cat-block h2 a:hover { color: var(--accent); }
.tool-list li[hidden], .cat-block[hidden] { display: none; }

.updated { color: var(--muted); font-size: .85rem; margin-top: 28px; }

.foot-grid { display: grid; gap: 24px; grid-template-columns: 2fr 1.5fr 1fr; width: 100%; }
.foot-grid h4 { margin: 0 0 8px; color: var(--text); font-size: .9rem; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin: 4px 0; }
.foot-grid p { margin: 8px 0 0; }
.site-footer .wrap { display: block; }
.site-footer .copy { margin: 24px 0 0; font-size: .8rem; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; } }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.btn-row button { padding: 8px 12px; font-size: .9rem; }

/* Affiliate recommendation box (only rendered when a link is set in CONFIG["affiliates"]) */
.partners { margin: 28px 0; padding: 18px 20px; background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius); }
.partners h2 { margin: 0 0 8px; font-size: 1.05rem; }
.partners ul { margin: 0; padding-left: 18px; }
.partners li { margin: 6px 0; }
.partners a { color: var(--accent); font-weight: 600; }
.partners .aff-note { margin: 10px 0 0; font-size: .82rem; color: var(--muted); }


/* =================== Fun layer: colour, motion, effects =================== */
body { background:
  radial-gradient(1200px 500px at 85% -10%, rgba(255,79,139,.10), transparent 60%),
  radial-gradient(900px 500px at -10% 10%, rgba(91,61,245,.10), transparent 60%),
  var(--bg); background-attachment: fixed; }

/* category colours */
[data-cat=docs]{--c:#5b3df5} [data-cat=pricing]{--c:#ff7a1a} [data-cat=pay]{--c:#0ea5e9}
[data-cat=tax]{--c:#e11d74} [data-cat=money]{--c:#10b981} [data-cat=marketing]{--c:#f59e0b}
[data-cat=dates]{--c:#8b5cf6} [data-cat=writing]{--c:#14b8a6} [data-cat=pt]{--c:#16a34a}
[data-cat=br]{--c:#eab308} [data-cat=india]{--c:#f97316}

/* scroll progress */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 60;
  background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* glassy sticky header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 75%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); }
.logo { font-weight: 800; }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo:hover span { animation: hue 2s linear infinite; }
.site-header nav a { padding: 7px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; transition: transform .2s, background .2s; }
.site-header nav a:hover { color: #fff; background: var(--accent); transform: translateY(-1px); }

/* headings */
h1 { font-weight: 800; letter-spacing: -.03em; }
.grad { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s ease-in-out infinite alternate; }
.cat-block h2 { display: flex; align-items: center; gap: 10px; }
.cat-block h2 .ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-style: normal; font-size: 1.15rem;
  background: color-mix(in srgb, var(--c) 15%, transparent); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.cat-block:hover h2 .ic { transform: rotate(-10deg) scale(1.12); }

/* hero */
.hero { position: relative; padding: 36px 0 18px; isolation: isolate; }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); margin-top: 10px; animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
.hero .lede { animation: rise .7s .1s cubic-bezier(.2,.8,.2,1) both; }
.hero .search { display: block; animation: rise .7s .2s cubic-bezier(.2,.8,.2,1) both; }
.kicker { display: inline-block; margin: 0; padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700;
  color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  animation: rise .6s both, bob 4s 1s ease-in-out infinite; }
.blobs { position: absolute; inset: -40px -10% auto; height: 340px; z-index: -1; pointer-events: none; filter: blur(50px); opacity: .55; }
.blobs b { position: absolute; border-radius: 50%; width: 260px; height: 260px; animation: float 14s ease-in-out infinite; }
.blobs b:nth-child(1) { background: #8b6bff; left: 5%; top: 0; }
.blobs b:nth-child(2) { background: #ff6fa3; right: 8%; top: 20px; animation-delay: -5s; animation-duration: 17s; }
.blobs b:nth-child(3) { background: #3ee0c3; left: 40%; top: 90px; width: 200px; height: 200px; animation-delay: -9s; }
.search input { border: 2px solid var(--border); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s, transform .2s; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent), var(--shadow-lg); transform: translateY(-1px); }

/* tool cards */
.tool-list li { animation: rise .55s calc(var(--i, 0) * 45ms) cubic-bezier(.2,.8,.2,1) both; }
.tool-list a { position: relative; overflow: hidden; padding: 18px 18px 18px 18px; border: 1px solid var(--border);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s; }
.tool-list a::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); opacity: .85; transform: scaleX(.18); transform-origin: 0 50%; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.tool-list a::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c) 16%, transparent), transparent 70%); }
.tool-list a:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 18px 36px -14px color-mix(in srgb, var(--c) 55%, transparent); }
.tool-list a:hover::before { transform: scaleX(1); }
.tool-list a:hover::after { opacity: 1; }
.tool-list a:active { transform: translateY(-2px) scale(.985); }
.tool-list .ic { float: right; font-style: normal; font-size: 1.3rem; margin: -2px 0 0 8px; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.tool-list a:hover .ic { transform: scale(1.3) rotate(-12deg); }
.tool-list a:hover strong { color: var(--c); }
.tool-list strong { transition: color .2s; }

/* tool page */
.crumbs + h1, main > h1 { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
main > .lede { animation: rise .6s .08s cubic-bezier(.2,.8,.2,1) both; }
.tool { position: relative; border: 1px solid var(--border); animation: rise .6s .15s cubic-bezier(.2,.8,.2,1) both; }
.tool::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .5; }
input, select, textarea { border-radius: 10px; transition: border-color .2s, box-shadow .2s, background .2s; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type=range] { accent-color: var(--accent); }

button, .btn { position: relative; overflow: hidden; border-radius: 12px; background: var(--grad); background-size: 160% 100%;
  box-shadow: 0 6px 16px -6px rgba(91,61,245,.55); transition: transform .15s, box-shadow .2s, background-position .4s; }
button:hover, .btn:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 10px 22px -8px rgba(255,79,139,.6); }
button:active, .btn:active { transform: translateY(0) scale(.97); }
button.secondary { background: var(--accent-soft); box-shadow: none; }
button.ghost { background: transparent; box-shadow: none; }
button.ghost:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); transform: rotate(90deg); }
@media (prefers-color-scheme: dark) { button, .btn { color: #fff; } button.secondary { color: var(--accent); } }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255,255,255,.55); transform: scale(0); animation: ripple .6s ease-out forwards; }

/* results */
.stat { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 8%, var(--accent-soft))); transition: transform .25s, box-shadow .25s; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat:first-child { background: var(--grad); border: 0; }
.stat:first-child .label { color: rgba(255,255,255,.85); }
.stat:first-child .value { color: #fff; }
.stat .value { background: none; display: inline-block; }
.pop { animation: pop .45s cubic-bezier(.3,1.6,.5,1); }
.stat.flash::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-100%); animation: sweep .7s ease-out forwards; }

/* FAQ */
.faq details { transition: background .2s; border-radius: 10px; padding: 12px 10px; }
.faq details:hover { background: var(--accent-soft); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] p { animation: rise .35s both; }

/* scroll-revealed content (Chrome/Edge; other browsers simply show it) */
@supports (animation-timeline: view()) {
  .content > *, .related, .cat-block h2, .partners { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
}

.partners { border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-3) 10%, var(--accent-soft))); }

/* confetti */
.confetti { position: fixed; top: 0; left: 0; width: 9px; height: 14px; z-index: 100; pointer-events: none; border-radius: 2px; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes reveal { from { opacity: 0; transform: translateY(28px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(40px,-30px) scale(1.1); } 66% { transform: translate(-30px,20px) scale(.92); } }
@keyframes shimmer { from { background-position: 0% 0; } to { background-position: 100% 0; } }
@keyframes hue { to { filter: hue-rotate(360deg); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes sweep { to { transform: translateX(100%); } }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .progress, .blobs, .confetti { display: none !important; }
  body { background: #fff !important; }
  .tool::before { display: none; }
}

/* Share + embed */
.share-bar { margin: 22px 0 0; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--border)); }
.share-h { margin: 0 0 10px; font-weight: 700; font-size: .95rem; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sh { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600; text-decoration: none; color: #fff; box-shadow: none; transition: transform .2s, filter .2s; }
.sh:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: none; }
.sh-wa { background: #25d366; } .sh-x { background: #111; } .sh-li { background: #0a66c2; } .sh-fb { background: #1877f2; } .sh-tg { background: #229ed9; }
button.sh-copy { background: var(--accent-soft); color: var(--accent); padding: 7px 14px; font-size: .88rem; }
.embed-box { margin-top: 12px; }
.embed-box summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .92rem; }
.embed-box textarea { font: 12px/1.4 ui-monospace, Menlo, monospace; margin-top: 6px; }

/* Embedded (iframe) mode */
body.embed { background: var(--bg); }
body.embed .wrap { padding: 8px; max-width: none; }
body.embed .tool { animation: none; }
.powered { text-align: center; font-size: .85rem; color: var(--muted); margin: 12px 0 4px; }
.powered a { font-weight: 700; }
.featured-on { margin: 20px 0 0; }
.featured-on img { display: block; height: auto; opacity: .85; transition: opacity .2s; }
.featured-on a:hover img { opacity: 1; }

/* Salary slip + rent receipt generators: on-screen paper preview, clean print */
.ps-cols { display: grid; gap: 0 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ps-items td:first-child { width: auto; }
.ps-words { text-align: right; color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.rr-warn { margin: 16px 0 0; padding: 10px 14px; border-radius: 8px; background: #fff4e5; color: #8a4b00; font-size: .9rem; }
.rr-sum { color: var(--muted); font-size: .9rem; margin: 14px 0 0; }
.paper, .rr { background: #fff; color: #111; border: 1px solid #d9dbe3; border-radius: 8px; font-size: 13px; line-height: 1.45; }
.paper { padding: 28px; }
.ps-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 12px; }
.ps-co { font-size: 18px; font-weight: 700; }
.ps-addr { color: #555; font-size: 12px; margin-top: 2px; }
.ps-title { font-size: 20px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: right; }
.ps-title span { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #444; }
.ps-info { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; margin: 14px 0; }
.ps-info div { display: flex; gap: 8px; }
.ps-info dt { color: #555; min-width: 120px; }
.ps-info dd { margin: 0; font-weight: 600; }
.ps-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.ps-table th, .ps-table td { border: 1px solid #ccc; padding: 6px 8px; text-align: left; font-variant-numeric: tabular-nums; }
.ps-table th { background: #f2f3f7; font-weight: 700; }
.ps-table .num { text-align: right; white-space: nowrap; }
.ps-table tfoot td { font-weight: 700; background: #f8f9fb; }
.ps-net { margin-top: 14px; border: 2px solid #111; border-radius: 6px; padding: 10px 14px; }
.ps-net div { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.ps-net strong { font-size: 19px; }
.ps-net p { margin: 4px 0 0; color: #333; font-style: italic; }
.ps-note { margin: 18px 0 0; color: #666; font-size: 11px; text-align: center; }
.rr-list { display: grid; gap: 14px; }
.rr { padding: 18px 22px; display: flex; flex-direction: column; }
.rr-top { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid #111; padding-bottom: 6px; }
.rr-h { font-size: 17px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.rr-meta { text-align: right; font-size: 12px; }
.rr-body { margin: 10px 0; }
.rr-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: auto; }
.rr-who span { color: #555; display: inline-block; min-width: 64px; }
.rr-sign { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rr-stamp { width: 62px; height: 62px; border: 1px dashed #777; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 9px; color: #777; line-height: 1.2; }
.rr-line { border-top: 1px solid #111; padding-top: 3px; font-size: 11px; min-width: 170px; text-align: center; }
@media (max-width: 560px) {
  .paper { padding: 16px; }
  .ps-info { grid-template-columns: 1fr; }
  .ps-head, .rr-foot { flex-direction: column; align-items: stretch; }
  .ps-title { text-align: left; }
}
@media print {
  body:has(#slip) .crumbs, body:has(#slip) .share-bar, body:has(#receipts) .crumbs, body:has(#receipts) .share-bar { display: none !important; }
  body:has(#slip) .wrap, body:has(#receipts) .wrap { padding: 0; margin: 0; max-width: none; }
  body:has(#slip) .tool, body:has(#receipts) .tool { border: 0 !important; box-shadow: none !important; background: #fff !important; padding: 0 !important; margin: 0; }
  .paper { border: 0; border-radius: 0; padding: 0; font-size: 12px; }
  .ps-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rr-list { gap: 0; display: block; }
  .rr { border: 1px solid #555; border-radius: 0; break-inside: avoid; page-break-inside: avoid; margin: 0 0 6mm; height: 84mm; box-sizing: border-box; }
  .rr-per-2 .rr { height: 128mm; font-size: 14px; }
  .rr-per-1 .rr { height: auto; min-height: 120mm; }
  .rr-break { break-after: page; page-break-after: always; }
}

/* Offer letter + experience / relieving letter generators */
.lt-sub { font-size: 1rem; margin: 22px 0 8px; }
.lt-help { color: var(--muted); font-size: .88rem; margin: 0 0 12px; }
.lt { font-family: Georgia, 'Times New Roman', serif; font-size: 13.5px; line-height: 1.6; padding: 36px 40px; }
.lt p { margin: 0 0 10px; }
.lt-head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid #1f2a44; padding-bottom: 12px; margin-bottom: 14px; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
.lt-logo { flex: none; min-width: 52px; height: 52px; padding: 0 8px; box-sizing: border-box; border-radius: 8px; background: #1f2a44; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; letter-spacing: .04em; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lt-name { font-size: 19px; font-weight: 700; color: #1f2a44; line-height: 1.25; }
.lt-addr { color: #555; font-size: 12px; line-height: 1.4; }
.lt-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; margin-bottom: 14px; }
.lt-to { margin-bottom: 12px; }
.lt-subject { font-weight: 700; }
.lt-title { text-align: center; font-size: 17px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 6px 0 14px; }
.lt-twimc { font-weight: 700; }
.lt-blank { color: #999; }
.lt-words { color: #444; font-style: italic; }
.lt-table { width: 100%; border-collapse: collapse; margin: 4px 0 14px; font-size: 13px; }
.lt-table th, .lt-table td { border: 1px solid #ccc; padding: 5px 9px; text-align: left; vertical-align: top; }
.lt-table th { width: 34%; background: #f4f5f8; font-weight: 600; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lt-terms { margin: 0 0 12px; padding-left: 22px; }
.lt-terms li { margin-bottom: 4px; }
.lt-sign { margin-top: 18px; break-inside: avoid; page-break-inside: avoid; }
.lt-sig-space { height: 44px; }
.lt-sig-name { font-weight: 700; border-top: 1px solid #111; display: inline-block; min-width: 200px; padding-top: 3px; }
.lt-accept { margin-top: 22px; padding-top: 12px; border-top: 1px dashed #888; break-inside: avoid; page-break-inside: avoid; }
.lt-accept-h, .lt-annex-h { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 12.5px; margin-bottom: 6px; }
.lt-accept-row { display: flex; gap: 40px; margin-top: 34px; }
.lt-accept-row div { flex: 1; border-top: 1px solid #111; padding-top: 3px; font-size: 12px; }
.lt-annex { margin-top: 24px; break-inside: avoid; page-break-inside: avoid; }
.lt-annex .ps-table { font-size: 12.5px; }
@media (max-width: 560px) {
  .lt { padding: 18px; font-size: 13px; }
  .lt-meta { flex-direction: column; gap: 2px; }
}
@media print {
  body:has(#letter) .crumbs, body:has(#letter) .share-bar { display: none !important; }
  body:has(#letter) .wrap { padding: 0; margin: 0; max-width: none; }
  body:has(#letter) .tool { border: 0 !important; box-shadow: none !important; background: #fff !important; padding: 0 !important; margin: 0; }
  .lt { padding: 0; font-size: 11.5pt; line-height: 1.5; }
  .lt-table, .lt-annex .ps-table { font-size: 10.5pt; }
}

/* Line-item documents (invoice, quote, receipt, proforma, purchase order, credit note, packing slip): clean print */
@media print {
  body:has(#rows) .crumbs, body:has(#rows) .share-bar, body:has(#rows) .pr-empty { display: none !important; }
  body:has(#rows) .wrap { padding: 0; margin: 0; max-width: none; }
  body:has(#rows) .tool { border: 0 !important; box-shadow: none !important; background: #fff !important; padding: 0 !important; margin: 0; }
  body:has(#rows) select { appearance: none; -webkit-appearance: none; background-image: none; }
  body:has(#rows) input::-webkit-calendar-picker-indicator { display: none; }
  body:has(#rows) .items input { padding-left: 4px; }
  body:has(#rows) textarea { overflow: hidden; }
  body:has(#rows) .lt-accept { margin-top: 16px; }
}

/* ---- Pour Decisions: homepage banner (neon, flickers) */
.play-banner { position: relative; isolation: isolate; display: flex; align-items: center; gap: 14px; margin: 18px 0 0;
  padding: 12px 14px 12px 18px; border-radius: 999px; text-decoration: none; color: #fff;
  background: linear-gradient(120deg, #1a1040, #2b1366 55%, #4a1250);
  box-shadow: 0 10px 30px -10px rgba(255,79,139,.6); }
.play-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 2px;
  background: linear-gradient(90deg, #ff4f8b, #9d8bff, #3ee0c3, #ff4f8b); background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: pb-border 4s linear infinite; }
.pb-text { flex: 1; font-size: .95rem; line-height: 1.35; }
.pb-text em { font-style: normal; color: #9ff3e2; }
.pb-neon { display: inline-block; margin-right: 6px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #ffd1e3; text-shadow: 0 0 6px #ff4f8b, 0 0 16px #ff4f8b; animation: pb-flicker 3.2s infinite; }
.pb-cta { flex: none; padding: 9px 16px; border-radius: 999px; font-weight: 800; background: #fff; color: #2b1366;
  box-shadow: 0 0 18px rgba(255,255,255,.55); animation: pb-pulse 1.6s ease-in-out infinite; }
.play-banner:hover .pb-cta { background: #ffe3ee; }
.pb-glass { flex: none; position: relative; width: 24px; height: 32px; overflow: hidden;
  border: 2px solid rgba(255,255,255,.85); border-top: 0; border-radius: 3px 3px 9px 9px; }
.pb-glass i { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; transform: scaleY(.2); transform-origin: bottom; background: linear-gradient(#3ee0c3, #9d8bff);
  animation: pb-fill 2.6s ease-in-out infinite; }
@keyframes pb-fill { 0%, 100% { transform: scaleY(.15); } 60% { transform: scaleY(.8); } }
@keyframes pb-flicker { 0%, 17%, 21%, 24%, 52%, 56%, 100% { opacity: 1; } 19%, 23%, 54% { opacity: .3; } }
@keyframes pb-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes pb-border { to { background-position: 300% 0; } }
@media (max-width: 560px) { .play-banner { border-radius: 20px; padding: 12px; gap: 10px; } .pb-text { font-size: .86rem; } .pb-cta { padding: 8px 12px; } }
@media (prefers-reduced-motion: reduce) { .play-banner::before, .play-banner * { animation: none !important; } .pb-glass i { transform: scaleY(.6); } }

/* ---- Pour Decisions: game page */
.pd-head { text-align: center; margin-top: 18px; }
.pd { max-width: 640px; margin: 18px auto 10px; }
.pd-hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 8px 10px 8px 14px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .92rem; }
.pd-hud b { color: var(--text); font-variant-numeric: tabular-nums; }
.pd-goal { color: var(--text); font-size: 1.02rem; }
.pd-goal b { font-size: 1.5rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
#pd-sound { padding: 6px 10px; font-size: 1rem; line-height: 1; }
.pd-stage { position: relative; }
#pd-canvas { display: block; width: 100%; height: 420px; border-radius: 22px; cursor: pointer; outline: none;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: radial-gradient(circle at 25% 15%, rgba(124,77,255,.55), transparent 55%),
              radial-gradient(circle at 85% 90%, rgba(255,79,139,.35), transparent 55%), #120e26;
  box-shadow: var(--shadow-lg); }
#pd-canvas:focus-visible { box-shadow: 0 0 0 3px var(--accent), var(--shadow-lg); }
.pd-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px; text-align: center; color: #fff; border-radius: 22px;
  background: rgba(14,10,32,.74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pd-over[hidden] { display: none; }
.pd-over h2 { margin: 0; font-size: 1.55rem; color: #fff; }
.pd-over p { margin: 0; color: #ddd7ff; }
.pd-over a:not(.btn) { color: #9ff3e2; }
.pd-kick { font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: #ffd1e3 !important; }
.pd-big { font-size: 3.4rem; font-weight: 900; line-height: 1; background: linear-gradient(120deg, #9d8bff, #ff7aa8, #3ee0c3);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.pd-emoji { font-size: 1.5rem; letter-spacing: 2px; }
.pd-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pd-btns .btn { text-decoration: none; }
.pd-small { font-size: .85rem; }
.pd-msg { min-height: 2.8em; margin: 10px 0 0; text-align: center; color: var(--muted); }
@media (max-width: 480px) { .pd-hud { font-size: .82rem; gap: 6px; } .pd-goal b { font-size: 1.25rem; } .pd-over h2 { font-size: 1.25rem; } .pd-big { font-size: 2.6rem; } }

/* Data tables inside page content (tax brackets, EITC limits…) */
.tbl-wrap { overflow-x: auto; margin: 10px 0 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 600; padding: 7px 8px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.tbl td { padding: 7px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }

/* Rewards toast + homepage "jump back in" */
.fk-toast { position: fixed; z-index: 60; top: 72px; right: 16px; max-width: 360px; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px; background: var(--surface); color: var(--text); border: 1px solid var(--border);
  box-shadow: 0 12px 34px rgba(40, 20, 120, .18); font-size: .93rem; line-height: 1.4; animation: fk-in .35s cubic-bezier(.2,.8,.3,1.2); }
.fk-toast.out { opacity: 0; transform: translateY(-8px); transition: .35s; }
.fk-t-msg { flex: 1; }
.fk-t-btn { flex: none; border: 0; border-radius: 999px; padding: 7px 14px; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #5b3df5, #ff4f8b); }
.fk-t-x { flex: none; border: 0; background: none; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 2px; }
@keyframes fk-in { from { opacity: 0; transform: translateY(-10px) scale(.96); } }
@media (max-width: 600px) { .fk-toast { left: 16px; right: 16px; max-width: none; top: 64px; } }
@media (prefers-reduced-motion: reduce) { .fk-toast { animation: none; } }
.jb { margin: 0 0 18px; }
.jb:empty { display: none; }
.jb-stats { font-size: .9rem; color: var(--muted); margin: 0 0 8px; }
.jb-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.jb-list a { display: inline-block; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); text-decoration: none;
  color: var(--text); font-size: .9rem; background: var(--surface); }
.jb-list a:hover { border-color: #5b3df5; }
.next-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 4px; font-size: .9rem; }
.next-try span { color: var(--muted); font-weight: 600; }
.next-try a { padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-weight: 600; }
.next-try a:hover { background: var(--accent); color: #fff; }

/* ---- v3: trust box, conversion tables, ad units and sidebar rail ---- */
.trust { margin-top: 32px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: .9rem; color: var(--muted); }
.trust p { margin: 4px 0; }
.trust a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.trust .t-by a:first-child { font-weight: 600; color: var(--text); }
table.conv { width: 100%; max-width: 480px; border-collapse: collapse; margin: 12px 0 20px; font-variant-numeric: tabular-nums; }
table.conv th, table.conv td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); }
table.conv th { font-size: .85rem; color: var(--muted); }
table.conv tbody tr:nth-child(even) { background: var(--surface); }
.ad-unit { margin: 28px 0; min-height: 280px; }
.ad-unit::before { content: "Advertisement"; display: block; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad-rail { display: none; }
@media (min-width: 1260px) {
  .with-rail { display: flex; justify-content: center; gap: 32px; max-width: 1244px; margin: 0 auto; padding: 0 16px; }
  .with-rail > main.wrap { margin: 0; padding: 0; flex: 1 1 880px; min-width: 0; }
  .ad-rail { display: block; flex: 0 0 300px; }
  .ad-rail .rail-in { position: sticky; top: 84px; }
  .ad-rail .ad-unit { margin-top: 60px; min-height: 600px; }
}
@media print { .trust, .ad-unit, .ad-rail { display: none !important; } }

/* Decorative hero blobs extend past the viewport on phones: clip them so the page never scrolls sideways. */
html, body { overflow-x: clip; }
figure.pin { margin: 24px 0; max-width: 320px; }
figure.pin img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border); display: block; }
figure.pin figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
@media print { figure.pin { display: none; } }
