/* Toolfrnd global stylesheet */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --accent: #ec4899;
  --bg: #fafafb;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(99, 102, 241, 0.10);
  --radius: 14px;
  --radius-sm: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.logo {
  font-size: 21px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.6px;
  transition: opacity 0.15s;
}

.logo:hover {
  text-decoration: none;
  opacity: 0.85;
}

.logo-mark {
  width: 34px;
  height: 34px;
  background: url("../images/logo-mark.svg") center/contain no-repeat;
  display: inline-flex;
  font-size: 0;
  color: transparent;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.25));
}

.main-nav {
  display: flex;
  gap: 22px;
  align-items: center;
}

.main-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
}

.main-nav a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* Tools dropdown mega menu */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-dropdown-toggle::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.2s;
}
.nav-dropdown.open .nav-dropdown-toggle,
.nav-dropdown-toggle:hover {
  color: var(--primary);
}
.nav-dropdown.open .nav-dropdown-toggle::after {
  transform: rotate(-135deg);
  margin-top: 2px;
}
.mega-menu {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  width: min(600px, calc(100vw - 40px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
  padding: 20px;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  z-index: 200;
}
.mega-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 24px;
  width: 14px;
  height: 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  transform: rotate(45deg);
}
.nav-dropdown.open .mega-menu {
  display: grid;
}
.mega-col h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.mega-col a {
  display: block;
  padding: 6px 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, transform 0.15s;
}
.mega-col a:hover {
  color: var(--primary);
  text-decoration: none;
  transform: translateX(3px);
}

.nav-toggle {
  display: none;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  padding: 0;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.nav-toggle:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}
.nav-toggle:active {
  transform: scale(0.96);
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: background 0.15s, transform 0.2s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, top 0.2s;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle.open span {
  background: transparent;
}
.nav-toggle.open span::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-toggle.open span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Hero */
.hero {
  padding: 60px 0 40px;
  text-align: center;
  background: linear-gradient(180deg, var(--primary-light), var(--bg));
}

.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 24px;
}

.search-box {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  font-size: 16px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.search-box::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Main */
main {
  flex: 1;
  padding: 40px 0 60px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

/* Tool grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  text-decoration: none;
}

.tool-card .icon {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 6px;
}

.tool-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.tool-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.category-tabs button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.category-tabs button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.category-tabs button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Tool page layout */
.tool-page {
  padding: 40px 0;
}

.breadcrumb {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 500;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.tool-header {
  margin-bottom: 28px;
}

.tool-header h1 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.tool-header p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 720px;
}

.tool-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 900px) {
  .tool-body {
    grid-template-columns: 1fr 320px;
  }
}

.tool-card-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

/* Form */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 500px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
  text-decoration: none;
}

.btn:hover {
  background: var(--primary-dark);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--primary);
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Result box */
.result {
  margin-top: 22px;
  padding: 20px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
}

.result h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.result-grid .cell {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.result-grid .cell .label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.result-grid .cell .num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

.hidden {
  display: none !important;
}


.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}
.empty-state .empty-icon {
  font-size: 44px;
  margin-bottom: 12px;
  display: block;
  opacity: 0.7;
}
.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.55;
}
@media (max-width: 600px) {
  .empty-state {
    padding: 32px 18px;
  }
  .empty-state .empty-icon {
    font-size: 36px;
  }
  .empty-state h3 {
    font-size: 17px;
  }
  .empty-state p {
    font-size: 13px;
  }
}

