/* =====================================================================
   NexaFreeTools - design system, v4 "Control Panel"
   Concept: a bottle-green instrument bezel - brass/amber toggle accents,
   phosphor-mint status LEDs, monospace readout headline. Precise and
   armed rather than glowing and decorative - replaces the glassmorphic
   aurora v3 pass sitewide (it debuted scoped to the homepage first).

   Token note: variable NAMES are kept as-is from the original light
   "toolbox catalog" theme (--ink, --amber, --paper, etc.) to avoid
   touching every one of their ~230 call sites, but hold new VALUES -
   see the comment on each below.
   ===================================================================== */

:root {
  --ink: #ecf7f1;            /* primary foreground */
  --ink-soft: #86a89b;       /* secondary foreground */
  --ink-deep: #0b1613;       /* near-black bezel, the "badge/button surface" role */
  --paper: #12211d;          /* page bg - bottle-green instrument chassis */
  --paper-card: #1b2f29;     /* solid surface: cards, dropdowns, inputs */
  --grid-line: rgba(255, 255, 255, 0.05);
  --grid-line-strong: rgba(255, 255, 255, 0.14);
  --amber: #ffab2e;          /* primary accent - brass/amber toggle */
  --amber-dark: #d98a1c;     /* pressed/hover variant */
  --cyan: #7de6c0;           /* secondary accent - phosphor-mint status LED */
  --gold: #d4a017;           /* reserved for premium/star cues only */
  --rust: #ff5c72;           /* danger/error - red indicator LED */
  --green-ok: #34d399;       /* success */

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  --radius: 8px;
  --radius-lg: 14px;
  --shadow-tag: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* ---------- Light theme ----------
   The very first version of this design system (before v2's dark-console
   pass) was itself a light "toolbox catalog" theme — pale blueprint-grid
   backdrop, deep ink typography — sharing these exact variable names. This
   revives that palette as an explicit opt-in rather than inventing a new
   one, so light mode still feels like the same product family instead of
   a generic light-mode reskin.

   --ink-deep intentionally stays dark in BOTH themes: it's the "bezel"
   surface — buttons (.btn), badges, .big-result, the site header/sidebar —
   the instrument-panel metal that doesn't change color with the room
   lighting, only the "paper" around it does. Every element that pairs a
   fixed-white/rgba(255,255,255,…) foreground with an --ink-deep background
   (button labels, .big-result numbers, the admin sidebar, etc.) needed no
   change for exactly this reason — only spots pairing a
   rgba(255,255,255,…) foreground/tint with a *theme-following* surface
   (--paper/--paper-card) needed an explicit override; see below.

   Applied via a `data-theme` attribute set by theme.js (System/Light/Dark
   picker in the header) — resolved and set before first paint by the
   inline snippet in each layout's <head>, so there's no flash of the
   wrong theme. No data-theme attribute (JS disabled) falls back to the
   dark palette above, same as the site behaved before this feature. */
:root[data-theme="light"] {
  --ink: #16233a;
  --ink-soft: #3c4a63;
  --paper: #eef2f7;
  --paper-card: #ffffff;
  --grid-line: #ccd7e8;
  --grid-line-strong: #aebcd4;
  --amber: #c9821f;
  --amber-dark: #a8691a;
  --cyan: #0f8f6a;
  --gold: #a8790a;
  --rust: #c1442b;
  --green-ok: #2f7d5c;
  --shadow-tag: 0 1px 0 rgba(22, 35, 58, 0.06), 0 6px 16px rgba(22, 35, 58, 0.08);
}

/* Individual spots where a hardcoded rgba(255,255,255,…)/rgba(18,33,29,…)
   literal was tuned for the dark palette and sits on a surface that DOES
   flip with the theme (unlike the --ink-deep-backed elements above) — each
   needs its own light-mode value rather than automatically following a
   variable. */
:root[data-theme="light"] .site-header {
  background: rgba(238, 242, 247, 0.85);
}

:root[data-theme="light"] .search-inline {
  box-shadow: inset 0 0 0 1px rgba(22, 35, 58, 0.1);
}

:root[data-theme="light"] .strength-meter__track {
  background: rgba(22, 35, 58, 0.08);
}

:root[data-theme="light"] .diff-stat--added,
:root[data-theme="light"] .diff-cell--added {
  color: #0f6e56;
}

:root[data-theme="light"] .diff-stat--removed,
:root[data-theme="light"] .diff-cell--removed {
  color: #8a2a1a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 22px 22px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Skip link (UI_UX_ACCESSIBILITY_POLISH.md §18) ---------- */

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 1000;
  background: var(--ink-deep);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 0 0 6px 6px;
  border: 1px solid var(--grid-line-strong);
  border-top: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--amber);
  outline-offset: 1px;
}

/* ---------- Top accent bar ---------- */

.top-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--amber-dark), var(--amber), var(--cyan), var(--amber));
  background-size: 250% 100%;
  box-shadow: 0 0 14px 1px rgba(125, 230, 192, 0.35);
  animation: accent-shift 8s ease-in-out infinite;
}

@keyframes accent-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--grid-line-strong);
  background: rgba(18, 33, 29, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 60;
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}

.logo .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 30px;
  height: 30px;
  background: var(--ink-deep);
  border-radius: 50%;
  font-size: 0;
  box-shadow: inset 0 0 0 2px var(--grid-line-strong), inset 0 2px 5px rgba(0, 0, 0, 0.6);
}

.logo .logo-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  transform: translate(-50%, -50%);
  animation: mark-glow 3.2s ease-in-out infinite;
}

@keyframes mark-glow {
  0%, 100% { box-shadow: 0 0 7px 2px rgba(125, 230, 192, 0.65); }
  50% { box-shadow: 0 0 10px 3px rgba(125, 230, 192, 0.9); }
}

.logo .logo-suffix {
  color: var(--amber-dark);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.main-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--amber);
}

.nav-divider {
  width: 1px;
  height: 16px;
  background: var(--grid-line-strong);
  display: inline-block;
}

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: normal;
  text-decoration: none;
}

.nav-user:hover {
  color: var(--amber-dark);
  text-decoration: underline;
}

.nav-link-btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: none;
  border: none;
  padding: 0;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-link-btn:hover {
  color: var(--ink);
  border-bottom-color: var(--amber);
}

.nav-signup {
  position: relative;
  background: var(--ink-deep) !important;
  color: var(--amber) !important;
  padding: 8px 16px 8px 26px !important;
  border-radius: 999px;
  border-bottom: none !important;
  box-shadow: inset 0 0 0 1px rgba(255, 171, 46, 0.4), 0 0 16px -4px rgba(255, 171, 46, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  /* Real bug: no protection against the flex row squeezing this below its
     own text width — it was wrapping "Sign up free" onto 3 stacked lines
     at ordinary desktop widths (confirmed live at 1280px). white-space
     stops the wrap; flex-shrink:0 stops it being the item that gives way
     when .site-header__actions runs out of room (the search input and
     nav links can already shrink/wrap first). */
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-signup::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 6px 2px rgba(255, 171, 46, 0.75);
  transform: translateY(-50%);
}

.nav-signup:hover {
  background: var(--ink-deep) !important;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255, 171, 46, 0.6), 0 0 22px -2px rgba(255, 171, 46, 0.7) !important;
  border-bottom: none !important;
}

/* ---------- Tools dropdown / mega menu ---------- */

.nav-dropdown {
  position: relative;
}

.nav-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: none;
  border: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-dropdown__trigger:hover,
.nav-dropdown__trigger[aria-expanded="true"] {
  color: var(--ink);
  border-bottom-color: var(--amber);
}

.nav-user.nav-dropdown__trigger {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.8rem;
}

.nav-dropdown__chevron {
  transition: transform 0.2s ease;
}

.nav-dropdown__trigger[aria-expanded="true"] .nav-dropdown__chevron {
  transform: rotate(180deg);
}

.mega-menu {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translate(-50%, -8px);
  width: min(880px, 90vw);
  max-height: min(560px, calc(100vh - 140px));
  background: var(--paper-card);
  border: 1px solid var(--grid-line-strong);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18), 0 2px 0 var(--amber-dark);
  padding: 28px 12px 0 28px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 70;
  display: flex;
  flex-direction: column;
}

