/**
 * LegalStatusCheck.in - Core Stylesheet
 * Clean, professional, Indian financial & compliance portal design.
 */

:root {
  /* Color Palette */
  --primary-navy: #0b1f3a;
  --navy-dark: #071526;
  --navy-light: #162f52;
  --accent-royal: #1d4ed8;
  --accent-royal-hover: #1e40af;
  --accent-royal-light: #eff6ff;
  --teal-highlight: #0d9488;
  --teal-light: #f0fdfa;
  --emerald-success: #059669;
  --emerald-light: #ecfdf5;
  --amber-warning: #d97706;
  --amber-light: #fffbeb;
  --rose-danger: #dc2626;
  --rose-light: #fef2f2;

  /* Neutrals & Surfaces */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;

  /* Typography & Shadows */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 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.03);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  /* Radius & Transitions */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --container-max: 1280px;
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-page);
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
  background-color: var(--bg-page);
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

/* Headings & Text */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-navy);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent-royal);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-royal-hover);
  text-decoration: underline;
}

ul, ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

li {
  margin-bottom: 0.35rem;
}

code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
}

/* Container */
.site-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
#site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.08);
  width: 100%;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

#site-header.is-scrolled .site-header,
.site-header.is-scrolled {
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.12);
  border-bottom-color: rgba(203, 213, 225, 0.9);
}

/* Top bar */
.top-bar {
  background-color: var(--primary-navy);
  color: #e2e8f0;
  font-size: 0.8125rem;
  padding: 0.35rem 0;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: rgba(13, 148, 136, 0.25);
  color: #5eead4;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-link {
  color: #cbd5e1;
}

.top-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.top-divider {
  color: #475569;
}

/* Main Nav */
.nav-container {
  padding: 0.65rem 0;
  background-color: #ffffff;
}

.nav-container .site-container,
.top-bar .site-container {
  max-width: 1360px;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

/* Brand Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none !important;
  flex-shrink: 0;
}

.site-logo-img {
  height: 38px;
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.drawer-logo .site-logo-img {
  height: 32px;
}

.footer-logo-img {
  height: 34px;
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-royal), #1e3a8a);
  color: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.25);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  white-space: nowrap;
}

.logo-primary {
  color: var(--primary-navy);
}

.logo-tld {
  color: var(--accent-royal);
}

/* Quick Search in Header */
.header-search-wrap {
  flex: 0 1 290px;
  max-width: 300px;
  min-width: 180px;
}

.search-trigger-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.search-trigger-btn:hover {
  background-color: #ffffff;
  border-color: var(--accent-royal);
  box-shadow: var(--shadow-sm);
}

.search-placeholder-text {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-kbd {
  font-size: 0.75rem;
  background-color: #ffffff;
  color: var(--text-muted);
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  flex-shrink: 0;
}

/* Desktop Nav Menu */
.desktop-nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

.nav-item {
  position: relative;
  flex-shrink: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.65rem;
  color: var(--primary-navy);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none !important;
  flex-shrink: 0;
}

.nav-link:hover, .nav-link:focus {
  color: var(--accent-royal);
  background-color: var(--accent-royal-light);
}

.chevron-icon {
  margin-left: 0.15rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  pointer-events: none;
}

.has-dropdown:hover .chevron-icon,
.has-dropdown.is-open .chevron-icon,
.has-dropdown.active .chevron-icon {
  transform: rotate(180deg);
}

/* Desktop Dropdown Container: extends hoverable area downwards to eliminate gap */
.nav-item.has-dropdown {
  position: relative;
  flex-shrink: 0;
  padding-bottom: 10px;
  margin-bottom: -10px;
}

/* Mega-Menu Panel Base */
.mega-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 580px;
  max-width: calc(100vw - 2rem);
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px -6px rgba(15, 23, 42, 0.16), 0 4px 16px -2px rgba(15, 23, 42, 0.08);
  padding: 1.25rem;
  margin-top: 2px;
  z-index: 1010;
  pointer-events: auto;
}

/* Invisible bridge pseudo-element connecting nav link to mega panel */
.mega-panel::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 0;
  right: 0;
  height: 18px;
  background: transparent;
  display: block;
  z-index: 1;
}

/* Tax Tools Panel: 3-column wide */
.mega-panel-large {
  width: 780px;
  left: 35%;
  transform: translateX(-35%);
}

