/* ==========================================================================
   Bing Rank — public site styles (soft UI)
   Brand: #235FAF (blue) · #02B7E9 (sky) · #00C7CC (teal) · Inter
   ========================================================================== */

:root {
  --ink: #12274a;
  --ink-2: #33486b;
  --muted: #55678a;
  --blue: #235faf;
  --blue-dark: #1a4a8a;
  --sky: #02b7e9;
  --teal: #00c7cc;
  --teal-dark: #00777b;
  --bg: #edf2f9;
  --surface: #f6f9fd;
  --white: #ffffff;
  --line: #d6e1ef;
  --line-soft: #e4ebf5;
  --ok: #00777b;
  --ok-bg: #dcf6f6;
  --warn: #8a5a00;
  --warn-bg: #fff3d6;
  --bad: #b42323;
  --bad-bg: #fde7e7;
  --grad: linear-gradient(135deg, #235faf 0%, #02b7e9 64%, #00c7cc 100%);
  --grad-soft: linear-gradient(135deg, rgba(35, 95, 175, .08), rgba(0, 199, 204, .08));
  --sd: rgba(35, 95, 175, .16);
  --sl: rgba(255, 255, 255, .96);
  --raise: 12px 12px 28px var(--sd), -10px -10px 24px var(--sl);
  --raise-sm: 6px 6px 14px var(--sd), -6px -6px 14px var(--sl);
  --raise-xs: 3px 3px 8px var(--sd), -3px -3px 8px var(--sl);
  --inset: inset 4px 4px 9px rgba(35, 95, 175, .13), inset -4px -4px 9px rgba(255, 255, 255, .92);
  --inset-sm: inset 2px 2px 5px rgba(35, 95, 175, .14), inset -2px -2px 5px rgba(255, 255, 255, .9);
  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --wrap: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "cv11", "ss03";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
p { margin: 0 0 1rem; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.05rem); line-height: 1.1; font-weight: 800; letter-spacing: -.028em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1.1vw, 2rem); line-height: 1.2; font-weight: 750; letter-spacing: -.02em; }
h3 { font-size: 1.2rem; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }
h4 { font-size: 1.05rem; font-weight: 700; }
small { font-size: .875rem; }
hr { border: 0; height: 1px; background: var(--line); margin: 2rem 0; }

:focus-visible { outline: 3px solid rgba(2, 183, 233, .6); outline-offset: 2px; border-radius: 6px; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }

.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;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header { position: sticky; top: 0; z-index: 50; padding-top: 12px; background: linear-gradient(var(--bg) 70%, rgba(237, 242, 249, 0)); }

.nav-bar {
  display: flex; align-items: center; gap: 16px;
  min-height: 64px; padding: 8px 10px 8px 18px;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--raise-sm);
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; line-height: 1; }
.brand:hover { color: var(--ink); }

.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav a, .main-nav .nav-drop-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 12px;
  font: 600 .95rem/1 var(--font); color: var(--ink-2); text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.main-nav a:hover, .main-nav .nav-drop-btn:hover { color: var(--blue); background: rgba(35, 95, 175, .06); }
.main-nav a[aria-current="page"], .main-nav .is-active > .nav-drop-btn { color: var(--blue); box-shadow: var(--inset-sm); background: var(--bg); }

.nav-drop { position: relative; }
.nav-drop-btn .icon { width: 1em; height: 1em; transition: transform .2s; }
.nav-drop-menu {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  width: 330px; padding: 10px; display: none;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--raise);
}
.nav-drop.open .nav-drop-menu { display: block; }
.nav-drop.open .nav-drop-btn .icon { transform: rotate(180deg); }
@media (hover: hover) and (min-width: 961px) {
  .nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { display: block; }
}
.nav-drop-menu a { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 14px; line-height: 1.3; }
.nav-drop-menu .tool-ico {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--bg); box-shadow: var(--inset-sm); color: var(--blue); flex: none;
}
.nav-drop-menu strong { display: block; color: var(--ink); font-size: .95rem; }
.nav-drop-menu small { color: var(--muted); font-weight: 500; font-size: .82rem; }

