/* InspectDock website styles.

   The palette below mirrors brand/tokens.ts, which is the source of truth and
   where the WCAG contrast is verified. A test fails if the two drift apart. */

/*

   Written with logical properties (inset-inline-start, margin-inline-end,
   padding-inline-start) rather than left/right, so the layout mirrors
   correctly when `dir="rtl"` is set, without a second stylesheet. */

/*
   One stylesheet, no framework, no web fonts: the system stack renders instantly
   and costs nothing to download. */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f6f9;
  --fg: #15171c;
  --fg-muted: #55596a;
  --line: #d9dce4;
  --accent: #3b4fd8;
  --accent-fg: #ffffff;
  --notice-bg: #fff6e0;
  --notice-line: #e8c26a;
  --notice-fg: #6a4a05;
  --radius: 10px;
  --wrap: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1116;
    --bg-soft: #171a21;
    --fg: #e8ebf2;
    --fg-muted: #a2abbd;
    --line: #2a2f3a;
    --accent: #8ea4ff;
    --accent-fg: #0b0d12;
    --notice-bg: #241e10;
    --notice-line: #6b5520;
    --notice-fg: #f5d99a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

/* Keyboard users get a real target, not a hidden one. */
.skip {
  position: absolute; inset-inline-start: -9999px;
  background: var(--accent); color: var(--accent-fg);
  padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0; z-index: 10;
}
.skip:focus { inset-inline-start: 0; top: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 650; color: var(--fg); text-decoration: none; }
.brand-mark {
  width: 1.15rem; height: 1.15rem; border-radius: 4px;
  border: 2px solid var(--accent);
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 -4px 0 0 var(--accent);
}
.site-header nav ul, .site-footer nav ul { display: flex; flex-wrap: wrap; gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.site-header nav a { color: var(--fg-muted); text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--fg); text-decoration: underline; }

/* Headings and text */
h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem); line-height: 1.2; letter-spacing: -.02em; margin: 2rem 0 .75rem; }
h2 { font-size: 1.35rem; letter-spacing: -.01em; margin: 2.5rem 0 .6rem; }
h3 { font-size: 1.03rem; margin: 0 0 .35rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.1rem; color: var(--fg-muted); max-width: 46rem; }
.eyebrow { font-size: .82rem; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); font-weight: 650; margin: 2rem 0 .4rem; }
.muted { color: var(--fg-muted); font-size: .92rem; }
section { margin-bottom: 1rem; }

.hero { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }

/* Buttons */
.cta-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.1rem 0 0; }
.btn {
  display: inline-block; padding: .62rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-soft);
  color: var(--fg); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }

/* Notices carry the honest release state, so they must read as information. */
.notice {
  border: 1px solid var(--notice-line); background: var(--notice-bg); color: var(--notice-fg);
  border-radius: var(--radius); padding: .9rem 1.05rem; margin: 1.25rem 0;
}
.notice p:last-child { margin-bottom: 0; }
.notice a { color: inherit; }

/* Grids */
.grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.grid-3 article { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: var(--bg-soft); }
.grid-3 p { margin: 0; color: var(--fg-muted); font-size: .95rem; }

.tool-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); list-style: none; margin: 0 0 1.5rem; padding: 0; }
.tool-card a {
  display: block; height: 100%; padding: .9rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); color: var(--fg); text-decoration: none;
}
.tool-card a:hover { border-color: var(--accent); }
.tool-card p { margin: 0; color: var(--fg-muted); font-size: .9rem; }
.category-blurb { color: var(--fg-muted); margin-top: -.2rem; }

.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--dot, var(--accent)); margin-inline-end: .45rem; vertical-align: baseline; }

/* Lists */
.checklist { list-style: none; margin: 0 0 1rem; padding: 0; }
.checklist li { position: relative; padding-inline-start: 1.4rem; margin-bottom: .5rem; }
.checklist li::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: .5rem; height: .5rem; border-radius: 2px; background: var(--accent); }

/* Tables */
.facts { border-collapse: collapse; width: 100%; margin: 0 0 1rem; font-size: .95rem; }
.facts th, .facts td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th[scope="row"] { color: var(--fg-muted); font-weight: 500; width: 40%; }
.facts thead th { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-muted); }