.mega-menu.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
  visibility: visible;
}

.mega-menu__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 22px 20px;
  overflow-y: auto;
  padding-right: 16px;
  padding-bottom: 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--amber) transparent;
}

.mega-menu__grid::-webkit-scrollbar {
  width: 8px;
}

.mega-menu__grid::-webkit-scrollbar-track {
  background: transparent;
}

.mega-menu__grid::-webkit-scrollbar-thumb {
  background-color: var(--amber);
  border-radius: 999px;
  border: 2px solid var(--paper-card);
}

.mega-menu__grid::-webkit-scrollbar-thumb:hover {
  background-color: var(--amber-dark);
}

.mega-menu__cat {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber-dark);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--amber);
  display: inline-block;
}

.mega-menu__view-all {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--amber-dark);
  margin-top: 6px;
  text-decoration: none;
}

.mega-menu__view-all:hover {
  text-decoration: underline;
}

.mega-menu__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mega-menu__col a {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  padding: 7px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.mega-menu__col a:hover {
  background: var(--paper);
  border-left-color: var(--amber);
  transform: translateX(2px);
}

.mega-menu__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.mega-menu__icon svg {
  width: 15px;
  height: 15px;
}

.mega-menu__col a:hover .mega-menu__icon {
  color: var(--amber-dark);
}

.mega-menu__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
  padding: 14px 16px 16px 0;
  border-top: 1px dashed var(--grid-line-strong);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.mega-menu__footer a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber-dark);
  text-decoration: none;
  font-weight: 700;
}

.mega-menu__footer a:hover {
  text-decoration: underline;
}

/* ---------- Signed-in user menu ---------- */

.user-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 190px;
  background: var(--paper-card);
  border: 1px solid var(--grid-line-strong);
  border-radius: 10px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15), 0 2px 0 var(--amber-dark);
  padding: 8px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 70;
}

.user-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.user-menu a,
.user-menu__logout {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.12s ease;
}

.user-menu a:hover,
.user-menu__logout:hover {
  background: var(--paper);
  text-decoration: none;
}

.user-menu__logout {
  color: var(--rust);
}

.user-menu__divider {
  height: 1px;
  background: var(--grid-line);
  margin: 6px 6px;
}

/* ---------- Cookie consent banner ---------- */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: var(--paper-card);
  color: var(--ink);
  border-top: 3px solid var(--amber);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.cookie-banner__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 640px;
}

.cookie-banner a {
  color: var(--amber);
}

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Real bug: the banner is position:fixed at the bottom with nothing
   reserving room for it, so on a short page (Pricing's own plan cards,
   whose last 1-2 feature lines land right at the viewport bottom) it was
   covering real content until dismissed. Applied to <body> only while
   consent is undecided (see _Layout.cshtml) — an approximate height,
   not exact-measured, but comfortably clears the banner's own ~1-2 line
   text + button row at every width the banner itself is tested at. */
body.has-cookie-banner {
  padding-bottom: 96px;
}

/* ---------- Toast notification ---------- */

.toast-notice {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--paper-card);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid var(--grid-line-strong);
  border-left: 3px solid var(--amber);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Color palette generator ---------- */

.cp-palette {
  margin-bottom: 20px;
}

.cp-palette:last-child {
  margin-bottom: 0;
}

.cp-swatch-row {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--grid-line-strong);
}

.cp-swatch {
  flex: 1;
  height: 64px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  transition: transform 0.12s ease;
}

.cp-swatch:hover {
  transform: scaleY(1.05);
}

.cp-swatch span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ---------- Site search (inline autocomplete in the header) ---------- */

.search-inline {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.15s ease, width 0.15s ease;
  width: clamp(90px, 10vw, 150px);
  flex-shrink: 1;
  min-width: 0;
}

.search-inline:focus-within {
  box-shadow: inset 0 0 0 1.5px var(--amber);
  width: 190px;
}

.search-inline svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.search-inline .search-inline__input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  box-shadow: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink);
  padding: 0;
  border-radius: 0;
  width: auto;
}

.search-inline__input::placeholder {
  color: var(--ink-soft);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  min-width: 320px;
  background: var(--paper-card);
  border: 1px solid var(--grid-line-strong);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  padding: 6px;
  max-height: 60vh;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 120;
}

.search-dropdown.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.search-dropdown__empty {
  padding: 20px 14px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
}

.search-result.is-active {
  background: var(--paper);
}

.search-result__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.search-result__name {
  font-weight: 600;
  font-size: 0.9rem;
}

.search-result__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Mobile nav toggle ---------- */

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  /* UI_UX_ACCESSIBILITY_POLISH.md §13: practical ~44x44 touch target, was 38x38. */
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--grid-line-strong);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
}

.nav-mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-mobile-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Theme toggle (Light/Dark/System — see theme.js) ---------- */

.header-actions-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--grid-line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle-btn:hover {
  color: var(--amber);
  border-color: var(--amber);
}

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 44px;
  border-bottom: 1px dashed var(--grid-line-strong);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}

.hero-content > * {
  animation: hero-rise 0.6s ease both;
}

.hero-content > *:nth-child(2) { animation-delay: 0.05s; }
.hero-content > *:nth-child(3) { animation-delay: 0.1s; }
.hero-content > *:nth-child(4) { animation-delay: 0.15s; }
.hero-content > *:nth-child(5) { animation-delay: 0.2s; }

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-visual {
  position: relative;
  height: 380px;
}

.hero-visual__card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper-card);
  border: 1px solid var(--grid-line-strong);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  animation: hero-rise 0.6s ease both, hero-float 5s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-visual__card::before,
.hero-visual__card::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--grid-line-strong);
}

.hero-visual__card::before { left: 7px; }
.hero-visual__card::after { right: 7px; }

.hero-visual__card:hover {
  transform: translateY(-6px) rotate(0deg);
  translate: 0 0;
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(125, 230, 192, 0.35), 0 0 26px rgba(125, 230, 192, 0.25);
  border-color: var(--cyan);
  animation-play-state: paused;
}

.hero-visual__card .mega-menu__icon {
  color: var(--amber-dark);
}

.hero-visual__card--1 {
  top: 6%;
  left: 4%;
  transform: rotate(-5deg);
  animation-delay: 0.1s, 0s;
}

.hero-visual__card--2 {
  top: 26%;
  right: 2%;
  transform: rotate(4deg);
  animation-delay: 0.2s, 0.6s;
}

.hero-visual__card--3 {
  top: 56%;
  left: 0;
  transform: rotate(3deg);
  animation-delay: 0.3s, 1.2s;
}

.hero-visual__card--4 {
  top: 76%;
  right: 10%;
  transform: rotate(-4deg);
  animation-delay: 0.4s, 1.8s;
}

@keyframes hero-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber-dark);
  background: rgba(255, 171, 46, 0.14);
  border: 1px solid var(--amber);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero h1 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 0 0 20px;
  max-width: 34ch;
}

.hero h1 .stamp {
  position: relative;
  color: var(--amber);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 36px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stat .num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
}

.hero-stat .label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.hero-cta {
  display: inline-block;
  margin-top: 32px;
}

/* ---------- Filter bar (workbench) ---------- */

.workbench {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px dashed var(--grid-line-strong);
  margin-bottom: 40px;
}

.workbench__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-right: 6px;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 7px 14px;
  border: 1px solid var(--grid-line-strong);
  background: var(--paper-card);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--cyan);
  color: var(--ink);
}

.chip.active {
  background: var(--ink-deep);
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: inset 0 0 0 1px rgba(255, 171, 46, 0.3);
}

/* Lets someone scanning the filter row see how big each category is
   before clicking into it — real per-category counts (Home/Index.cshtml),
   not decorative. Muted so it reads as metadata, not a second label. */
.chip__count {
  opacity: 0.6;
  font-size: 0.85em;
}

/* ---------- Tool grid: hang-tag cards ---------- */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  padding-bottom: 80px;
}

@keyframes tool-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.tool-grid .tool-tag {
  animation: tool-rise 0.45s ease both;
}

