:root{
    --bg:#fff; --surface:#fff; --surface-2:#f5f5f7; --header:rgba(255,255,255,.72);
    --border:rgba(9,9,11,.10); --border-strong:rgba(9,9,11,.18);
    --text:#09090b; --muted:#5b5b66; --muted-2:#8a8a94;
    --checker-a:#ebebef; --checker-b:#fff;
  }
  html.dark{
    --bg:#08080a; --surface:#0f0f13; --surface-2:#16161c; --header:rgba(15,15,19,.72);
    --border:rgba(255,255,255,.08); --border-strong:rgba(255,255,255,.16);
    --text:#fafafa; --muted:#a1a1aa; --muted-2:#71717a;
    --checker-a:#1b1b22; --checker-b:#111116;
  }
  *{ -webkit-tap-highlight-color: transparent; box-sizing:border-box; }
  html{ scroll-behavior:smooth; }
  body{ background:var(--bg); color:var(--text); font-family:Inter,system-ui,sans-serif; -webkit-font-smoothing:antialiased; margin:0; }
  .checker{ background-image: repeating-conic-gradient(from 0deg, var(--checker-a) 0% 25%, var(--checker-b) 0% 50%); background-size:18px 18px; }
  .lbl{ display:block; font-size:10.5px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--muted-2); margin-bottom:7px; }
  .field{ width:100%; border-radius:10px; border:1px solid var(--border); background:var(--surface-2); color:var(--text); padding:9px 11px; font-size:13px; outline:none; font-family:inherit; }
  .field::placeholder{ color:var(--muted-2); }
  .field:focus{ border-color:#6366f1; box-shadow:0 0 0 3px rgba(99,102,241,.18); }
  .chip{ display:inline-flex; align-items:center; gap:4px; border-radius:999px; border:1px solid var(--border); background:var(--surface-2); padding:3px 9px; font-weight:500; }
  .range{ -webkit-appearance:none; appearance:none; width:100%; height:5px; border-radius:99px; background:linear-gradient(90deg,#6366f1,#8b5cf6,#22d3ee); outline:none; cursor:pointer; }
  .range::-webkit-slider-thumb{ -webkit-appearance:none; height:17px; width:17px; border-radius:50%; background:#fff; border:2px solid #6366f1; box-shadow:0 2px 8px rgba(99,102,241,.45); cursor:grab; }
  .range::-moz-range-thumb{ height:15px; width:15px; border-radius:50%; background:#fff; border:2px solid #6366f1; cursor:grab; }
  .range:disabled{ opacity:.4; cursor:not-allowed; }
  .grad-text{ background:linear-gradient(100deg,#818cf8 0%,#c084fc 45%,#22d3ee 100%); -webkit-background-clip:text; background-clip:text; color:transparent; }
  .glass{ background:var(--header); backdrop-filter:saturate(180%) blur(20px); -webkit-backdrop-filter:saturate(180%) blur(20px); }
  .glow{ position:absolute; border-radius:9999px; filter:blur(90px); opacity:.35; pointer-events:none; }
  .faq-body{ overflow:hidden; max-height:0; transition:max-height .38s cubic-bezier(.4,0,.2,1), opacity .3s; opacity:0; }
  .faq-item.open .faq-body{ opacity:1; }
  .faq-item.open .faq-chev{ transform:rotate(180deg); }
  .faq-chev{ transition:transform .3s; }
  .fmt.active{ background:var(--surface); color:var(--text); box-shadow:0 1px 4px rgba(0,0,0,.14); font-weight:700; }
  .fmt{ border-radius:8px; padding:7px 0; font-size:12px; font-weight:600; color:var(--muted); transition:.15s; background:transparent; border:none; cursor:pointer; }
  .fmt:disabled{ opacity:.35; cursor:not-allowed; text-decoration:line-through; }
  ::-webkit-scrollbar{ height:8px; width:8px; }
  ::-webkit-scrollbar-thumb{ background:var(--border-strong); border-radius:99px; }
  ::-webkit-scrollbar-track{ background:transparent; }
  .grid-bg{ background-image:linear-gradient(var(--border) 1px, transparent 1px),linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size:56px 56px; mask-image:radial-gradient(ellipse 70% 55% at 50% 0%, #000 30%, transparent 75%); }
  #themeBtn .icon-sun{ display:block; } #themeBtn .icon-moon{ display:none; }
  html.dark #themeBtn .icon-sun{ display:none; } html.dark #themeBtn .icon-moon{ display:block; }
  .visually-hidden{ position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
  @keyframes spin{ to{ transform:rotate(360deg); } }
  .spin{ animation:spin 1s linear infinite; }
  @keyframes fadeUp{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:translateY(0); } }
  .fade-up{ animation:fadeUp .35s ease-out; }
  .tab-bar{ display:flex; gap:4px; padding:4px; background:var(--surface-2); border-radius:12px; border:1px solid var(--border); }
  .tab{ flex:1; padding:9px 14px; border-radius:9px; font-size:12.5px; font-weight:600; color:var(--muted); cursor:pointer; background:transparent; border:none; transition:all .18s; display:inline-flex; align-items:center; justify-content:center; gap:6px; }
  .tab:hover{ color:var(--text); }
  .tab.active{ background:var(--surface); color:var(--text); box-shadow:0 1px 4px rgba(0,0,0,.18); font-weight:700; }
  .tab svg{ width:14px; height:14px; }
  .progress-track{ width:100%; height:4px; background:var(--border); border-radius:99px; overflow:hidden; }
  .progress-fill{ height:100%; width:0%; background:linear-gradient(90deg,#6366f1,#8b5cf6,#22d3ee); border-radius:99px; transition:width .3s ease-out; }
  .stat-card{ background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:10px 14px; }
  .stat-value{ font-variant-numeric:tabular-nums; letter-spacing:-.02em; }
  .toggle{ position:relative; width:36px; height:20px; background:var(--border-strong); border-radius:99px; cursor:pointer; transition:background .2s; flex-shrink:0; }
  .toggle.on{ background:#6366f1; }
  .toggle::after{ content:''; position:absolute; top:2px; left:2px; width:16px; height:16px; background:#fff; border-radius:50%; transition:transform .2s; box-shadow:0 1px 3px rgba(0,0,0,.3); }
  .toggle.on::after{ transform:translateX(16px); }
  .status-dot{ display:inline-block; width:6px; height:6px; border-radius:50%; background:#10b981; transition:background .3s; }
  .status-dot.offline{ background:#ef4444; }
  details > summary{ list-style:none; cursor:pointer; }
  details > summary::-webkit-details-marker{ display:none; }
  details > summary::before{ content:'▸'; display:inline-block; margin-right:6px; transition:transform .2s; }
  details[open] > summary::before{ transform:rotate(90deg); }
  .mini-btn{ display:inline-flex; align-items:center; justify-content:center; gap:4px; padding:5px 9px; border-radius:8px; font-size:11px; font-weight:600; cursor:pointer; transition:all .15s; border:1px solid var(--border); background:var(--surface-2); color:var(--muted); }
  .mini-btn:hover{ color:var(--text); border-color:var(--border-strong); }
  .mini-btn.active{ background:#6366f1; color:#fff; border-color:#6366f1; }
  .unit-btn{ padding:3px 7px; border-radius:6px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.02em; color:var(--muted-2); background:transparent; border:none; cursor:pointer; transition:.15s; }
  .unit-btn:hover{ color:var(--text); }
  .unit-btn.active{ background:#6366f1; color:#fff; }
  #compare{ user-select:none; -webkit-user-select:none; }

  /* Crop overlay. Plain CSS rather than utility classes: the Tailwind build is
     purged and does not emit the negative offsets or grid-rows this needs. */
  #cropOverlay{ position:absolute; inset:0; z-index:20; pointer-events:none; }
  #cropBox{ position:absolute; left:0; top:0; width:100%; height:100%; box-sizing:border-box;
    border:2px solid #fff; cursor:move; pointer-events:auto; touch-action:none;
    box-shadow:0 0 0 9999px rgba(0,0,0,.48); }
  .crop-h{ position:absolute; background:#fff; border-radius:2px; }
  /* Handles sit fully inside the box: #compare clips overflow, so anything
     positioned outside the frame would be unclickable near the edges. */
  .crop-h-nw{ left:0; top:0; width:14px; height:14px; cursor:nwse-resize; border-bottom-right-radius:3px; }
  .crop-h-ne{ right:0; top:0; width:14px; height:14px; cursor:nesw-resize; border-bottom-left-radius:3px; }
  .crop-h-sw{ left:0; bottom:0; width:14px; height:14px; cursor:nesw-resize; border-top-right-radius:3px; }
  .crop-h-se{ right:0; bottom:0; width:14px; height:14px; cursor:nwse-resize; border-top-left-radius:3px; }
  .crop-h-n{ left:50%; top:0; width:28px; height:8px; margin-left:-14px; cursor:ns-resize; border-radius:0 0 3px 3px; }
  .crop-h-s{ left:50%; bottom:0; width:28px; height:8px; margin-left:-14px; cursor:ns-resize; border-radius:3px 3px 0 0; }
  .crop-h-w{ top:50%; left:0; width:8px; height:28px; margin-top:-14px; cursor:ew-resize; border-radius:0 3px 3px 0; }
  .crop-h-e{ top:50%; right:0; width:8px; height:28px; margin-top:-14px; cursor:ew-resize; border-radius:3px 0 0 3px; }
  .crop-rule{ position:absolute; inset:0; pointer-events:none; display:grid;
    grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(3,1fr); }
  .crop-rule i{ border-right:1px solid rgba(255,255,255,.35); border-bottom:1px solid rgba(255,255,255,.35); }
  .crop-rule i:nth-child(3n){ border-right:none; }
  .crop-rule i:nth-child(n+7){ border-bottom:none; }

  /* ---- ToolGuest SEO / AEO content system ---- */
  .tool-seo-content { max-width: 1120px; margin: 0 auto; padding: 0 20px 72px; }
  .tool-seo-content .seo-block { margin-top: 56px; }
  .tool-seo-content .seo-eyebrow { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #6366f1; margin-bottom: .6rem; }
  html.dark .tool-seo-content .seo-eyebrow, html[data-theme="dark"] .tool-seo-content .seo-eyebrow, body.dark .tool-seo-content .seo-eyebrow { color: #818cf8; }
  .tool-seo-content h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -.028em; line-height: 1.16; }
  .tool-seo-content h3 { font-size: 1.02rem; font-weight: 700; letter-spacing: -.015em; }
  .tool-seo-content p { margin-top: .85rem; font-size: .975rem; line-height: 1.78; color: #52525b; }
  html.dark .tool-seo-content p, html[data-theme="dark"] .tool-seo-content p, body.dark .tool-seo-content p { color: #a1a1aa; }
  .tool-seo-content strong { color: #18181b; font-weight: 650; }
  html.dark .tool-seo-content strong, html[data-theme="dark"] .tool-seo-content strong, body.dark .tool-seo-content strong { color: #f4f4f5; }
  .tool-seo-content code { font-family: ui-monospace, 'JetBrains Mono', monospace; font-size: .85em; background: rgba(99,102,241,.10); color: #4f46e5; padding: .12em .42em; border-radius: .4em; border: 1px solid rgba(99,102,241,.18); word-break: break-word; }
  html.dark .tool-seo-content code, html[data-theme="dark"] .tool-seo-content code, body.dark .tool-seo-content code { background: rgba(129,140,248,.14); color: #c7d2fe; border-color: rgba(129,140,248,.24); }
  .tool-seo-content a { color: #4f46e5; text-decoration: none; border-bottom: 1px solid rgba(99,102,241,.35); }
  html.dark .tool-seo-content a, html[data-theme="dark"] .tool-seo-content a, body.dark .tool-seo-content a { color: #a5b4fc; }
  .seo-grid { display: grid; gap: 16px; margin-top: 22px; grid-template-columns: 1fr; }
  @media (min-width: 640px) { .seo-grid { grid-template-columns: 1fr 1fr; } }
  @media (min-width: 1024px) { .seo-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
  .seo-card { border: 1px solid rgba(24,24,27,.10); border-radius: 18px; padding: 20px; background: rgba(255,255,255,.65); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
  .seo-card:hover { transform: translateY(-3px); border-color: rgba(99,102,241,.4); box-shadow: 0 18px 40px -22px rgba(79,70,229,.5); }
  html.dark .seo-card, html[data-theme="dark"] .seo-card, body.dark .seo-card { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.03); }
  .seo-card .seo-city { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #0891b2; }
  html.dark .seo-card .seo-city, html[data-theme="dark"] .seo-card .seo-city, body.dark .seo-card .seo-city { color: #22d3ee; }
  .seo-card p { margin-top: .5rem; font-size: .9rem; }
  .seo-aeo { border: 1px solid rgba(99,102,241,.3); border-radius: 18px; padding: 22px 24px; background: linear-gradient(135deg, rgba(99,102,241,.10), rgba(34,211,238,.06)); }
  .seo-aeo-label { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #4f46e5; }
  html.dark .seo-aeo-label, html[data-theme="dark"] .seo-aeo-label, body.dark .seo-aeo-label { color: #a5b4fc; }
  .seo-aeo p { margin-top: .6rem; font-size: 1.02rem; color: #3f3f46; }
  html.dark .seo-aeo p, html[data-theme="dark"] .seo-aeo p, body.dark .seo-aeo p { color: #d4d4d8; }
  .seo-tablewrap { margin-top: 24px; overflow-x: auto; border: 1px solid rgba(24,24,27,.10); border-radius: 18px; background: rgba(255,255,255,.6); }
  html.dark .seo-tablewrap, html[data-theme="dark"] .seo-tablewrap, body.dark .seo-tablewrap { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.03); }
  .seo-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .9rem; text-align: left; }
  .seo-table th, .seo-table td { padding: 14px 18px; border-bottom: 1px solid rgba(24,24,27,.08); }
  html.dark .seo-table th, html.dark .seo-table td, html[data-theme="dark"] .seo-table th, html[data-theme="dark"] .seo-table td, body.dark .seo-table th, body.dark .seo-table td { border-bottom-color: rgba(255,255,255,.07); }
  .seo-table tbody tr:last-child th, .seo-table tbody tr:last-child td { border-bottom: 0; }
  .seo-table thead th { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #71717a; }
  .seo-table th[scope="row"] { font-weight: 600; color: #27272a; }
  html.dark .seo-table th[scope="row"], html[data-theme="dark"] .seo-table th[scope="row"], body.dark .seo-table th[scope="row"] { color: #e4e4e7; }
  .seo-table .yes { color: #059669; font-weight: 650; }
  html.dark .seo-table .yes, html[data-theme="dark"] .seo-table .yes, body.dark .seo-table .yes { color: #34d399; }
  .seo-table .no { color: #71717a; }
  .seo-faq { margin-top: 22px; display: grid; gap: 12px; }
  .seo-faq details { border: 1px solid rgba(24,24,27,.10); border-radius: 16px; padding: 0 20px; background: rgba(255,255,255,.6); }
  html.dark .seo-faq details, html[data-theme="dark"] .seo-faq details, body.dark .seo-faq details { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.03); }
  .seo-faq summary { cursor: pointer; padding: 16px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
  .seo-faq summary::-webkit-details-marker { display: none; }
  .seo-faq summary::after { content: "+"; font-size: 1.25rem; font-weight: 400; color: #a1a1aa; }
  .seo-faq details[open] summary::after { content: "\2013"; }
  .seo-faq p { padding-bottom: 16px; margin-top: 0; }