/* FAQ */
.faq { margin: 0; }
.faq dt { font-weight: 650; margin-top: 1.1rem; }
.faq dd { margin: .3rem 0 0; color: var(--fg-muted); }

/* Breadcrumb */
.breadcrumb { margin-top: 1.25rem; font-size: .88rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; color: var(--fg-muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: .4rem; color: var(--line); }

/* Code */
pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; overflow-x: auto; font-size: .88rem; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: .05rem .35rem; background: var(--bg-soft); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.75rem 0 2.5rem; color: var(--fg-muted); font-size: .92rem; }
.site-footer a { color: var(--fg-muted); }
.site-footer nav ul { margin: .75rem 0; }
.footer-state { font-weight: 600; color: var(--fg); }
.footer-legal { margin: 0; }

@media (max-width: 36rem) {
  .facts th[scope="row"] { width: auto; }
  .header-inner { min-height: auto; padding: .75rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Right-to-left.

   Logical properties handle the mirroring, so this only covers the few places
   where the character itself has a direction. The breadcrumb separator is a
   slash, which should lean the other way in RTL. */
[dir="rtl"] .breadcrumb li + li::before { content: "\\"; }

/* Script-appropriate fallbacks. The system stack covers Latin well but can
   pick a poor face for these, so name the platform defaults first. */
:root[lang^="ar"] body, :root[lang^="fa"] body, :root[lang^="he"] body {
  font-family: "SF Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
}
:root[lang^="hi"] body, :root[lang^="mr"] body {
  font-family: "Kohinoor Devanagari", "Nirmala UI", "Noto Sans Devanagari", sans-serif;
}
:root[lang^="th"] body {
  font-family: "Thonburi", "Leelawadee UI", "Noto Sans Thai", sans-serif;
}
:root[lang^="ja"] body {
  font-family: "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
}
:root[lang^="zh"] body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
:root[lang^="ko"] body {
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}

/* Questions and answers. Each item is its own section so the heading
   structure is the outline, which is also how a screen reader navigates it. */
.faq-item {
  margin-block: 1.75rem;
  padding-inline-start: 1rem;
  border-inline-start: 2px solid var(--line, rgba(255, 255, 255, 0.1));
}

.faq-item h2 {
  font-size: 1.0625rem;
  margin-block-end: 0.5rem;
}

.faq-item p {
  margin: 0;
  max-width: 68ch;
}

/* Product screenshots. Two across where there is room, one where there is not. */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.5rem;
  margin-block-start: 1.25rem;
}

.shot {
  margin: 0;
}

.shot img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  /* The panels are dark whatever the page theme is, so they need no
     background of their own; this only softens the edge in light mode. */
  background: #121316;
}

.shot figcaption {
  margin-block-start: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted, #64748b);
  line-height: 1.5;
}

/* ---------------------------------------------------------------------------
   The local tools.

   Only the tool pages with a pure engine render these. The markup is built
   by /webtools.js; the fallback paragraph is in the HTML so a visitor
   without JavaScript sees an explanation rather than an empty box.
   --------------------------------------------------------------------------- */
