:root {
  color-scheme: light;
  --bg: #f5faf8;
  --surface: #ffffff;
  --surface-2: #eef7f4;
  --surface-3: #e5f1ed;
  --header: #071716;
  --header-soft: #102321;
  --text: #10201f;
  --muted: #60716e;
  --border: #dce9e5;
  --mint: #66f2c2;
  --mint-dark: #0d7f63;
  --mint-soft: #dffbef;
  --gold: #d6a84f;
  --gold-soft: #fff5dc;
  --danger: #a33b3b;
  --shadow: 0 14px 34px rgba(5, 32, 28, .08);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1480px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #081311;
  --surface: #10201d;
  --surface-2: #142824;
  --surface-3: #19322d;
  --text: #e8f5f1;
  --muted: #a7bbb5;
  --border: #29433d;
  --mint-soft: #143a31;
  --gold-soft: #372d17;
  --shadow: 0 14px 34px rgba(0, 0, 0, .24);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--mint-dark); }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
img, svg, video, canvas { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.skip-link {
  position: fixed;
  inset-inline-start: 12px;
  top: -80px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--mint);
  color: #071716;
  font-weight: 800;
}
.skip-link:focus { top: 12px; }

.site-header { background: var(--header); color: #edf9f5; border-bottom: 1px solid rgba(255,255,255,.08); }
.header-inner {
  width: min(var(--max), calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}
.logo { direction: ltr; unicode-bidi: isolate; display: inline-flex; align-items: baseline; min-width: max-content; font-size: clamp(20px, 2vw, 27px); font-weight: 900; letter-spacing: -.045em; }
.logo .bq, .logo .tools { color: var(--mint); }
.logo .middle { color: var(--gold); }
.site-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 5px; }
.site-nav a { padding: 9px 11px; border-radius: 10px; color: #cfe4de; font-size: 14px; font-weight: 700; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: rgba(102,242,194,.12); color: #fff; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .language-select {
  min-height: 40px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  background: var(--header-soft);
  color: #ecf8f4;
}
.icon-button { min-width: 42px; padding: 8px 10px; font-weight: 800; }
.language-select { max-width: 150px; padding: 7px 30px 7px 10px; }
.menu-toggle { display: none; }

.hero { background: linear-gradient(180deg, #0b201d 0%, #102b26 100%); color: #fff; }
.hero-inner { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: clamp(54px, 8vw, 92px) 0; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--mint); font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .13em; }
.hero h1 { max-width: 850px; margin: 0 auto; font-size: clamp(38px, 6vw, 72px); line-height: 1.02; letter-spacing: -.055em; }
.hero p { max-width: 760px; margin: 22px auto 0; color: #bed4cd; font-size: clamp(17px, 2.2vw, 21px); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 800;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--mint); color: #071716; }
.button-primary:hover { background: #8af6d5; color: #071716; }
.button-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.button-quiet { background: transparent; color: var(--muted); border-color: var(--border); }
.button-gold { background: var(--gold); color: #1d1709; }

.page-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 32px auto 64px;
  display: grid;
  grid-template-columns: minmax(180px, 230px) minmax(0, 900px) minmax(180px, 230px);
  justify-content: center;
  gap: 24px;
  align-items: start;
}
.main-column { min-width: 0; }
.side-rail { position: sticky; top: 18px; display: grid; gap: 16px; min-width: 0; }
.rail-card, .panel, .content-card, .tool-card, .category-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.rail-card { padding: 18px; box-shadow: none; }
.rail-card h2, .rail-card h3 { margin: 0 0 10px; font-size: 15px; }
.rail-card p { margin: 0; color: var(--muted); font-size: 13px; }
.rail-links { display: grid; gap: 5px; }
.rail-links a { padding: 8px 9px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.rail-links a:hover { background: var(--surface-2); color: var(--text); }

.breadcrumbs { margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-inline-start: 7px; color: #98aaa5; }
.page-head { margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: clamp(31px, 5vw, 48px); line-height: 1.08; letter-spacing: -.04em; }
.page-head p { max-width: 760px; margin: 12px 0 0; color: var(--muted); font-size: 17px; }

.panel { padding: clamp(18px, 3vw, 28px); }
.tool-panel { overflow: hidden; }
.tool-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.privacy-note { display: inline-flex; align-items: center; gap: 7px; color: var(--mint-dark); font-size: 13px; font-weight: 800; }
.privacy-note::before { content: "●"; color: var(--mint-dark); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-actions .button { min-height: 39px; padding: 8px 11px; font-size: 13px; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.editor-grid.single { grid-template-columns: 1fr; }
.editor-block { min-width: 0; }
.editor-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; font-size: 13px; font-weight: 850; }
.editor-label small { color: var(--muted); font-weight: 600; }
textarea, input[type="text"], input[type="number"], select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
textarea:focus, input:focus, select:focus, button:focus-visible, a:focus-visible { border-color: var(--mint-dark); box-shadow: 0 0 0 3px rgba(13,127,99,.18); outline: none; }
textarea { min-height: 270px; resize: vertical; padding: 14px; line-height: 1.55; tab-size: 4; }
.output-area { background: var(--surface-2); }
.options-shell { margin: 18px 0 0; padding: 16px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); }
.options-shell h2 { margin: 0 0 12px; font-size: 15px; }
.options-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; align-items: end; }
.field { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.field input, .field select { min-height: 41px; padding: 8px 10px; }
.check { display: flex; align-items: center; gap: 8px; min-height: 41px; color: var(--text); font-size: 13px; font-weight: 750; }
.check input { width: 18px; height: 18px; accent-color: var(--mint-dark); }
.run-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 16px; }
.run-row small { color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.stat { min-width: 0; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.stat span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.stat strong { display: block; margin-top: 3px; font-size: 21px; overflow-wrap: anywhere; }
.empty-state { margin-top: 10px; color: var(--muted); font-size: 13px; }

.section { margin-top: 28px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: clamp(23px, 4vw, 31px); letter-spacing: -.03em; }
.section-head p { margin: 5px 0 0; color: var(--muted); }
.content-card { padding: clamp(20px, 3vw, 28px); box-shadow: none; }
.content-card h2, .content-card h3 { margin-top: 0; }
.content-card p:last-child { margin-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; counter-reset: steps; }
.step { padding: 17px; border-radius: 13px; background: var(--surface-2); }
.step::before { counter-increment: steps; content: counter(steps); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 10px; border-radius: 999px; background: var(--mint); color: #071716; font-weight: 900; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
.faq-list { display: grid; gap: 10px; }
details { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
summary { padding: 15px 17px; cursor: pointer; font-weight: 850; }
details p { margin: 0; padding: 0 17px 16px; color: var(--muted); }

.search-panel { margin: -28px auto 0; position: relative; z-index: 2; width: min(950px, calc(100% - 32px)); }
.search-box { padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.search-box input { min-height: 54px; padding: 12px 16px; font-size: 17px; }
.home-main { width: min(1180px, calc(100% - 32px)); margin: 48px auto 70px; }
.quick-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.quick-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.quick-toolbar .button.is-active { background: var(--mint); color: #071716; border-color: var(--mint); }
.categories-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.category-card { padding: 20px; box-shadow: none; }
.category-card h3 { margin: 0; }
.category-card p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.tools-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.tool-card { position: relative; min-width: 0; padding: 18px; box-shadow: none; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.tool-card:hover { transform: translateY(-2px); border-color: #a8d9ca; box-shadow: var(--shadow); color: var(--text); }
.tool-card h3 { margin: 0; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.tool-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; margin-bottom: 9px; padding: 3px 8px; border-radius: 999px; background: var(--gold-soft); color: #7f5d17; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
html[data-theme="dark"] .badge { color: #f4cd77; }
.no-results { padding: 28px; text-align: center; color: var(--muted); }

.static-page { width: min(900px, calc(100% - 32px)); margin: 42px auto 70px; }
.static-page .content-card { font-size: 17px; }
.static-page h1 { font-size: clamp(34px, 6vw, 54px); letter-spacing: -.045em; line-height: 1.05; }
.static-page a { color: var(--mint-dark); font-weight: 800; }

.site-footer { background: var(--header); color: #cfe0db; }
.footer-inner { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0; display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; }
.footer-inner p { margin: 10px 0 0; color: #93aaa3; font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: start; gap: 8px 16px; }
.footer-links a { color: #cfe0db; font-size: 14px; font-weight: 700; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom-inner { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 16px 0 22px; color: #879e97; font-size: 12px; text-align: center; }
.toast-dock { position: fixed; z-index: 1000; inset-inline-end: 18px; bottom: 18px; display: grid; gap: 8px; }
.toast { max-width: 320px; padding: 11px 14px; border-radius: 10px; background: var(--header); color: #fff; box-shadow: var(--shadow); font-weight: 800; }

[dir="rtl"] .site-nav { margin-inline-start: auto; }
[dir="rtl"] .language-select { padding: 7px 10px 7px 30px; }
[dir="rtl"] textarea, [dir="rtl"] input { text-align: right; }
[dir="rtl"] .output-area { direction: rtl; }

@media (max-width: 1120px) {
  .page-shell { grid-template-columns: minmax(170px,210px) minmax(0,1fr); }
  .right-rail { display: none; }
  .tools-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .header-inner { min-height: 66px; flex-wrap: wrap; padding: 10px 0; }
  .site-nav { display: none; order: 4; width: 100%; margin: 0; padding: 7px; border-radius: 12px; background: var(--header-soft); flex-direction: column; align-items: stretch; }
  .site-nav.is-open { display: flex; }
  .site-nav a { width: 100%; }
  .header-actions { margin-inline-start: auto; }
  .menu-toggle { display: inline-flex; }
  .language-select { max-width: 120px; }
  .page-shell { grid-template-columns: minmax(0,1fr); margin-top: 22px; }
  .side-rail { display: none; }
  .hero-inner { padding: 52px 0 66px; }
  .categories-grid, .steps { grid-template-columns: 1fr; }
  .quick-editor { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .header-inner, .page-shell, .home-main, .footer-inner, .footer-bottom-inner, .static-page, .hero-inner { width: min(100% - 22px, var(--max)); }
  .search-panel { width: calc(100% - 22px); }
  .logo { font-size: 21px; }
  .site-nav { border-radius: 0; margin-inline: -11px; width: calc(100% + 22px); }
  .language-select { width: 92px; }
  .page-head h1 { font-size: 34px; }
  .panel { padding: 15px; border-radius: 14px; }
  .tool-topline { align-items: flex-start; flex-direction: column; }
  .editor-grid { grid-template-columns: 1fr; }
  textarea { min-height: 220px; }
  .options-form, .stats-grid, .tools-grid { grid-template-columns: 1fr; }
  .run-row { align-items: stretch; flex-direction: column; }
  .run-row .button { width: 100%; }
  .tool-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
  .tool-actions .button { width: 100%; }
  .hero h1 { font-size: 42px; }
  .hero p { font-size: 17px; }
  .content-card { border-radius: 14px; }
}

@media print {
  .site-header, .side-rail, .breadcrumbs, .tool-actions, .action-menu, .options-shell, .run-row, .section:not(.print-keep), .site-footer, .toast-dock { display: none !important; }
  body { background: #fff; color: #000; }
  .page-shell { display: block; width: 100%; margin: 0; }
  .panel, .content-card { border: 0; box-shadow: none; padding: 0; }
  textarea { border: 1px solid #bbb; min-height: 180px; color: #000; background: #fff; }
  .stats-grid { grid-template-columns: repeat(3,1fr); }
  .stat { border: 1px solid #bbb; background: #fff; }
}

/* v1.7.x local workflow upgrades */
.tool-panel.is-dragover{outline:3px dashed var(--mint);outline-offset:4px;box-shadow:0 0 0 8px color-mix(in srgb,var(--mint) 15%,transparent)}
body.tool-focus .site-header,body.tool-focus .site-footer,body.tool-focus .side-rail,body.tool-focus .breadcrumbs,body.tool-focus .page-head,body.tool-focus .main-column>.section{display:none!important}
body.tool-focus .page-shell{display:block;max-width:1440px;margin-inline:auto;padding-top:clamp(12px,3vw,36px)}
body.tool-focus .main-column{max-width:1280px;margin-inline:auto}
body.tool-focus .tool-panel{min-height:calc(100vh - 48px)}
body.tool-focus #focus-mode{position:sticky;top:8px;z-index:4}
@media(max-width:700px){body.tool-focus .page-shell{padding:8px}.tool-actions{gap:6px}.tool-actions .button{min-height:40px}}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* v1.8.0 directory and editor polish */
.compact-hero .hero-inner { padding-block: clamp(44px, 6vw, 68px); }
.dark-button { border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.08); color: #fff; }
.dark-button:hover { background: rgba(255,255,255,.14); color: #fff; }
.search-hint { margin: 8px 3px 0; color: var(--muted); font-size: 12px; }
.text-link { color: var(--mint-dark); font-size: 14px; font-weight: 850; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.tool-category { display: inline-flex; margin-bottom: 8px; color: var(--mint-dark); font-size: 11px; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.badge-link:hover { color: #6f5011; box-shadow: 0 0 0 2px color-mix(in srgb,var(--gold) 28%,transparent); }
.category-card { position: relative; display: flex; min-height: 220px; flex-direction: column; }
.category-card .category-count { position: absolute; inset-block-start: 16px; inset-inline-end: 16px; display: grid; place-items: center; min-width: 34px; height: 30px; padding-inline: 8px; border-radius: 999px; background: var(--mint-soft); color: var(--mint-dark); font-size: 12px; font-weight: 900; }
.category-card h3 { padding-inline-end: 42px; }
.category-card p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.category-link { margin-top: auto; padding-top: 14px; color: var(--mint-dark); font-size: 13px; font-weight: 850; }
.directory-search-results { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.directory-controls { display: grid; gap: 15px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.filter-row { display: grid; gap: 10px; }
.filter-row > strong { font-size: 13px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip { min-height: 38px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 800; }
.filter-chip:hover, .filter-chip.is-active { border-color: var(--mint-dark); background: var(--mint-soft); color: var(--mint-dark); }
.sort-row { display: flex; align-items: end; gap: 10px; }
.sort-row label { color: var(--muted); font-size: 12px; font-weight: 850; }
.sort-row select { width: min(230px,100%); min-height: 42px; padding: 8px 10px; }
.sort-row .button { margin-inline-start: auto; }
.directory-summary { min-height: 28px; margin-top: 14px; color: var(--muted); font-size: 13px; font-weight: 750; }
.directory-summary p { margin: 0; }
.directory-list { margin-top: 8px; }
.category-links { display: flex; flex-wrap: wrap; gap: 9px; }
.category-links a { padding: 9px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 800; }
.category-links a:hover { border-color: var(--mint-dark); color: var(--mint-dark); }
.tool-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.action-menu { position: relative; border: 0; background: transparent; }
.action-menu > summary { list-style: none; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu[open] > summary { border-color: var(--mint-dark); color: var(--text); }
.action-menu-panel { position: absolute; z-index: 20; inset-block-start: calc(100% + 8px); inset-inline-end: 0; display: grid; width: min(230px,80vw); gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); }
.action-menu-panel .button { width: 100%; justify-content: flex-start; }
.output-actions { justify-content: flex-start; }
.editor-label small { text-align: end; }

@media (max-width: 1120px) {
  .categories-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .section-head { align-items: flex-start; }
  .sort-row { align-items: stretch; flex-direction: column; }
  .sort-row select { width: 100%; }
  .sort-row .button { width: 100%; margin-inline-start: 0; }
  .tool-toolbar { width: 100%; justify-content: space-between; }
  .primary-tool-actions { flex: 1; }
}

@media (max-width: 620px) {
  .categories-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 0; }
  .section-head { align-items: stretch; flex-direction: column; }
  .section-head .text-link { align-self: flex-start; }
  .directory-controls { padding: 14px; }
  .filter-chips { flex-wrap: nowrap; margin-inline: -14px; padding-inline: 14px; overflow-x: auto; scrollbar-width: thin; }
  .filter-chip { flex: 0 0 auto; }
  .tool-toolbar { align-items: stretch; flex-direction: column; }
  .primary-tool-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .action-menu { width: 100%; }
  .action-menu > summary { width: 100%; }
  .action-menu-panel { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
  .output-actions { grid-template-columns: 1fr; }
  .editor-label { align-items: flex-start; flex-direction: column; gap: 2px; }
  .editor-label small { text-align: start; }
}


/* v1.8.1 performance and interaction polish */
kbd { display:inline-grid; place-items:center; min-width:1.55em; min-height:1.55em; padding:0 .35em; border:1px solid var(--border); border-bottom-width:2px; border-radius:6px; background:var(--surface); color:var(--muted); font:700 11px/1 ui-monospace,SFMono-Regular,Consolas,monospace; }
section[id] { scroll-margin-top: 18px; }
.back-to-top { position:fixed; z-index:80; inset-inline-end:max(16px,env(safe-area-inset-right)); bottom:max(16px,calc(env(safe-area-inset-bottom) + 10px)); display:grid; place-items:center; width:46px; height:46px; border:1px solid var(--border); border-radius:999px; background:var(--header); color:#fff; box-shadow:var(--shadow); font-size:21px; font-weight:900; }
.back-to-top:hover { background:var(--mint); color:#071716; }
.back-to-top[hidden] { display:none; }
.tool-card:focus-visible,.category-card:focus-visible { border-color:var(--mint-dark); box-shadow:0 0 0 4px rgba(13,127,99,.18),var(--shadow); }
.quick-run-row .tool-actions { justify-content:flex-end; }
@media (max-width:620px) {
  .quick-run-row .tool-actions { display:grid; grid-template-columns:1fr; width:100%; }
  .tool-run-row { position:sticky; z-index:12; bottom:0; margin-inline:-15px; margin-bottom:0; padding:10px 15px calc(10px + env(safe-area-inset-bottom)); border-top:1px solid var(--border); background:var(--surface); backdrop-filter:blur(12px); }
  .tool-run-row small { display:none; }
  .tool-run-row .button { min-height:48px; }
  .back-to-top { width:42px; height:42px; }
  .back-to-top.with-tool-bar { bottom:max(82px,calc(env(safe-area-inset-bottom) + 76px)); }
}

/* v1.8.3 accessibility, resilience, cache safety, and large-input safeguards */
.noscript-banner { padding: 11px 16px; border-bottom: 1px solid #d9b965; background: #fff5dc; color: #3d2d0b; text-align: center; font-size: 14px; font-weight: 750; }
.tool-status { min-height: 1.5em; margin: 8px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.tool-status:empty { min-height: 0; margin: 0; }
textarea[spellcheck="false"] { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 14px; }
button, .button, .filter-chip, summary { touch-action: manipulation; }
.tool-run-row { background: var(--surface); }
@supports (background: color-mix(in srgb, white 50%, black)) {
  @media (max-width:620px) { .tool-run-row { background: color-mix(in srgb,var(--surface) 92%,transparent); } }
}
@media (forced-colors: active) {
  .button, .tool-card, .category-card, .panel, .content-card, .rail-card, .filter-chip, textarea, input, select { forced-color-adjust: auto; }
  .privacy-note::before { color: CanvasText; }
}
