/* GmCat Toolbox */
.tool-sec { margin: 0 0 56px; }
.tool-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; flex: none;
  background: linear-gradient(135deg, var(--shadow), var(--orange)); color: var(--accent-ink); font: 14px var(--pixel); box-shadow: 3px 3px 0 color-mix(in srgb, var(--cream) 18%, transparent); }
.tool-icon.sym { font: 800 24px 'DM Sans', system-ui, sans-serif; }
.tool-icon.big.sym { font-size: 32px; }
.tool-icon.big { width: 72px; height: 72px; border-radius: 18px; font-size: 18px; }

/* Index */
.tools-hero { margin-bottom: 48px; }
.tool-card { color: var(--cream); text-decoration: none; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s; }
a.tool-card:hover { border-color: var(--orange); color: var(--cream); transform: translateY(-2px); }
.tool-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tool-card h3 { margin: 4px 0 0; }
.tool-card p { margin: 0 0 12px; color: var(--muted); font-size: 15.5px; }
.tool-go { margin-top: auto; color: var(--gold); font-weight: 700; font-size: 15px; }
.soon-card { border-style: dashed; background: var(--tint); }
.soon-card .tool-icon { filter: grayscale(.7); opacity: .7; }
.promise ul { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.promise li { color: var(--muted); }
.promise li b { color: var(--cream); display: block; }

/* Tool page header */
.tool-head { display: flex; align-items: center; gap: 22px; padding: 28px 0 26px; }
.tool-head h1 { margin-bottom: .15em; font-size: clamp(1.9rem, 4.6vw, 3rem); }
.tool-head .lede { margin: 0; max-width: 60ch; font-size: 1.1rem; }
.tool-head .eyebrow { margin-bottom: 8px; }
.tool-head .eyebrow a { color: var(--gold); text-decoration: none; }
@media (max-width: 600px) { .tool-head { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 14px; } .tool-icon.big { width: 56px; height: 56px; font-size: 14px; } }

/* Shared panel bits */
.tool-panel { padding: clamp(18px, 3vw, 28px); }
.panel-h { font-size: 1.15rem; margin: 26px 0 12px; }
.tool-panel > .panel-h:first-child { margin-top: 0; }
.field-label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.tool-panel input, .tool-panel select, .tool-panel textarea {
  font: inherit; color: var(--cream); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0; }
.tool-panel input:focus, .tool-panel select:focus, .tool-panel textarea:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
.tool-panel textarea { resize: vertical; min-height: 220px; line-height: 1.6; }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 0; }
.tool-actions .btn { min-height: 40px; padding: 0 16px; }
.status { color: var(--ok); font-weight: 700; font-size: 14px; }
.stats, .results { display: grid; gap: 10px; margin-top: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
.stat { background: var(--tint); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat b { font-size: 1.45rem; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat.hi { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 12%, transparent); }
.privacy { font-size: 14px; color: var(--muted); margin: 14px 0 48px; }
.small-print { font-size: 13px; margin: 14px 0 0; }

/* Word counter limits */
.limits { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.limit-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 6px; }
.limit-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--orange); border-radius: inherit; transition: width .15s; }
.limit.near .meter i { background: var(--warn); }
.limit.near .limit-n { color: var(--warn); }
.limit.over .meter i { background: var(--pink); }
.limit.over .limit-n { color: var(--pink); font-weight: 700; }

/* Calculators */
.calc-grid { display: grid; gap: 20px; }
.calc-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) minmax(0, 1.1fr); align-items: end; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.calc-row:last-child { border-bottom: 0; }
.calc-row .q { margin: 0 0 10px; font-weight: 600; white-space: nowrap; }
.calc-row .ans { margin: 0 0 8px; font-weight: 700; font-size: 1.15rem; }
.calc-row output { color: var(--gold); font-variant-numeric: tabular-nums; }
.num { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.num > span:first-child { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.num-in { position: relative; display: block; }
.num-in .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.num-in input:has(+ .suffix) { padding-right: 30px; }
.calc-fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.pill { font: inherit; font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--tint); color: var(--cream); cursor: pointer; }
.pill:hover { border-color: var(--orange); }
.pill[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: var(--accent-ink); }
.check { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); }
@media (max-width: 700px) {
  .calc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
  .calc-row .q { margin: 0; font-size: 15px; }
  .calc-row { gap: 8px; }
  .calc-row .num { width: 4.3em; }
  .calc-row .num input { padding-inline: 10px; }
  .calc-row .num > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .calc-row .ans { flex-basis: 100%; margin: 2px 0 0; }
}