.tool-grid .tool-tag:nth-child(4n+1) { animation-delay: 0.02s; }
.tool-grid .tool-tag:nth-child(4n+2) { animation-delay: 0.07s; }
.tool-grid .tool-tag:nth-child(4n+3) { animation-delay: 0.12s; }
.tool-grid .tool-tag:nth-child(4n+4) { animation-delay: 0.17s; }

.tool-tag {
  position: relative;
  background: var(--paper-card);
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-tag);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tool-tag::before {
  /* corner rivet, top-left - instrument-panel bezel detail */
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--grid-line-strong);
}

.tool-tag:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(125, 230, 192, 0.18);
}

.tool-tag::after {
  /* status LED, top-right - cycled per card below */
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 5px 1px rgba(125, 230, 192, 0.7);
  animation: dot-pulse 2.6s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 0.7; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Cycle 3 status-LED hues across the grid so the catalog reads as a
   set of distinct tools rather than one flat block of mint. Gold is
   kept out of this cycle - it's reserved for PRO/rating cues only. */
.tool-grid .tool-tag:nth-child(4n+2)::after { background: var(--amber); box-shadow: 0 0 5px 1px rgba(255, 171, 46, 0.7); }
.tool-grid .tool-tag:nth-child(4n+3)::after { background: var(--rust); box-shadow: 0 0 5px 1px rgba(255, 92, 114, 0.7); }
.tool-grid .tool-tag:nth-child(4n+4)::after { background: var(--cyan); box-shadow: 0 0 5px 1px rgba(125, 230, 192, 0.7); }

.tool-tag .tag-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--amber-dark);
  font-weight: 700;
}

.badge-pro {
  display: inline-block;
  font-family: var(--font-mono);
  /* UI_UX_ACCESSIBILITY_POLISH.md §16: was 0.6rem — the smallest text
     size in the sheet, on a label repeated across nearly every page
     (nav, tool grids, dashboard, pricing) that conveys real gating
     information, not decoration. */
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ink-deep);
  color: var(--gold);
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

.tool-tag .tag-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-deep);
  color: var(--cyan);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--grid-line-strong);
}

/* Real issue, not a rendering bug: _Icon.cshtml's SVG is a fixed 18x18,
   so it only fills ~47% of this 38px box (vs. ~60-64% in the smaller
   .dashboard-actions-row/.mini-tile variants below) — a thin 1.8-stroke
   line icon that small, left floating in a lot of empty colored square,
   reads as soft/indistinct rather than a crisp glyph (reported: icons
   in the homepage grid and "You might also like" cards look blurry).
   CSS width/height on an <svg> overrides its width/height attributes —
   sizing proportionally keeps every .tag-icon variant's fill ratio
   consistent regardless of container size, rather than hand-tuning each. */
.tag-icon svg {
  width: 58%;
  height: 58%;
}

.tool-grid .tool-tag:nth-child(4n+2) .tag-icon { color: var(--amber); }
.tool-grid .tool-tag:nth-child(4n+3) .tag-icon { color: var(--rust); }
.tool-grid .tool-tag:nth-child(4n+4) .tag-icon { color: var(--cyan); }

.tool-tag h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0;
}

.tool-tag p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  flex-grow: 1;
}

.tool-tag .tag-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed var(--grid-line-strong);
  padding-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* ---------- Tool detail page ---------- */

.tool-page-header {
  padding: 48px 0 28px;
  border-bottom: 1px dashed var(--grid-line-strong);
}

a.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 18px;
}

a.breadcrumb:hover {
  color: var(--ink);
}

/* ---------- Tool-page breadcrumb trail (Bootstrap .breadcrumb structure,
   themed to match the site instead of Bootstrap's default look) ---------- */

.tool-breadcrumb {
  --bs-breadcrumb-divider: ">";
  margin: 0 0 18px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.tool-breadcrumb .breadcrumb-item a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tool-breadcrumb .breadcrumb-item a:hover {
  color: var(--amber-dark);
  text-decoration: underline;
}

.tool-breadcrumb .breadcrumb-item.active {
  color: var(--ink);
  font-weight: 600;
}

.tool-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: var(--grid-line-strong);
  padding-right: 0.6rem;
}

.tool-page-header .tag-number {
  font-family: var(--font-mono);
  color: var(--amber-dark);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.tool-page-header h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  margin: 8px 0 8px;
}

/* NORMAL_USER_DASHBOARD_ENHANCEMENT.md §17: additive only — every existing
   .tool-page-header still puts exactly one <h1> here and is unaffected.
   Account/Dashboard.cshtml's own body heading was demoted from <h1> to
   <h2> (the shared _DashboardLayout topbar already renders the page's one
   <h1>), so it needs the same visual size it always had. */
.tool-page-header h2 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  margin: 8px 0 8px;
}

/* NORMAL_USER_DASHBOARD_ENHANCEMENT.md §14/§17: Chart.js's own
   responsive-resize logic (Dashboard.cshtml's usage-over-time chart) sets
   an explicit inline width/height on the canvas at chart-creation time —
   at the shared dashboard shell's narrower content width (sidebar takes
   240px), that measurement can land wider than the panel-card actually
   has room for, and since a <canvas> is a replaced element that honors
   its own explicit size, it was pushing the whole page into horizontal
   overflow at ~1200px. This doesn't touch AdminDashboard's own #categoryChart
   canvas or the 3 tool pages' functional canvases (favicon-generator,
   image-color-picker, qr-code-generator), which have real pixel-mapping
   reasons not to be CSS-rescaled — scoped to this one id only. */
#usage-chart {
  max-width: 100%;
}

/* DASHBOARD_REFERENCE_MATCH.md: the dashboard is the one page in this
   shared shell that benefits from using more of the content column the
   240px sidebar leaves available — every OTHER page still using .wrap
   (public tool pages, Profile, Billing) keeps its existing 1120px
   reading-width cap untouched. A separate class rather than widening
   .wrap itself, so this is scoped to Dashboard.cshtml only. */
.dashboard-wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 28px;
}

/* DASHBOARD_COMPACT_VIEWPORT_PASS.md: a page-scoped override of
   .tool-page-header's shared 48px/28px hero padding and 2.4rem heading —
   compound selector so specificity wins regardless of source order,
   without touching the shared rules Profile.cshtml/Billing.cshtml still
   use at their original size. */
.tool-page-header.dashboard-intro {
  /* DASHBOARD_SIDEBAR_PROFILE_OVERLAP_FIX.md: top padding bumped 22px ->
     32px — modest defense-in-depth alongside the real fix (the topbar's
     stacking-context correction in admin.css) and the trimmed profile
     dropdown (2 items instead of 3): a bit more clearance between the
     topbar and Quick Actions/the KPI row, without undoing
     DASHBOARD_COMPACT_VIEWPORT_PASS.md's own compaction win (the intro
     is still ~48% shorter than its original ~227.5px, comfortably past
     that pass's own 40% target). */
  padding: 32px 0 18px;
}

.dashboard-intro h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  margin: 0 0 4px;
}

.dashboard-intro p {
  margin: 0;
}

/* PROFILE_SECURITY_UI_ENHANCEMENT.md: Account/Profile.cshtml's compact
   header — no breadcrumb/eyebrow (the sidebar already shows where you
   are), same padding/heading treatment as .dashboard-intro. Billing.cshtml
   still uses the original unscoped .tool-page-header/.tool-panel sizes,
   untouched until it's asked for too. */
.tool-page-header.account-intro {
  padding: 24px 0 18px;
}

.account-intro h2 {
  font-size: 1.9rem;
  margin: 0 0 4px;
}

.account-intro p {
  margin: 0;
}

.tool-panel.account-panel {
  padding: 20px 0 32px;
  gap: 20px;
}

/* Plan/Credit history grids (Billing.cshtml) — admin.css already gives
   DataTables a workable dark skin (reused so the two grids didn't need any
   CSS of their own to ship), but its search box, length select, and
   pagination are still shaped like plain Bootstrap chrome. Here on the
   account pages, next to .panel-card/.role-pill/.btn everywhere else,
   that reads as a borrowed admin-panel look rather than a native part of
   the page. This restyles just those three controls to the site's own
   pill/mono/amber language — column headers and row styling already match
   via admin.css and are left alone. */
