/* ============================================
   UTILIAA — Global Styles
   Design System: Clean, Professional, Modern
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --text-900: #0f172a;
  --text-800: #1e293b;
  --text-700: #334155;
  --text-600: #475569;
  --text-500: #64748b;
  --text-400: #94a3b8;
  --border: #e2e8f0;
  --border-2: #f1f5f9;
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --bg-3: #f1f5f9;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md:
    0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg:
    0 10px 15px -3px rgba(15, 23, 42, 0.08),
    0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --header-h: 64px;
  --max-w: 1200px;
  --font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
}

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-800);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  max-width: 100%;
  display: block;
}
a {
  color: var(--brand-600);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--brand-700);
}
ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-900);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}
h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
}
h4 {
  font-size: 1.05rem;
}

p {
  color: var(--text-600);
}

/* --- Layout --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}
.section {
  padding: 56px 0;
}
.section-sm {
  padding: 36px 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--brand-700);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-secondary {
  background: #fff;
  color: var(--text-800);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--bg-2);
  border-color: var(--text-400);
  color: var(--text-900);
}
.btn-sm {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}
.btn-block {
  width: 100%;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-800);
  margin-bottom: 6px;
}
.form-label .req {
  color: var(--danger);
  margin-left: 2px;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-900);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.form-input::placeholder {
  color: var(--text-400);
}
.form-textarea {
  resize: vertical;
  min-height: 100px;
}
.form-hint {
  font-size: 12.5px;
  color: var(--text-500);
  margin-top: 5px;
}
.form-error {
  font-size: 12.5px;
  color: var(--danger);
  margin-top: 5px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- Cards --- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.2s,
    transform 0.2s,
    border-color 0.2s;
}
.card-hover:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

/* --- Tool Card --- */
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  position: relative;
  height: 100%;
}
.tool-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: inherit;
}
.tool-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tool-card__icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}
.tool-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.tool-card__title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-900);
  margin-bottom: 4px;
}
.tool-card__desc {
  font-size: 14px;
  color: var(--text-600);
  line-height: 1.5;
}
.tool-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 4px;
}
.tool-card__cat {
  font-size: 12.5px;
  color: var(--text-500);
  font-weight: 500;
}
.tool-card__arrow {
  color: var(--brand-600);
  transition: transform 0.15s;
  display: flex;
}
.tool-card__arrow svg {
  width: 18px;
  height: 18px;
}
.tool-card:hover .tool-card__arrow {
  transform: translateX(3px);
}
.tool-card--coming {
  opacity: 0.7;
}
.tool-card--coming:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}
.tool-card__badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-3);
  color: var(--text-600);
}

/* --- Category Card --- */
.cat-card {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  height: 100%;
}
.cat-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}
.cat-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-card__icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}
.cat-card__count {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-600);
}
.cat-card__title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-900);
}
.cat-card__desc {
  font-size: 14px;
  color: var(--text-600);
  line-height: 1.55;
}
.cat-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-600);
  margin-top: auto;
  padding-top: 6px;
}
.cat-card__cta svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  flex-shrink: 0;
}
.cat-card:hover .cat-card__cta svg {
  transform: translateX(2px);
  transition: transform 0.15s;
}

.cat-icon--calc {
  background: #fef3c7;
  color: #b45309;
}
.cat-icon--img {
  background: #dcfce7;
  color: #15803d;
}
.cat-icon--text {
  background: #dbeafe;
  color: #1d4ed8;
}
.cat-icon--dev {
  background: #f3e8ff;
  color: #7e22ce;
}
.cat-icon--pdf {
  background: #fee2e2;
  color: #b91c1c;
}
.cat-icon--ai {
  background: #cffafe;
  color: #0e7490;
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: var(--text-900);
  letter-spacing: -0.03em;
  text-decoration: none;
}
.logo:hover {
  color: var(--text-900);
}
.logo__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.logo__mark svg {
  width: 20px;
  height: 20px;
  display: block;
}
.logo__text .brand-accent,
.logo__text .logo__t-accent,
.footer__logo .logo__t-accent {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__link {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-700);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition:
    color 0.15s,
    background 0.15s;
}
.nav__link:hover,
.nav__link--active {
  color: var(--brand-600);
  background: var(--brand-50);
}
.nav__dropdown {
  position: relative;
}
.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s ease;
  z-index: 50;
}
.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav__dropdown-item {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-700);
  text-decoration: none;
}
.nav__dropdown-item:hover {
  background: var(--bg-2);
  color: var(--brand-600);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-700);
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover {
  background: var(--bg-2);
  color: var(--brand-600);
}
.icon-btn:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}
.icon-btn svg {
  width: 19px;
  height: 19px;
}

.mobile-toggle {
  display: none;
}

