/* r5/bots: Telegram Bot Maker (tg-) and Chrome Extension Maker (cx-) */
.tg-h, .cx-h { margin: 22px 0 6px; font-size: 1.1rem; }
.tg-tabs, .cx-tabs { display: flex; flex-wrap: wrap; max-width: 100%; }
.tg-tabs button, .cx-tabs button { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; }
.tg-code, .cx-code { max-width: 100%; min-height: 160px; }
.tg-warnings, .cx-warnings { margin: 0 0 14px; padding: 10px 14px 10px 32px; border-left: 4px solid var(--warn); background: var(--surface); border-radius: 0 12px 12px 0; font-size: .92rem; overflow-wrap: anywhere; }
.tg-warnings[hidden], .cx-warnings[hidden] { display: none; }
.tg-check { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; font-size: .95rem; font-weight: 500; cursor: pointer; }
.tg-check input { width: auto; flex: none; margin-top: 4px; }
.tg-hint { margin: -6px 0 14px; font-size: .85rem; color: var(--muted); }
.tg-features { border: 1px solid var(--border); border-radius: 14px; padding: 14px 14px 2px; background: var(--surface); }
.tg-sub { margin: -4px 0 6px 26px; }
.tg-sub[hidden] { display: none; }
.tg-phone { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--bg); }
.tg-phone-top { padding: 10px 14px; font-weight: 700; background: var(--surface); border-bottom: 1px solid var(--border); overflow-wrap: anywhere; min-height: 2.6em; }
.tg-chat { display: flex; flex-direction: column; gap: 8px; padding: 14px; max-height: 340px; overflow-y: auto; }
.tg-msg { max-width: 85%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface); border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .93rem; align-self: flex-start; }
.tg-msg.tg-me { align-self: flex-end; background: var(--brand); border-color: var(--brand); color: #fff; border-radius: 14px 14px 4px 14px; }
@media (prefers-color-scheme: dark) { .tg-msg.tg-me { color: #14162a; } }
.tg-sys { align-self: center; font-size: .8rem; color: var(--muted); }
.cx-icons { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.cx-icons canvas { display: block; flex: none; }
#cx-icon128 { width: 96px; height: 96px; }
#cx-zoom { width: 100%; padding: 0; }
[data-cx-for][hidden] { display: none; }
[data-cx-ext] input[type=color] { width: 100%; min-width: 56px; height: 44px; padding: 4px; }

/* r5/docs: resume builder (rb-) and invoice generator (iv-) */
.rb-bar, .iv-bar { margin-bottom: 14px; }
.rb-bar .updated, .iv-bar .updated { margin: 8px 0 0; min-height: 1.3em; }
.rb-bad, .iv-bad { color: var(--bad) !important; font-weight: 650; }
.rb-danger, .iv-danger { color: var(--bad); }
.rb-layout, .iv-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.rb-form, .iv-form, .rb-side, .iv-side { min-width: 0; }
.rb-side, .iv-side { order: -1; } /* phones: preview and Download first, form below */
@media (min-width: 900px) {
  .rb-layout, .iv-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .rb-side, .iv-side { order: 0; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; scrollbar-gutter: stable; padding-right: 2px; }
}
.rb-sec, .iv-sec { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; background: var(--surface); }
.rb-sec > summary, .iv-sec > summary { cursor: pointer; font-weight: 750; padding: 12px 14px; border-radius: 14px; }
.rb-sec > summary:focus-visible, .iv-sec > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rb-sec-body, .iv-sec-body { padding: 2px 14px 12px; }
.rb-sec-body .row > *, .iv-sec-body .row > * { min-width: 130px; }
.rb-sec-body .actions, .iv-sec-body .actions { margin-top: 2px; }
.rb-entry, .iv-entry { border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px 10px; margin: 0 0 12px; min-width: 0; background: var(--bg); }
.rb-entry legend, .iv-entry legend { font-weight: 700; font-size: .88rem; color: var(--muted); padding: 0 6px; }
.rb-entry input, .rb-entry textarea, .iv-entry input, .iv-entry textarea { background: var(--surface); }
.rb-entry-fields, .iv-entry-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.rb-f-wide, .iv-f-wide { grid-column: 1 / -1; }
.rb-entry .field, .iv-entry .field { margin-bottom: 10px; }
.rb-entry-btns, .iv-entry-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.rb-entry-btns button:disabled, .iv-entry-btns button:disabled { opacity: .4; cursor: default; }
.iv-line-amt { margin-right: auto; font-weight: 700; font-size: .92rem; }
.rb-dl, .iv-dl { margin: 0 0 10px; }
.rb-warn, .iv-warn { margin: 0 0 12px; font-size: .92rem; overflow-wrap: anywhere; }
.rb-preview, .iv-preview { min-width: 0; }
.rb-sheet, .iv-sheet { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 4px; box-shadow: var(--shadow); margin-bottom: 12px; }
.rb-page, .iv-page { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #fff; color: #1a1a1a; font-family: Helvetica, Arial, "Liberation Sans", sans-serif; }
.rb-page span, .rb-page i, .rb-page img, .iv-page span, .iv-page i, .iv-page img { position: absolute; display: block; }
.rb-page span, .iv-page span { white-space: pre; line-height: 1; }
.iv-totals { margin: 6px 0 0; padding: 12px 14px; background: var(--brand-soft); border-radius: 12px; }
.iv-totals div { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.iv-totals dt { color: var(--muted); }
.iv-totals dd { margin: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.iv-totals .iv-total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; font-size: 1.1rem; }
.iv-totals .iv-total dt { color: var(--text); font-weight: 750; }
.iv-totals .iv-total dd { font-weight: 850; }
#iv-cur-note:empty { display: none; }
#iv-cur-note { margin: -6px 0 12px; }
#iv-logo-file { padding: 8px; }
#iv-logo-remove[hidden], .rb-warn[hidden], .iv-warn[hidden] { display: none; }

/* Privacy policy + terms generators (prefix lg-) */
.lg-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 900px) { .lg-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } .lg-out { position: sticky; top: 84px; } }
.lg-form, .lg-out { min-width: 0; }
.lg-h { font-size: 1.02rem; margin: 20px 0 10px; }
.lg-h:first-child { margin-top: 0; }
.lg-checks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0 0 12px; }
.lg-check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; }
.lg-check input { margin: 4px 0 0; flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--brand); }
.lg-check span { min-width: 0; overflow-wrap: anywhere; }
.lg-check strong { display: block; font-size: .95rem; }
.lg-check small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.lg-sub { margin: -4px 0 12px; padding: 10px 12px 0; border-left: 3px solid var(--brand-soft); }
.lg-sub[hidden] { display: none; }
.lg-tabs { flex-wrap: wrap; margin-bottom: 8px; max-width: 100%; }
.lg-preview { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; max-height: 560px; overflow: auto; overflow-wrap: anywhere; font-size: .93rem; line-height: 1.6; margin: 0 0 10px; }
.lg-preview h1 { font-size: 1.3rem; line-height: 1.25; margin: 0 0 8px; }
.lg-preview h2 { font-size: 1.02rem; margin: 18px 0 6px; }
.lg-preview p { margin: 0 0 10px; }
.lg-preview ul { margin: 0 0 10px; padding-left: 20px; }
.lg-preview li { margin-bottom: 4px; }
.lg-code { max-height: 560px; white-space: pre-wrap; overflow-wrap: anywhere; }
.lg-code[hidden], .lg-preview[hidden] { display: none; }
.lg-out .updated { margin: 0 0 8px; }

/* r5/messaging: Discord embed builder (de-) and WhatsApp link generator (wa-) */
#de-app, #wa-app { min-width: 0; }
#de-app .tool-grid > *, #wa-app .tool-grid > * { min-width: 0; }
.de-count, .wa-count { float: right; font-weight: 500; font-size: .82rem; color: var(--muted); }
.de-over { color: var(--bad) !important; font-weight: 700; }
.de-good { color: var(--good); }
.de-bad { border-color: var(--bad) !important; }
.de-hint, .wa-hint { font-size: .88rem; color: var(--muted); margin: 6px 0 0; min-height: 1.2em; }
.wa-hint.wa-bad { color: var(--bad); font-weight: 600; }
.de-embed { border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); margin-bottom: 12px; }
.de-embed > summary { cursor: pointer; padding: 12px 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.de-embed[open] > summary { border-bottom: 1px dashed var(--border); }
.de-embed-body { padding: 14px; }
.de-embed-body .row > * { min-width: 150px; }
.de-colorrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.de-colorrow input[type=color] { width: 56px; height: 40px; padding: 3px; flex: 0 0 56px; }
.de-colorrow input[type=color]:disabled { opacity: .35; }
.de-hex { font-size: .88rem; color: var(--muted); }
.de-check { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 500; margin: 0; }
.de-field { border: 1px solid var(--border); border-radius: 12px; padding: 12px 12px 10px; margin-bottom: 10px; background: var(--bg); }
.de-field input, .de-field textarea { background: var(--surface); }
.de-field .field { margin-bottom: 10px; }
.de-fieldbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.de-addrow { margin: 0 0 14px; }
.de-addrow .de-count { float: none; }
.de-tsrow { display: flex; gap: 8px; flex-wrap: wrap; }
.de-tsrow input { flex: 1 1 180px; min-width: 0; }
#de-app button:disabled, #wa-app button:disabled { opacity: .5; cursor: not-allowed; }
.de-side { position: sticky; top: 84px; align-self: start; }
@media (max-width: 760px) { .de-side { position: static; } }
.de-meter { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); margin: 10px 0; }
.de-errors { border: 1.5px solid var(--bad); border-radius: 12px; padding: 10px 14px; font-size: .9rem; margin: 10px 0; overflow-wrap: anywhere; }
.de-errors ul { margin: 6px 0 0; padding-left: 20px; }
.de-status { border-radius: 12px; padding: 10px 14px; font-size: .92rem; margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; border: 1.5px solid var(--border); }
.de-status.de-ok { border-color: var(--good); color: var(--good); font-weight: 650; }
.de-status.de-err { border-color: var(--bad); color: var(--bad); }
.de-box { border: 1.5px solid var(--border); border-radius: 14px; padding: 0 14px; margin-top: 14px; background: var(--surface); }
.de-box > summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.de-box[open] { padding-bottom: 14px; }
.de-h { margin: 22px 0 10px; font-size: 1.1rem; }
#de-code, #wa-html { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Discord message preview: always dark, like the Discord client */
.de-preview { background: #313338; color: #dbdee1; border-radius: 14px; padding: 16px 14px; font-size: .95rem; line-height: 1.4; overflow: hidden; overflow-wrap: anywhere; max-height: 78vh; overflow-y: auto; }
.de-preview a { color: #00a8fc; text-decoration: none; }
.de-preview a:hover { text-decoration: underline; color: #00a8fc; }
.de-preview code { background: #1e1f22; border-radius: 4px; padding: 1px 4px; font: .85em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.de-pre { background: #1e1f22; border: 1px solid #232428; border-radius: 6px; padding: 8px; margin: 4px 0; font: .82rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; }
.de-msg { display: flex; gap: 12px; min-width: 0; }
.de-msg-main { flex: 1; min-width: 0; }
.de-av { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px; object-fit: cover; }
.de-av-ph { background: #5865f2; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.de-msg-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.de-name { color: #f2f3f5; font-weight: 600; }
.de-app { background: #5865f2; color: #fff; font-size: .62rem; font-weight: 700; border-radius: 4px; padding: 1px 5px; }
.de-time { color: #949ba4; font-size: .75rem; }
.de-content { margin-top: 2px; }
.de-empty { color: #949ba4; font-style: italic; }
.de-card { background: #2b2d31; border-left: 4px solid #1e1f22; border-radius: 4px; padding: 10px 14px 14px 12px; margin-top: 6px; max-width: 520px; }
.de-card-grid { display: flex; gap: 14px; }
.de-card-main { flex: 1; min-width: 0; }
.de-author { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: #f2f3f5; margin-top: 4px; }
.de-author a { color: #f2f3f5; }
.de-icon { width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px; object-fit: cover; }
.de-title { font-weight: 700; color: #f2f3f5; margin-top: 6px; font-size: 1rem; }
.de-desc { font-size: .88rem; margin-top: 6px; }
.de-pfields { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; margin-top: 8px; }
.de-pfield { min-width: 0; font-size: .86rem; }
.de-pfname { font-weight: 700; color: #f2f3f5; margin-bottom: 1px; }
.de-thumb { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 4px; object-fit: cover; margin-top: 6px; }
.de-image { display: block; max-width: 100%; max-height: 300px; border-radius: 4px; margin-top: 12px; }
.de-ph { background: #1e1f22; color: #949ba4; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.de-icon.de-ph { font-size: .7rem; }
.de-image.de-ph { height: 110px; width: 100%; }
.de-footer { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: #b5bac1; margin-top: 10px; }
.de-footer .de-icon { width: 20px; height: 20px; flex-basis: 20px; }

/* WhatsApp link generator */
.wa-phone-row { display: flex; gap: 10px; flex-wrap: wrap; }
.wa-phone-row > .field:first-child { flex: 1 1 200px; min-width: 0; }
.wa-phone-row > .field:last-child { flex: 2 1 200px; min-width: 0; }
.wa-out { background: var(--brand-soft); border-radius: var(--radius); padding: 16px; min-width: 0; }
.wa-out .copy-row { flex-wrap: wrap; }
.wa-out .copy-row input { min-width: 0; flex: 1 1 200px; background: var(--surface); }
.wa-status { font-size: .9rem; color: var(--muted); margin: 8px 0 0; overflow-wrap: anywhere; }
.wa-qr-wrap { margin-top: 16px; text-align: center; }
.wa-qr-wrap canvas { width: 220px; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); background: #fff; image-rendering: pixelated; }
.wa-qr-wrap .actions { justify-content: center; }
.wa-btn-preview { margin: 4px 0 12px; }
.wa-h { margin: 24px 0 10px; font-size: 1.1rem; }
.wa-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .wa-tpls { grid-template-columns: 1fr; } }
.wa-tpl { border: 1.5px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--surface); min-width: 0; }
.wa-tpl label { display: block; font-weight: 700; margin-bottom: 6px; }
.wa-tpl .actions { margin-top: 8px; }
/* build.py adds a generic "nothing is sent to a server" note after every generator. On the embed builder the
   optional Send button does post to Discord, so the page's own, more precise note replaces it. */
section.tool:has(#de-app) + p.note { display: none; }

/* r5/profile: Link in Bio Maker (lb-) and Email Signature Generator (es-) */
.lb-h, .es-h { font-size: 1.02rem; margin: 20px 0 8px; }
.lb-h:first-child, .es-h:first-child { margin-top: 0; }
.lb-list { list-style: none; margin: 0 0 8px; padding: 0; }
.lb-item { display: flex; gap: 8px; align-items: flex-start; padding: 10px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.lb-item-fields { flex: 1; min-width: 0; display: grid; gap: 6px; }
.lb-item-fields input, .lb-item-fields select { padding: 8px 10px; font-size: .95rem; min-width: 0; }
.lb-row-btns { display: grid; gap: 4px; flex: none; }
.lb-row-btns .btn-sm { padding: 3px 9px; line-height: 1.3; min-width: 34px; }
.lb-row-btns button:disabled { opacity: .35; cursor: default; }
.lb-photo-row, .es-photo-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lb-photo-row input[type=file], .es-photo-row input[type=file] { flex: 1; min-width: 0; padding: 8px; font-size: .9rem; }
.lb-hint, .es-hint { color: var(--muted); font-size: .86rem; margin: 6px 0 0; min-height: 1.2em; }
.lb-warn { color: var(--warn); }
.lb-side { min-width: 0; }
.lb-sticky { position: sticky; top: 14px; }
.lb-phone { width: 100%; max-width: 320px; margin: 0 auto 14px; padding: 10px; border-radius: 38px; background: #14151c; box-shadow: var(--shadow); }
.lb-phone::before { content: ""; display: block; width: 70px; height: 6px; margin: 2px auto 8px; border-radius: 6px; background: #3a3c4a; }
.lb-frame { display: block; width: 100%; height: 540px; border: 0; border-radius: 28px; background: #fff; }
.lb-side .actions { justify-content: center; }
.lb-code, .es-code { max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; }
.lb-details, .es-details { margin-top: 18px; }
.lb-details summary, .es-details summary { cursor: pointer; font-weight: 650; }
@media (max-width: 760px) { .lb-sticky { position: static; } .lb-frame { height: 480px; } }

.es-side { min-width: 0; }
.es-preview-box { background: #ffffff; color: #333333; border: 1px solid var(--border); border-radius: 12px; padding: 18px 16px; overflow-x: auto; margin-bottom: 12px; }
.es-preview-lead { margin: 0 0 14px; color: #666666; font: 14px/1.5 Arial, Helvetica, sans-serif; }
.es-color-row { display: flex; gap: 10px; align-items: center; }
.es-color-row input[type=color] { width: 56px; height: 44px; padding: 4px; flex: none; }
.es-check { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin: 0 0 14px; }
#lb-photo-remove[hidden], #es-img-remove[hidden], #es-data-warn[hidden] { display: none; }
/* keep the site's table styling out of the signature preview (the signature's own inline styles still apply) */
#es-preview table { width: auto; margin: 0; border: 0; background: none; box-shadow: none; border-radius: 0; font-size: inherit; }
#es-preview tr, #es-preview td { border: 0; padding: 0; background: none; text-align: left; }
#es-preview a { text-decoration: none; }

/* GitHub README generator (rg-) */
.rg-tabs { flex-wrap: wrap; max-width: 100%; }
.rg-grid { align-items: start; }
.rg-grid > * { min-width: 0; }
.rg-h { margin: 20px 0 10px; font-size: 1.02rem; padding-top: 14px; border-top: 1px dashed var(--border); }
.rg-form > div > .rg-h:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.rg-skillset { border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px 12px; margin: 0 0 10px; min-width: 0; }
.rg-skillset legend { font-weight: 650; font-size: .88rem; padding: 0 6px; color: var(--muted); }
.rg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rg-chips label { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: .88rem; cursor: pointer; background: var(--bg); }
.rg-chips label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.rg-chips input { margin: 0; }
.rg-check { display: flex; align-items: flex-start; gap: 8px; font-size: .92rem; margin: 0 0 10px; line-height: 1.5; }
.rg-check input { margin-top: 5px; flex: none; }
.rg-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin: 2px 0 6px; }
@media (max-width: 480px) { .rg-checks { grid-template-columns: 1fr; } }
.rg-out { position: sticky; top: 84px; }
@media (max-width: 760px) { .rg-out { position: static; } }
.rg-outhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rg-outhead .tabs { margin-bottom: 0; }
.rg-outhead .updated { margin: 0; }
.rg-preview, .rg-md { height: min(62vh, 560px); max-height: none; overflow: auto; margin: 0 0 12px; }
.rg-md { white-space: pre-wrap; overflow-wrap: anywhere; }
.rg-preview { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--surface); font-size: .95rem; line-height: 1.6; overflow-wrap: anywhere; }
.rg-preview > :first-child { margin-top: 0; }
.rg-preview h1, .rg-preview h2 { border-bottom: 1px solid var(--border); padding-bottom: .25em; }
.rg-preview h1 { font-size: 1.5rem; margin: 0 0 12px; line-height: 1.25; }
.rg-preview h2 { font-size: 1.2rem; margin: 22px 0 10px; }
.rg-preview h3 { font-size: 1.02rem; margin: 16px 0 8px; }
.rg-preview p, .rg-preview ul, .rg-preview ol, .rg-preview pre, .rg-preview table { margin: 0 0 12px; }
.rg-preview ul, .rg-preview ol { padding-left: 1.5em; }
.rg-preview li:has(> input[type=checkbox]) { list-style: none; margin-left: -1.3em; }
.rg-preview li > input[type=checkbox] { margin: 0 6px 0 0; }
.rg-preview code { font: .86em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 1px 5px; }
.rg-preview pre { background: #12141f; color: #e6e9f5; border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
.rg-preview pre code { background: none; border: 0; padding: 0; color: inherit; white-space: pre; overflow-wrap: normal; }
.rg-preview table { display: block; overflow-x: auto; border-collapse: collapse; max-width: 100%; font-size: .9rem; }
.rg-preview th, .rg-preview td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; overflow-wrap: normal; }
.rg-preview th { background: var(--bg); }
.rg-preview img { max-width: 100%; vertical-align: middle; }
.rg-img { display: inline-block; background: var(--bg); color: var(--muted); border: 1px dashed var(--border); border-radius: 6px; padding: 1px 8px; font-size: .78rem; font-weight: 650; margin: 2px 0; }

/* r5/seo — robots.txt, sitemap and meta tag generators (prefix sg-) */
.sg-tool { min-width: 0; }
.sg-tool .tool-grid > * { min-width: 0; }
.sg-h { margin: 22px 0 10px; font-size: 1.05rem; }
.sg-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sg-group { border: 1.5px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 12px; background: var(--surface); }
.sg-group-top { display: flex; gap: 10px; flex-wrap: wrap; }
.sg-group-top .field { flex: 1 1 200px; min-width: 0; }
.sg-group-top .sg-delay { flex: 0 1 130px; }
.sg-rule { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.sg-rule select { flex: 0 0 112px; width: 112px; padding: 9px 8px; }
.sg-rule input { flex: 1 1 auto; min-width: 0; padding: 9px 10px; }
.sg-rule .sg-x { flex: 0 0 auto; padding: 7px 10px; }
.sg-empty { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.sg-out { white-space: pre; overflow: auto; max-height: 440px; min-height: 120px; }
.sg-out-wrap { white-space: pre-wrap; word-break: break-word; }
.sg-warn { border-left: 4px solid var(--warn); background: var(--surface); border-radius: 0 12px 12px 0; padding: 10px 14px; margin: 10px 0; font-size: .92rem; overflow-wrap: anywhere; }
.sg-warn ul { margin: 0; padding-left: 18px; }
.sg-warn[hidden] { display: none; }
.sg-stats { margin: 0 0 8px; }
.sg-test { border: 1.5px solid var(--border); border-radius: 14px; padding: 14px; margin-top: 20px; background: var(--surface); }
.sg-test h3 { margin: 0 0 10px; font-size: 1.05rem; }
.sg-verdict { border-radius: 12px; padding: 11px 14px; font-size: .95rem; overflow-wrap: anywhere; border: 1.5px solid var(--border); }
.sg-verdict.sg-yes { border-color: var(--good); }
.sg-verdict.sg-no { border-color: var(--bad); }
.sg-count { display: block; margin-top: 5px; font-size: .84rem; color: var(--muted); }
.sg-count.sg-ok { color: var(--good); }
.sg-count.sg-short, .sg-count.sg-long { color: var(--warn); }
.sg-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 14px; font-size: .95rem; }
.sg-checks label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.sg-theme { display: flex; gap: 10px; align-items: center; }
.sg-theme input[type=color] { flex: 0 0 60px; width: 60px; }
.sg-theme label { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 0; }
.sg-fieldset { border: 1.5px solid var(--border); border-radius: 14px; padding: 12px 14px 2px; margin: 0 0 14px; min-width: 0; }
.sg-fieldset legend { font-weight: 700; padding: 0 6px; font-size: .95rem; }
.sg-preview-label { font-weight: 650; font-size: .92rem; margin: 0 0 6px; }
/* Google-style result */
.sg-google { background: #fff; color: #202124; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; font-family: Arial, Helvetica, sans-serif; overflow: hidden; }
.sg-g-top { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; min-width: 0; }
.sg-g-ico { flex: 0 0 28px; height: 28px; border-radius: 50%; background: #e8eaed; color: #5f6368; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }
.sg-g-meta { min-width: 0; line-height: 1.3; }
.sg-g-site { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-g-url { font-size: .76rem; color: #4d5156; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-g-title { color: #1a0dab; font-size: 1.22rem; line-height: 1.3; margin-bottom: 3px; overflow-wrap: anywhere; }
.sg-g-desc { color: #4d5156; font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; }
.sg-noindex { display: inline-block; margin-top: 8px; font-size: .78rem; background: #fde8ea; color: #a3172b; border-radius: 6px; padding: 2px 8px; }
.sg-noindex[hidden] { display: none; }
/* Social card */
.sg-card { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--bg); margin-bottom: 8px; }
.sg-card-img { background: var(--brand-soft); color: var(--muted); display: flex; align-items: center; justify-content: center; text-align: center; font-size: .85rem; padding: 8px; overflow-wrap: anywhere; }
.sg-card-large .sg-card-img { aspect-ratio: 1.91 / 1; }
.sg-card-small { display: flex; }
.sg-card-small .sg-card-img { flex: 0 0 110px; min-height: 110px; font-size: .72rem; }
.sg-card-body { padding: 10px 14px; min-width: 0; }
.sg-card-host { font-size: .78rem; color: var(--muted); text-transform: lowercase; }
.sg-card-title { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.sg-card-desc { font-size: .88rem; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) {
  .sg-google { background: #1f1f1f; color: #e8eaed; }
  .sg-g-ico { background: #3c4043; color: #e8eaed; }
  .sg-g-url, .sg-g-desc { color: #bdc1c6; }
  .sg-g-title { color: #8ab4f8; }
}
@media (max-width: 480px) {
  .sg-rule select { flex-basis: 98px; width: 98px; }
  .sg-presets .btn { flex: 1 1 45%; }
}