.account-panel .dt-container .dt-search input {
  border-radius: 999px;
  border: none;
  box-shadow: inset 0 0 0 1px var(--grid-line-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 8px 16px;
}

.account-panel .dt-container .dt-search input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--amber);
}

.account-panel .dt-container .dt-length select {
  border-radius: var(--radius);
  border: 1px solid var(--grid-line-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 6px 10px;
}

.account-panel .dt-container .dt-info,
.account-panel .dt-container .dt-length label,
.account-panel .dt-container .dt-search label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-panel .dt-container .page-link {
  border-radius: 999px;
  border: 1px solid var(--grid-line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin: 0 2px;
}

.account-panel .dt-container .page-link:hover {
  color: var(--ink);
  background: var(--paper-card);
}

.account-panel .dt-container .page-item.active .page-link {
  background: var(--ink-deep);
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: inset 0 0 0 1px rgba(255, 171, 46, 0.4);
}

.account-panel .dt-container .page-item.disabled .page-link {
  color: var(--ink-soft);
  opacity: 0.4;
}

/* PROFILE_SECURITY_UI_ENHANCEMENT.md: two-column Profile layout — a
   narrower identity/account column beside a wider settings column, each
   its own vertical stack of cards. Collapses to one column at the same
   900px breakpoint the Pricing page's own two-column grid already uses
   (both live under the same 1120px .wrap reading width). */
.profile-layout {
  grid-template-columns: 1fr 2fr;
  align-items: start;
}

.profile-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-avatar-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-identity-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.profile-identity-email {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 2px 0 8px;
}

/* PROFILE_SECURITY_UI_ENHANCEMENT.md: show/hide sits inside the password
   field itself (an absolutely-positioned icon button over the input's own
   right edge), not as a separate control beside it. The input's own
   right-padding override lives further down, after the shared input rule
   it needs to beat (equal specificity — .password-input-wrap input vs
   input[type="password"] — source order decides the tie, so it can't sit
   here, above the rule it's overriding). */
.password-input-wrap {
  position: relative;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--ink-soft);
  cursor: pointer;
}

.password-toggle-btn:hover {
  color: var(--ink);
  background: var(--paper-card);
}

/* NORMAL_USER_DASHBOARD_ENHANCEMENT.md follow-up (density pass): a
   self-contained grid for Account/Dashboard.cshtml's two card rows —
   deliberately its own class, not a change to the shared .tool-panel
   (used by many other pages on the site as a single-column stack; this
   dashboard is the only place that actually needs real side-by-side
   columns, so it gets its own scoped rule rather than a site-wide one).
   DASHBOARD_COMPACT_VIEWPORT_PASS.md: align-items changed from the grid
   default (stretch) to start — CSS Grid stretches every row's cards to
   match its tallest cell by default, which was forcing "Favorite tools"
   (a handful of small tiles) to inherit "Usage overview"'s much taller
   natural height, leaving a large blank card body. Each card now sizes
   to its own real content instead. */
.dashboard-grid {
  display: grid;
  align-items: start;
  gap: 20px;
  padding: 16px 0;
}

/* DASHBOARD_PRODUCT_VALUE_ENHANCEMENT.md: compact full-width action rows
   (icon, label, chevron) — used by "Continue using" and "Account
   shortcuts", which share their own row below the primary row (see the
   comment beside their markup in Dashboard.cshtml for why they aren't
   stacked into the primary row's Favorites column any more). Previously
   existed for a "Quick actions" card that was removed as pure
   duplication of the header's own dropdown; reintroduced here for
   genuinely new, non-duplicated content. Distinct from .mini-tile (a
   tile grid) so the two modules don't look like the same component
   repeated. */
.dashboard-actions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--grid-line-strong);
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.85rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dashboard-actions-row:hover {
  border-color: var(--amber);
  background: var(--paper-card);
}

.dashboard-actions-row .tag-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-deep);
  border-radius: 50%;
  color: var(--amber);
}

.dashboard-actions-row span:nth-child(2) {
  /* DASHBOARD_PRODUCT_VALUE_ENHANCEMENT.md: min-width:0 is load-bearing —
     without it, a flex item can't shrink below its own unwrapped text
     width, so a real long tool name ("Pregnancy Due Date Calculator" in
     "Continue using") forced this row — and with it the whole card/
     grid track — wider than the viewport at narrow widths (confirmed:
     390px real horizontal overflow before this fix). Truncates with an
     ellipsis instead, same pattern as Recent Activity's own label fix. */
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-actions-row .bi-chevron-right {
  flex-shrink: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

/* DASHBOARD_COMPACT_VIEWPORT_PASS.md / DASHBOARD_SIDEBAR_PROFILE_OVERLAP_FIX.md
   follow-up: Recent Activity's timestamp-wrap fix (see the comment
   beside its markup in Dashboard.cshtml) — scoped to this one list,
   .kv-row/.kv-value themselves are untouched.
   BUG FOUND (live screenshot showed the character-per-line wrap still
   happening after this rule was first added): every selector below was
   written as ".kv-list--activity .kv-label"/".kv-list--activity
   .kv-value" — a descendant selector with the SAME specificity (0,2,0)
   as the shared ".kv-row .kv-label { flex-shrink: 0; }" / ".kv-row
   .kv-value { word-break: break-all; }" rules further down this file.
   With tied specificity, the LATER rule in the file wins regardless of
   which one "sounds" more specific to a reader — and the shared rules
   are later, so they were silently winning and undoing this override
   completely. Fixed by including .kv-row in these selectors too
   (matching the real DOM nesting: .kv-list--activity > .kv-row >
   .kv-label/.kv-value), which raises specificity to (0,3,0) and wins
   regardless of source order. */
.kv-list--activity .kv-row {
  gap: 10px;
}

.kv-list--activity .kv-row .kv-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.kv-list--activity .kv-row .kv-label a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  min-width: 0;
}

.kv-list--activity .kv-row .kv-value {
  /* word-break back to the browser default (wrap at spaces, e.g.
     "Aug 29," / "7:45 AM") instead of the shared .kv-value rule's
     break-all — that's what was forcing a character-per-line render in
     a narrow column. Deliberately NOT white-space:nowrap/flex-shrink:0
     here: a timestamp this long forced to stay on one non-shrinking
     line is exactly what pushed the whole row (and the page) into
     horizontal overflow at ~1200px in an earlier attempt — 2 clean
     lines at a word boundary is the width-safe compact result. */
  word-break: normal;
  text-align: right;
  min-width: 0;
}

.dashboard-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.dashboard-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

/* DASHBOARD_REFERENCE_MATCH.md: Recent activity / Usage overview /
   Favorites — weighted so the usage panel (the reference's visual
   center) reads as dominant rather than an equal third, same 3 real
   cards as .dashboard-grid--3 otherwise. */
.dashboard-grid--primary {
  grid-template-columns: 1.05fr 1.5fr 1.25fr;
}

@media (max-width: 1100px) {
  .dashboard-grid--3,
  .dashboard-grid--primary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .dashboard-grid--3,
  .dashboard-grid--primary,
  .dashboard-grid--2 {
    grid-template-columns: 1fr;
  }
}

/* Compact favorite/quick-action tiles for the density pass above — an
   icon + one line of text, not the full tool-tag card (tagline/category/
   "Open →") used on the tool-browsing grids elsewhere on the site. */
.mini-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mini-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--grid-line-strong);
  background: var(--paper);
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.78rem;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.mini-tile:hover {
  border-color: var(--amber);
  transform: translateY(-1px);
}

.mini-tile .tag-icon {
  width: 28px;
  height: 28px;
}

/* DASHBOARD_FINAL_POLISH.md: a long real tool name ("Batch Image Resizer",
   "Duplicate Line Remover & Sorter") was previously free to wrap to 3+
   lines, making tiles in the same row visibly uneven — clamp to 2 lines
   with an ellipsis instead, same tiles otherwise unchanged. */
.mini-tile span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
}

/* Dashboard "beautify" pass: icon + horizontal-text stat cards for the
   Overview row, replacing the plain centered .stat-box for this one row
   only — .stat-box itself is untouched (still used as-is by the Usage
   panel's own numbers, the admin overview panel, and every /admin/* page
   that already relies on it). */