/* --- Mobile Nav --- */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  padding: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 99;
}
.mobile-nav--open {
  transform: translateX(0);
}
.mobile-nav__section {
  margin-bottom: 24px;
}
.mobile-nav__section-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-400);
  margin-bottom: 10px;
  padding: 0 4px;
}
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-800);
  text-decoration: none;
  font-weight: 500;
}
.mobile-nav__link:hover {
  background: var(--bg-2);
  color: var(--brand-600);
}
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}
.mobile-overlay--show {
  opacity: 1;
  visibility: visible;
}

/* --- Search Modal --- */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s ease;
}
.search-modal--open {
  opacity: 1;
  visibility: visible;
}
.search-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}
.search-modal__panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.15s ease;
}
.search-modal--open .search-modal__panel {
  transform: translateY(0) scale(1);
}
.search-modal__input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.search-modal__input-wrap svg {
  width: 20px;
  height: 20px;
  color: var(--text-400);
  flex-shrink: 0;
}
.search-modal__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 17px;
  color: var(--text-900);
}
.search-modal__input::placeholder {
  color: var(--text-400);
}
.search-modal__close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--bg-2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-600);
  transition: background 0.15s;
}
.search-modal__close:hover {
  background: var(--bg-3);
}
.search-modal__close svg {
  width: 16px;
  height: 16px;
}
.search-modal__results {
  max-height: 55vh;
  overflow-y: auto;
  padding: 8px;
}
.search-modal__group-label {
  padding: 12px 12px 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-400);
}
.search-modal__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}
.search-modal__item:hover,
.search-modal__item--active {
  background: var(--bg-2);
}
.search-modal__item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-modal__item-icon svg {
  width: 18px;
  height: 18px;
}
.search-modal__item-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-900);
}
.search-modal__item-desc {
  font-size: 13px;
  color: var(--text-500);
}
.search-modal__empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-500);
}
.search-modal__kbd {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-2);
  font-size: 11px;
  font-family: monospace;
  color: var(--text-500);
}

/* --- Footer --- */
.footer {
  background: var(--text-900);
  color: var(--text-400);
  margin-top: 80px;
}
.footer__top {
  padding: 56px 0 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer__brand-tag {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-400);
  margin-top: 14px;
  max-width: 280px;
}
.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  color: #fff;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.footer__logo:hover {
  color: #fff;
}
.footer__col-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 18px;
}
.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__link {
  color: var(--text-400);
  font-size: 14.5px;
  text-decoration: none;
  transition: color 0.15s;
}
.footer__link:hover {
  color: #fff;
}
.footer__bottom {
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
}
.footer__bottom-line {
  color: var(--text-400);
}
.footer__attribution {
  color: var(--text-400);
}
.footer__attribution a {
  color: #fff;
  font-weight: 500;
}

/* --- Hero --- */
.hero {
  padding: 72px 0 64px;
  background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
  border-bottom: 1px solid var(--border-2);
}
.hero__inner {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
}
.hero__title {
  margin-bottom: 16px;
}
.hero__subtitle {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text-600);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero__search {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}
.hero__search-input {
  width: 100%;
  padding: 17px 54px 17px 54px;
  font-family: inherit;
  font-size: 16.5px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  transition: all 0.15s;
}
.hero__search-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px var(--brand-100);
}
.hero__search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-400);
  width: 20px;
  height: 20px;
  pointer-events: none;
}
.hero__search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}
.hero__examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.hero__example {
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-600);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.hero__example:hover {
  border-color: var(--brand-500);
  color: var(--brand-600);
}

/* --- Section Headers --- */
.section__header {
  margin-bottom: 32px;
}
.section__eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-600);
  margin-bottom: 8px;
}
.section__title {
  margin-bottom: 10px;
}
.section__subtitle {
  color: var(--text-600);
  max-width: 600px;
  font-size: 16px;
}

/* --- Grid Helpers --- */
.grid-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.grid-cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.grid-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* --- Features --- */
.feature {
  padding: 20px 18px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 100%;
}
.feature__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature__icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}
.feature__title {
  font-size: 16.5px;
  margin-bottom: 8px;
}
.feature__desc {
  font-size: 14px;
  color: var(--text-600);
  line-height: 1.6;
}
.feature__icon--free {
  background: #dcfce7;
  color: #15803d;
}
.feature__icon--lock {
  background: #fee2e2;
  color: #b91c1c;
}
.feature__icon--bolt {
  background: #fef3c7;
  color: #b45309;
}
.feature__icon--web {
  background: #dbeafe;
  color: #1d4ed8;
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: var(--radius-xl);
  padding: 56px 40px;
  text-align: center;
  color: #fff;
}
.cta-section h2 {
  color: #fff;
  margin-bottom: 12px;
}
.cta-section p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 28px;
  font-size: 16.5px;
}
.cta-section .btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.cta-section .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 18px 0;
  font-size: 14px;
  color: var(--text-500);
  border-bottom: 1px solid var(--border-2);
  background: var(--bg-2);
}
.breadcrumb__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-600);
}
.breadcrumb a:hover {
  color: var(--brand-600);
}
.breadcrumb__sep {
  color: var(--text-400);
}
.breadcrumb__current {
  color: var(--text-800);
  font-weight: 500;
}

