/* PlainPaste. Same look as cfeti.com. */
:root {
  --bg: #0b1118; --surface: #111a24; --surface2: #16212d; --border: #223244; --border-strong: #35506b;
  --text: #e9eef4; --muted: #9fb0c2; --accent: #6db3ff; --solid: #2672c9; --on-solid: #ffffff;
  --amber: #f0b45a; --amber-bg: #2a2111; --amber-border: #5a4519; --amber-deep: #1e1809;
  --glow: rgba(70, 150, 240, 0.14); --scrim: rgba(5, 9, 13, 0.66); --shadow: rgba(0, 0, 0, 0.55);
  --serif: ui-serif, 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fa; --surface: #ffffff; --surface2: #eef2f6; --border: #d8e0e8; --border-strong: #b5c3d2;
    --text: #0f1720; --muted: #475568; --accent: #0b5cad; --solid: #1d62b8;
    --amber: #7a4f00; --amber-bg: #fdf3da; --amber-border: #ecd49b; --amber-deep: #fff7e6;
    --glow: rgba(38, 114, 201, 0.10); --scrim: rgba(15, 23, 32, 0.45); --shadow: rgba(15, 23, 32, 0.28);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.6;
  background-image: radial-gradient(900px 420px at 80% -120px, var(--glow), transparent 70%); background-repeat: no-repeat;
}
h1, h2, h3 { text-wrap: balance; }
p, li, dd, dt { text-wrap: pretty; }
a { color: var(--muted); text-decoration: none; }
a:hover { color: var(--text); }
button, input, label { font-family: inherit; }
h1:focus { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.site-header { max-width: 1080px; margin: 0 auto; padding: 20px 40px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--accent); font-weight: 700; letter-spacing: 0.16em; }
.brand span { color: var(--text); }
.nav { display: flex; gap: 24px; font-size: 15px; }