/* Unit converter */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tab { font: inherit; font-weight: 700; font-size: 14px; padding: 8px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--tint); color: var(--cream); cursor: pointer; }
.tab:hover { border-color: var(--orange); }
.tab[aria-selected="true"] { background: var(--orange); border-color: var(--orange); color: var(--accent-ink); }
.uc-ingredient { max-width: 360px; margin-bottom: 16px; }
.uc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; }
.uc-side { display: grid; gap: 8px; }
.uc-side input { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.swap { min-height: 46px; width: 46px; padding: 0; justify-content: center; font-size: 20px; margin-top: 22px; }
.uc-sentence { font-size: 1.15rem; margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--orange) 10%, transparent); border: 1px solid color-mix(in srgb, var(--orange) 35%, var(--line)); }
.uc-sentence b { color: var(--gold); }
.uc-all { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.uc-cell { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; background: var(--tint); border: 1px solid var(--line); min-width: 0; }
.uc-cell b { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.uc-cell span { color: var(--muted); font-size: 13px; }
.uc-cell.on { border-color: var(--orange); }
@media (max-width: 600px) {
  .uc-row { grid-template-columns: 1fr; }
  .swap { margin: 0 auto; transform: rotate(90deg); }
}

/* FAQ + more tools */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--tint); padding: 0 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; }
.faq details[open] summary { color: var(--gold); }
.faq p { margin: 0 0 16px; color: var(--muted); }
.more-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.more-card { display: flex; gap: 16px; align-items: center; padding: 18px; color: var(--cream); text-decoration: none; }
.more-card:hover { border-color: var(--orange); color: var(--cream); }
.more-card > span:not(.tool-icon) { display: flex; flex-direction: column; }
.more-card small { color: var(--muted); font-size: 14px; line-height: 1.45; }
@media (max-width: 380px) { .calc-row .q { font-size: 14px; } .calc-row .num { width: 3.9em; } .calc-row .num input { padding-inline: 8px; } }