/* --- Tool Page --- */
.tool-page {
  padding: 40px 0 64px;
}
.tool-hero {
  margin-bottom: 32px;
}
.tool-hero h1 {
  margin-bottom: 10px;
}
.tool-hero p {
  font-size: 16.5px;
  color: var(--text-600);
  max-width: 700px;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}
.tool-main {
  min-width: 0;
}
.tool-sidebar {
  position: sticky;
  top: 84px;
  align-self: flex-start;
}

.help-block {
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 32px;
}
.help-block h3 {
  margin-bottom: 12px;
  font-size: 17px;
}
.help-block p,
.help-block li {
  font-size: 14.5px;
  color: var(--text-700);
  line-height: 1.7;
}
.help-block ol,
.help-block ul {
  padding-left: 22px;
}
.help-block li {
  margin-bottom: 8px;
}
.help-block ul li {
  list-style: disc;
}
.help-block ol li {
  list-style: decimal;
}

/* --- Result Card --- */
.result-card {
  margin-top: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #fafbff 0%, #f5f3ff 100%);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-lg);
}
.result-card__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-600);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-card__title svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.result-note svg,
.breadcrumb svg,
.alert svg {
  flex-shrink: 0;
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.result-item {
  background: #fff;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
}
.result-item__label {
  font-size: 12.5px;
  color: var(--text-500);
  font-weight: 500;
  margin-bottom: 4px;
}
.result-item__value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-900);
  font-variant-numeric: tabular-nums;
}
.result-item__value--small {
  font-size: 18px;
}
.result-item--highlight {
  background: var(--brand-600);
  border-color: var(--brand-600);
}
.result-item--highlight .result-item__label {
  color: rgba(255, 255, 255, 0.85);
}
.result-item--highlight .result-item__value {
  color: #fff;
}

.result-note {
  margin-top: 18px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--warning);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-700);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.result-note svg {
  width: 18px;
  height: 18px;
  color: var(--warning);
  flex-shrink: 0;
  margin-top: 1px;
}

/* --- Tabs --- */
.tabs {
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.tab-btn {
  padding: 12px 18px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.tab-btn:hover {
  color: var(--text-800);
}
.tab-btn--active {
  color: var(--brand-600);
  border-bottom-color: var(--brand-600);
}
.tab-panel {
  display: none;
}
.tab-panel--active {
  display: block;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- FAQ --- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}
.faq-item__q {
  width: 100%;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-800);
  transition: background 0.15s;
}
.faq-item__q:hover {
  background: var(--bg-2);
}
.faq-item__q svg {
  width: 18px;
  height: 18px;
  color: var(--text-400);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item--open .faq-item__q svg {
  transform: rotate(180deg);
}
.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-item--open .faq-item__a {
  max-height: 500px;
}
.faq-item__a-inner {
  padding: 0 20px 18px;
  font-size: 14.5px;
  color: var(--text-600);
  line-height: 1.7;
}

/* --- Related Tools --- */
.related-tools {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border-2);
}
.related-tools h2 {
  margin-bottom: 24px;
  font-size: 1.5rem;
}

/* --- Segment / Toggle --- */
.segment {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}
.segment__btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-600);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
}
.segment__btn--active {
  background: #fff;
  color: var(--text-900);
  box-shadow: var(--shadow-sm);
}

/* --- Switch --- */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14.5px;
  color: var(--text-700);
  user-select: none;
}
.switch__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch__track {
  position: relative;
  width: 42px;
  height: 24px;
  background: var(--border);
  border-radius: 999px;
  transition: background 0.15s;
}
.switch__input:checked + .switch__track {
  background: var(--brand-600);
}
.switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s;
}
.switch__input:checked + .switch__track .switch__thumb {
  transform: translateX(18px);
}

/* --- Slider --- */
.slider-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}
.slider-wrap .form-input {
  max-width: 120px;
  text-align: center;
}
input[type="range"] {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-3);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-600);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-600);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* --- Dropzone --- */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
  background: var(--bg-2);
}
.dropzone:hover,
.dropzone--drag {
  border-color: var(--brand-500);
  background: var(--brand-50);
}
.dropzone__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: var(--radius-lg);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-600);
  border: 1px solid var(--border);
}
.dropzone__icon svg {
  width: 28px;
  height: 28px;
}
.dropzone__title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-900);
  margin-bottom: 6px;
}
.dropzone__desc {
  font-size: 14px;
  color: var(--text-500);
  margin-bottom: 14px;
}
.dropzone__hint {
  font-size: 12.5px;
  color: var(--text-400);
}