.nav-cta { margin-left: 6px; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--surface); color: var(--ink); box-shadow: var(--raise-xs);
  align-items: center; justify-content: center;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-bar .nav-cta { display: none; }
  .main-nav {
    position: absolute; left: 16px; right: 16px; top: calc(100% + 8px);
    display: none; padding: 12px; max-height: calc(100vh - 100px); overflow-y: auto;
    background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--raise);
  }
  .nav-open .main-nav { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a, .main-nav .nav-drop-btn { width: 100%; padding: 13px 14px; font-size: 1rem; justify-content: flex-start; }
  .nav-drop-btn { justify-content: space-between !important; }
  .nav-drop-menu { position: static; transform: none; width: auto; box-shadow: none; padding: 0 0 6px 8px; background: none; }
  .site-header .wrap { position: relative; }
}

/* --------------------------------------------------------------------------
   Buttons, fields
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border: 0; border-radius: var(--r-md);
  font: 700 1rem/1.1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:disabled { cursor: progress; opacity: .7; }
.btn-primary { color: #fff; background: var(--grad); box-shadow: 0 10px 22px rgba(2, 133, 200, .32), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-primary:hover { color: #fff; filter: brightness(1.05); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(2, 133, 200, .3), inset 0 2px 6px rgba(0, 0, 0, .15); }
.btn-soft { color: var(--blue); background: var(--surface); box-shadow: var(--raise-xs); }
.btn-soft:hover { color: var(--blue-dark); box-shadow: var(--raise-sm); }
.btn-soft:active { box-shadow: var(--inset-sm); }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: .9rem; border-radius: 12px; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .field-label { font-weight: 650; font-size: .92rem; color: var(--ink-2); }
.field .hint { font-size: .82rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 16px;
  font: 500 1rem/1.4 var(--font); color: var(--ink);
  background: var(--bg); border: 1px solid transparent; border-radius: var(--r-md);
  box-shadow: var(--inset); transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333486b' stroke-width='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 14px center; background-size: 18px;
}
.input::placeholder, .textarea::placeholder { color: #8394b1; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--sky); box-shadow: var(--inset), 0 0 0 4px rgba(2, 183, 233, .18); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--bad); }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 550; color: var(--ink-2); cursor: pointer; user-select: none; }
.check input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; border-radius: 7px; background: var(--bg); box-shadow: var(--inset-sm); cursor: pointer; display: grid; place-items: center; }
.check input:checked { background: var(--grad); box-shadow: none; }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
.check input:focus-visible { outline: 3px solid rgba(2, 183, 233, .6); outline-offset: 2px; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); font-size: .95rem; line-height: 1.5; }
.notice .icon { margin-top: 2px; }
.notice-ok { background: var(--ok-bg); color: #054f52; }
.notice-warn { background: var(--warn-bg); color: #5c3c00; }
.notice-bad { background: var(--bad-bg); color: #7a1515; }
.notice-info { background: #e3efff; color: #163d73; }

/* --------------------------------------------------------------------------
   Page sections
   -------------------------------------------------------------------------- */