/* Currency converter */
.cc-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto minmax(0, 1.2fr); align-items: end; gap: 14px; }
.cc-amt input { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cc-row .swap { margin-top: 0; }
.cc-result { margin: 20px 0 0; padding: 18px 20px; border-radius: 14px; background: color-mix(in srgb, var(--orange) 10%, transparent); border: 1px solid color-mix(in srgb, var(--orange) 35%, var(--line)); }
.cc-big { margin: 0; font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cc-from-amt { display: block; font-size: 1rem; font-weight: 600; color: var(--muted); }
.cc-unit { margin: 6px 0 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: pre-wrap; }
.cc-meta { font-size: 14px; color: var(--muted); margin: 12px 0 0; }
.cc-stale { color: var(--warn); font-weight: 700; }
button.uc-cell { font: inherit; color: var(--cream); text-align: left; cursor: pointer; }
button.uc-cell:hover { border-color: var(--orange); }
@media (max-width: 700px) {
  .cc-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .cc-amt { grid-column: 1 / -1; }
  .cc-row .swap { margin-bottom: 0; }
}

/* Spell checker */
.sc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.sc-top .field-label { margin: 0; }
.sc-lang { margin: 0; }
.sc-summary { margin: 18px 0 0; font-size: 1.05rem; }
.sc-ok { color: var(--ok); font-weight: 800; }
.sc-preview { margin: 12px 0 0; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 12px; background: var(--tint); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; line-height: 1.7; }
.sc-preview mark { background: transparent; color: inherit; text-decoration: underline wavy var(--pink); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.sc-issues { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.sc-issue { display: grid; grid-template-columns: minmax(110px, auto) 1fr auto; align-items: center; gap: 8px 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--tint); }
.sc-word b { color: var(--pink); text-decoration: line-through; text-decoration-thickness: 1px; }
.sc-sugs { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-sugs .pill { padding: 4px 12px; }
.sc-acts { display: flex; gap: 14px; }
.linkbtn { font: inherit; font-size: 13px; font-weight: 700; background: none; border: 0; padding: 4px 0; color: var(--gold); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--cream); }
.sc-mywords { margin-top: 18px; }
.sc-mywords summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); }
.sc-mylist { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border: 1px solid var(--line); border-radius: 99px; font-size: 14px; }
.sc-del { font: inherit; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 6px; font-size: 16px; line-height: 1; }
.sc-del:hover { color: var(--pink); }
@media (max-width: 700px) { .sc-issue { grid-template-columns: 1fr; } }
.cc-all { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }

/* Gentle tools */
.contrast-inputs { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: end; gap: 14px; }
.color-field { display: grid; grid-template-columns: 48px 1fr; gap: 8px; }
.color-field input[type="color"] { padding: 3px; height: 46px; cursor: pointer; }
.color-field input.invalid { border-color: var(--pink); }
.contrast-inputs .swap { margin: 0 0 1px; }
.contrast-preview { display: flex; flex-direction: column; gap: 5px; margin-top: 22px; padding: 28px; border-radius: 14px; border: 1px solid var(--line); font-size: 18px; }
.contrast-preview b { font-size: 1.45rem; }
.contrast-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 14px; margin: 20px 0 12px; }
.contrast-score strong { font-size: 2rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.contrast-results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.contrast-test { display: grid; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--tint); }
.contrast-test span { color: var(--muted); font-size: 13px; }.contrast-test strong { margin-top: 5px; }.pass { color: var(--ok); }.fail { color: var(--pink); }
.reading-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 24px; margin: 18px 0; }
.reading-controls label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; font-size: 14px; font-weight: 700; }
.reading-controls input { grid-column: 1/-1; padding: 0; accent-color: var(--orange); }.reading-controls output { color: var(--muted); }
.reading-modes { margin-bottom: 18px; }.reading-preview { box-sizing: content-box; margin: 0 auto; min-height: 180px; padding: clamp(20px,4vw,42px); border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; background: #fff6dd; color: #382546; font-family: Verdana, Arial, sans-serif; }
.reading-preview[data-paper="white"] { background: #fff; color: #202027; }.reading-preview[data-paper="dark"] { background: #252230; color: #f6edf8; }
.journal-prompt { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; padding: 15px 18px; border-radius: 12px; background: color-mix(in srgb,var(--gold) 12%,transparent); border: 1px solid color-mix(in srgb,var(--gold) 35%,var(--line)); }
.journal-prompt > span { font-size: 1.8rem; color: var(--gold); }.journal-prompt p { margin: 2px 0 0; color: var(--muted); }
.journal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 28px; }.journal-head .panel-h { margin: 0; }
.journal-empty { margin-top: 12px; padding: 22px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
.journal-entries { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }.journal-entries li { padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--tint); }.journal-entries p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }.journal-entries div { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; }.journal-entries time { color: var(--muted); font-size: 13px; }.journal-danger { justify-content: flex-end; }
.compliment-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }.compliment-card { margin-top: 20px; padding: clamp(22px,5vw,42px); border-radius: 16px; background: linear-gradient(135deg,color-mix(in srgb,var(--orange) 18%,var(--tint)),color-mix(in srgb,var(--shadow) 28%,var(--tint))); border: 1px solid color-mix(in srgb,var(--orange) 40%,var(--line)); }.compliment-card blockquote { margin: 12px 0 0; font-size: clamp(1.35rem,4vw,2rem); font-weight: 750; line-height: 1.35; }
@media (max-width: 600px) { .contrast-inputs { grid-template-columns: 1fr; }.contrast-inputs .swap { margin: auto; transform: rotate(90deg); }.contrast-results,.reading-controls,.compliment-filters { grid-template-columns: 1fr; }.contrast-preview { padding: 20px; } }