.hero { padding-top: 56px; padding-bottom: 32px; }
.hero.compact { padding-top: 40px; padding-bottom: 28px; }
.eyebrow { margin: 0 0 14px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0 0 16px; max-width: 780px; font-family: var(--serif); font-weight: 600; font-size: 46px; line-height: 1.1; letter-spacing: -0.015em; }
.hero.compact h1 { font-size: 38px; line-height: 1.12; margin-bottom: 12px; }
.lede { margin: 0; max-width: 620px; font-size: 18px; color: var(--muted); }
.hero.compact .lede { font-size: 17px; }
.noscript { color: var(--amber); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; color: var(--text); background: transparent; }
.btn.primary { background: var(--solid); color: var(--on-solid); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.outline, .btn.ghost { border-color: var(--border-strong); }
.btn.outline:hover, .btn.ghost:hover { background: var(--surface2); }
.btn.big { min-height: 48px; padding: 0 24px; font-size: 16px; }
.btn.small-btn { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.chips { margin: 20px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 14.5px; }
.chips svg { color: var(--accent); }
.callout { display: flex; align-items: flex-start; gap: 14px; margin-top: 28px; padding: 20px 22px; border: 1px solid var(--amber-border); border-radius: 14px; background: var(--amber-bg); }
.callout svg { flex: none; margin-top: 2px; color: var(--amber); }
.callout h2 { margin: 0 0 4px; font-size: 17px; font-weight: 650; color: var(--amber); }
.callout p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--text); }
.site-footer { max-width: 1080px; margin: 72px auto 0; padding: 32px 40px 40px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: 14.5px; color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { text-decoration: underline; }
/* update notices */
.notice-host { position: fixed; right: 24px; bottom: 24px; z-index: 30; width: 420px; max-width: calc(100vw - 24px); }
.notice { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface2); box-shadow: 0 12px 32px var(--shadow); }
.notice .badge { flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--accent); }
.notice .body { min-width: 0; flex: 1; }
.notice .ttl { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.35; }
.notice .txt { margin: 2px 0 12px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.notice .acts { display: flex; flex-wrap: wrap; gap: 10px; }
.notice .acts .btn { min-height: 44px; }
.notice.warn { border-color: var(--amber); background: var(--amber-bg); box-shadow: 0 -10px 36px var(--shadow); padding-top: 18px; }
.notice.warn .badge { border-color: var(--amber); background: var(--amber-deep); color: var(--amber); }
.notice.warn .txt { color: var(--text); }
.notice.warn .btn.outline { border-color: var(--amber); color: var(--amber); }
.notice.toast { align-items: center; padding: 12px 8px 12px 18px; gap: 12px; }
.notice.toast .ttl { font-size: 15.5px; font-weight: 600; flex: 1; }
.notice.toast .txt { margin: 2px 0 0; }
.notice .x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.notice .x:hover { background: var(--surface); }
.scrim { position: fixed; inset: 0; z-index: 20; background: var(--scrim); }

/* PasteGuard */
.msg { margin: 14px 0 0; font-size: 15px; color: var(--amber); }
.msg:empty { display: none; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.status { padding: 24px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--surface); }
.st-top { display: flex; align-items: flex-start; gap: 16px; }
.st-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface2); color: var(--accent); }
.st-copy { flex: 1; min-width: 0; }
.st-title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; }
.st-text { margin: 4px 0 0; font-size: 16px; color: var(--muted); }
.st-count { flex: none; margin: 0; font-family: var(--mono); font-size: 34px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.bar { height: 8px; margin: 20px 0 0; border-radius: 999px; background: var(--surface2); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width 0.25s linear; }
.status .btn-row { margin-top: 20px; }
.status[data-mode="pending"], .status[data-mode="tap"], .status[data-mode="error"] { border-color: var(--amber-border); background: var(--amber-bg); }
.status[data-mode="pending"] .st-icon, .status[data-mode="tap"] .st-icon, .status[data-mode="error"] .st-icon { border-color: var(--amber-border); background: var(--amber-deep); color: var(--amber); }
.status[data-mode="pending"] .st-text, .status[data-mode="tap"] .st-text, .status[data-mode="error"] .st-text { color: var(--text); }
.status[data-mode="pending"] .bar span, .status[data-mode="tap"] .bar span, .status[data-mode="error"] .bar span { background: var(--amber); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.panel { padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.panel h2 { margin: 0 0 4px; font-size: 19px; font-weight: 650; }
.panel > p { margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.seg button { min-height: 44px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 10px; background: transparent; color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer; }
.seg button:hover { background: var(--surface2); }
.seg button[aria-pressed="true"] { border-color: var(--accent); background: var(--surface2); color: var(--accent); }
.opts { margin: 14px 0 0; padding: 0; border: 0; }
.opts legend { padding: 0; margin-bottom: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.opt { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15.5px; cursor: pointer; }
.opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--solid); }
.watch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.watch-note { margin: 12px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.watch-note:empty { display: none; }
.check { margin-top: 20px; }
.check .btn-row { margin-top: 0; }
.paste { display: block; width: 100%; min-height: 84px; margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 15px; resize: vertical; }
.paste::placeholder { color: var(--muted); }
.paste-label { display: block; margin-top: 16px; font-size: 14.5px; color: var(--muted); }
.result { margin-top: 16px; }
.result:empty { display: none; }
.res-head { margin: 0 0 8px; font-size: 16px; font-weight: 650; }
.finds { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.finds li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 14px; border: 1px solid var(--amber-border); border-radius: 12px; background: var(--amber-bg); }
.finds .lb { font-weight: 650; color: var(--amber); }
.finds .nt { font-size: 14.5px; color: var(--text); }
.res-ok { margin: 0; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface2); font-size: 15px; }
.res-fine { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.res-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.callout { margin-top: 28px; }

@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .wrap, .site-header, .site-footer { padding-left: 20px; padding-right: 20px; }
  .site-header { padding-top: 16px; padding-bottom: 16px; }
  .brand { font-size: 15px; gap: 9px; }
  .brand svg { width: 26px; height: 26px; }
  .nav { gap: 16px; font-size: 14.5px; }
  .hero { padding-top: 28px; padding-bottom: 20px; }
  h1 { font-size: 31px; }
  .lede { font-size: 16px; }
  .status { padding: 18px; }
  .st-icon { width: 40px; height: 40px; }
  .st-title { font-size: 22px; }
  .st-text { font-size: 15px; }
  .st-count { font-size: 26px; }
  .st-top { flex-wrap: wrap; }
  .btn-row .btn { width: 100%; min-height: 52px; font-size: 17px; }
  .panel { padding: 18px; }
  .seg button { flex: 1 1 auto; }
  .site-footer { margin-top: 40px; padding-top: 24px; padding-bottom: 32px; font-size: 13.5px; }
  .notice-host { left: 12px; right: 12px; bottom: 16px; width: auto; max-width: none; }
  .notice.warn .acts .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.offscreen { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }

.site-footer .ver { order: 3; flex-basis: 100%; margin: 0; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--muted); }

/* PlainPaste */
.drop { display: block; width: 100%; min-height: 150px; padding: 16px; border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; resize: vertical; }
.drop:focus { border-style: solid; }
.drop::placeholder { color: var(--muted); }
.in-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.in-row .hint { margin: 0; font-size: 14.5px; color: var(--muted); }
.out-box { margin-top: 24px; padding: 22px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); }
.out-box h2 { margin: 0 0 4px; font-size: 19px; font-weight: 650; }
.summary { margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.out { display: block; width: 100%; min-height: 180px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-family: var(--mono); font-size: 14.5px; line-height: 1.55; resize: vertical; }
.out-meta { margin: 10px 0 0; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--muted); }
.out-box .btn-row { margin-top: 16px; }
.opt { align-items: flex-start; padding: 8px 0; }
.opt input { margin-top: 2px; flex: none; }
.optnote { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.panel.opts-panel { margin-top: 20px; }
.msg.ok { color: var(--accent); }
.paste-label.first { margin-top: 0; margin-bottom: 12px; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.pane h2 { margin: 0 0 8px; font-size: 19px; font-weight: 650; }
.pane .summary { margin-top: 0; }
.pv { height: 260px; overflow: auto; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); font-size: 15px; line-height: 1.5; }
.pv > :first-child { margin-top: 0; }
.pv h1, .pv h2, .pv h3, .pv h4, .pv h5, .pv h6 { margin: 0.8em 0 0.3em; font-size: 1.1em; font-weight: 700; line-height: 1.3; }
.pv p { margin: 0.5em 0; color: var(--text); }
.pv ul, .pv ol { margin: 0.5em 0; padding-left: 1.4em; }
.pv blockquote { margin: 0.5em 0; padding-left: 12px; border-left: 3px solid var(--border-strong); color: var(--muted); }
.pv table { border-collapse: collapse; margin: 0.5em 0; }
.pv td, .pv th { padding: 3px 8px; border: 1px solid var(--border-strong); }
.pv code, .pv-src { font-family: var(--mono); font-size: 13.5px; }
.pv-src { margin: 0; white-space: pre-wrap; word-break: break-word; color: var(--text); }
.pv-link { color: var(--accent); text-decoration: underline; }
.pv-img { display: inline-block; padding: 0 8px; border: 1px dashed var(--border-strong); border-radius: 6px; font-size: 12.5px; color: var(--muted); }
.out { min-height: 260px; height: 260px; }
.out-box.flash { animation: arrive 0.9s ease-out; }
@keyframes arrive { from { border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); } to { border-color: var(--border-strong); box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; } .pv, .out { height: 200px; min-height: 200px; } }