main { display: block; }
.section { padding-block: clamp(40px, 6vw, 72px); }
.section-tight { padding-block: clamp(28px, 4vw, 44px); }
.section-head { max-width: 680px; margin-bottom: 28px; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.center { text-align: center; margin-inline: auto; }

.hero { padding-top: clamp(28px, 5vw, 56px); padding-bottom: 8px; text-align: center; }
.hero h1 { max-width: 860px; margin-inline: auto; }
.hero .lead { max-width: 760px; margin: 0 auto; font-size: clamp(1.02rem, .95rem + .35vw, 1.18rem); color: var(--ink-2); line-height: 1.65; }

.page-hero { padding-top: clamp(24px, 4vw, 44px); padding-bottom: 10px; }
.page-hero h1 { max-width: 820px; }
.page-hero .lead { max-width: 720px; color: var(--ink-2); font-size: 1.08rem; margin: 0; }

.breadcrumbs { font-size: .86rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0; padding: 0; align-items: center; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid #9aa9c2; border-top: 1.5px solid #9aa9c2; transform: rotate(45deg); margin-right: 2px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue); text-decoration: underline; }

.card { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--raise); }
.card-pad { padding: clamp(20px, 3.4vw, 34px); }

/* --------------------------------------------------------------------------
   Tool panel
   -------------------------------------------------------------------------- */

.tool { max-width: 1000px; margin: 30px auto 0; text-align: left; }
.tool-panel { padding: clamp(18px, 3vw, 30px); }
.tool-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.tool-grid .span-2 { grid-column: 1 / -1; }
.tool-row { display: grid; gap: 16px; grid-template-columns: 1.4fr .9fr auto; align-items: end; margin-top: 16px; }
.tool-row-3 { grid-template-columns: 1.4fr .8fr; }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.tool-actions .btn-primary { min-width: 220px; min-height: 54px; font-size: 1.05rem; }
.tool-foot { margin-top: 14px; font-size: .84rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
@media (max-width: 760px) {
  .tool-grid, .tool-row, .tool-row-3 { grid-template-columns: 1fr; }
  .tool-actions .btn-primary { width: 100%; }
}

.tool-status { margin-top: 18px; }
.loading { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--bg); box-shadow: var(--inset); color: var(--ink-2); font-weight: 600; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(35, 95, 175, .18); border-top-color: var(--sky); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Result: rank dial + summary */
.results { margin-top: 26px; }
.rank-result { display: grid; grid-template-columns: 220px 1fr; gap: clamp(20px, 3vw, 36px); align-items: center; padding: clamp(20px, 3vw, 32px); }
@media (max-width: 700px) { .rank-result { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

.dial {
  --p: 0; --c1: #02b7e9; --c2: #235faf;
  position: relative; width: 200px; height: 200px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--raise); display: grid; place-items: center;
}
.dial::before {
  content: ""; position: absolute; inset: 14px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--c1), var(--c2) calc(var(--p) * 1%), rgba(35, 95, 175, .09) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 14px), #000 calc(100% - 13px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 14px), #000 calc(100% - 13px));
}
.dial-core {
  position: relative; width: 132px; height: 132px; border-radius: 50%;
  background: var(--bg); box-shadow: var(--inset);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.dial-num { font-size: 3rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.dial-num small { font-size: 1.4rem; font-weight: 700; color: var(--muted); margin-right: 1px; }
.dial-label { margin-top: 6px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.dial.is-miss { --c1: #b6c3d7; --c2: #8ea1bd; }
.dial.is-miss .dial-num { font-size: 2.1rem; color: var(--ink-2); }

.rank-summary h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); margin-bottom: 10px; }
.rank-summary p { color: var(--ink-2); margin-bottom: 10px; }
.rank-url { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg); box-shadow: var(--inset-sm); word-break: break-all; margin: 12px 0; text-align: left; }
.rank-url strong { display: block; color: var(--ink); word-break: normal; overflow-wrap: anywhere; }
.rank-url a { font-size: .9rem; color: var(--teal-dark); }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 700px) { .meta-row { justify-content: center; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--bg); box-shadow: var(--inset-sm); font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.chip-you { background: var(--grad); color: #fff; box-shadow: none; }

/* SERP list */
.serp-wrap { margin-top: 22px; padding: clamp(16px, 2.6vw, 26px); }
.serp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.serp-head h3 { margin: 0; }
.serp-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.serp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.serp-item { display: grid; grid-template-columns: 46px 1fr; gap: 14px; padding: 14px; border-radius: var(--r-md); }
.serp-item + .serp-item { border-top: 1px solid var(--line-soft); }
.serp-pos { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg); box-shadow: var(--inset-sm); font-weight: 750; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.serp-title { font-weight: 650; font-size: 1.02rem; line-height: 1.35; color: var(--blue); text-decoration: none; overflow-wrap: anywhere; }
.serp-title:hover { text-decoration: underline; }
.serp-url { display: block; font-size: .85rem; color: var(--teal-dark); margin: 2px 0 4px; overflow-wrap: anywhere; }
.serp-snippet { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.5; }
.serp-item.is-you { background: linear-gradient(90deg, rgba(0, 199, 204, .12), rgba(2, 183, 233, .05)); border-top-color: transparent; box-shadow: inset 4px 0 0 var(--teal); }
.serp-item.is-you + .serp-item { border-top-color: transparent; }
.serp-item.is-you .serp-pos { background: var(--grad); color: #fff; box-shadow: none; }

.data-note { font-size: .82rem; color: var(--muted); margin-top: 14px; }

/* Tables (bulk tool, suggestions) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-md); }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data-table th { text-align: left; font-size: .8rem; font-weight: 700; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .num { font-variant-numeric: tabular-nums; font-weight: 750; }
.pos-pill { display: inline-flex; min-width: 46px; justify-content: center; padding: 4px 10px; border-radius: 999px; font-weight: 750; font-size: .9rem; font-variant-numeric: tabular-nums; }
.pos-top3 { background: var(--grad); color: #fff; }
.pos-top10 { background: #d8f3fb; color: #0b4f6b; }
.pos-deep { background: #e7edf6; color: var(--ink-2); }
.pos-miss { background: #eef1f6; color: var(--muted); font-weight: 600; }
.pos-err { background: var(--bad-bg); color: var(--bad); font-weight: 600; }

.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-strip > div { padding: 16px; border-radius: var(--r-md); background: var(--bg); box-shadow: var(--inset-sm); }
.stat-strip b { display: block; font-size: 1.6rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-strip span { font-size: .82rem; color: var(--muted); font-weight: 600; }
@media (max-width: 600px) { .stat-strip { grid-template-columns: 1fr; } }

.kw-groups { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.kw-group h4 { margin: 0 0 8px; display: flex; justify-content: space-between; gap: 8px; }
.kw-group h4 span { color: var(--muted); font-weight: 600; font-size: .85rem; }
.kw-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; border-radius: var(--r-md); background: var(--bg); box-shadow: var(--inset-sm); }
.kw-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line-soft); font-size: .93rem; }
.kw-list li:last-child { border-bottom: 0; }
.kw-list button { border: 0; background: none; color: var(--blue); cursor: pointer; font: 600 .8rem var(--font); padding: 0; white-space: nowrap; }

/* --------------------------------------------------------------------------
   Content blocks
   -------------------------------------------------------------------------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.steps li { counter-increment: step; padding: 26px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--raise-sm); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px;
  border-radius: 14px; background: var(--bg); box-shadow: var(--inset-sm); font-weight: 800; color: var(--blue); font-size: 1.1rem;
}
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.tick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.tick-list li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.tick-list .icon { width: 22px; height: 22px; color: var(--teal-dark); margin-top: 2px; }
.tick-list strong { color: var(--ink); }
.tick-list span { color: var(--ink-2); }

.tool-cards { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .tool-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tool-cards { grid-template-columns: 1fr; } }
.tool-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--raise-sm); text-decoration: none; color: var(--ink); transition: box-shadow .2s; }
.tool-card:hover { color: var(--ink); box-shadow: var(--raise); }
.tool-card .tool-ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--bg); box-shadow: var(--inset-sm); color: var(--blue); }
.tool-card .tool-ico .icon { width: 24px; height: 24px; }
.tool-card h3 { margin: 4px 0 0; font-size: 1.08rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.tool-card .more { margin-top: auto; padding-top: 6px; font-weight: 650; font-size: .92rem; color: var(--blue); }

.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--raise-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .2s; color: var(--blue); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq .faq-a { padding: 0 22px 18px; color: var(--ink-2); }
.faq .faq-a p:last-child { margin-bottom: 0; }

/* Prose (blog posts, legal pages, homepage text) */
.prose { font-size: 1.05rem; line-height: 1.75; color: var(--ink-2); max-width: 74ch; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 1.9em 0 .55em; color: var(--ink); }
.prose h3 { margin: 1.6em 0 .5em; font-size: 1.25rem; color: var(--ink); }
.prose h4 { margin: 1.4em 0 .4em; color: var(--ink); }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li > p { margin: 0; }
.prose li.ql-indent-1 { margin-left: 1.5em; } .prose li.ql-indent-2 { margin-left: 3em; } .prose li.ql-indent-3 { margin-left: 4.5em; }
.prose .ql-align-center { text-align: center; } .prose .ql-align-right { text-align: right; } .prose .ql-align-justify { text-align: justify; }
.prose a { color: var(--blue); font-weight: 550; }
.prose strong { color: var(--ink); }
.prose img { border-radius: var(--r-md); margin: 1.4em auto; }
.prose blockquote { margin: 1.5em 0; padding: 14px 20px; border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--grad-soft); border-left: 4px solid var(--sky); color: var(--ink); }
.prose code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9em; background: #e3eaf4; padding: 2px 6px; border-radius: 6px; }
.prose pre { background: var(--ink); color: #e6eefb; padding: 16px; border-radius: var(--r-md); overflow-x: auto; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; }
.prose thead th, .prose tr:first-child th { background: #e6eefa; color: var(--ink); }
.prose tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .5); }
.prose hr { margin: 2em 0; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--r-md); margin: 1.4em 0; }

.home-text { padding: clamp(24px, 4vw, 48px); }
.home-text .prose { max-width: 78ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   Blog
   -------------------------------------------------------------------------- */

.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 3.4vw, 44px); align-items: start; }
@media (max-width: 1000px) { .with-sidebar { grid-template-columns: 1fr; } }

.post-grid { display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .post-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .post-grid, .post-grid.cols-3 { grid-template-columns: 1fr; } }

.post-card { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--raise-sm); overflow: hidden; }
.post-card .thumb { display: block; aspect-ratio: 16 / 9; background: var(--grad-soft); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .thumb img { transform: scale(1.03); }
.post-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h2, .post-card h3 { font-size: 1.12rem; line-height: 1.35; margin: 0; letter-spacing: -.01em; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--blue); }
.post-card p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.6; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); font-weight: 550; margin-top: auto; padding-top: 6px; }
.post-meta span { display: inline-flex; align-items: center; gap: 5px; }
.cat-chip { align-self: flex-start; display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; color: var(--blue); background: #e2ecfa; text-decoration: none; }
.cat-chip:hover { background: #d3e3f8; color: var(--blue-dark); }

.post-head { margin-bottom: 24px; }
.post-head h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
.post-head .post-meta { margin-top: 12px; padding: 0; font-size: .9rem; }
.post-figure { margin: 0 0 28px; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--raise-sm); background: var(--grad-soft); }
.post-figure img { width: 100%; max-height: 520px; object-fit: cover; }
.post-body { padding: clamp(20px, 3.6vw, 40px); }
.post-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.share > span { font-weight: 700; font-size: .92rem; margin-right: 4px; }
.share a, .share button { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; cursor: pointer; background: var(--surface); box-shadow: var(--raise-xs); color: var(--ink-2); }
.share a:hover, .share button:hover { color: var(--blue); }
.draft-banner { margin-bottom: 18px; }

.cta-box { margin-top: 30px; padding: 26px; border-radius: var(--r-lg); background: var(--grad); color: #fff; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.cta-box h3 { color: #fff; margin: 0 0 4px; }
.cta-box p { margin: 0; color: rgba(255, 255, 255, .9); }
.cta-box .btn { background: #fff; color: var(--blue); box-shadow: 0 8px 18px rgba(18, 39, 74, .2); }
.cta-box .btn:hover { color: var(--blue-dark); }

.sidebar { display: grid; gap: 22px; }
.widget { padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--raise-sm); }
.widget h2 { font-size: 1.05rem; margin-bottom: 14px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget-links li + li { border-top: 1px solid var(--line-soft); }
.widget-links a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px; text-decoration: none; color: var(--ink-2); font-weight: 550; font-size: .95rem; }
.widget-links a:hover { color: var(--blue); }
.widget-links .count { min-width: 28px; text-align: center; padding: 1px 8px; border-radius: 999px; background: var(--bg); box-shadow: var(--inset-sm); font-size: .78rem; color: var(--muted); font-weight: 700; }
.mini-posts li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.mini-posts li + li { margin-top: 14px; }
.mini-posts img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.mini-posts .ph { width: 64px; height: 64px; border-radius: 12px; background: var(--grad-soft); }
.mini-posts a { color: var(--ink); text-decoration: none; font-weight: 650; font-size: .92rem; line-height: 1.35; display: block; }
.mini-posts a:hover { color: var(--blue); }
.mini-posts small { color: var(--muted); font-size: .78rem; }
.search-form { display: flex; gap: 8px; }
.search-form .input { min-height: 46px; }
.search-form .btn { min-height: 46px; padding: 10px 14px; }
.widget-cta { background: var(--grad); color: #fff; box-shadow: var(--raise-sm); }
.widget-cta h2 { color: #fff; }
.widget-cta p { color: rgba(255, 255, 255, .92); font-size: .93rem; }
.widget-cta .btn { background: #fff; color: var(--blue); width: 100%; }

.pager ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; margin: 34px 0 0; }
.pager a, .pager .current, .pager .gap { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; border-radius: 12px; text-decoration: none; font-weight: 650; }
.pager a { background: var(--surface); box-shadow: var(--raise-xs); color: var(--ink-2); }
.pager a:hover { color: var(--blue); }
.pager .current { background: var(--grad); color: #fff; }
.pager .gap { color: var(--muted); }

.empty { padding: 40px 24px; text-align: center; color: var(--muted); }

/* --------------------------------------------------------------------------
   Contact / legal
   -------------------------------------------------------------------------- */

.contact-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: clamp(20px, 3vw, 36px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.legal-wrap { padding: clamp(22px, 4vw, 52px); }
.legal-wrap .prose { max-width: 80ch; }
.legal-updated { font-size: .9rem; color: var(--muted); margin-bottom: 1.6em; }
.toc { padding: 18px 22px; border-radius: var(--r-md); background: var(--bg); box-shadow: var(--inset-sm); margin-bottom: 2em; }
.toc ol { margin: 6px 0 0; padding-left: 1.3em; columns: 2; column-gap: 28px; font-size: .95rem; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* --------------------------------------------------------------------------
   Ads
   -------------------------------------------------------------------------- */

.ad-slot { display: block; width: 100%; max-width: 100%; overflow: hidden; margin-inline: auto; text-align: center; }
.ad-slot > ins.adsbygoogle[style*="display:block"], .ad-slot > ins.adsbygoogle[style*="display: block"] { width: 100%; }
.ad-slot--header { margin-top: 14px; }
.ad-slot--below_tool { margin-top: 28px; }
.ad-slot--footer { margin-block: 36px 0; }
.ad-slot--sidebar { min-height: 0; }
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.ad-slot ins.adsbygoogle { max-width: 100%; }

.ad-slot--preview .ad-preview {
  width: 728px; max-width: 100%; height: 90px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center;
  background: #ffe600; color: #3a3000; border: 2px dashed #b89c00; border-radius: 10px; font-size: .84rem; padding: 8px;
}
.ad-slot--preview .ad-preview strong { font-size: .95rem; }
.ad-slot--sidebar.ad-slot--preview .ad-preview { width: 300px; height: 250px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { margin-top: clamp(48px, 6vw, 80px); background: var(--ink); color: #c4d3ea; border-radius: 32px 32px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-block: 48px 28px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { max-width: 380px; font-size: .95rem; color: #b3c4df; }
.site-footer h2 { font-size: .95rem; color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #c4d3ea; text-decoration: none; font-size: .95rem; }
.site-footer a:hover { color: #8fe3f7; text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 20px 28px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .86rem; color: #9fb2d1; }
.footer-bottom nav ul { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-bottom a { font-size: .86rem; }
.disclaimer { font-size: .8rem; color: #8ea3c4; }

/* Admin bar (shown on the public site to a signed-in admin) */
.admin-bar { background: #0d1c37; color: #d7e4f8; font-size: .82rem; }
.admin-bar .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: space-between; min-height: 36px; padding-block: 6px; }
.admin-bar a { color: #8fe3f7; text-decoration: none; font-weight: 600; }
.admin-bar a:hover { text-decoration: underline; }
.admin-bar .warn { color: #ffd76a; font-weight: 700; }

/* 404 */
.error-page { text-align: center; padding-block: clamp(40px, 8vw, 90px); }
.error-code { font-size: clamp(5rem, 3rem + 10vw, 9rem); font-weight: 800; letter-spacing: -.06em; line-height: .9; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; }
.error-page .lead { max-width: 560px; margin: 0 auto 26px; color: var(--ink-2); font-size: 1.1rem; }
.error-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 200; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: .92rem; transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(18, 39, 74, .3); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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

@media print {
  .site-header, .site-footer, .ad-slot, .sidebar, .share, .admin-bar { display: none !important; }
  body { background: #fff; }
  .card, .widget, .post-card { box-shadow: none; }
}