.icon-stat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

@media (max-width: 1100px) {
  .icon-stat-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .icon-stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Redesigned from a generic icon-in-tinted-circle tile (the same "stat
   card" shape countless admin-dashboard templates default to) into a
   small instrument-gauge readout — colored top edge + status LED next to
   the label + a tabular-mono value, matching the vocabulary the rest of
   this design system already uses for status (.related-tools__dot,
   .admin-brand-mark::after) and big numbers (.big-result) instead of a
   borrowed, generic dashboard pattern. No icon glyphs anymore — the
   color+LED does the same "what kind of stat is this" job. */
.icon-stat-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px 12px;
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.icon-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ink-soft);
}

.icon-stat-card--amber::before { background: var(--amber); }
.icon-stat-card--mint::before { background: var(--cyan); }

.icon-stat-card__body {
  min-width: 0;
}

.icon-stat-card__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.icon-stat-card__label::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-soft);
}

.icon-stat-card--amber .icon-stat-card__label::before { background: var(--amber); }
.icon-stat-card--mint .icon-stat-card__label::before { background: var(--cyan); }

.icon-stat-card__value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 1.4rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.icon-stat-card__meta {
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.icon-stat-card__meta--up {
  color: var(--green-ok);
}

.icon-stat-card__meta--down {
  color: var(--rust);
}

.tool-page-header p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 60ch;
  margin: 0;
}

.tool-page-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.favorite-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper-card);
  border: 1px solid var(--grid-line-strong);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.favorite-btn svg {
  width: 15px;
  height: 15px;
}

.favorite-btn:hover {
  border-color: var(--rust);
  color: var(--rust);
}

.favorite-btn.is-favorited {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--ink-deep);
}

.favorite-btn.is-favorited:hover {
  opacity: 0.9;
}

.rating-summary-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.rating-stars {
  color: var(--gold);
  letter-spacing: 1px;
}

.tag-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-chip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--grid-line);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.tag-chip:hover {
  border-color: var(--amber-dark);
  color: var(--ink);
  background: var(--paper-card);
}

/* ---------- Homepage feature cards (Bootstrap .card, themed) ---------- */

.feature-card-row {
  margin: 8px 0 32px;
}

.feature-card {
  background: var(--paper-card);
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-tag);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4), 0 0 22px rgba(255, 171, 46, 0.18);
  border-color: var(--amber-dark);
}

.feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ink-deep);
  color: var(--cyan);
  margin-bottom: 14px;
  box-shadow: inset 0 0 0 1px var(--grid-line-strong);
}

.feature-card-row .col-md-4:nth-child(2) .feature-card__icon {
  color: var(--amber);
}

.feature-card-row .col-md-4:nth-child(3) .feature-card__icon {
  color: var(--rust);
}

.feature-card .card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.feature-card .card-text {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ---------- Break-Even Calculator: cost/revenue chart ---------- */

.be-chart-wrap {
  margin-bottom: 16px;
}

.be-chart {
  width: 100%;
  height: auto;
  max-height: 220px;
}

.be-chart__axis {
  stroke: var(--grid-line-strong);
  stroke-width: 1.5;
}

.be-chart__dash {
  stroke: var(--grid-line-strong);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.be-chart__cost {
  fill: none;
  stroke: var(--rust);
  stroke-width: 2.5;
}

.be-chart__revenue {
  fill: none;
  stroke: var(--green-ok);
  stroke-width: 2.5;
}

.be-chart__point {
  fill: var(--ink);
}

.be-chart__label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--ink-soft);
}

.be-chart__label--cost {
  fill: var(--rust);
}

.be-chart__label--revenue {
  fill: var(--green-ok);
}



.pa-quick-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 18px 0 8px;
}

.pa-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pa-quick-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--paper);
  border: 1px solid var(--grid-line-strong);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.pa-quick-btn:hover {
  border-color: var(--amber-dark);
  background: var(--paper-card);
}



.cn-segments {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.cn-segment {
  flex: 1;
  min-width: 100px;
  background: var(--paper);
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}

.cn-segment__value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--amber-dark);
  letter-spacing: 0.04em;
}

.cn-segment__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-top: 6px;
}



.subtract-block {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--grid-line-strong);
}

.subtract-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rust);
  margin: 0 0 10px;
}

.add-block {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--grid-line-strong);
}

.result-section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber-dark);
  margin: 0 0 10px;
}

.result-callout {
  background: var(--ink-deep);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  margin-top: 20px;
}

.result-callout__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 6px;
}

.result-callout__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--amber);
  margin: 0;
}



.dp-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 6px;
}

.dp-row {
  padding: 12px 12px 0;
  background: var(--paper);
  border: 1px solid var(--grid-line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  margin: 0 0 10px;
}

.dp-winner {
  background: var(--ink-deep);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  padding: 12px 18px;
  border-radius: 999px;
  margin-top: 20px;
}

.dp-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 20px 20px 60px;
}

.dp-strategy-card {
  display: flex;
  flex-direction: column;
}

.dp-strategy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dp-strategy-head h2 {
  margin: 0;
}

.dp-strategy-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--amber-dark);
  background: rgba(255, 171, 46, 0.14);
  border: 1px solid var(--amber);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.dp-order-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 18px 0 10px;
}

.tool-panel {
  padding: 40px 0 44px;
  display: grid;
  gap: 24px;
}

/* Premium tool lock overlay - see _PremiumLockOverlay.cshtml. Only the
   interactive .tool-panel is blurred/disabled; the SEO content above it
   (H1, breadcrumbs, description, structured data) rendered by
   _ToolHeader.cshtml is untouched and stays fully visible/crawlable. */
body.tool-locked .tool-panel {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.premium-lock-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  pointer-events: none;
}

.premium-lock-overlay__card {
  pointer-events: auto;
  background: var(--paper-card);
  border: 1px solid var(--grid-line-strong);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22), 0 2px 0 var(--amber-dark);
  padding: 32px 36px;
  width: min(380px, calc(100vw - 32px));
  text-align: center;
}

.premium-lock-overlay__icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  /* Real bug: unlike the near-identical .locked-tool-teaser__icon (the
     anonymous-visitor version of this same "you need Pro" prompt), this
     one had no background/color/radius at all — a bare 18px icon
     floating on the modal's own background read as a stray mark, not an
     icon (reported). Matched to that sibling's treatment. */
  border-radius: 12px;
  background: var(--ink-deep);
  color: var(--amber);
}

.premium-lock-overlay__icon svg {
  width: 24px;
  height: 24px;
}

.premium-lock-overlay__card h2 {
  margin: 0 0 8px;
}

.premium-lock-overlay__card p {
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.premium-lock-overlay__card p a {
  color: var(--amber);
  font-weight: 600;
}

.premium-lock-overlay__card p a:hover {
  text-decoration: underline;
}

.premium-lock-overlay__card form {
  margin: 0 0 14px;
}

.premium-lock-overlay__card .btn.secondary {
  display: inline-block;
  margin-bottom: 14px;
}

.panel-card {
  background: var(--paper-card);
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-tag);
}

.panel-card h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-card h2::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--amber);
  border-radius: 2px;
}

textarea,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="email"],
input[type="password"] {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}

/* PROFILE_SECURITY_UI_ENHANCEMENT.md: must come after the shared input
   rule above (equal specificity — source order decides the tie) so the
   password-toggle icon has room and never sits under typed text. */
.password-input-wrap input {
  padding-right: 44px;
}

textarea:focus,
input:focus,
button:focus-visible,
.chip:focus-visible,
a:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 1px;
}

.field-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.stripe-card-element {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  background: var(--paper);
}

.stripe-card-element--focused {
  outline: 3px solid var(--amber);
  outline-offset: 1px;
}

.field-error {
  display: block;
  color: var(--rust);
  font-size: 0.8rem;
  margin-top: 6px;
  min-height: 1.1em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.btn {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  background: var(--ink-deep);
  color: var(--amber);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 171, 46, 0.4), 0 0 18px -4px rgba(255, 171, 46, 0.45);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none !important;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255, 171, 46, 0.6), 0 0 24px -2px rgba(255, 171, 46, 0.6);
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--grid-line-strong);
  box-shadow: none;
}

