:root {
  --teal-900: #0f3644;
  --teal-800: #164E63;
  --teal-700: #1e6682;
  --teal-100: #e0f2fe;
  --sky-500: #6CB4D8;
  --sky-400: #88c7e6;
  --sky-100: #eef7fc;
  --yellow-500: #E7C66A;
  --yellow-100: #fbf5e2;
  --paper: #F7F4EA;
  --paper-card: #FFFFFF;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2dfd5;
  --border-focus: #164E63;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(22, 78, 99, 0.05);
  --shadow-md: 0 8px 24px rgba(22, 78, 99, 0.08);
  --shadow-hover: 0 14px 32px rgba(22, 78, 99, 0.14);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--paper);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Slim Non-Sticky Header */
.site-header {
  height: 60px;
  background: var(--paper-card);
  border-bottom: 1px solid var(--border-color);
  position: static;
  width: 100%;
  z-index: 50;
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--teal-800);
  letter-spacing: -0.5px;
}

.brand-logo svg {
  width: 30px;
  height: 30px;
  fill: var(--teal-800);
}

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

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--teal-800);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-sm-primary {
  background: var(--teal-800);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-sm-primary:hover {
  background: var(--teal-900);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--teal-800);
}

/* Mobile Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--paper-card);
  padding: 24px;
  border-top: 1px solid var(--border-color);
  z-index: 100;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-drawer.open {
  display: flex;
}

.mobile-nav-drawer a {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 10px 0;
  border-bottom: 1px solid #f1ece1;
}

/* Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Common Hero */
.hero-section {
  padding: 60px 0 40px;
  background: radial-gradient(circle at top right, rgba(108, 180, 216, 0.2), transparent 50%),
              radial-gradient(circle at bottom left, rgba(231, 198, 106, 0.15), transparent 45%);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow-100);
  color: #855d08;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  border: 1px solid rgba(231, 198, 106, 0.4);
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 800;
  color: var(--teal-900);
  line-height: 1.15;
  letter-spacing: -1px;
  max-width: 860px;
  margin-bottom: 18px;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 32px;
}

/* Interactive Path Finder Box */
.pathfinder-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-top: 20px;
}

.pathfinder-box h3 {
  font-size: 1.25rem;
  color: var(--teal-900);
  margin-bottom: 6px;
}

.pathfinder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.selector-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

.custom-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  background: var(--paper);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.custom-select:focus {
  border-color: var(--teal-800);
}

.btn-finder-submit {
  background: var(--teal-800);
  color: white;
  border: none;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s;
  height: 48px;
  align-self: end;
}

.btn-finder-submit:hover {
  background: var(--teal-900);
}

.finder-result {
  margin-top: 20px;
  padding: 16px;
  background: var(--sky-100);
  border-left: 4px solid var(--teal-800);
  border-radius: var(--radius-sm);
  display: none;
}

/* SEARCH & CONTROLS TOOLBAR */
.search-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 24px 0 28px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input-wrapper svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--teal-800);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 18px 14px 48px;
  font-size: 1rem;
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--teal-800);
  box-shadow: 0 0 0 4px rgba(22, 78, 99, 0.1);
}

.filter-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pill {
  padding: 8px 18px;
  border-radius: 30px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill.active, .filter-pill:hover {
  background: var(--teal-800);
  color: #fff;
  border-color: var(--teal-800);
}

.filter-stats-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* NOVEL CARD ARCHITECTURE: Modular Data-Grid Card */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin: 20px 0 60px;
}

.data-grid-card {
  background: var(--paper-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}

.data-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--sky-500);
}

.card-img-wrapper {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: #e2e8f0;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.data-grid-card:hover .card-img-wrapper img {
  transform: scale(1.04);
}

.card-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(22, 78, 99, 0.92);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Embedded Metric Panel */
.card-data-panel {
  background: #fdfbf7;
  border-bottom: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 10px 14px;
}

.metric-item {
  border-right: 1px solid #eee9dc;
  padding: 0 8px;
}

.metric-item:last-child {
  border-right: none;
}

.metric-k {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
}

.metric-v {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 8px;
}

.card-title a {
  color: inherit;
  transition: color 0.2s;
}

.card-title a:hover {
  color: var(--teal-700);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
  flex-grow: 1;
}

.card-footer-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f1ece1;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--teal-800);
  transition: gap 0.2s;
}