/* Financial Calculators Panel: shifted left so it stays cleanly inside container */
.mega-panel-finance {
  width: 580px;
  left: auto !important;
  right: -50px !important;
  transform: none !important;
}

/* Business Verification Panel & Last Dropdown: Flush to Right edge */
.mega-panel-right,
.nav-item:last-child .mega-panel {
  left: auto !important;
  right: 0 !important;
  transform: none !important;
}

/* Show Panel on Hover, JS is-open class, or Focus */
.has-dropdown:hover .mega-panel,
.has-dropdown.is-open .mega-panel,
.has-dropdown:focus-within .mega-panel {
  display: block;
  animation: megaPanelFade 0.18s ease-out forwards;
}

@keyframes megaPanelFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.mega-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.65rem;
  margin-bottom: 0.85rem;
}

.mega-header h4 {
  font-size: 0.95rem;
  color: var(--primary-navy);
  margin-bottom: 0.2rem;
}

.mega-header p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.mega-links-grid {
  display: grid;
  gap: 0.5rem;
}

.mega-links-grid.col-2 {
  grid-template-columns: repeat(2, 1fr);
}

.mega-links-grid.col-3 {
  grid-template-columns: repeat(3, 1fr);
}

.mega-link-item {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none !important;
}

.mega-link-item:hover {
  background-color: var(--bg-surface-subtle);
}

.mega-link-item .item-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-navy);
}

.mega-link-item:hover .item-title {
  color: var(--accent-royal);
}

.mega-link-item .item-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 0.15rem;
}

.mega-footer-bar {
  border-top: 1px solid var(--border-light);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  text-align: right;
}

.view-all-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-royal);
}

/* Mobile Toggle */
.mobile-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 0;
}

.hamburger-bar {
  width: 22px;
  height: 2px;
  background-color: var(--primary-navy);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 380px;
  height: 100vh;
  background-color: #ffffff;
  z-index: 1100;
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.mobile-nav-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.drawer-close-btn {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--text-muted);
  cursor: pointer;
}

.drawer-search {
  padding: 1rem 1.25rem 0.5rem;
}

.drawer-search-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
}

.mobile-menu-links {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  color: var(--primary-navy);
  border-radius: var(--radius-sm);
  text-decoration: none !important;
}

.mobile-nav-link:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--accent-royal);
}

.mobile-accordion {
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mobile-summary {
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--primary-navy);
  cursor: pointer;
  background-color: var(--bg-surface-subtle);
  user-select: none;
}

.accordion-sublinks {
  padding: 0.5rem 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background-color: #ffffff;
}

.accordion-sublinks a {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.3rem 0;
  text-decoration: none;
}

.accordion-sublinks a:hover {
  color: var(--accent-royal);
}

.mobile-drawer-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 1rem;
}

.mobile-drawer-footer .sublink {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1050;
  display: none;
}

.drawer-overlay.active {
  display: block;
}

/* ==========================================================================
   Buttons & Form Controls
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none !important;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-royal);
  color: #ffffff;
  border-color: var(--accent-royal);
  box-shadow: 0 1px 3px rgba(29, 78, 216, 0.2);
}

.btn-primary:hover {
  background-color: var(--accent-royal-hover);
  border-color: var(--accent-royal-hover);
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(29, 78, 216, 0.3);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--primary-navy);
  border-color: var(--border-medium);
}

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

.btn-teal {
  background-color: var(--teal-highlight);
  color: #ffffff;
}

.btn-teal:hover {
  background-color: #0f766e;
  color: #ffffff;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-navy);
  margin-bottom: 0.35rem;
}

.form-label .required-star {
  color: var(--rose-danger);
}

.form-label .helper-badge {
  font-size: 0.75rem;
  font-weight: normal;
  color: var(--text-muted);
  margin-left: 0.35rem;
}

.form-control, .form-select {
  width: 100%;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text-main);
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-royal);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.form-control.is-invalid {
  border-color: var(--rose-danger);
  background-color: var(--rose-light);
}

.field-error {
  display: none;
  color: var(--rose-danger);
  font-size: 0.8125rem;
  margin-top: 0.3rem;
  font-weight: 500;
}

.field-error.active {
  display: block;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-light);
  pointer-events: none;
}

.input-with-icon .form-control {
  padding-left: 2.6rem;
}

.input-with-icon .country-prefix {
  position: absolute;
  left: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.input-with-icon .form-control.with-prefix {
  padding-left: 3.2rem;
}

/* Radio & Switch Button Groups */
.segmented-control {
  display: flex;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.25rem;
  gap: 0.25rem;
}