/* ---------------------------------------------------------------- Pawste (private paste bin) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html[data-site="tools"] { --tk-key: #b0306a; --tk-str: #2f7d4f; --tk-num: #94640f; --tk-com: #7f8f8d; --tk-fn: #2f5bb5; --tk-type: #157266; --tk-attr: #b4542c; --tk-meta: #5f56b8; --tk-add-bg: #e3f5e8; --tk-rem-bg: #fbe6ea; --pw-sel: #fff3c4; }
html[data-site="tools"][data-theme="dark"] { --tk-key: #f28fb0; --tk-str: #9fe0a5; --tk-num: #f5c967; --tk-com: #6f8a86; --tk-fn: #8fd0ff; --tk-type: #8fd6c5; --tk-attr: #ffb38a; --tk-meta: #c9b6ff; --tk-add-bg: #15342a; --tk-rem-bg: #3a1c27; --pw-sel: #3b3517; }
.pw-note { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--orange) 12%, transparent); border: 1px solid color-mix(in srgb, var(--orange) 40%, transparent); font-size: 15px; }
.pw-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.pw-row label, .pw-ttl { display: block; min-width: 0; }
.field-label small { text-transform: none; letter-spacing: 0; font-weight: 600; }
#pw-text { font: 14.5px/1.55 ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; min-height: 300px; tab-size: 4; white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.pw-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.pw-meta .over { color: var(--pink); font-weight: 700; }
.pw-guard { margin-top: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); }
.pw-guard-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.pw-guard-top .btn { min-height: 36px; padding: 0 14px; }
.pw-guard ul { margin: 10px 0 0; padding-left: 20px; font-size: 14.5px; }
.pw-guard code { font-size: 12.5px; color: var(--muted); }
.pw-options { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.pw-checks { display: grid; gap: 4px; }
.pw-checks .check { margin: 0; align-items: flex-start; }
.pw-checks .check input { margin-top: 3px; flex: none; }
.pw-checks .check span { display: flex; flex-direction: column; }
.pw-checks .check small { color: var(--muted); font-size: 13px; }
#pw-pass { max-width: 340px; margin: 4px 0 0 28px; }
.pw-err { color: var(--pink); font-weight: 700; font-size: 14px; }
.pw-done .panel-h { margin-top: 0; font-size: 1.4rem; }
.pw-linkrow { display: flex; gap: 8px; }
.pw-linkrow input { flex: 1; font: 14px ui-monospace, Menlo, Consolas, monospace; }
.pw-linkrow .btn { min-height: 44px; flex: none; }
.pw-done-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; margin-top: 18px; align-items: start; }
.pw-qr { background: #fff; border-radius: 12px; padding: 6px; line-height: 0; }
.pw-qr svg { width: 100%; height: auto; }
.pw-mine { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pw-mine li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; }
.pw-mine li > div { display: flex; flex-direction: column; min-width: 0; }
.pw-mine li a { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-mine small { font-size: 13px; }
.pw-mine-btns { white-space: nowrap; }
.pw-feats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.pw-feat span { font-size: 26px; }
.pw-feat h3 { margin: 6px 0 4px; font-size: 1.05rem; }
.pw-feat p { margin: 0; color: var(--muted); font-size: 15px; }
.pw-vs { margin-top: 18px; max-width: 70ch; }

/* reader */
.pw-view { padding-top: 22px; }
.pw-state { padding: clamp(20px, 4vw, 36px); margin-bottom: 30px; }
.pw-state h1 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); }
.pw-state p { max-width: 62ch; }
.pw-bad { color: var(--pink); }
.pw-pwform { display: flex; gap: 8px; max-width: 420px; }
.pw-pwform input { flex: 1; font: inherit; color: var(--cream); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.pw-paper { padding: 0; overflow: hidden; margin-bottom: 22px; }
.pw-paper-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 22px clamp(16px, 3vw, 28px) 6px; flex-wrap: wrap; }
.pw-paper-title { min-width: 0; }
.pw-paper-head h1 { font-size: clamp(1.35rem, 3.4vw, 2rem); margin: 0 0 4px; overflow-wrap: anywhere; }
.pw-paper-head .eyebrow { margin-bottom: 6px; }
.pw-paper-head .eyebrow a { color: var(--gold); text-decoration: none; }
.pw-facts { margin: 0; color: var(--muted); font-size: 14px; }
.pw-ver select { font: inherit; font-size: 14px; color: var(--cream); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; max-width: 100%; }
.pw-banner { margin: 10px clamp(16px, 3vw, 28px) 0; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--pink) 12%, transparent); border: 1px solid color-mix(in srgb, var(--pink) 40%, transparent); font-weight: 600; font-size: 15px; }
.pw-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px clamp(16px, 3vw, 28px); }
.pw-toolbar .btn { min-height: 38px; padding: 0 13px; font-size: 14px; }
.pw-toolbar .btn[aria-pressed="true"] { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, transparent); }
.pw-linehint { margin: 0 clamp(16px, 3vw, 28px) 10px; }
.pw-body { border-top: 1px solid var(--line); background: var(--panel2); }
.pw-code { font: 14px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; overflow-x: auto; padding: 12px 0; tab-size: 4; counter-reset: none; }
.pw-ln { display: grid; grid-template-columns: calc(var(--digits, 2) * 1ch + 30px) minmax(0, 1fr); min-width: max-content; }
.pw-body.wrap .pw-ln { min-width: 0; }
.pw-num { text-align: right; padding: 0 14px 0 8px; color: var(--soft); text-decoration: none; user-select: none; -webkit-user-select: none; position: sticky; left: 0; background: var(--panel2); }
.pw-num:hover { color: var(--gold); }
.pw-lc { white-space: pre; padding-right: 24px; font: inherit; background: none; }
.pw-body.wrap .pw-lc { white-space: pre-wrap; overflow-wrap: anywhere; }
.pw-ln.on, .pw-ln.on .pw-num { background: var(--pw-sel); }
.pw-ln.on .pw-num { color: var(--cream); font-weight: 700; }
.pw-md { padding: clamp(18px, 3vw, 34px); max-width: 78ch; font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }
.pw-md h2, .pw-md h3, .pw-md h4 { margin: 1.3em 0 .4em; }
.pw-md > :first-child { margin-top: 0; }
.pw-md code { font: .88em ui-monospace, Menlo, Consolas, monospace; background: var(--tint); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.pw-md pre { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; }
.pw-md pre code { border: 0; padding: 0; background: none; font-size: 14px; }
.pw-md blockquote { margin: 1em 0; padding: 2px 16px; border-left: 4px solid var(--orange); color: var(--muted); }
.pw-md .md-table { overflow-x: auto; }
.pw-md table { border-collapse: collapse; font-size: 15px; }
.pw-md th, .pw-md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.pw-md li.task { list-style: none; margin-left: -1.2em; }
.pw-paper-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px clamp(16px, 3vw, 28px); border-top: 1px solid var(--line); font-size: 14px; }
.pw-history { margin-bottom: 22px; }
.pw-hist-pick { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.pw-hist-pick label { flex: 1 1 220px; }
.pw-arrow { padding-bottom: 10px; color: var(--muted); }
.pw-diff { font: 13.5px/1.55 ui-monospace, Menlo, Consolas, monospace; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; background: var(--panel2); }
.pw-diff:empty { display: none; }
.pw-dl { display: grid; grid-template-columns: 4ch 4ch 2ch minmax(0, 1fr); gap: 6px; padding: 0 10px; min-width: max-content; }
.pw-dl code { white-space: pre; font: inherit; background: none; }
.pw-dl.add { background: var(--tk-add-bg); }
.pw-dl.rem { background: var(--tk-rem-bg); }
.pw-dn { color: var(--soft); text-align: right; user-select: none; }
.pw-dop { font-weight: 700; color: var(--muted); }
.pw-fold { padding: 2px 12px; color: var(--muted); background: var(--tint); font-family: "DM Sans", system-ui, sans-serif; font-size: 12.5px; }
.pw-make { text-align: center; margin: 10px 0 50px; }
.pw-dlg { max-width: min(760px, calc(100vw - 24px)); width: 100%; color: var(--cream); padding: 22px; border: 1px solid var(--line); }
.pw-dlg::backdrop { background: rgba(10, 8, 20, .55); }
.pw-dlg .panel-h { margin-top: 0; }
.pw-dlg label { display: block; margin-bottom: 12px; }
.pw-dlg select, .pw-dlg textarea, .pw-dlg input:not([type="checkbox"]) { font: inherit; color: var(--cream); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; width: 100%; }
.pw-dlg .check { display: flex; }
#pw-qr-dlg { max-width: 360px; }
.pw-pic-opts { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: end; }
.pw-pic-opts > label:not(.check) { flex: 0 1 auto; }
.pw-range { display: flex; align-items: center; gap: 6px; }
.pw-range input { width: 80px !important; }
.pw-pic-wrap { border-radius: 12px; overflow: auto; max-height: 52vh; background: var(--tint); border: 1px solid var(--line); }
#pw-pic-canvas { display: block; width: 100%; height: auto; }
@media (max-width: 640px) {
  .pw-row, .pw-options, .pw-done-grid { grid-template-columns: minmax(0, 1fr); }
  .pw-done-grid .pw-qr { width: 150px; }
  .pw-linkrow { flex-wrap: wrap; }
  .pw-linkrow input { flex-basis: 100%; }
  .pw-mine li { flex-direction: column; align-items: flex-start; }
  .pw-code { font-size: 13px; }
}

/* code colours (highlight.js class names) */
.hljs-keyword, .hljs-selector-tag, .hljs-tag, .hljs-name, .hljs-deletion { color: var(--tk-key); }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-selector-attr, .hljs-template-tag { color: var(--tk-str); }
.hljs-number, .hljs-literal, .hljs-symbol, .hljs-bullet { color: var(--tk-num); }
.hljs-comment, .hljs-quote { color: var(--tk-com); font-style: italic; }
.hljs-title, .hljs-title.function_, .hljs-section, .hljs-link, .hljs-property { color: var(--tk-fn); }
.hljs-type, .hljs-built_in, .hljs-title.class_, .hljs-selector-class, .hljs-selector-id { color: var(--tk-type); }
.hljs-attr, .hljs-attribute, .hljs-variable.language_ { color: var(--tk-attr); }
.hljs-meta, .hljs-meta .hljs-keyword, .hljs-doctag { color: var(--tk-meta); }
.hljs-section, .hljs-strong { font-weight: 700; }
.hljs-emphasis { font-style: italic; }
.pw-dl.add .hljs-addition, .pw-dl.rem .hljs-deletion { color: inherit; }
/* hidden must win over .btn / label display rules inside Pawste */
.pw-editor [hidden], .pw-done [hidden], .pw-view [hidden], .pw-dlg [hidden], .pw-mine-sec[hidden], .pw-history[hidden] { display: none !important; }
.pw-toolbar a.btn { text-decoration: none; line-height: 1; }
.pw-mine-sec { margin-top: 40px; }
/* Pawste link type (private / short) */
.pw-kind { border: 0; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pw-kind legend { padding: 0; margin-bottom: 6px; }
.pw-kind-opt { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--tint); cursor: pointer; }
.pw-kind-opt.on { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 9%, transparent); box-shadow: 0 0 0 1px var(--orange) inset; }
.pw-kind-opt input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--orange); }
.pw-kind-opt span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pw-kind-opt small { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.pw-kind-opt code { font-size: 12px; color: var(--gold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-guard-short { margin: 8px 0 0; font-size: 14.5px; font-weight: 600; }
.pw-editor .pw-kind[hidden] { display: none !important; }
@media (max-width: 640px) { .pw-kind { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Day / night (theme.py) ---------- */
html[data-site="tools"][data-theme="dark"] { color-scheme: dark;
  --bg: #17131d; --panel: #221c2b; --panel2: #2a2235; --line: #372e44; --cream: #efeaf6; --muted: #aaa0bb; --soft: #8b819c;
  --orange: #f2a582; --accent-ink: #2a1626; --gold: #b8bff0; --shadow: #6f78bf;
  --ok: #72d49a; --warn: #f5c967; --info: #8fb6ef; --purple: #9d6bcc; --green: #72d49a; --pink: #ef8faa; --sky: #8fb6ef;
  --glow1: color-mix(in srgb, var(--shadow) 18%, var(--bg)); --glow2: color-mix(in srgb, var(--orange) 8%, var(--bg));
  --spot1: color-mix(in srgb, var(--shadow) 40%, var(--panel)); --spot2: color-mix(in srgb, var(--shadow) 14%, var(--panel2));
  --footer: color-mix(in srgb, black 30%, var(--bg));
  --bg: #0f1918; --panel: #172423; --panel2: #1c2c2b; --line: #26393a; --cream: #e6f2ef; --muted: #93aaa6; --soft: #758c88; --orange: #45c4b0; --accent-ink: #0b1d1a; --gold: #6fd6c5; --shadow: #2f7d72; }
html.theme-anim body, html.theme-anim .card, html.theme-anim .faq, html.theme-anim .chip-btn, html.theme-anim .site-footer, html.theme-anim .policy,
html.theme-anim .btn, html.theme-anim .spot, html.theme-anim .tile, html.theme-anim .mood, html.theme-anim input, html.theme-anim select,
html.theme-anim .step, html.theme-anim .ill { transition: background-color .7s ease, color .7s ease, border-color .7s ease, background .7s ease; }

.site-header .theme-toggle { order: 3; }
.theme-toggle { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--cream); background: var(--panel); border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 14px 5px 5px; cursor: pointer; box-shadow: 2px 2px 0 var(--shadow); }
.theme-toggle:hover { border-color: var(--orange); }
.theme-toggle:focus-visible, .sky-stage:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.tt-track { position: relative; width: 52px; height: 28px; border-radius: 99px; background: linear-gradient(180deg, #9fd6ff, #ffe7b0);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cream) 15%, transparent); transition: background .6s ease; }
html[data-theme="dark"] .tt-track { background: linear-gradient(180deg, #1b2350, #3b2a5c); }
.tt-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fffaf0;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .55s cubic-bezier(.6,-0.4,.35,1.4), background .5s ease; overflow: hidden; }
html[data-theme="dark"] .tt-knob { transform: translateX(24px) rotate(360deg); background: #2b2440; }
.tt-knob svg { position: absolute; inset: 3px; width: 16px; height: 16px; transition: opacity .35s ease, transform .5s ease; }
.tt-knob .mini-moon { opacity: 0; transform: scale(.4) rotate(-90deg); }
html[data-theme="dark"] .tt-knob .mini-sun { opacity: 0; transform: scale(.4) rotate(90deg); }
html[data-theme="dark"] .tt-knob .mini-moon { opacity: 1; transform: none; }

.sky-stage { position: relative; display: block; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; border-radius: 24px;
  -webkit-tap-highlight-color: transparent; }
.sky-stage .cat { position: relative; z-index: 1; display: block; }
.sky { position: absolute; z-index: 0; left: 52%; top: 17%; width: 66%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.sky .sun, .sky .moon { position: absolute; inset: 0; width: 100%; height: 100%;
  transition: transform .9s cubic-bezier(.55,-0.25,.35,1.25), opacity .7s ease, filter .9s ease; }
.sky .sun { filter: drop-shadow(0 0 18px rgba(255, 196, 64, .65)); animation: sun-spin 40s linear infinite; }
.sky .moon { opacity: 0; transform: translateY(55%) rotate(-50deg) scale(.6); filter: drop-shadow(0 0 16px rgba(240, 232, 200, .45)); }
html[data-theme="dark"] .sky .sun { opacity: 0; transform: translateY(60%) rotate(140deg) scale(.5); animation: none; }
html[data-theme="dark"] .sky .moon { opacity: 1; transform: translate(9%, -4%); }
.stars i { position: absolute; width: 5%; aspect-ratio: 1; background: #fff7d6; opacity: 0; transform: scale(.2);
  transition: opacity .5s ease calc(.45s + var(--d)), transform .5s ease calc(.45s + var(--d)); box-shadow: 0 0 6px #fff1b8; }
html[data-theme="dark"] .stars i { opacity: 1; transform: scale(1); animation: twinkle 2.6s ease-in-out infinite var(--d); }
.cat.boop { animation: boop .6s ease; }
.sky-pair .duo { position: relative; z-index: 1; display: grid; place-items: center; }   /* both cats share one cell, so both get the same size rule (no stretched night cat) */
.sky-pair .duo .cat { grid-area: 1 / 1; transition: opacity .6s ease; }
.sky-pair .duo .cat-night { opacity: 0; }
html[data-theme="dark"] .sky-pair .duo .cat-day { opacity: 0; }
html[data-theme="dark"] .sky-pair .duo .cat-night { opacity: 1; }
html[data-theme="dark"] .hero-art .sky-pair img { filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .45)); }   /* no pale halo around the night cat */
@keyframes boop { 0% { transform: translateY(0); } 30% { transform: translateY(-9px) rotate(-2deg); } 60% { transform: translateY(2px); } 100% { transform: none; } }
@keyframes sun-spin { to { rotate: 360deg; } }
@keyframes twinkle { 50% { opacity: .35; } }
@media (max-width: 760px) {
  .site-header .theme-toggle { order: 2; margin-left: auto; }
  .site-header .site-nav { order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sky .sun, .sky .moon, .stars i, .tt-knob, .tt-knob svg, .tt-track { transition: none !important; animation: none !important; }
  .cat.boop { animation: none; }
}