.data-grid-card:hover .card-btn {
  gap: 10px;
  color: var(--teal-900);
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #855d08;
  background: var(--yellow-100);
  padding: 3px 8px;
  border-radius: 4px;
}

.no-results-msg {
  grid-column: 1 / -1;
  background: #ffffff;
  padding: 48px 24px;
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
  display: none;
}

.no-results-msg h4 {
  font-size: 1.25rem;
  color: var(--teal-900);
  margin-bottom: 8px;
}

/* Category Navigation Section */
.section-header {
  margin: 48px 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid #eae5d8;
  padding-bottom: 14px;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--teal-900);
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Comparison Table Layout */
.comparison-table-wrapper {
  overflow-x: auto;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin: 32px 0;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 650px;
}

.comparison-table th {
  background: #f8fafc;
  padding: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal-900);
  border-bottom: 2px solid var(--border-color);
  text-transform: uppercase;
}

.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.92rem;
  vertical-align: middle;
}

.comparison-table tr:hover {
  background: #fdfefe;
}

/* Detail & Guide Layout */
.article-layout {
  padding: 50px 0 80px;
  max-width: 860px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 32px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.article-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--teal-900);
  line-height: 1.2;
  margin-bottom: 16px;
}

.article-banner {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: var(--shadow-md);
  background: #e2e8f0;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}

.article-content h2 {
  font-size: 1.65rem;
  color: var(--teal-900);
  margin: 36px 0 16px;
}

.article-content h3 {
  font-size: 1.3rem;
  color: var(--teal-900);
  margin: 24px 0 12px;
}

.article-content p {
  margin-bottom: 20px;
}

.article-content ul, .article-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.callout-box {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  padding: 20px;
  border-radius: var(--radius-sm);
  margin: 28px 0;
}

.callout-warning {
  background: var(--yellow-100);
  border-left: 4px solid var(--yellow-500);
  padding: 20px;
  border-radius: var(--radius-sm);
  margin: 28px 0;
}

/* Specs Box in Tool Profile */
.specs-panel {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.spec-cell {
  padding: 12px;
  background: #faf8f2;
  border-radius: var(--radius-sm);
}

.spec-cell span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.spec-cell strong {
  font-size: 0.95rem;
  color: var(--teal-900);
}

/* Legal Content Styles */
.legal-layout {
  max-width: 900px;
  margin: 50px auto 80px;
  background: white;
  padding: 48px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.legal-layout h1 {
  font-size: 2.2rem;
  color: var(--teal-900);
  margin-bottom: 8px;
}

.legal-layout .last-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  display: block;
}

.legal-layout h2 {
  font-size: 1.35rem;
  color: var(--teal-900);
  margin: 32px 0 12px;
  border-bottom: 1px solid #f1ece1;
  padding-bottom: 6px;
}

.legal-layout p {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 16px;
}

.legal-layout ul {
  padding-left: 20px;
  margin-bottom: 18px;
  color: #475569;
}

/* Form Styles for Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  margin: 32px 0 60px;
}

.contact-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.contact-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--sky-100);
  color: var(--teal-800);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--teal-900);
  margin-bottom: 2px;
}

.contact-info-text span, .contact-info-text a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-info-text a:hover {
  color: var(--teal-800);
  text-decoration: underline;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-900);
  margin-bottom: 6px;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  background: #fbf9f4;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--teal-800);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 78, 99, 0.08);
}

.form-textarea {
  height: 140px;
  resize: vertical;
}

/* Unified Footer */
.site-footer {
  background: var(--teal-900);
  color: #e2e8f0;
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand h4 {
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h5 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 0.88rem;
  color: #cbd5e1;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--yellow-500);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #94a3b8;
}

.legal-copy-note {
  max-width: 700px;
  line-height: 1.5;
}

/* Cookie Banner (Persistent) */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 600px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: none;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-banner p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.cookie-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cookie-btn {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
}

.cookie-accept {
  background: var(--teal-800);
  color: #fff;
}

.cookie-reject {
  background: #e2e8f0;
  color: var(--text-main);
}

.cookie-prefs {
  background: transparent;
  color: var(--teal-800);
  border: 1px solid var(--border-color);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .main-nav {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .legal-layout {
    padding: 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .card-data-panel {
    grid-template-columns: 1fr 1fr;
  }
  .metric-item:nth-child(3) {
    grid-column: span 2;
    border-top: 1px solid #eee9dc;
    margin-top: 6px;
    padding-top: 6px;
  }
}