.btn.secondary:hover {
  background: var(--paper-card);
  border-color: var(--amber);
}

.btn--small {
  padding: 7px 14px;
  font-size: 0.72rem;
}

.mono {
  font-family: var(--font-mono);
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 0.85rem;
}

.btn--danger {
  background: transparent;
  border-color: var(--rust);
  color: var(--rust);
  box-shadow: none;
}

.btn--danger:hover {
  background: var(--rust);
  color: var(--ink-deep);
}

/* ---------- Admin: tool management table ---------- */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 10px 12px;
  border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--grid-line);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: var(--paper);
}

.admin-table__icon svg {
  width: 22px;
  height: 22px;
  color: var(--ink-soft);
}

.admin-table__actions {
  white-space: nowrap;
  text-align: right;
}

.admin-table__actions .btn--small {
  margin-left: 6px;
}

.admin-subnav {
  display: flex;
  gap: 4px;
  margin: -6px 0 20px;
  border-bottom: 1px solid var(--grid-line-strong);
}

.admin-subnav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.admin-subnav a:hover {
  color: var(--ink);
}

.admin-subnav a.active {
  color: var(--ink);
  border-bottom-color: var(--amber);
}

.role-pill {
  display: inline-block;
  font-family: var(--font-mono);
  /* UI_UX_ACCESSIBILITY_POLISH.md §16: repeated key-metadata label
     (account role), was 0.68rem. */
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--grid-line-strong);
  color: var(--ink-soft);
  margin: 0 4px 4px 0;
}

.role-pill--admin {
  background: var(--ink-deep);
  color: var(--amber);
  border-color: var(--ink-deep);
}

/* PROFILE_SECURITY_UI_ENHANCEMENT.md: a temporary credit unlock reads
   as "Temporary" (gold), never the same "Active" a real paid plan gets
   — must be defined after the base .role-pill rule above (equal
   specificity; source order decides the tie) or it silently loses. */
.role-pill--temp {
  background: rgba(212, 160, 23, 0.18);
  color: var(--gold);
  border-color: var(--gold);
}

.role-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.role-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
  padding: 10px 12px;
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
}

/* ---------- Avatars ---------- */

.avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ink-deep);
  color: var(--amber);
  font-family: var(--font-display);
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-circle--sm {
  width: 26px;
  height: 26px;
  font-size: 0.75rem;
}

.avatar-circle--lg {
  width: 84px;
  height: 84px;
  font-size: 2rem;
  border: 3px solid var(--paper-card);
  box-shadow: var(--shadow-tag);
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.avatar-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.avatar-row__actions form {
  display: inline-flex;
}

.btn--file {
  cursor: pointer;
}

.output-box {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--ink-deep);
  color: #e7edf7;
  padding: 16px;
  border-radius: var(--radius);
  min-height: 60px;
}

.output-box mark {
  background: var(--amber);
  color: var(--ink);
  padding: 0 2px;
  border-radius: 2px;
}

.status-msg {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-top: 10px;
}

.status-msg.error {
  color: var(--rust);
}

.status-msg.ok {
  color: var(--green-ok);
}

/* ---------- Prominent disclaimer box (health/legal/financial caveats) ---------- */

.disclaimer-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(241, 101, 74, 0.06);
  border: 1px solid var(--rust);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--ink);
}

.disclaimer-box__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--rust);
}

.disclaimer-box__icon svg {
  width: 100%;
  height: 100%;
}

.disclaimer-box p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.disclaimer-box strong {
  color: var(--rust);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 16px;
}

/* ---------- Admin overview panel (shown on /dashboard for Admin-role users) ---------- */

.admin-overview-panel {
  background: var(--ink-deep);
  border-radius: 14px;
  padding: 24px 28px;
  color: #fff;
}

.admin-overview-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.admin-overview-panel__subtitle {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  margin: 4px 0 0;
  max-width: 46ch;
}

.admin-overview-panel .stat-box {
  background: rgba(255, 255, 255, 0.06);
  border: none;
}

.admin-overview-panel .stat-box .stat-num {
  color: var(--amber);
}

.admin-overview-panel .stat-box .stat-label {
  color: rgba(255, 255, 255, 0.6);
}

.stat-box {
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  background: var(--paper);
}

.stat-box .stat-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}

.stat-box .stat-label {
  font-family: var(--font-mono);
  /* UI_UX_ACCESSIBILITY_POLISH.md §16: key-metadata label under a large
     stat number, was 0.68rem. */
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* ---------- New tool components: select, swatch, kv-list, diff ---------- */

select {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 12px 14px;
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

select:focus {
  outline: 3px solid var(--amber);
  outline-offset: 1px;
}

/* ---------- Select2 (themed to match the native select above, not
   Select2's generic default look) ---------- */

.select2-container--default .select2-selection--single {
  height: auto;
  padding: 12px 14px;
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  display: flex;
  align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.3;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  top: 0;
  right: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: var(--ink-soft) transparent transparent transparent;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent var(--ink-soft) transparent;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  outline: 3px solid var(--amber);
  outline-offset: 1px;
  border-color: var(--grid-line-strong);
}

.select2-dropdown {
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-body);
}

.select2-search--dropdown {
  padding: 8px;
  background: var(--paper-card);
}

.select2-search--dropdown .select2-search__field {
  border: 1px solid var(--grid-line-strong);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
}

.select2-search--dropdown .select2-search__field:focus {
  border-color: var(--amber);
}

.select2-results__options {
  background: var(--paper-card);
}

.select2-results__option {
  padding: 9px 14px;
  font-size: 0.9rem;
  color: var(--ink);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--ink-deep);
  color: var(--amber);
}

.select2-container--default .select2-results__option[aria-selected="true"] {
  background: var(--paper);
  font-weight: 600;
}

input[type="color"] {
  width: 56px;
  height: 44px;
  padding: 2px;
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--amber-dark);
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.swatch {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  border: 1px solid var(--grid-line-strong);
  box-shadow: var(--shadow-tag);
  flex-shrink: 0;
}

.kv-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--paper);
}

.kv-row .kv-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.kv-row .kv-value {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--ink);
  word-break: break-all;
  text-align: right;
  flex-grow: 1;
}

.kv-row .kv-copy {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.kv-row .kv-copy:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ---------- Text Diff: side-by-side comparison ---------- */

.diff-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 24px;
}

.diff-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.diff-panel-head h2 {
  margin: 0;
}

.diff-mini-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--grid-line-strong);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.diff-mini-btn:hover {
  border-color: var(--amber-dark);
  color: var(--ink);
}

.diff-action-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 24px 0;
}

.diff-action-row .btn svg {
  vertical-align: -2px;
  margin-right: 4px;
}

.diff-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.diff-stat {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.diff-stat--added {
  background: rgba(52, 211, 153, 0.14);
  color: #8ff0c4;
}

.diff-stat--removed {
  background: rgba(241, 101, 74, 0.12);
  color: #ffb4a3;
}

.diff-stat--same {
  background: var(--paper);
  color: var(--ink-soft);
  font-weight: 500;
}

.diff-sbs {
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  overflow: auto;
  max-height: 560px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
}

.diff-sbs__empty {
  padding: 30px 14px;
  text-align: center;
  color: var(--ink-soft);
  margin: 0;
}

.diff-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.diff-row:not(:last-child) {
  border-bottom: 1px solid var(--grid-line);
}

.diff-cell {
  display: flex;
  gap: 10px;
  padding: 2px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  min-width: 0;
}

.diff-cell:first-child {
  border-right: 1px solid var(--grid-line);
}

.diff-line-num {
  flex-shrink: 0;
  width: 34px;
  text-align: right;
  color: var(--grid-line-strong);
  user-select: none;
}

.diff-line-text {
  flex: 1;
  min-width: 0;
}

.diff-cell--added {
  background: rgba(52, 211, 153, 0.14);
  color: #8ff0c4;
}

.diff-cell--removed {
  background: rgba(241, 101, 74, 0.12);
  color: #ffb4a3;
}

.diff-cell--empty {
  background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 6px, var(--grid-line) 6px, var(--grid-line) 7px);
}