.webtool-section { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; background: var(--bg-raised, rgba(255,255,255,.02)); }
.webtool-section h2 { margin-top: 0; }
.webtool { display: flex; flex-direction: column; gap: .5rem; margin-top: .9rem; }
.wt-fallback { color: var(--fg-muted); margin: 0; }
.webtool.wt-ready .wt-fallback { display: none; }
.wt-hint { color: var(--fg-muted); margin: 0 0 .2rem; font-size: .95rem; }
.wt-label { font-size: .85rem; color: var(--fg-muted); }
.wt-pane { width: 100%; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; line-height: 1.5; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); resize: vertical; }
.wt-pane:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.wt-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem .8rem; }
.wt-field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.wt-field-wide { grid-column: 1 / -1; }
.wt-select, .wt-text { width: 100%; box-sizing: border-box; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font-size: .9rem; }
.wt-toggle { align-self: start; width: 1rem; height: 1rem; }
.wt-status p { margin: .35rem 0 0; font-size: .9rem; }
.wt-error { color: var(--danger, #f87171); }
.wt-note { color: var(--fg-muted); }
.wt-details { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: .5rem 0 0; font-size: .88rem; }
.wt-details dt { color: var(--fg-muted); }
.wt-details dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.wt-copy { align-self: start; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--fg); font: inherit; font-size: .9rem; cursor: pointer; }
.wt-copy:hover { border-color: var(--accent); }
.wt-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Visually hidden, still announced. The standard clip pattern: `display:
   none` and `visibility: hidden` both remove it from the accessibility
   tree, which would defeat the point. */
.wt-announce { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Generated by site/build.ts from the tool catalogue. Do not edit here:
   edit `accentColor` in src/tools/catalog.ts. */
.dot-screenshot { --dot: #6366f1; }
.dot-responsive-viewer { --dot: #3b82f6; }
.dot-extract-images { --dot: #10b981; }
.dot-color-picker { --dot: #ec4899; }
.dot-world-clock { --dot: #3b82f6; }
.dot-qr-code { --dot: #8b5cf6; }
.dot-picture-in-picture { --dot: #3b82f6; }
.dot-json-formatter { --dot: #38bdf8; }
.dot-page-speed { --dot: #10b981; }
.dot-web-scrape { --dot: #38bdf8; }
.dot-seo-meta { --dot: #06b6d4; }
.dot-speed-test { --dot: #00f0ff; }
.dot-site-stack { --dot: #facc15; }
.dot-export-element { --dot: #38bdf8; }
.dot-color-palette { --dot: #fb7185; }
.dot-list-fonts { --dot: #38bdf8; }
.dot-ruler-measure { --dot: #fb7185; }
.dot-url-opener { --dot: #c084fc; }
.dot-cookie-editor { --dot: #fb923c; }
.dot-css-inspector { --dot: #a78bfa; }
.dot-layout-tools { --dot: #38bdf8; }
.dot-accessibility { --dot: #84cc16; }
.dot-ai-assistant { --dot: #c084fc; }
.dot-font-changer { --dot: #10b981; }
.dot-pattern-background { --dot: #00f0ff; }
.dot-dark-mode { --dot: #818cf8; }
.dot-code-injection { --dot: #f97316; }
.dot-live-text-editor { --dot: #f43f5e; }
.dot-base64 { --dot: #8b5cf6; }
.dot-url-encoder { --dot: #6366f1; }
.dot-html-entities { --dot: #0ea5e9; }
.dot-jwt-inspector { --dot: #f59e0b; }
.dot-hash-generator { --dot: #10b981; }
.dot-uuid-generator { --dot: #ec4899; }
.dot-timestamp-converter { --dot: #3b82f6; }
.dot-text-stats { --dot: #14b8a6; }
.dot-regex-tester { --dot: #f472b6; }
.dot-text-diff { --dot: #60a5fa; }
.dot-query-builder { --dot: #38bdf8; }
.dot-utm-builder { --dot: #34d399; }
.dot-json-converter { --dot: #a78bfa; }
.dot-css-units { --dot: #fbbf24; }
.dot-clamp-calculator { --dot: #fb923c; }
.dot-color-converter { --dot: #f43f5e; }
.dot-contrast-checker { --dot: #22d3ee; }
.dot-cron-parser { --dot: #818cf8; }
.dot-curl-to-fetch { --dot: #2dd4bf; }
.dot-slug-generator { --dot: #84cc16; }
.dot-number-base { --dot: #eab308; }
.dot-string-escape { --dot: #c084fc; }
.dot-meta-tags { --dot: #fb7185; }
.dot-batch-capture { --dot: #6ddd9a; }
.dot-markdown { --dot: #f87171; }
.dot-svg-sanitiser { --dot: #4ade80; }
.dot-html-formatter { --dot: #38bdf8; }
.dot-css-formatter { --dot: #a78bfa; }
.dot-js-formatter { --dot: #fbbf24; }
.dot-gradient-builder { --dot: #f472b6; }
.dot-shadow-builder { --dot: #818cf8; }
.dot-storage-inspector { --dot: #2dd4bf; }
.dot-image-resize { --dot: #fb923c; }
