@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
}

:root {
  --paper: #f5f7fb;
  --surface: #ffffff;
  --ink: #16203a;
  --ink-2: #36415e;
  --muted: #5a6580;
  --line: #dce1ec;
  --line-strong: #b4bdd3;
  --cobalt: #2b4acb;
  --cobalt-dark: #1f379e;
  --cobalt-soft: #e9edff;
  --tape: #ffc83d;
  --tape-soft: #fff4d1;
  --ok: #0b7a4b;
  --ok-soft: #e3f5ec;
  --err: #b9212b;
  --err-soft: #fdecec;
  --accent: var(--cobalt);
  --accent-soft: var(--cobalt-soft);
  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 18px;
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --shadow-tape: 5px 5px 0 var(--tape);
  --focus: 0 0 0 3px var(--surface), 0 0 0 6px var(--cobalt);
}

.cat-orange { --accent: #c2410c; --accent-soft: #ffeedf; }
.cat-red { --accent: #b42335; --accent-soft: #fdebee; }
.cat-blue { --accent: #2b4acb; --accent-soft: #e9edff; }
.cat-green { --accent: #0b7a5e; --accent-soft: #e0f4ec; }
.cat-violet { --accent: #6d3fd0; --accent-soft: #f0eafe; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, canvas, video { max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--cobalt); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--cobalt-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-weight: 780; }
h2 { font-weight: 720; }
h3 { font-weight: 680; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--font-mono); font-size: 0.92em; }
:not(pre) > code { background: #edf0f7; border-radius: 5px; padding: 0.08em 0.36em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
[hidden] { display: none !important; }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }
.icon--filled { fill: var(--tape); stroke: #a87500; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-s); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 820px; }
.wrap--form { max-width: 480px; padding-top: 2.5rem; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.lead { font-size: 1.2rem; color: var(--ink-2); }

.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(6px);
}
.site-header__inner {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 20px;
  min-height: 68px; padding-top: 10px; padding-bottom: 10px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo__mark { width: 34px; height: 34px; }
.logo__text { font-family: var(--font-display); font-weight: 800; font-size: 1.32rem; letter-spacing: -0.025em; }

.site-search { position: relative; display: flex; align-items: center; max-width: 440px; min-width: 220px; width: 100%; justify-self: center; }
.site-search__icon { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.site-search__input {
  width: 100%; height: 44px; padding: 0 14px 0 42px; border: 1.5px solid var(--line-strong);
  background: var(--paper); border-radius: 999px; font-size: 1rem; transition: border-color .15s, background .15s;
}
.site-search__input:hover { border-color: var(--muted); }
.site-search__input:focus { outline: none; border-color: var(--cobalt); background: #fff; box-shadow: 0 0 0 3px var(--cobalt-soft); }
.site-search__input::-webkit-search-cancel-button { cursor: pointer; }

.search-pop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60; margin: 0; padding: 6px;
  list-style: none; background: #fff; border: 1.5px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow-tape); max-height: min(70vh, 460px); overflow-y: auto;
}
.search-pop__item a, .search-pop__empty {
  display: grid; grid-template-columns: 36px 1fr; gap: 2px 12px; align-items: center; padding: 9px 10px;
  border-radius: var(--radius-s); text-decoration: none; color: var(--ink);
}
.search-pop__item a .icon { grid-row: span 2; width: 36px; height: 36px; padding: 8px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.search-pop__name { font-weight: 650; line-height: 1.25; }
.search-pop__cat { font-size: 0.82rem; color: var(--muted); line-height: 1.2; }
.search-pop__item[aria-selected="true"] a, .search-pop__item a:hover { background: var(--cobalt-soft); }
.search-pop__empty { display: block; color: var(--muted); font-size: 0.95rem; }
.search-pop__all a { display: block; padding: 9px 10px; font-weight: 600; font-size: 0.92rem; border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 var(--radius-s) var(--radius-s); text-decoration: none; }
.search-pop__all[aria-selected="true"] a, .search-pop__all a:hover { background: var(--cobalt-soft); }

.main-nav { justify-self: end; }
.main-nav__toggle {
  display: none; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 1.5px solid var(--line-strong);
  border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600;
}
.main-nav__list { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; align-items: center; }
.main-nav__list a {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 999px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.95rem; white-space: nowrap;
}
.main-nav__list a:hover { background: var(--paper); color: var(--ink); }
.main-nav__list a[aria-current="page"] { background: var(--ink); color: #fff; }
.main-nav__cat { display: none; }

@media (min-width: 1380px) {
  .main-nav__cat { display: list-item; }
}

@media (max-width: 860px) {
  .site-header__inner { grid-template-columns: 1fr auto; }
  .site-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .main-nav__toggle { display: inline-flex; }
  .main-nav__list {
    display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% - 6px);
    flex-direction: column; align-items: stretch; gap: 2px; padding: 8px; background: #fff;
    border: 1.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-tape);
  }
  .main-nav.is-open .main-nav__list { display: flex; }
  .main-nav__list a { padding: 12px 14px; font-size: 1rem; border-radius: var(--radius-s); }
  .main-nav__cat { display: list-item; }
  .main-nav { position: static; }
  .site-header__inner { position: relative; }
}

.site-main { display: block; min-height: 60vh; padding-bottom: 3rem; }
.site-main:focus { outline: none; }
.flash-zone:empty { display: none; }
.flash-zone { padding-top: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 18px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 650; font-size: 0.98rem;
  line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .15s, border-color .15s;
}
.btn--primary { background: var(--cobalt); color: #fff; border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn--primary:hover { background: var(--cobalt-dark); color: #fff; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn--primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--paper); }
.btn--danger { background: #fff; color: var(--err); border-color: #e7b3b6; }
.btn--danger:hover { background: var(--err-soft); color: var(--err); border-color: var(--err); }
.btn--small { min-height: 36px; padding: 0 12px; font-size: 0.9rem; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .icon { width: 1.15em; height: 1.15em; }

.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem); background: #fff; border-bottom: 1px solid var(--line); }
.hero__inner > * { max-width: 860px; }
.hero__title { font-size: clamp(2.2rem, 5.6vw, 3.9rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; margin-bottom: 0.4em; max-width: 17ch; }
.hero__lead { font-size: clamp(1.08rem, 2vw, 1.28rem); color: var(--ink-2); max-width: 54ch; margin-bottom: 1.8rem; }
.site-search--hero { max-width: 760px; min-width: 0; justify-self: start; margin: 0; }
.site-search--hero .site-search__input {
  height: 62px; font-size: 1.08rem; padding-left: 52px; padding-right: 150px; background: #fff;
  border: 2px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--tape);
}
.site-search--hero .site-search__input:focus { box-shadow: 6px 6px 0 var(--tape), 0 0 0 4px var(--cobalt-soft); }
.site-search--hero .site-search__icon { left: 18px; width: 22px; height: 22px; color: var(--ink); }
.site-search__submit { position: absolute; right: 8px; min-height: 46px; box-shadow: none; border-radius: 11px; }
.site-search__submit:hover { box-shadow: none; transform: none; }
.hero__quick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 1.6rem; }
.hero__quick-label { font-size: 0.92rem; color: var(--muted); font-weight: 600; }

@media (max-width: 560px) {
  .site-search--hero .site-search__input { padding-right: 16px; height: 56px; font-size: 1rem; }
  .site-search--hero .site-search__submit { display: none; }
}

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip-list--center { justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: #fff;
  border: 1.5px solid var(--line-strong); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.93rem;
}
.chip .icon { color: var(--accent); width: 1.1em; height: 1.1em; }
.chip:hover { border-color: var(--ink); color: var(--ink); background: var(--accent-soft); }

.section { padding: clamp(2.2rem, 5vw, 3.6rem) 0 0; }
.section--compact { padding-top: 2.5rem; }
.section--tint { background: transparent; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.section__title { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 0; }
.section__title--small { font-size: 1.3rem; margin-bottom: 1rem; }
.link-more { font-weight: 650; text-decoration: none; display: inline-block; margin-top: 0.8rem; }
.section__head .link-more { margin-top: 0; }
.link-more:hover { text-decoration: underline; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.tool-grid > li { display: flex; }
.tool-card {
  display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 18px; background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tool-card:hover { color: var(--ink); border-color: var(--ink); box-shadow: 4px 4px 0 var(--accent-soft); transform: translate(-1px, -1px); }
.tool-card__icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.tool-card__icon .icon { width: 24px; height: 24px; }
.tool-card__title { font-size: 1.06rem; margin: 2px 0 4px; line-height: 1.25; }
.tool-card__desc { display: block; font-size: 0.92rem; color: var(--muted); line-height: 1.45; }

.cat-board { align-items: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.cat-panel { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-l); padding: 6px 6px 14px; border-top: 5px solid var(--accent); }
.cat-panel__head { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.cat-panel__head:hover { background: var(--accent-soft); color: var(--ink); }
.cat-panel__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #fff; flex: none; }
.cat-panel__title { font-size: 1.25rem; margin: 0; }
.cat-panel__count { font-size: 0.88rem; color: var(--muted); }
.cat-panel__list { margin: 0; padding: 0 14px; list-style: none; columns: 1; }
.cat-panel__list li { border-top: 1px solid var(--line); }
.cat-panel__list a { display: block; padding: 9px 0; color: var(--ink-2); text-decoration: none; font-weight: 550; }
.cat-panel__list a:hover { color: var(--accent); }

.promise { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 28px; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.promise li { padding-left: 0; }
.promise__icon { width: 30px; height: 30px; color: var(--cobalt); margin-bottom: 10px; }
.promise h3 { font-size: 1.15rem; margin-bottom: 0.35em; }
.promise p { color: var(--ink-2); margin: 0; }

.breadcrumbs { padding: 1.1rem 0 0.4rem; font-size: 0.9rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { display: inline-flex; align-items: center; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin: 0 6px 0 2px; color: var(--line-strong); }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

.page-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; padding: 1rem 0 1.6rem; flex-wrap: wrap; }
.page-head > div { flex: 1 1 380px; }
.page-head__title { font-size: clamp(1.9rem, 4.2vw, 2.7rem); letter-spacing: -0.03em; margin-bottom: 0.3em; }
.page-head__lead { color: var(--ink-2); font-size: 1.1rem; max-width: 64ch; margin: 0; }
.page-head--cat { justify-content: flex-start; }
.page-head--cat > div { flex: 1 1 300px; }
.page-head__icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: var(--accent); color: #fff; flex: none; }
.page-head__icon .icon { width: 30px; height: 30px; }

.tool-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: start; padding: 0.8rem 0 1.4rem; }
.tool-head__icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); border: 1.5px solid var(--accent); }
.tool-head__icon .icon { width: 30px; height: 30px; }
.tool-head__title { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.03em; margin-bottom: 0.25em; }
.tool-head__intro { color: var(--ink-2); font-size: 1.08rem; max-width: 68ch; margin: 0; }
.tool-head__fav { align-self: center; }
@media (max-width: 640px) {
  .tool-head { grid-template-columns: auto 1fr; }
  .tool-head__icon { width: 46px; height: 46px; border-radius: 12px; }
  .tool-head__fav { grid-column: 1 / -1; }
}

.tool-app {
  background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-l);
  box-shadow: 7px 7px 0 var(--tape); padding: clamp(16px, 3vw, 28px); min-height: 220px;
}
.tool-privacy { display: flex; align-items: center; gap: 8px; margin: 1rem 0 0; color: var(--muted); font-size: 0.9rem; }
.tool-privacy .icon { color: var(--ok); }

.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 5vw, 56px); margin-top: 2.6rem; align-items: start; }
.tool-aside { position: sticky; top: 92px; }
.tool-aside__title { font-size: 1.15rem; margin-bottom: 0.8rem; }
.tool-aside .tool-grid { grid-template-columns: 1fr; gap: 10px; }
.tool-aside .tool-card { padding: 14px; }
.tool-aside .tool-card__icon { width: 40px; height: 40px; }
@media (max-width: 960px) {
  .tool-layout { grid-template-columns: minmax(0, 1fr); }
  .tool-aside { position: static; }
  .tool-aside .tool-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); }
}

.prose { max-width: 72ch; }
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.03em; margin-top: 0.4rem; }
.prose h2 { font-size: 1.55rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.18rem; margin-top: 1.6rem; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--accent); }
.prose ol.steps { list-style: none; counter-reset: step; padding: 0; }
.prose ol.steps > li { counter-increment: step; position: relative; padding-left: 46px; margin-bottom: 1em; min-height: 32px; }
.prose ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
}
.prose code { overflow-wrap: anywhere; }
.prose pre { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; overflow-x: auto; max-width: 100%; }
.prose pre code { overflow-wrap: normal; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--paper); font-weight: 650; }
.prose .tip { border-left: 4px solid var(--tape); background: var(--tape-soft); padding: 12px 16px; border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.credits li { margin-bottom: 0.3em; }

.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 650; position: relative; font-family: var(--font-display); font-size: 1.08rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px; margin-top: -8px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .2s;
}
.faq__item[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq__answer { padding: 0 0 14px; color: var(--ink-2); }

.ad-slot { margin: 2rem auto 0; text-align: center; overflow: hidden; }
.ad-slot__label { display: block; font-size: 0.72rem; color: var(--muted); margin-bottom: 4px; }
.ad-h-small { min-height: 110px; }
.ad-h-medium { min-height: 270px; }
.ad-h-large { min-height: 300px; }
.ad-slot--top { margin-top: 1rem; }

.site-footer { background: var(--ink); color: #c9d0e3; margin-top: 4rem; padding: 3rem 0 1rem; font-size: 0.95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--tape); text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
.site-footer__grid ul { list-style: none; margin: 0; padding: 0; }
.site-footer__grid li { margin-bottom: 8px; }
.site-footer__title { color: #fff; font-size: 1rem; margin-bottom: 0.9rem; }
.site-footer__brand p { max-width: 38ch; margin-top: 12px; }
.logo--footer { color: #fff; }
.logo--footer:hover { color: #fff; text-decoration: none !important; }
.site-footer__bottom { border-top: 1px solid #2c3858; margin-top: 2.2rem; padding-top: 1rem; }
.site-footer__bottom p { margin: 0; font-size: 0.88rem; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--radius); border: 1.5px solid; margin: 0 0 1rem; }
.notice p, .notice ul { margin: 0; }
.notice ul { padding-left: 1.1em; }
.notice > .icon { margin-top: 2px; }
.notice--success { background: var(--ok-soft); border-color: #9fd5b9; color: #0a5c39; }
.notice--error { background: var(--err-soft); border-color: #efb4b7; color: #8c1820; }
.notice--info { background: var(--cobalt-soft); border-color: #b8c4f3; color: var(--cobalt-dark); }

.card { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-l); padding: clamp(18px, 3vw, 26px); margin-bottom: 1.4rem; }
.card__title { font-size: 1.25rem; }
.card--danger { border-color: #f0c4c6; }
.form-card__title { font-size: 1.8rem; }
.form-card__alt { margin: 1rem 0 0; text-align: center; font-size: 0.95rem; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; margin-top: 2.4rem; }

.form { display: grid; gap: 16px; }
.form__row { display: grid; gap: 16px; }
.form__row--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.form__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.form__actions form { display: inline; }
.form__help, .field__help { font-size: 0.86rem; color: var(--muted); margin: 0; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 650; font-size: 0.94rem; }
.field--trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fieldset { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0 0 12px; display: grid; gap: 10px; }
.fieldset legend { font-weight: 700; padding: 0 6px; font-family: var(--font-display); }

.input {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-s);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: var(--muted); }
.input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.input[aria-invalid="true"] { border-color: var(--err); }
.input--small { min-height: 36px; padding: 5px 9px; width: auto; }
select.input { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316203a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.input[type="color"] { padding: 4px; height: 44px; cursor: pointer; }
.input[type="number"] { font-variant-numeric: tabular-nums; }

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 0.97rem; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cobalt); flex: none; }
.switch input { width: 22px; height: 22px; accent-color: var(--cobalt); cursor: pointer; }

input[type="range"] { width: 100%; accent-color: var(--cobalt); height: 28px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.seg span { display: block; padding: 7px 13px; border-radius: 9px; font-weight: 650; font-size: 0.92rem; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { box-shadow: var(--focus); }
.seg label:hover span { color: var(--ink); }
.seg input:checked:hover + span { color: #fff; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1.5px solid var(--line); margin-bottom: 18px; }
.tabs [role="tab"] {
  border: 0; background: none; padding: 10px 14px; font-weight: 650; color: var(--muted); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -1.5px; border-radius: 8px 8px 0 0;
}
.tabs [role="tab"]:hover { color: var(--ink); background: var(--paper); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }

.dropzone {
  position: relative; display: grid; place-items: center; text-align: center; gap: 6px; padding: clamp(22px, 5vw, 40px) 18px;
  border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { box-shadow: var(--focus); }
.dropzone__icon { width: 40px; height: 40px; color: var(--accent); }
.dropzone__title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin: 0; }
.dropzone__hint { margin: 0; color: var(--muted); font-size: 0.9rem; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone--compact { padding: 14px; grid-auto-flow: column; gap: 12px; justify-content: center; }
.dropzone--compact .dropzone__icon { width: 24px; height: 24px; }
.dropzone--compact .dropzone__title { font-size: 1rem; }

.tool-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.tool-cols--side { grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); }
@media (max-width: 860px) { .tool-cols, .tool-cols--side { grid-template-columns: minmax(0, 1fr); } }
.tool-options { display: grid; gap: 16px; align-content: start; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.tool-actions--end { justify-content: flex-end; }
.tool-status { font-size: 0.92rem; color: var(--muted); margin: 10px 0 0; min-height: 1.4em; }
.tool-status--error { color: var(--err); font-weight: 600; }
.tool-status--ok { color: var(--ok); font-weight: 600; }
.range-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.range-row output { min-width: 4.2ch; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.inline-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.inline-fields .field { flex: 1 1 120px; }
.subhead { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin: 0 0 8px; }

.file-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.file-row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 8px 10px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff;
}
.file-row__thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--paper) center/12px 12px; border: 1px solid var(--line); }
.file-row__name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row__meta { font-size: 0.86rem; color: var(--muted); }
.file-row__meta .gain { color: var(--ok); font-weight: 650; }
.file-row__meta .loss { color: var(--err); font-weight: 650; }
.file-row__actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .file-row { grid-template-columns: 44px minmax(0, 1fr); } .file-row__thumb { width: 44px; height: 44px; } .file-row__actions { grid-column: 1 / -1; justify-content: flex-start; } }

.checker { background-color: #fff; background-image: linear-gradient(45deg, #e8ebf2 25%, transparent 25%), linear-gradient(-45deg, #e8ebf2 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e8ebf2 75%), linear-gradient(-45deg, transparent 75%, #e8ebf2 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.preview { display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 220px; overflow: hidden; }
.preview img, .preview canvas, .preview svg { max-height: 520px; object-fit: contain; display: block; }
.preview__empty { color: var(--muted); font-size: 0.95rem; text-align: center; padding: 30px 10px; }

.code-area {
  width: 100%; min-height: 260px; padding: 12px 14px; font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.55;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-s); background: #fbfcfe; resize: vertical; tab-size: 2; white-space: pre; overflow: auto;
}
.code-area:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); background: #fff; }
.code-area--wrap { white-space: pre-wrap; word-break: break-word; }
.code-area--short { min-height: 120px; }
.code-out { margin: 0; max-height: 520px; overflow: auto; }

.result-line {
  display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 9px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: #fff;
}
.result-line + .result-line { margin-top: 8px; }
.result-line__label { font-weight: 650; font-size: 0.9rem; color: var(--ink-2); }
.result-line__value { font-family: var(--font-mono); font-size: 0.92rem; overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 520px) { .result-line { grid-template-columns: minmax(0, 1fr) auto; } .result-line__label { grid-column: 1 / -1; } }

.copy-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1.5px solid var(--line-strong); background: #fff; cursor: pointer; color: var(--ink-2); flex: none; }
.copy-btn:hover { border-color: var(--ink); color: var(--ink); }
.copy-btn .icon { width: 18px; height: 18px; }

.issues { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.issue { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px 12px; border-radius: var(--radius-s); border: 1.5px solid #efb4b7; background: var(--err-soft); color: #7d1219; font-size: 0.95rem; }
.issue--warn { border-color: #f0d28a; background: var(--tape-soft); color: #6b4b00; }
.issue--ok { border-color: #9fd5b9; background: var(--ok-soft); color: #0a5c39; }
.issue__pos { font-family: var(--font-mono); font-weight: 700; white-space: nowrap; }
.issue button { all: unset; cursor: pointer; font-family: var(--font-mono); font-weight: 700; text-decoration: underline; }
.issue pre { margin: 6px 0 0; white-space: pre; overflow-x: auto; font-size: 0.85rem; color: var(--ink); background: #fff; border-radius: 6px; padding: 6px 8px; }

.kv { display: grid; grid-template-columns: minmax(130px, 34%) minmax(0, 1fr); margin: 0; border: 1.5px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.kv dt, .kv dd { margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.kv dt { background: var(--paper); font-weight: 650; color: var(--ink-2); }
.kv dd { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.kv dt:nth-last-of-type(1), .kv dd:last-child { border-bottom: 0; }

.table-wrap { overflow-x: auto; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 1rem; }
.table-wrap table, .table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th, .table td, .table-wrap th, .table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th, .table-wrap th { background: var(--paper); font-weight: 650; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .is-unread td { font-weight: 650; background: #fbfcff; }
.data-preview { max-height: 360px; overflow: auto; }
.data-preview td { font-family: var(--font-mono); font-size: 0.85rem; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--cobalt-soft); color: var(--cobalt-dark); }
.badge--error { background: var(--err-soft); color: var(--err); }
.badge--ok { background: var(--ok-soft); color: var(--ok); }

.meter { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; width: 0; background: var(--err); border-radius: 999px; transition: width .25s, background .25s; }

.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 12px; }
.progress > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; margin-top: 16px; }
.page-card { position: relative; display: grid; gap: 6px; padding: 8px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; }
.page-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.page-card canvas, .page-card img { width: 100%; height: 150px; object-fit: contain; background: var(--paper); border-radius: 6px; transition: transform .2s; }
.page-card__label { font-size: 0.8rem; color: var(--muted); text-align: center; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-card__tools { display: flex; justify-content: center; gap: 4px; }
.page-card__tools button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-2); }
.page-card__tools button:hover { border-color: var(--ink); color: var(--ink); }
.page-card__tools .icon { width: 16px; height: 16px; }
.page-card[draggable="true"] { cursor: grab; }
.page-card.is-dragging { opacity: .4; }
.page-card.is-drop { outline: 3px dashed var(--accent); outline-offset: 2px; }

.swatch { width: 100%; height: 120px; border-radius: var(--radius); border: 1.5px solid var(--line); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.swatches button { all: unset; cursor: pointer; display: grid; gap: 4px; font-family: var(--font-mono); font-size: 0.78rem; text-align: center; color: var(--ink-2); }
.swatches button span:first-child { height: 52px; border-radius: 9px; border: 1px solid rgba(0,0,0,.08); }
.swatches button:focus-visible span:first-child { box-shadow: var(--focus); }

.diff-out { font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.5; border: 1.5px solid var(--line); border-radius: var(--radius-s); overflow: auto; max-height: 620px; background: #fff; }
.diff-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.diff-table td { padding: 1px 8px; vertical-align: top; white-space: pre-wrap; word-break: break-word; }
.diff-table td.ln { width: 3.6em; color: var(--muted); text-align: right; user-select: none; background: var(--paper); border-right: 1px solid var(--line); }
.diff-table .add { background: #e6f6ec; }
.diff-table .del { background: #fdecec; }
.diff-table .empty { background: repeating-linear-gradient(45deg, #fafbfd, #fafbfd 5px, #f1f3f8 5px, #f1f3f8 10px); }
.diff-table ins { background: #a8e2bf; text-decoration: none; border-radius: 2px; }
.diff-table del { background: #f5b4b8; text-decoration: none; border-radius: 2px; }
.diff-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.92rem; margin: 10px 0; }
.diff-stats .plus { color: var(--ok); font-weight: 700; }
.diff-stats .minus { color: var(--err); font-weight: 700; }

.highlight-box { font-family: var(--font-mono); font-size: 0.9rem; white-space: pre-wrap; word-break: break-word; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: #fff; min-height: 140px; max-height: 460px; overflow: auto; line-height: 1.55; }
.highlight-box mark { background: #ffe08a; border-bottom: 2px solid #e0a800; border-radius: 2px; color: inherit; }
.highlight-box mark:nth-of-type(even) { background: #c9d6ff; border-bottom-color: var(--cobalt); }

.serp { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; font-family: Arial, sans-serif; }
.serp__site { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #202124; }
.serp__fav { width: 28px; height: 28px; border-radius: 50%; background: #f1f3f4; display: grid; place-items: center; }
.serp__fav .icon { width: 16px; height: 16px; }
.serp__url { font-size: 12px; color: #4d5156; }
.serp__title { color: #1a0dab; font-size: 20px; line-height: 1.3; margin: 6px 0 3px; font-family: Arial, sans-serif; font-weight: 400; letter-spacing: 0; }
.serp__desc { color: #4d5156; font-size: 14px; line-height: 1.58; margin: 0; }
.social-card { border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.social-card__img { aspect-ratio: 1.91 / 1; background: var(--paper); display: grid; place-items: center; color: var(--muted); font-size: 0.9rem; overflow: hidden; }
.social-card__img img { width: 100%; height: 100%; object-fit: cover; }
.social-card__body { padding: 10px 14px; background: #f2f3f5; }
.social-card__domain { font-size: 12px; text-transform: uppercase; color: #606770; }
.social-card__title { font-weight: 700; font-size: 16px; color: #1d2129; margin: 2px 0; line-height: 1.3; }
.social-card__desc { font-size: 14px; color: #606770; margin: 0; }
.counter { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--err); font-weight: 700; }

.md-preview { border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 14px 18px; background: #fff; min-height: 260px; max-height: 620px; overflow: auto; }
.md-preview img { max-width: 100%; }
.md-preview table { border-collapse: collapse; }
.md-preview th, .md-preview td { border: 1px solid var(--line); padding: 5px 9px; }
.md-preview pre { background: var(--paper); padding: 10px; border-radius: 6px; overflow: auto; }
.md-preview blockquote { border-left: 4px solid var(--line-strong); margin: 0 0 1em; padding-left: 12px; color: var(--ink-2); }

.unit-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.unit-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: #fff; }
.unit-list li.is-source { border-color: var(--accent); background: var(--accent-soft); }
.unit-list__name { color: var(--ink-2); font-size: 0.93rem; }
.unit-list__value { font-family: var(--font-mono); font-weight: 650; text-align: right; overflow-wrap: anywhere; }

.qr-out { display: grid; place-items: center; padding: 18px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; min-height: 300px; }
.qr-out canvas, .qr-out svg { width: min(100%, 320px); height: auto; image-rendering: pixelated; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 1.4rem; }
.stats__item { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stats__item dt { font-size: 0.88rem; color: var(--muted); font-weight: 600; }
.stats__item dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.9rem; font-weight: 750; line-height: 1; }
.stats__item small { font-size: 0.9rem; color: var(--muted); font-weight: 500; font-family: var(--font-body); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist__item { display: flex; gap: 10px; align-items: flex-start; }
.checklist__item .icon { margin-top: 3px; }
.checklist__item--ok .icon { color: var(--ok); }
.checklist__item--error .icon { color: var(--err); }
.checklist__item--info .icon { color: var(--cobalt); }
.admin { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; padding-top: 1.6rem; }
.admin-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; position: sticky; top: 90px; }
.admin-nav a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius-s); text-decoration: none; color: var(--ink-2); font-weight: 600; }
.admin-nav a:hover { background: #fff; color: var(--ink); }
.admin-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.admin__main .page-head__title { margin-bottom: 1rem; }
@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .admin-nav ul { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .admin-nav a { padding: 8px 12px; background: #fff; border: 1.5px solid var(--line); }
}
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.message__body { padding: 14px 16px; background: var(--paper); border-radius: var(--radius-s); margin: 12px 0; white-space: normal; }

.filter-bar { position: relative; max-width: 480px; margin-bottom: 1.6rem; }
.filter-bar .input { padding-left: 42px; border-radius: 999px; }
.filter-bar__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filter-empty { margin-bottom: 1.6rem; }
.cat-group { margin-bottom: 2.4rem; }
.cat-group__title { display: flex; align-items: center; gap: 12px; font-size: 1.45rem; margin-bottom: 1rem; }
.cat-group__title a { color: var(--ink); text-decoration: none; }
.cat-group__title a:hover { color: var(--accent); text-decoration: underline; }
.cat-group__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #fff; }
.cat-group__icon .icon { width: 20px; height: 20px; }

.search-page-form { display: flex; gap: 10px; max-width: 640px; margin-bottom: 2rem; }
.search-page-form .input { flex: 1; }
.empty-state { text-align: center; padding: 2.6rem 1rem; background: #fff; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-l); margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.35rem; }
.empty-state p { color: var(--ink-2); max-width: 60ch; margin-left: auto; margin-right: auto; }
.empty-state--small { padding: 1.6rem 1rem; text-align: left; }
.empty-state--small p { margin-left: 0; }
.empty-state--404 { margin-top: 2.5rem; border-style: solid; }
.empty-state--404 .search-page-form { margin: 1.6rem auto; }
.empty-state__code { font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 14vw, 7rem); line-height: 1; color: var(--cobalt); margin: 0 0 0.2em; letter-spacing: -0.05em; text-shadow: 5px 5px 0 var(--tape); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; padding: 11px 18px;
  background: var(--ink); color: #fff; border-radius: 999px; font-weight: 600; font-size: 0.95rem; box-shadow: 4px 4px 0 var(--tape);
  max-width: calc(100% - 32px);
}
.toast--error { background: var(--err); }

.install .card { margin-top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .ad-slot, .tool-aside, .skip-link { display: none !important; }
  body { background: #fff; }
  .tool-app { box-shadow: none; }
}

.compare { margin-top: 18px; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px; background: #fff; }
.compare__head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.compare__title { font-weight: 700; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare__stage { position: relative; overflow: hidden; border-radius: 8px; display: grid; width: fit-content; max-width: 100%; margin: 0 auto; }
.compare__stage img { display: block; max-width: 100%; max-height: 560px; width: auto; height: auto; }
.compare__stage > img { grid-area: 1 / 1; }
.compare__line { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: var(--tape); left: 50%; pointer-events: none; }
.compare__labels { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.compare__zoom { display: flex; gap: 8px; align-items: center; font-size: 0.9rem; }

.crop-stage { display: grid; place-items: center; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #eef1f7; min-height: 280px; }
.crop-wrap { position: relative; display: inline-block; overflow: hidden; line-height: 0; touch-action: none; user-select: none; max-width: 100%; }
.crop-wrap canvas { display: block; max-width: 100%; max-height: 560px; width: auto; height: auto; }
.crop-box { position: absolute; border: 2px solid #fff; outline: 1px solid rgba(22, 32, 58, .6); box-shadow: 0 0 0 9999px rgba(22, 32, 58, .5); cursor: move; touch-action: none; }
.crop-box:focus-visible { outline: 3px solid var(--tape); }
.crop-box::before, .crop-box::after { content: ""; position: absolute; border: 0 dashed rgba(255, 255, 255, .7); pointer-events: none; }
.crop-box::before { left: 33.33%; right: 33.33%; top: 0; bottom: 0; border-left-width: 1px; border-right-width: 1px; }
.crop-box::after { top: 33.33%; bottom: 33.33%; left: 0; right: 0; border-top-width: 1px; border-bottom-width: 1px; }
.crop-handle { position: absolute; width: 18px; height: 18px; background: #fff; border: 2px solid var(--ink); border-radius: 4px; z-index: 1; }
.crop-handle[data-h="nw"] { left: -3px; top: -3px; cursor: nwse-resize; }
.crop-handle[data-h="ne"] { right: -3px; top: -3px; cursor: nesw-resize; }
.crop-handle[data-h="sw"] { left: -3px; bottom: -3px; cursor: nesw-resize; }
.crop-handle[data-h="se"] { right: -3px; bottom: -3px; cursor: nwse-resize; }
.icon-row { display: flex; flex-wrap: wrap; gap: 8px; }

.fav-previews { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; }
.fav-previews figure { margin: 0; display: grid; gap: 6px; justify-items: center; font-size: 0.8rem; color: var(--muted); }
.fav-previews canvas { display: block; image-rendering: auto; }
.fav-previews .is-tiny canvas { image-rendering: pixelated; }
.fav-tab { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; background: #e9ecf3; border-radius: 10px 10px 0 0; font-size: 0.85rem; max-width: 260px; }
.fav-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.exif-card { display: grid; gap: 14px; margin-top: 16px; }
.exif-card__head { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.exif-card__head .file-row__thumb { width: 64px; height: 64px; }
.exif-card__title { font-size: 1.1rem; margin: 0 0 2px; overflow-wrap: anywhere; }
.exif-card__head p { margin: 0; }
.exif-card .notice { margin: 0; }
.exif-card__all summary { cursor: pointer; font-weight: 650; padding: 4px 0 10px; }
@media (max-width: 600px) { .exif-card__head { grid-template-columns: 52px minmax(0, 1fr); } .exif-card__head .btn { grid-column: 1 / -1; } }

.tool-options > [role="tabpanel"] { display: grid; gap: 16px; }
.pos-grid { display: grid; grid-template-columns: repeat(3, 40px); gap: 4px; }
.pos-grid label { position: relative; width: 40px; height: 32px; }
.pos-grid input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pos-grid span { display: block; width: 100%; height: 100%; border-radius: 6px; border: 1.5px solid var(--line-strong); background: #fff; }
.pos-grid span::after { content: ""; display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); margin: 10px auto 0; }
.pos-grid input:checked + span { border-color: var(--ink); background: var(--accent-soft); }
.pos-grid input:checked + span::after { background: var(--accent); }
.pos-grid input:focus-visible + span { box-shadow: var(--focus); }
.pos-grid input:disabled + span { opacity: .4; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.thumbs button { all: unset; cursor: pointer; border-radius: 8px; border: 2px solid transparent; line-height: 0; }
.thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.thumbs button:focus-visible { box-shadow: var(--focus); }
.thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }

.mt-l { margin-top: 22px; }
.page-card__thumb { all: unset; display: block; cursor: pointer; border-radius: 6px; position: relative; }
.page-card__thumb:focus-visible { box-shadow: var(--focus); }
.page-card__thumb canvas { display: block; }
.page-card__num { position: absolute; top: 6px; left: 6px; background: var(--ink); color: #fff; font-size: 0.75rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; line-height: 1.5; }
.page-card.is-selected .page-card__num { background: var(--accent); }
.page-card__check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; display: grid; place-items: center; }
.page-card.is-selected .page-card__check { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-card__check .icon { width: 14px; height: 14px; opacity: 0; }
.page-card.is-selected .page-card__check .icon { opacity: 1; }

.code-toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; margin-bottom: 14px; }
.code-toolbar .field { min-width: 170px; }
.code-toolbar__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
@media (max-width: 700px) { .code-toolbar__actions { margin-left: 0; } }
.code-editor { display: grid; grid-template-columns: auto minmax(0, 1fr); border: 1.5px solid var(--line-strong); border-radius: var(--radius-s); background: #fbfcfe; overflow: hidden; }
.code-editor:focus-within { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.code-editor__gutter { margin: 0; padding: 12px 8px 12px 10px; min-width: 3.2em; text-align: right; color: #8a93ab; background: var(--paper); border-right: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.55; overflow: hidden; user-select: none; white-space: pre; }
.code-editor__area { border: 0; border-radius: 0; min-height: 360px; background: transparent; }
.code-editor__area:focus { box-shadow: none; background: #fff; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn:focus-within { box-shadow: var(--focus); }

.conv-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: end; margin-bottom: 12px; }
.conv-head__swap { margin-bottom: 4px; }
.conv-options { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 16px; }
.conv-options summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.conv-options__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px 20px; padding: 10px 0 6px; align-items: end; }
.field-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 36px; }
.field-head > label:first-child { font-weight: 650; font-size: 0.94rem; }

.result-line.is-match { border-color: #6fc49a; background: var(--ok-soft); }
.regex-line { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 1.15rem; }
.regex-line__slash { color: var(--muted); font-weight: 700; }
.regex-line__pattern { font-family: var(--font-mono); font-size: 1rem; flex: 1; }
.regex-line__flags { color: var(--accent); font-weight: 700; min-width: 3ch; }
.regex-line .input[aria-invalid="true"] { border-color: var(--err); background: var(--err-soft); }
.diff-table col.ln-col { width: 3.6em; }
.now-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; margin-bottom: 18px; }
.now-box .result-line { grid-template-columns: minmax(0, 1fr) auto; }
.now-box .result-line__value { font-size: 1.25rem; font-weight: 700; }
.now-box .result-line__label { grid-column: 1 / -1; }

.cron-expr { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700; letter-spacing: 0.04em; min-height: 56px; }
.cron-fields { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.cron-fields .input { font-family: var(--font-mono); }
@media (max-width: 760px) { .cron-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cron-result { margin-top: 18px; padding: 16px 18px; border-radius: var(--radius); background: var(--accent-soft); border: 1.5px solid var(--accent); font-family: var(--font-display); font-size: 1.3rem; font-weight: 650; line-height: 1.35; }
.cron-result.is-error { background: var(--err-soft); border-color: #efb4b7; color: #8c1820; font-family: var(--font-body); font-size: 1rem; }
.cron-next { margin: 0; padding-left: 1.6em; font-variant-numeric: tabular-nums; }
.cron-next li { padding: 4px 0; border-bottom: 1px solid var(--line); }

.pw-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); }
.pw-output { font-family: var(--font-mono); font-size: clamp(1.05rem, 2.6vw, 1.45rem); font-weight: 700; overflow-wrap: anywhere; min-height: 1.5em; }
@media (max-width: 600px) { .pw-main { grid-template-columns: 1fr; } }
#pt-tips { margin: 8px 0 0; padding-left: 1.2em; color: var(--ink-2); }

.contrast-box { border-radius: var(--radius); padding: 16px 18px; border: 1.5px solid var(--line); margin: 12px 0; }
.contrast-box p { margin: 0 0 6px; }
.contrast-box__big { font-size: 1.5rem; font-weight: 700; }
.palette-row { margin-bottom: 14px; }
.palette-row__title { font-weight: 650; font-size: 0.92rem; margin: 0 0 6px; }
#co-canvas { cursor: crosshair; max-width: 100%; }
.input[type="color"] { max-width: 160px; }
@media (max-width: 860px) { .tool-cols--side > :last-child { order: -1; } }
@media (max-width: 640px) { .tool-head__intro { grid-column: 1 / -1; } .tool-head__text { display: contents; } .tool-head__title { align-self: center; margin: 0; } }