.md-preview {
  min-height: 60px;
  padding: 16px 18px;
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  background: var(--paper-card);
  color: var(--ink);
  line-height: 1.6;
  overflow-wrap: break-word;
}

.md-preview h1, .md-preview h2, .md-preview h3 {
  font-family: var(--font-display);
  margin: 0.6em 0 0.4em;
  line-height: 1.2;
}
.md-preview h1 { font-size: 1.6rem; }
.md-preview h2 { font-size: 1.3rem; }
.md-preview h3 { font-size: 1.1rem; }

.md-preview p { margin: 0 0 0.8em; }
.md-preview ul, .md-preview ol { margin: 0 0 0.8em; padding-left: 1.4em; }
.md-preview li { margin-bottom: 0.2em; }

.md-preview a { color: var(--amber-dark); }

.md-preview code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--paper);
  border: 1px solid var(--grid-line);
  border-radius: 4px;
  padding: 1px 5px;
}

.md-preview pre {
  background: var(--ink-deep);
  color: #e7edf7;
  padding: 14px 16px;
  border-radius: var(--radius);
  overflow-x: auto;
}
.md-preview pre code { background: none; border: none; padding: 0; }

.md-preview blockquote {
  margin: 0 0 0.8em;
  padding: 4px 16px;
  border-left: 3px solid var(--amber);
  color: var(--ink-soft);
}

.md-preview img { max-width: 100%; border-radius: var(--radius); }
.md-preview hr { border: none; border-top: 1px dashed var(--grid-line-strong); margin: 1em 0; }

/* ---------- Image tools: file input, preview frame ---------- */

input[type="file"] {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 10px 0;
}

input[type="file"]::file-selector-button {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 9px 16px;
  margin-right: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  background: var(--paper-card);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease;
}

input[type="file"]::file-selector-button:hover {
  background: var(--paper);
}

.preview-frame {
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 18px;
  text-align: center;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Before/after image comparison (e.g. Compress Image) ---------- */

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.compare-pane__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.compare-pane .preview-frame {
  min-height: 160px;
}

.compare-pane .preview-frame img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.compare-pane__size {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: center;
  margin: 8px 0 0;
  min-height: 1.2em;
}

.preview-frame img {
  max-width: 100%;
  max-height: 380px;
  border-radius: 4px;
  box-shadow: var(--shadow-tag);
}

.preview-frame .preview-placeholder {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.preview-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 10px;
  text-align: center;
}

/* ---------- Calculators: big result display ---------- */

.big-result {
  text-align: center;
  padding: 28px 20px;
  border-radius: var(--radius);
  background: var(--ink-deep);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.big-result::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 171, 46, 0.25), transparent 60%);
  pointer-events: none;
}

.big-result .big-result-value {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--amber);
  line-height: 1.1;
  position: relative;
}

.big-result .big-result-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 8px;
  position: relative;
}

.big-result .big-result-sub {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 12px;
  position: relative;
}

/* ---------- Password strength meter ---------- */

.strength-meter {
  text-align: center;
  padding: 26px 20px;
  border-radius: var(--radius);
  border: 2px solid var(--grid-line-strong);
  background: var(--paper);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.strength-meter__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.7rem);
  line-height: 1.1;
  color: var(--ink-soft);
  transition: color 0.25s ease;
}

.strength-meter__bits {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  margin-top: 8px;
}

.strength-meter__track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 18px;
}

.strength-meter__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--grid-line-strong);
  transition: width 0.25s ease, background 0.25s ease;
}

.strength-meter--weak { border-color: var(--rust); background: rgba(241, 101, 74, 0.06); }
.strength-meter--weak .strength-meter__label { color: var(--rust); }
.strength-meter--weak .strength-meter__fill { background: var(--rust); }

.strength-meter--fair { border-color: var(--amber-dark); background: rgba(217, 138, 28, 0.06); }
.strength-meter--fair .strength-meter__label { color: var(--amber-dark); }
.strength-meter--fair .strength-meter__fill { background: var(--amber-dark); }

.strength-meter--good { border-color: var(--amber); background: rgba(255, 171, 46, 0.09); }
.strength-meter--good .strength-meter__label { color: var(--amber-dark); }
.strength-meter--good .strength-meter__fill { background: var(--amber); }

.strength-meter--strong { border-color: var(--green-ok); background: rgba(52, 211, 153, 0.07); }
.strength-meter--strong .strength-meter__label { color: var(--green-ok); }
.strength-meter--strong .strength-meter__fill { background: var(--green-ok); }

.crack-time-callout {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--ink-deep);
}

.crack-time-callout__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
}

.crack-time-callout__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--amber);
  text-align: right;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--grid-line-strong);
  font-size: 0.85rem;
  color: var(--ink-soft);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.check-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--grid-line-strong);
  transition: color 0.2s ease;
}

.check-item.is-pass {
  border-color: var(--green-ok);
  background: rgba(52, 211, 153, 0.06);
  color: var(--ink);
}

.check-item.is-pass svg {
  color: var(--green-ok);
}

/* ---------- Resume/Cover-letter builder dynamic blocks ---------- */

.rb-block {
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  background: var(--paper);
}

/* ---------- Ad units ---------- */

.ad-slot {
  margin: 28px 0;
  text-align: center;
  position: relative;
}

.ad-slot__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  opacity: 0.6;
  margin-bottom: 6px;
}

.ad-slot .adsbygoogle {
  min-height: 90px;
}

.ad-slot--placeholder {
  border: 1px dashed var(--grid-line-strong);
  border-radius: var(--radius);
  padding: 22px 16px;
  background: repeating-linear-gradient(
    135deg,
    var(--paper),
    var(--paper) 10px,
    rgba(0, 0, 0, 0.02) 10px,
    rgba(0, 0, 0, 0.02) 20px
  );
}

.ad-slot--placeholder .ad-slot__label {
  opacity: 1;
  font-size: 0.72rem;
}

/* ---------- About this tool (SEO section) ---------- */

/* ---------- Ratings & reviews ---------- */

.rating-section {
  padding: 40px 0;
  border-top: 1px dashed var(--grid-line-strong);
}

.rating-widget {
  background: var(--paper-card);
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 480px;
}

.rating-widget__stars {
  display: flex;
  gap: 4px;
}

.rating-star {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--grid-line-strong);
  cursor: pointer;
  /* UI_UX_ACCESSIBILITY_POLISH.md §13: was padding:0 — the ~29px glyph
     alone fell short of a practical touch target; padding widens the hit
     area without inflating the visible star. */
  padding: 7px 5px;
  transition: color 0.1s ease, transform 0.1s ease;
}

.rating-star:hover,
.rating-star.is-hover {
  transform: scale(1.1);
}

.rating-star.is-filled {
  color: var(--gold);
}

.rating-widget[data-signed-in="false"] .rating-star {
  cursor: default;
  pointer-events: none;
  opacity: 0.6;
}

.rating-widget textarea {
  width: 100%;
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 12px;
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}

.review-list {
  margin-top: 28px;
  display: grid;
  gap: 16px;
  max-width: 640px;
}

.review-item {
  border-bottom: 1px solid var(--grid-line);
  padding-bottom: 16px;
}

.review-item:last-child {
  border-bottom: none;
}

.review-item__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.review-item__stars {
  color: var(--gold);
  letter-spacing: 1px;
}

.review-item__name {
  font-weight: 600;
  font-size: 0.9rem;
}

.review-item__date {
  color: var(--ink-soft);
}

.review-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

.tool-about {
  padding: 0 0 40px;
}

.related-tools {
  position: relative;
  margin-top: 8px;
  padding: 40px 0 44px;
  background:
    radial-gradient(ellipse 900px 400px at 15% 0%, rgba(255, 171, 46, 0.2), transparent 60%),
    linear-gradient(180deg, #0d1e28 0%, #050d13 100%);
  overflow: hidden;
}

.related-tools::before {
  /* faint blueprint-grid texture, echoing the page background but on dark */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.related-tools__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  position: relative;
}

.related-tools__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(255, 171, 46, 0.6);
  animation: related-pulse 2.2s ease-out infinite;
}

@keyframes related-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 171, 46, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(255, 171, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 171, 46, 0); }
}

.related-tools__title {
  position: relative;
  color: #fff;
  margin: 0 0 24px;
}