/* --- Image Preview --- */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.preview-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.preview-box__header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.preview-box__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-800);
}
.preview-box__meta {
  font-size: 12.5px;
  color: var(--text-500);
  font-variant-numeric: tabular-nums;
}
.preview-box__img {
  padding: 16px;
  background: repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 50% / 20px
    20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-height: 360px;
  overflow: hidden;
}
.preview-box__img img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}
.preview-box--placeholder {
  padding: 40px 20px;
  color: var(--text-400);
  font-size: 14px;
  text-align: center;
}

.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: var(--radius);
  font-size: 13.5px;
  color: #155e75;
  margin-bottom: 20px;
}
.info-banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.savings-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #dcfce7;
  color: #166534;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

/* --- Alert --- */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.alert--success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.alert--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* --- Prose (legal pages) --- */
.prose {
  max-width: 800px;
  margin: 0 auto;
}
.prose h1 {
  margin-bottom: 16px;
}
.prose h2 {
  margin: 36px 0 14px;
  font-size: 1.4rem;
}
.prose h3 {
  margin: 24px 0 10px;
  font-size: 1.15rem;
}
.prose p,
.prose li {
  font-size: 15.5px;
  color: var(--text-700);
  line-height: 1.75;
  margin-bottom: 12px;
}
.prose ul,
.prose ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.prose ul li {
  list-style: disc;
}
.prose ol li {
  list-style: decimal;
}
.prose strong {
  color: var(--text-900);
}
.prose em {
  color: var(--text-800);
}

/* --- Category Page --- */
.cat-header {
  padding: 48px 0 32px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border-2);
}
.cat-header__eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-600);
  margin-bottom: 10px;
}
.cat-header h1 {
  margin-bottom: 8px;
}
.cat-header p {
  font-size: 16.5px;
  color: var(--text-600);
  max-width: 650px;
}

.cat-tools {
  padding: 48px 0;
}
.cat-tools__label {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-400);
  margin-bottom: 14px;
}
.coming-soon-grid {
  margin-top: 36px;
}

/* --- Contact page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
}
.contact-info-card {
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.contact-info-card h3 {
  margin-bottom: 14px;
}
.contact-info-card p {
  font-size: 14.5px;
  color: var(--text-700);
  margin-bottom: 20px;
  line-height: 1.7;
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.contact-info-item:last-child {
  border-bottom: none;
}
.contact-info-item svg {
  width: 20px;
  height: 20px;
  color: var(--brand-600);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-info-item__label {
  font-size: 12.5px;
  color: var(--text-500);
  margin-bottom: 2px;
}
.contact-info-item__value {
  font-size: 15px;
  color: var(--text-900);
  font-weight: 500;
}

/* --- Code example block --- */
.code-ex {
  background: var(--text-900);
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: "SF Mono", Consolas, Monaco, monospace;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 12px 0;
  overflow-x: auto;
}
.code-ex .var {
  color: #a5b4fc;
}
.code-ex .val {
  color: #6ee7b7;
}

/* --- Future Ad Space Placeholder (invisible structure) --- */
.ad-slot {
  min-height: 0;
  width: 100%;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-tools {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-cats {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-features {
    grid-template-columns: repeat(2, 1fr);
  }
  .tool-layout {
    grid-template-columns: 1fr;
  }
  .tool-sidebar {
    position: static;
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 58px;
  }
  .section {
    padding: 48px 0;
  }
  .nav {
    display: none;
  }
  .mobile-toggle {
    display: inline-flex;
  }
  .hero {
    padding: 48px 0 40px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .preview-grid {
    grid-template-columns: 1fr;
  }
  .result-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .cta-section {
    padding: 40px 24px;
  }
  .hero__search-input {
    padding: 14px 48px 14px 48px;
    font-size: 15.5px;
    border-radius: 12px;
  }
}

@media (max-width: 560px) {
  .grid-tools {
    grid-template-columns: 1fr;
  }
  .grid-cats {
    grid-template-columns: 1fr;
  }
  .grid-features {
    grid-template-columns: 1fr;
  }
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
  .segment {
    width: 100%;
  }
  .segment__btn {
    flex: 1;
  }
  .card,
  .tool-card,
  .cat-card,
  .help-block,
  .result-card {
    padding: 18px;
  }
  .dropzone {
    padding: 32px 18px;
  }
}

/* --- Focus --- */
:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-2);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