.segmented-control label {
  flex: 1;
  text-align: center;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.segmented-control input[type="radio"] {
  display: none;
}

.segmented-control input[type="radio"]:checked + label {
  background-color: #ffffff;
  color: var(--accent-royal);
  box-shadow: var(--shadow-sm);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.badge-blue { background-color: var(--accent-royal-light); color: var(--accent-royal); }
.badge-teal { background-color: var(--teal-light); color: var(--teal-highlight); }
.badge-green { background-color: var(--emerald-light); color: var(--emerald-success); }
.badge-amber { background-color: var(--amber-light); color: var(--amber-warning); }

/* Breadcrumbs */
.breadcrumb-nav {
  padding: 0.85rem 0;
  background-color: transparent;
  font-size: 0.8125rem;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--accent-royal);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--border-medium);
}

.breadcrumb-item.active {
  color: var(--primary-navy);
  font-weight: 600;
}

/* ==========================================================================
   Tool Page Layout (Two-Column Workspace)
   ========================================================================== */
.tool-page-header {
  padding: 1.5rem 0 1rem;
}

.tool-header-inner {
  max-width: 850px;
}

.tool-category-badge {
  margin-bottom: 0.65rem;
}

.tool-page-title {
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
  color: var(--primary-navy);
}

.tool-page-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Tool Grid Layout */
.tool-workspace-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  margin: 1.5rem 0 3rem;
  align-items: start;
}

.tool-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
}

.tool-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-navy);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tool-button-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Tool Results Panel */
.results-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
  position: sticky;
  top: 95px;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
}

.results-header h3 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.result-stat-highlight {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.stat-label {
  display: block;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-royal);
  line-height: 1.1;
}

.stat-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 0.9375rem;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row .row-label {
  color: var(--text-muted);
}

.stat-row .row-val {
  font-weight: 700;
  color: var(--primary-navy);
}

.results-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Verification Result Badges & Status */
.verify-status-banner {
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.verify-status-banner.valid {
  background-color: var(--emerald-light);
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.verify-status-banner.invalid {
  background-color: var(--rose-light);
  border: 1px solid #fecaca;
  color: #991b1b;
}

.verify-status-banner.notice {
  background-color: var(--amber-light);
  border: 1px solid #fde68a;
  color: #92400e;
}

.portal-redirect-box {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.25rem;
}

.portal-redirect-box h4 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.portal-redirect-box p {
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}

/* Content Explanations, Methodology & Formulas */
.content-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-light);
}

.content-block {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.content-block h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.content-block h3 {
  font-size: 1.2rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.formula-box {
  background-color: var(--bg-surface-subtle);
  border-left: 4px solid var(--accent-royal);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.25rem 0;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.9375rem;
  color: var(--primary-navy);
}

.example-box {
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.data-table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.data-table th, .data-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
}

.data-table th {
  background-color: var(--bg-surface-subtle);
  color: var(--primary-navy);
  font-weight: 700;
}

.data-table tr:nth-child(even) {
  background-color: #f8fafc;
}

/* FAQ Accordion Section */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.active {
  border-color: var(--accent-royal);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-navy);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.faq-icon {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--accent-royal);
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  margin-top: 0.25rem;
  padding-top: 0.85rem;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Related Tools Grid */
.related-tools-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-light);
}

.tools-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.tool-summary-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none !important;
}

.tool-summary-card:hover {
  border-color: var(--accent-royal);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--accent-royal-light);
  color: var(--accent-royal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.tool-summary-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--primary-navy);
}

.tool-summary-card:hover h3 {
  color: var(--accent-royal);
}

.tool-summary-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 1rem;
}

.tool-card-cta {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-royal);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   Customer Enquiry Component
   ========================================================================== */
.enquiry-section {
  padding: 3rem 0;
  background-color: #f1f5f9;
}

.enquiry-card {
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2.25rem;
}