.related-tools__grid {
  position: relative;
}

.related-tools .tool-tag {
  overflow: hidden;
  border-color: transparent;
}

.related-tools .tool-tag::after {
  /* colored top accent bar */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--amber-dark), var(--amber));
}

.related-tools .tool-tag .tag-icon {
  background: linear-gradient(135deg, var(--amber-dark), var(--amber));
  color: var(--ink-deep);
  box-shadow: 0 4px 10px rgba(217, 138, 28, 0.35);
}

.related-tools .tool-tag:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--amber);
}

.tool-about__box {
  background: var(--paper-card);
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius);
  padding: 24px 28px;
}

.tool-about__box p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.tool-about__box p:last-child {
  margin-bottom: 0;
}

.tool-about__box h3 {
  margin: 24px 0 10px;
  font-size: 1.05rem;
  color: var(--ink);
}

.tool-about__box h3:first-child {
  margin-top: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-dark);
  margin: 0 0 8px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 2px solid var(--ink);
  background: var(--paper-card);
  padding: 44px 0 0;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 28px;
  padding-bottom: 32px;
}

.footer-col--brand .logo {
  margin-bottom: 10px;
}

.footer-col--brand p {
  max-width: 32ch;
}

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-dark);
  margin: 0 0 12px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--amber-dark);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0;
  border-top: 1px dashed var(--grid-line-strong);
}

.footer-bottom a {
  color: var(--ink-soft);
}

.footer-bottom a:hover {
  color: var(--amber-dark);
}

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo toggle"
      "search search";
    row-gap: 10px;
    align-items: center;
    height: auto;
    padding: 12px 0;
  }

  .site-header__actions {
    display: contents;
  }

  .logo {
    grid-area: logo;
  }

  .header-actions-end {
    grid-area: toggle;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

  .hero-eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    padding: 5px 10px;
  }

  .diff-input-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }

  .dp-compare-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 16px 40px;
  }

  .diff-row {
    grid-template-columns: 1fr;
  }

  .diff-cell:first-child {
    border-right: none;
    border-bottom: 1px solid var(--grid-line);
  }

  .diff-cell--empty:first-child {
    display: none;
  }

  .search-inline {
    grid-area: search;
    width: 100%;
  }

  .search-inline:focus-within {
    width: 100%;
  }

  .search-dropdown {
    min-width: 0;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper-card);
    border-bottom: 2px solid var(--ink);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s;
  }

  body.mobile-menu-open .main-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .main-nav > a,
  .main-nav .nav-user,
  .main-nav .nav-signup {
    padding: 13px 4px;
    border-bottom: 1px dashed var(--grid-line);
    width: 100%;
  }

  .nav-signup {
    border-radius: 8px;
    text-align: center;
    margin-top: 8px;
    border-bottom: 1px dashed var(--grid-line) !important;
  }

  .nav-divider {
    display: none;
  }

  .nav-dropdown {
    /* Sits after the plain links (Pricing/About/Source/Login/Sign up) —
       its accordion covers the whole tool catalog, so putting it first
       would push those links below several screens' worth of scrolling. */
    order: 1;
    border-bottom: 1px dashed var(--grid-line);
  }

  .nav-dropdown--user {
    order: 0;
  }

  .nav-dropdown__trigger {
    width: 100%;
    justify-content: space-between;
    padding: 13px 4px;
  }

  .mega-menu {
    position: static;
    transform: none;
    width: 100%;
    max-height: none;
    box-shadow: none;
    border: none;
    padding: 8px 0 12px;
    display: none;
  }

  .mega-menu.is-open {
    display: block;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
  }

  .user-menu {
    position: static;
    transform: none;
    width: 100%;
    box-shadow: none;
    border: none;
    padding: 4px 0 8px;
    display: none;
  }

  .user-menu.is-open {
    display: flex;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
  }

  .mega-menu__grid {
    grid-template-columns: 1fr;
    gap: 4px;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .mega-menu__col {
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--grid-line);
    margin-bottom: 10px;
  }

  .mega-menu__col:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }

  .mega-menu__footer {
    padding: 14px 0 4px;
  }

  .hero {
    padding: 36px 0 32px;
  }

  .tool-panel {
    padding: 28px 0 32px;
  }

  /* UI_UX_ACCESSIBILITY_POLISH.md §11: previously forced to a single
     column for the entire <=1200px range (tablet through mobile), causing
     excessive scrolling on a ~90-tool grid at tablet/small-laptop widths.
     2 columns here; the 900px breakpoint below drops to 1 for genuine
     mobile widths. */
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .check-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-col--brand {
    grid-column: 1 / -1;
  }
}

/* ---------- Pricing page ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
  padding-top: 8px;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper-card);
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-tag);
}

.pricing-card--popular {
  border: 2px solid var(--amber);
  box-shadow: 0 16px 32px rgba(255, 171, 46, 0.18);
  transform: translateY(-8px);
}

.pricing-card:target {
  border: 2px solid var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 171, 46, 0.15);
  scroll-margin-top: 90px;
}

.pricing-card--highlighted {
  border: 2px solid var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 171, 46, 0.15);
}

.pricing-card__badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--amber), var(--cyan));
  color: var(--ink-deep);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-card__tier {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.pricing-card__price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--ink);
  margin: 0 0 10px;
}

.pricing-card__price span {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.pricing-card__trial {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green-ok);
  background: rgba(52, 211, 153, 0.1);
  border-radius: 999px;
  padding: 4px 10px;
  margin: 0 0 14px;
}

.pricing-card__blurb {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0 0 20px;
  min-height: 2.6em;
}

.pricing-card__features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.pricing-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.4;
}

.pricing-card__features li::before {
  content: "✓";
  color: var(--green-ok);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-card__cta {
  width: 100%;
  text-align: center;
  cursor: pointer;
}

.pricing-footnote {
  text-align: center;
  margin-top: 28px;
}

/* ---------- Locked premium tool teaser ---------- */

.locked-tool-teaser {
  max-width: 480px;
  margin: 40px auto 60px;
  text-align: center;
  padding: 40px 32px;
  background: var(--paper-card);
  border: 1px dashed var(--grid-line-strong);
  border-radius: 16px;
}

.locked-tool-teaser__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--ink-deep);
  color: var(--amber);
  margin-bottom: 18px;
}

.locked-tool-teaser__icon svg {
  width: 24px;
  height: 24px;
}

.locked-tool-teaser h2 {
  font-family: var(--font-display);
  margin: 0 0 8px;
}

.locked-tool-teaser p {
  color: var(--ink-soft);
  margin: 0 0 20px;
}

/* ---------- Pricing modal ---------- */

.pricing-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 10, 0.78);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.pricing-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

body.pricing-modal-open {
  overflow: hidden;
}

.pricing-modal {
  position: relative;
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper-card);
  border: 1px solid var(--grid-line-strong);
  border-radius: 18px;
  padding: 44px 36px 36px;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.pricing-modal-backdrop.is-open .pricing-modal {
  transform: translateY(0);
}

.pricing-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  /* UI_UX_ACCESSIBILITY_POLISH.md §13: practical ~44x44 touch target, was 34x34. */
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--grid-line-strong);
  border-radius: 50%;
  background: var(--paper-card);
  color: var(--ink);
  cursor: pointer;
}

.pricing-modal__title {
  font-family: var(--font-display);
  text-align: center;
  margin: 4px 0 28px;
}

.pricing-modal .pricing-card--popular {
  transform: none;
}

@media (max-width: 900px) {
  .pricing-grid,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .pricing-card--popular {
    transform: none;
  }

  .pricing-modal {
    padding: 36px 20px 24px;
  }

  .locked-tool-teaser {
    margin: 24px auto 40px;
    padding: 28px 20px;
  }
}

/* UI_UX_ACCESSIBILITY_POLISH.md §11: genuine mobile widths only — 768px
   (tablet) still gets the 1200px breakpoint's 2-column layout above; only
   truly narrow widths collapse to 1 column. A dedicated, narrower query
   (rather than folding this into the shared 900px block, which also
   governs nav/footer/pricing layout unrelated to this) keeps the change
   scoped to exactly the one component this was about. */
@media (max-width: 640px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