/* Info sidebar */
.tool-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.side-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.side-card p, .side-card li {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

.side-card ul {
  list-style: none;
  padding: 0;
}

.side-card ul li {
  padding: 4px 0;
}

.side-card ul.linklist li {
  padding: 0;
}

.side-card ul.linklist li a {
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  margin-bottom: 6px;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.side-card ul.linklist li a::after {
  content: "\2192";
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.side-card ul.linklist li a:hover {
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
  transform: translateX(2px);
  box-shadow: var(--shadow-md);
}

.side-card ul.linklist li a:hover::after {
  color: #ffffff;
  transform: translateX(3px);
}

.side-card ul.linklist li:last-child a {
  margin-bottom: 0;
}

/* Article content (for info sections on tool pages) */
.article {
  margin-top: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.article h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  margin-top: 24px;
  color: var(--text);
}

.article h2:first-child {
  margin-top: 0;
}

.article h3 {
  font-size: 17px;
  font-weight: 700;
  margin-top: 18px;
  margin-bottom: 8px;
  color: var(--text);
}

.article p, .article li {
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 12px;
}

.article ul, .article ol {
  padding-left: 22px;
  margin-bottom: 14px;
}

.article strong {
  color: var(--text);
}

/* Ad slot - hidden by default. When AdSense is approved:
   1. Uncomment the AdSense script in each HTML head
   2. Change 'display: none' below to 'display: flex' */
.ad-slot {
  display: none;
  margin: 28px 0;
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  min-height: 100px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  align-items: center;
  justify-content: center;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 40px 0 20px;
  margin-top: 40px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-cols h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 12px;
  font-weight: 700;
}

.footer-cols ul {
  list-style: none;
  padding: 0;
}

.footer-cols ul li {
  padding: 4px 0;
}

.footer-cols ul li a {
  color: #cbd5e1;
  font-size: 14px;
}

.footer-cols ul li a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

/* Simple pages */
.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 0;
}

.page h1 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.page h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 26px;
  margin-bottom: 10px;
}

.page p, .page li {
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 12px;
}

.page ul, .page ol {
  padding-left: 22px;
}

.page a {
  color: var(--primary);
}

.notice {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  color: #78350f;
  font-size: 14px;
}

/* Mobile nav */
@media (max-width: 720px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
  }
  .main-nav.open {
    display: flex;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .main-nav a {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
  }
  .main-nav a {
    text-align: center;
  }
  .main-nav > a:last-child,
  .main-nav > .nav-dropdown:last-child {
    border-bottom: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  /* Mobile: mega menu becomes inline accordion */
  .nav-dropdown {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  .nav-dropdown-toggle {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 8px 0;
    font-size: 15px;
    gap: 8px;
  }
  .mega-menu {
    position: static;
    min-width: 0;
    grid-template-columns: 1fr;
    padding: 8px 0 12px;
    background: transparent;
    border: none;
    box-shadow: none;
    gap: 10px;
  }
  .mega-menu::before {
    display: none;
  }
  .mega-col {
    text-align: left;
  }
  .mega-col h4 {
    font-size: 11px;
    margin-bottom: 6px;
    padding-bottom: 4px;
  }
  .mega-col a {
    font-size: 13px;
    padding: 4px 0;
  }
  .mega-col a:hover {
    transform: none;
  }
}

/* Tablet: compact layout below 900px */
@media (max-width: 900px) {
  .container {
    padding: 0 16px;
  }
  .hero {
    padding: 40px 0 28px;
  }
  .hero h1 {
    margin-bottom: 10px;
  }
  .hero p {
    font-size: 15px;
    margin-bottom: 18px;
  }
  .tool-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }
  .tool-card {
    padding: 16px;
  }
  .tool-card h3 {
    font-size: 15px;
  }
  .tool-card p {
    font-size: 12.5px;
  }
  .tool-card .icon {
    width: 34px;
    height: 34px;
    font-size: 17px;
    margin-bottom: 4px;
  }
  .section-title {
    font-size: 19px;
  }
  .tool-card-main {
    padding: 20px;
  }
  .article {
    padding: 20px;
    margin-top: 28px;
  }
  .article h2 {
    font-size: 19px;
  }
  .article h3 {
    font-size: 16px;
  }
  .article p, .article li {
    font-size: 14px;
  }
  .side-card {
    padding: 16px;
  }
  .result {
    padding: 16px;
  }
  .result .value {
    font-size: 20px;
  }
  .result-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .result-grid .cell {
    padding: 10px 12px;
  }
  .result-grid .cell .num {
    font-size: 15px;
  }
  .footer-cols {
    gap: 20px;
    margin-bottom: 20px;
  }
  .page {
    padding: 28px 0;
  }
  .page h1 {
    font-size: 26px;
  }
  .page h2 {
    font-size: 18px;
  }
}

/* Phone: single-column, compact below 600px */
@media (max-width: 600px) {
  .container {
    padding: 0 14px;
  }
  .header-inner {
    padding: 12px 0;
  }
  .logo {
    font-size: 18px;
    gap: 6px;
  }
  .logo-mark {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }
  .hero {
    padding: 28px 0 20px;
  }
  .hero h1 {
    font-size: 24px;
    letter-spacing: -0.5px;
  }
  .hero p {
    font-size: 14px;
    line-height: 1.5;
  }
  .search-box input {
    padding: 12px 16px 12px 40px;
    font-size: 15px;
  }
  main {
    padding: 24px 0 40px;
  }
  .tool-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .tool-card {
    padding: 14px 16px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .tool-card .icon {
    flex-shrink: 0;
    margin-bottom: 0;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .tool-card h3 {
    font-size: 15px;
    margin-bottom: 2px;
  }
  .tool-card p {
    font-size: 12.5px;
    line-height: 1.4;
  }
  .category-tabs {
    gap: 6px;
    margin-bottom: 16px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .category-tabs button {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 13px;
  }
  .tool-header h1 {
    font-size: 22px;
  }
  .tool-header p {
    font-size: 14px;
  }
  .tool-page {
    padding: 24px 0;
  }
  .tool-card-main {
    padding: 16px;
  }
  .field label {
    font-size: 13px;
  }
  .field input[type="text"],
  .field input[type="number"],
  .field input[type="date"],
  .field input[type="email"],
  .field select,
  .field textarea {
    padding: 10px 12px;
    font-size: 14px;
  }
  .btn {
    padding: 10px 18px;
    font-size: 14px;
  }
  .btn-row {
    gap: 8px;
  }
  .article {
    padding: 16px;
  }
  .article h2 {
    font-size: 17px;
    margin-top: 18px;
  }
  .article h3 {
    font-size: 15px;
  }
  .side-card h3 {
    font-size: 14px;
  }
  .side-card p, .side-card li {
    font-size: 13px;
  }
  .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    margin-bottom: 16px;
  }
  .footer-cols > div:first-child {
    grid-column: 1 / -1;
    text-align: center;
    padding-bottom: 6px;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 4px;
  }
  .footer-cols > div:first-child p {
    max-width: 320px;
    margin: 0 auto;
  }
  .footer-cols h4 {
    font-size: 13px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .footer-cols ul li {
    padding: 2px 0;
  }
  .footer-cols ul li a {
    font-size: 13px;
  }
  .site-footer {
    padding: 24px 0 14px;
    margin-top: 24px;
  }
  .footer-bottom {
    font-size: 12px;
    padding-top: 14px;
  }
  .page {
    padding: 24px 0;
  }
  .page h1 {
    font-size: 22px;
  }
  .breadcrumb {
    font-size: 12.5px;
    margin-bottom: 14px;
  }
}

/* 2026 EEAT elements */
.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.tool-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tool-meta .meta-item strong {
  color: var(--text);
  font-weight: 600;
}
.tool-meta .meta-dot {
  width: 4px;
  height: 4px;
  background: var(--border);
  border-radius: 50%;
}

.author-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 20px 0;
}
.author-byline .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.author-byline .meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.author-byline .name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.author-byline .role {
  font-size: 12.5px;
  color: var(--text-muted);
}

.reviewer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #ecfdf5;
  color: #047857;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.reviewer-badge::before {
  content: "\2713";
  font-size: 11px;
  font-weight: 800;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.copy-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.copy-btn.copied {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
}

/* Tabs for multi-mode tools */
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.tabs .tab {
  background: transparent;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-family: inherit;
  position: relative;
  transition: color 0.15s;
}
.tabs .tab:hover {
  color: var(--primary);
}
.tabs .tab.active {
  color: var(--primary);
}
.tabs .tab.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -5px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}

/* How-to-use ordered steps */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.steps li {
  counter-increment: step;
  padding: 10px 14px 10px 44px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
  border: 1px solid var(--border);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 10px;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* Highlight callout */
.callout {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  font-size: 14.5px;
  line-height: 1.6;
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  color: var(--text);
}
.callout.warn {
  border-left-color: #f59e0b;
  background: #fffbeb;
  color: #78350f;
}
.callout.good {
  border-left-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
}
.callout strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

/* Trust strip on homepage */
.trust-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 18px 20px;
  margin: 28px 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--text-muted);
}
.trust-strip .trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.trust-strip .trust-icon {
  width: 22px;
  height: 22px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Output textarea / code block style */
.output-box {
  position: relative;
  margin-top: 14px;
}
.output-box textarea,
.output-box .code-output {
  width: 100%;
  min-height: 120px;
  padding: 14px 14px;
  font-family: ui-monospace, Menlo, Consolas, "Roboto Mono", monospace;
  font-size: 13.5px;
  line-height: 1.6;
  background: #0f172a;
  color: #e2e8f0;
  border: none;
  border-radius: var(--radius-sm);
  resize: vertical;
  word-break: break-all;
  white-space: pre-wrap;
}
.output-box .code-output {
  overflow-x: auto;
  min-height: auto;
  display: block;
}
.output-box .copy-corner {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255,255,255,0.1);
  color: #cbd5e1;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.output-box .copy-corner:hover {
  background: var(--primary);
  color: #fff;
}
.output-box .copy-corner.copied {
  background: #10b981;
  color: #fff;
}

/* Preview color/gradient swatch */
.preview-swatch {
  width: 100%;
  height: 160px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin: 12px 0;
}

/* Blog list card */
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 14px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.post-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.post-card h3 a {
  color: var(--text);
}
.post-card h3 a:hover {
  color: var(--primary);
  text-decoration: none;
}
.post-card .excerpt {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
}
.post-card .post-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Range slider nice styling */
.range-field {
  margin-bottom: 14px;
}
.range-field .range-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.range-field .range-head label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.range-field .range-head .range-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: 999px;
  min-width: 48px;
  text-align: center;
}
.range-field input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

/* Checkbox nice styling */
.check-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.check-row input[type="checkbox"] {
  accent-color: var(--primary);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 920px;
  margin: 0 auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
  z-index: 10000;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  line-height: 1.55;
  animation: cookieSlideUp 0.4s ease-out;
}
@keyframes cookieSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-banner p {
  margin: 0;
  flex: 1 1 320px;
  color: #cbd5e1;
}
.cookie-banner p a {
  color: #a5b4fc;
  text-decoration: underline;
}
.cookie-banner .cookie-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cookie-banner .cookie-actions .btn,
.cookie-banner .cookie-actions .btn-secondary {
  padding: 8px 18px;
  font-size: 13.5px;
}
.cookie-banner .cookie-actions .btn-secondary {
  background: transparent;
  color: #cbd5e1;
  border-color: #334155;
}
.cookie-banner .cookie-actions .btn-secondary:hover {
  background: #1e293b;
  color: #fff;
  border-color: #475569;
}
@media (max-width: 500px) {
  .cookie-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 14px 16px;
    font-size: 13px;
  }
  .cookie-banner .cookie-actions {
    width: 100%;
  }
  .cookie-banner .cookie-actions .btn,
  .cookie-banner .cookie-actions .btn-secondary {
    flex: 1;
  }
}

/* Very small phones under 380px */
@media (max-width: 380px) {
  .container {
    padding: 0 12px;
  }
  .hero h1 {
    font-size: 22px;
  }
  .tool-card {
    padding: 12px 14px;
    gap: 10px;
  }
  .tool-card .icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .footer-cols ul li a {
    font-size: 12.5px;
  }
}