.enquiry-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.enquiry-icon-wrap {
  width: 52px;
  height: 52px;
  background-color: var(--accent-royal-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.enquiry-title {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
  color: var(--primary-navy);
}

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

.form-row.three-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.enquiry-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.enquiry-status-box {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background-color: var(--emerald-light);
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.enquiry-status-box .status-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.enquiry-status-box strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

.enquiry-status-box p {
  font-size: 0.875rem;
  color: #047857;
}

/* ==========================================================================
   Homepage Specific Sections
   ========================================================================== */
.hero-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--accent-royal-light);
  color: var(--accent-royal);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary-navy);
  max-width: 880px;
  margin: 0 auto 1.25rem;
  line-height: 1.18;
}

.hero-title .text-gradient {
  background: linear-gradient(135deg, var(--accent-royal), #0d9488);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2rem;
}

.hero-search-box {
  max-width: 650px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.hero-search-input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3.25rem;
  font-size: 1.05rem;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-family: inherit;
  transition: var(--transition);
}

.hero-search-input:focus {
  outline: none;
  border-color: var(--accent-royal);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.15);
}

.hero-search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.hero-quick-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.hero-tag {
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.hero-tag:hover {
  background: var(--accent-royal-light);
  color: var(--accent-royal);
  border-color: var(--accent-royal);
  text-decoration: none;
}

.section-padding {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.section-header h2 {
  font-size: 2.1rem;
  margin-bottom: 0.5rem;
}

.section-header p {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Category Grid */
.category-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.category-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  border-color: var(--accent-royal);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-subtle);
  color: var(--accent-royal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.category-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
  color: var(--primary-navy);
}

.category-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 1rem;
}

.category-count {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-royal);
}

/* Features Section (Why Use) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-box {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background-color: var(--teal-light);
  color: var(--teal-highlight);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-box h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

/* Steps (How to Use) */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.step-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--accent-royal);
  color: #ffffff;
  font-weight: 800;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */
.site-footer {
  background-color: var(--navy-dark);
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-main {
  padding: 4rem 1.5rem 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.tld-accent {
  color: #60a5fa;
}

.footer-tagline {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.footer-badges {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.badge-item {
  font-size: 0.8125rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
}

.footer-title {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: none;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.link-highlight {
  color: #60a5fa !important;
  font-weight: 600;
}

.footer-disclaimer-wrap {
  background-color: rgba(0, 0, 0, 0.25);
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.disclaimer-content p {
  font-size: 0.775rem;
  color: #94a3b8;
  line-height: 1.6;
}

.disclaimer-content strong {
  color: #cbd5e1;
}

.footer-bottom {
  padding: 1.25rem 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.bottom-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.bottom-legal-links {
  display: flex;
  gap: 1.25rem;
}

.bottom-legal-links a {
  color: #94a3b8;
  text-decoration: none;
}

.bottom-legal-links a:hover {
  color: #ffffff;
}

/* ==========================================================================
   Search Modal (Typeahead Overlay)
   ========================================================================== */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 1.5rem 2rem;
}

.search-modal-backdrop.active {
  display: flex;
}

.search-modal-card {
  width: 100%;
  max-width: 640px;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modalPop 0.15s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.search-modal-input {
  flex: 1;
  border: none;
  font-size: 1.1rem;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
}

.search-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.search-results-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.75rem 0;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  text-decoration: none !important;
  transition: var(--transition);
}

.search-result-item:hover, .search-result-item.selected {
  background-color: var(--accent-royal-light);
}

.search-result-info h4 {
  font-size: 0.95rem;
  color: var(--primary-navy);
  margin-bottom: 0.15rem;
}

.search-result-info p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.search-modal-footer {
  padding: 0.65rem 1.25rem;
  background-color: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Toast Notifications */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--primary-navy);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 3000;
  display: none;
  animation: toastIn 0.2s ease-out;
}

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

/* Print Styles */
@media print {
  .site-header, .site-footer, .breadcrumb-nav, .enquiry-section, .tool-button-group, .results-actions, .search-modal-backdrop {
    display: none !important;
  }
  body, html {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .tool-workspace-grid {
    grid-template-columns: 1fr !important;
  }
  .tool-card, .results-card {
    box-shadow: none !important;
    border: 1px solid #000000 !important;
  }
}
