:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #eef6ff;
  --surface-warm: #fff7ed;
  --text: #172033;
  --muted: #5d6b82;
  --border: #dbe4ef;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --green-soft: #dcfce7;
  --amber-soft: #fef3c7;
  --rose-soft: #ffe4e6;
  --violet-soft: #ede9fe;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.07);
  --radius: 8px;
  --max: 1160px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #172033;
  --surface-strong: #1f2a44;
  --surface-warm: #2b2118;
  --text: #e5edf8;
  --muted: #a8b4c7;
  --border: #31405b;
  --primary: #2dd4bf;
  --primary-strong: #5eead4;
  --accent: #60a5fa;
  --accent-soft: #17325f;
  --green-soft: #123827;
  --amber-soft: #3a2c12;
  --rose-soft: #3a1b25;
  --violet-soft: #2d2355;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(219, 234, 254, 0.72), transparent 30rem),
    linear-gradient(180deg, #ffffff 0, var(--bg) 38rem);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.14), transparent 30rem),
    linear-gradient(180deg, #0b1120 0, var(--bg) 38rem);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(100% - 32px, var(--max));
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 0.82rem;
}

.header-search {
  order: 3;
  grid-column: 1 / -1;
  width: 100%;
}

.header-search input,
.hero-search input,
.form-field input,
.form-field select,
.tool-textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 12px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.header-search input:focus,
.hero-search input:focus,
.form-field input:focus,
.form-field select:focus,
.tool-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.menu-toggle span:not(.sr-only) {
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
}

.primary-menu {
  display: none;
  grid-column: 1 / -1;
  padding: 0 0 16px;
}

.primary-menu.is-open {
  display: grid;
  gap: 8px;
}

.primary-menu a {
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 650;
}

.primary-menu a:hover {
  background: var(--surface-strong);
  color: var(--primary-strong);
}

.mega-menu-wrap {
  position: relative;
}

.mega-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  font-weight: 800;
  text-align: left;
}

.mega-trigger:hover,
.mega-menu-wrap.is-open .mega-trigger {
  background: var(--surface-strong);
  color: var(--primary-strong);
}

.menu-chevron {
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.mega-menu-wrap.is-open .menu-chevron,
.mega-menu-wrap:hover .menu-chevron,
.mega-menu-wrap:focus-within .menu-chevron {
  transform: rotate(225deg);
}

.mega-menu {
  display: none;
  grid-template-columns: 1fr;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 16px;
}

.mega-menu-wrap.is-open .mega-menu {
  display: grid;
}

.mega-menu section {
  display: grid;
  gap: 4px;
  align-content: start;
}

.mega-menu h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.mega-menu a {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 7px 8px;
  color: var(--text);
  font-size: 0.93rem;
}

.tool-icon {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: #1e40af;
  font-size: 0.7rem;
  font-weight: 900;
}

.tool-icon.pdf {
  background: #fee2e2;
  color: #b91c1c;
}

.tool-icon.image {
  background: #dbeafe;
  color: #1d4ed8;
}

.tool-icon.edit {
  background: #ede9fe;
  color: #6d28d9;
}

.tool-icon.text {
  background: #dcfce7;
  color: #166534;
}

.tool-icon.calc {
  background: #fef3c7;
  color: #92400e;
}

.hero-section {
  width: min(100% - 32px, var(--max));
  margin: 28px auto 0;
  padding: 48px 0 24px;
  display: grid;
  gap: 26px;
  align-items: center;
}

.hero-content {
  max-width: 820px;
}

.search-hint {
  min-height: 26px;
  margin: -4px 0 14px;
  font-size: 0.94rem;
}

.hero-toolboard {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero-toolboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 800;
}

.hero-toolboard-header strong {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 1.3rem;
}

.mini-tool-list {
  display: grid;
  gap: 10px;
}

.mini-tool-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 10px 12px;
  color: var(--text);
  font-weight: 800;
}

.mini-tool-list a:hover {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.mini-tool-list span {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #1e40af;
  font-size: 0.78rem;
}

.privacy-strip {
  margin-top: 14px;
  border-radius: var(--radius);
  background: var(--green-soft);
  padding: 14px;
}

.privacy-strip strong,
.privacy-strip span {
  display: block;
}

.privacy-strip span {
  color: #166534;
  font-size: 0.9rem;
}

.desktop-hero {
  display: grid;
  gap: 24px;
  align-items: start;
}

.desktop-hero-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.82), transparent 60%),
    #ffffff;
  box-shadow: var(--shadow);
  padding: 22px;
}

.desktop-hero-panel strong {
  color: var(--primary-strong);
  font-size: 2.4rem;
  line-height: 1;
}

.desktop-hero-panel span {
  color: var(--text);
  font-weight: 900;
}

.desktop-hero-panel p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 18px;
  font-size: clamp(2.3rem, 6vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
  line-height: 1.25;
}

p {
  color: var(--muted);
}

.hero-content p {
  max-width: 690px;
  font-size: 1.12rem;
}

.hero-search {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin: 28px 0 16px;
}

.hero-search input {
  min-height: 58px;
  padding-inline: 18px;
  font-size: 1rem;
}

.button,
.hero-search button,
.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  padding: 12px 18px;
  font-weight: 800;
}

.button:hover,
.hero-search button:hover,
.tool-button:hover {
  background: var(--primary-strong);
}

.button.secondary,
.tool-button.secondary,
.secondary-button {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 800;
}

.theme-toggle:hover {
  border-color: rgba(15, 118, 110, 0.42);
  color: var(--primary-strong);
}

.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b 0 50%, #1f2937 50% 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.16);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-weight: 800;
}

.secondary-button:hover {
  border-color: rgba(15, 118, 110, 0.4);
  color: var(--primary-strong);
}

.calculate-button {
  margin-top: 18px;
}

.rate-button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 800;
}

.rate-button:hover,
.rate-button.is-active {
  border-color: var(--primary);
  background: var(--surface-strong);
  color: var(--primary-strong);
}

.hero-badges,
.pill-links,
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  margin: 14px 0;
}

.hero-quick-grid a {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px 10px;
  min-height: 72px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  padding: 12px;
}

.hero-quick-grid a:hover {
  border-color: rgba(15, 118, 110, 0.42);
  transform: translateY(-1px);
}

.hero-quick-grid span {
  display: inline-grid;
  grid-row: span 2;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: #1e40af;
  font-size: 0.76rem;
  font-weight: 900;
}

.hero-quick-grid strong {
  color: var(--text);
  line-height: 1.18;
}

.hero-quick-grid small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.2;
}

.rate-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selected-zone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.selected-zone-chip,
.timezone-preset {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  padding: 8px 12px;
  font-weight: 800;
}

.selected-zone-chip:hover,
.timezone-preset:hover {
  border-color: rgba(15, 118, 110, 0.42);
  color: var(--primary-strong);
}

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

.world-clock-card {
  display: grid;
  gap: 10px;
  min-height: 226px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.world-clock-card span,
.world-clock-card small,
.world-clock-card em {
  color: var(--muted);
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 800;
}

.world-clock-card h3 {
  margin: 4px 0 0;
}

.world-clock-card strong {
  color: var(--text);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  line-height: 1;
}

.world-clock-card p {
  color: var(--text);
  font-weight: 800;
}

.cash-counter-layout {
  display: grid;
  gap: 20px;
}

.cash-counter-top {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.cash-counter-top p {
  margin-bottom: 0;
}

.cash-denomination-wrap {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.cash-denomination-group {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fbff;
  padding: 14px;
}

.cash-denomination-group legend {
  padding: 0 8px;
  color: var(--primary-strong);
  font-weight: 900;
}

.cash-denomination-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.cash-denomination-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(90px, 140px);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 10px;
}

.cash-denomination-row span,
.cash-denomination-row strong,
.cash-denomination-row small {
  display: block;
}

.cash-denomination-row small {
  color: var(--muted);
  font-weight: 800;
}

.cash-denomination-row input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  text-align: right;
}

.cash-custom-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 18px;
  align-items: end;
}

.cash-summary-panel {
  align-self: start;
}

.cash-summary-panel h3 {
  margin-top: 22px;
}

.cash-memory-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
}

.cash-memory-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 12px 14px;
}

.cash-memory-item strong,
.cash-memory-item span,
.cash-memory-item small {
  display: block;
}

.cash-memory-item span,
.cash-memory-item small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.cash-memory-item button {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--primary-strong);
  padding: 7px 12px;
  font-weight: 900;
}

.gst-bill-layout {
  display: grid;
  gap: 20px;
}

.editable-table-wrap {
  width: 100%;
  margin: 18px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: auto;
}

.gst-entry-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.gst-entry-table th,
.gst-entry-table td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 8px;
  text-align: left;
  vertical-align: middle;
}

.gst-entry-table th {
  background: #f1f5f9;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 900;
}

.gst-entry-table td {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 750;
}

.gst-entry-table input,
.gst-entry-table select {
  width: 100%;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--text);
  padding: 7px 8px;
}

.gst-entry-table input:focus,
.gst-entry-table select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.gst-entry-table input[type="number"],
.gst-entry-table .gst-line-taxable,
.gst-entry-table .gst-line-tax,
.gst-entry-table .gst-line-total,
.gst-entry-table .row-number {
  text-align: right;
}

.row-remove-button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: #b91c1c;
  font-weight: 900;
}

.gst-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.gst-print-area {
  display: none;
}

.gst-print-card {
  color: #111827;
  font-family: Arial, sans-serif;
}

.gst-print-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.gst-print-card p {
  color: #374151;
}

.gst-print-card table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 12px;
}

.gst-print-card th,
.gst-print-card td {
  border: 1px solid #d1d5db;
  padding: 7px;
  text-align: left;
}

.gst-print-card th {
  background: #f3f4f6;
}

.gst-print-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
  width: min(100%, 460px);
  margin: 18px 0 0 auto;
}

.gst-print-totals p {
  margin: 0;
}

.hero-badges span,
.pill-links a,
.pill-links button,
.badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 7px 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.pill-links button {
  cursor: pointer;
  font-family: inherit;
}

.stats-strip {
  width: min(100% - 32px, var(--max));
  margin: 12px auto 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stats-strip div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  padding: 14px;
}

.stats-strip strong,
.stats-strip span {
  display: block;
}

.stats-strip strong {
  color: var(--text);
  font-size: 1.18rem;
}

.stats-strip span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.section-wrap {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 56px 0;
}

.muted-band {
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100% - var(--max)) / 2));
  background: #eef6f8;
  border-block: 1px solid var(--border);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 24px;
}

.section-heading .eyebrow,
.split-section .eyebrow,
.tool-page .eyebrow {
  margin-bottom: 12px;
}

.card-grid,
.category-grid,
.related-grid,
.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.tool-card,
.category-card,
.feature-list article,
.tool-panel,
.result-card,
.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-card,
.category-card,
.feature-list article,
.result-card {
  padding: 20px;
}

.tool-card,
.category-card,
.feature-list article,
.result-card {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.tool-card:hover,
.category-card:hover {
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.11);
  transform: translateY(-2px);
}

.tool-card h3 a:hover,
.card-link:hover,
.pill-links a:hover,
.pill-links button:hover {
  color: var(--primary-strong);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.badge {
  background: var(--accent-soft);
  color: #1e40af;
}

.card-link {
  color: var(--primary);
  font-weight: 800;
}

.no-results-message {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-warm);
  padding: 14px 16px;
  color: #9a3412;
  font-weight: 800;
}

.category-card {
  min-height: 178px;
}

.category-dot {
  display: block;
  width: 34px;
  height: 8px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.accent-green .category-dot {
  background: var(--green-soft);
}

.accent-amber .category-dot {
  background: var(--amber-soft);
}

.accent-rose .category-dot {
  background: var(--rose-soft);
}

.accent-violet .category-dot {
  background: var(--violet-soft);
}

.split-section {
  display: grid;
  gap: 24px;
}

.tool-directory {
  display: grid;
  gap: 28px;
}

.directory-section {
  display: grid;
  gap: 14px;
}

.directory-heading {
  max-width: 680px;
}

.directory-heading h3 {
  margin-bottom: 4px;
  font-size: 1.35rem;
}

.planned-section {
  border: 1px dashed #b9c7d8;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}

.feature-list {
  display: grid;
  gap: 14px;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.roadmap-grid article {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

.roadmap-grid span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: #1e40af;
  font-weight: 900;
}

.roadmap-grid p {
  margin-bottom: 0;
}

.trust-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.trust-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--primary-strong);
  border: 1px solid var(--border);
  font-weight: 900;
}

.trust-item h3 {
  margin-bottom: 6px;
}

.trust-item p {
  margin-bottom: 0;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  padding: 18px 20px;
}

.faq-list summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
}

.faq-list p {
  margin: 12px 0 0;
}

.tool-hero {
  width: min(100% - 32px, var(--max));
  margin: 34px auto 0;
  padding: 44px 0 18px;
}

.tool-hero p {
  max-width: 760px;
  font-size: 1.08rem;
}

.tool-layout {
  display: grid;
  gap: 20px;
}

.tool-panel {
  padding: 20px;
}

.upload-box {
  display: grid;
  place-items: center;
  min-height: 250px;
  border: 2px dashed #b9c7d8;
  border-radius: var(--radius);
  background: #f8fbff;
  text-align: center;
  padding: 24px;
}

.upload-box input {
  max-width: 320px;
  margin-top: 16px;
}

.converter-shell {
  display: grid;
  gap: 18px;
}

.converter-dropzone {
  display: grid;
  place-items: center;
  min-height: 270px;
  border: 2px dashed #b9c7d8;
  border-radius: var(--radius);
  background: #f8fbff;
  padding: 24px;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease;
}

.pdf-dropzone {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 2px dashed #b9c7d8;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.56), transparent 55%),
    #f8fbff;
  padding: 24px;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease;
}

.converter-dropzone.is-dragging,
.pdf-dropzone.is-dragging {
  border-color: var(--primary);
  background: var(--surface-strong);
}

.converter-dropzone h2,
.pdf-dropzone h2 {
  margin-bottom: 8px;
  font-size: 1.45rem;
}

.converter-dropzone p,
.pdf-dropzone p {
  margin-bottom: 14px;
}

.converter-input,
.pdf-file-input,
.pdf-info-input {
  display: none;
}

.converter-details {
  display: grid;
  gap: 14px;
}

.converter-file-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 14px;
}

.converter-preview {
  min-height: 180px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #f1f5f9;
  overflow: hidden;
}

.converter-preview img {
  display: block;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.editor-canvas {
  display: block;
  width: 100%;
  max-height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
  object-fit: contain;
}

.privacy-canvas {
  cursor: crosshair;
  touch-action: none;
}

.file-name {
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.file-size {
  margin-bottom: 0;
}

.converter-error {
  min-height: 24px;
  margin: 0;
  color: #b91c1c;
  font-weight: 800;
}

.pdf-file-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.pdf-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 12px 14px;
}

.pdf-file-item strong {
  overflow-wrap: anywhere;
}

.pdf-file-item span {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 800;
}

.split-workspace {
  display: grid;
  gap: 20px;
  align-items: start;
}

.split-main-panel {
  min-height: 520px;
}

.split-file-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.split-file-summary strong,
.split-file-summary span {
  display: block;
}

.split-file-summary span {
  color: var(--muted);
  font-weight: 800;
}

.split-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  border-radius: var(--radius);
  background: #f1f5f9;
  padding: 18px;
}

.split-page-card {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 172px;
  border: 1px dashed #94a3b8;
  border-radius: var(--radius);
  background: #ffffff;
  padding: 12px;
  text-align: center;
}

.split-page-card div {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 124px;
}

.split-page-card canvas {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.split-page-card img {
  display: block;
  max-width: 100%;
  max-height: 150px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  object-fit: contain;
}

.split-page-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.split-page-card small {
  max-width: 100%;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.split-more-card strong {
  color: var(--primary-strong);
  font-size: 1.6rem;
}

.split-control-panel {
  position: sticky;
  top: 96px;
}

.split-control-panel h2 {
  text-align: center;
}

.split-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.split-mode-tabs button {
  min-height: 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  font-weight: 900;
}

.split-mode-tabs button.is-active {
  border-color: #ef4444;
  color: #dc2626;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.split-ranges {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.split-range-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 12px;
}

.split-range-row > span {
  color: var(--text);
  font-weight: 900;
}

.split-range-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.split-range-row input {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
}

.split-range-row button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: #b91c1c;
  font-weight: 900;
}

.split-range-row button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  opacity: 0.56;
}

.split-merge-choice {
  margin: 14px 0;
}

.split-actions {
  margin-top: 18px;
}

.split-actions .tool-button {
  flex: 1 1 100%;
}

.merge-pdf-item {
  align-items: flex-start;
}

.merge-pdf-item > div:first-child {
  display: grid;
  gap: 4px;
}

.merge-file-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.merge-file-actions button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  padding: 6px 10px;
  font-weight: 800;
}

.merge-file-actions button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.merge-file-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.download-button[hidden] {
  display: none;
}

.pdf-download-button[hidden] {
  display: none;
}

.placeholder-note,
.status-message {
  margin-top: 14px;
  border-radius: var(--radius);
  background: var(--surface-strong);
  padding: 12px 14px;
  color: var(--muted);
}

.status-message.compact {
  min-height: 0;
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  color: var(--primary-strong);
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 12px 14px;
  color: var(--text);
  font-weight: 750;
}

.choice-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label {
  color: var(--text);
  font-weight: 800;
}

.result-grid {
  margin-top: 20px;
}

.formula-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.product-family-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.family-card {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 18px 12px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.family-card:hover {
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.family-icon {
  display: inline-grid;
  place-items: center;
  min-width: 50px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: #1e40af;
  padding: 0 8px;
  font-size: 0.86rem;
  font-weight: 900;
}

.family-card strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
}

.family-card small {
  color: var(--muted);
  font-weight: 700;
}

.family-blue {
  background: #f5faff;
}

.family-green {
  background: #f5fff9;
}

.family-green .family-icon {
  background: var(--green-soft);
  color: #166534;
}

.family-amber {
  background: #fffdf5;
}

.family-amber .family-icon {
  background: var(--amber-soft);
  color: #92400e;
}

.family-violet {
  background: #fbf8ff;
}

.family-violet .family-icon {
  background: var(--violet-soft);
  color: #6d28d9;
}

.family-rose {
  background: #fff7f8;
}

.family-rose .family-icon {
  background: var(--rose-soft);
  color: #be123c;
}

.family-neutral {
  background: #ffffff;
}

.family-neutral .family-icon {
  background: #f1f5f9;
  color: var(--text);
}

.popular-conversions {
  padding-top: 34px;
}

.conversion-matrix {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.conversion-matrix a,
.conversion-matrix span,
.conversion-matrix button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 62px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  color: #2563eb;
  padding: 16px 18px;
  font-weight: 800;
  text-align: left;
}

.conversion-matrix a:hover,
.conversion-matrix button:hover {
  background: #f8fbff;
  color: #1d4ed8;
  cursor: pointer;
}

.conversion-matrix span {
  color: var(--muted);
}

.conversion-matrix small {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.conversion-callout {
  margin-top: 18px;
  border: 1px dashed #b9c7d8;
  border-radius: var(--radius);
  background: #f8fbff;
  padding: 18px;
}

.conversion-callout p {
  margin-bottom: 0;
}

.result-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.result-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.6rem;
  overflow-wrap: anywhere;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.pricing-card {
  display: grid;
  gap: 20px;
  align-content: start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.pricing-header {
  padding: 20px;
  background: var(--surface-strong);
  color: #1e40af;
  text-align: center;
}

.pricing-header span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-header h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

.pricing-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px 0;
  text-align: center;
}

.pricing-price strong {
  color: var(--text);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1;
}

.pricing-price span {
  color: var(--muted);
  font-weight: 800;
}

.pricing-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0 30px;
  color: var(--muted);
}

.pricing-list li {
  padding-left: 4px;
}

.pricing-card .tool-button {
  width: calc(100% - 40px);
  margin: 0 20px 24px;
}

.pricing-free .pricing-header {
  background: #dbeafe;
  color: #1d4ed8;
}

.pricing-pro .pricing-header {
  background: #dcfce7;
  color: #166534;
}

.pricing-team .pricing-header {
  background: #ffedd5;
  color: #c2410c;
}

.tool-textarea {
  min-height: 280px;
  resize: vertical;
}

.color-preview {
  min-height: 170px;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0f766e;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.22);
}

.diagram-preview {
  min-height: 360px;
  display: grid;
  place-items: center;
  border: 1px dashed #b9c7d8;
  border-radius: var(--radius);
  background: #f8fbff;
  padding: 14px;
  overflow: auto;
}

.diagram-preview svg {
  max-width: 100%;
  height: auto;
}

.flowchart-layout {
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
}

.flowchart-toolbox {
  margin: 16px 0;
}

.flowchart-toolbox h2 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.shape-palette {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.shape-palette button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
}

.shape-palette button:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.compact-form-grid {
  grid-template-columns: minmax(0, 1fr) 120px;
}

.flowchart-preview-panel {
  min-width: 0;
}

.flowchart-canvas {
  min-height: 520px;
  justify-items: stretch;
  align-items: stretch;
}

.flowchart-canvas svg {
  width: 100%;
  min-width: 720px;
  border-radius: var(--radius);
}

.flowchart-canvas .flow-node {
  cursor: grab;
}

.flowchart-canvas .flow-node:active {
  cursor: grabbing;
}

.todo-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.todo-progress {
  height: 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}

.todo-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 160ms ease;
}

.todo-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 12px;
}

.todo-item.priority-high {
  border-left: 5px solid #ef4444;
}

.todo-item.priority-medium {
  border-left: 5px solid #f59e0b;
}

.todo-item.priority-low {
  border-left: 5px solid #22c55e;
}

.todo-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
}

.todo-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.todo-item input:checked + span {
  color: var(--muted);
  text-decoration: line-through;
}

.todo-item span {
  overflow-wrap: anywhere;
}

.todo-item button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: #b91c1c;
  padding: 6px 10px;
  font-weight: 800;
}

.todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.todo-meta strong {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--primary-strong);
}

.archive-file-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.archive-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 12px;
}

.archive-file-row span {
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 800;
}

.archive-file-row strong {
  color: var(--muted);
  font-size: 0.9rem;
}

.archive-file-row button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: #b91c1c;
  padding: 6px 10px;
  font-weight: 800;
}

.archive-file-row-warning {
  border-color: #fecaca;
  background: #fff7f7;
}

.archive-warning {
  display: grid;
  gap: 6px;
  border: 1px dashed #f59e0b;
  border-radius: var(--radius);
  background: var(--amber-soft);
  padding: 14px;
}

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

.archive-warning span {
  color: var(--muted);
  font-weight: 700;
}

.print-branding {
  margin-top: 28px;
  border-top: 1px solid #d1d5db;
  padding-top: 12px;
  color: #475569;
  font-weight: 800;
}

.redact-pages {
  display: grid;
  gap: 22px;
}

.redact-page-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.redact-page-card h3 {
  margin-bottom: 12px;
}

.redact-page-card canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: crosshair;
  touch-action: none;
}

.ocr-preview {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fbff;
  padding: 12px;
}

.ocr-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: var(--radius);
}

.ocr-language-field {
  margin-top: 16px;
}

.ocr-feature-heading {
  display: grid;
  gap: 22px;
  align-items: center;
  margin-bottom: 30px;
}

.ocr-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  color: #0c4a6e;
  font-weight: 900;
  text-align: center;
}

.ocr-flow span,
.ocr-flow strong {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 82px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: #f8fbff;
  padding: 10px;
}

.ocr-flow strong {
  background: #eff6ff;
}

.ocr-feature-table {
  display: grid;
  gap: 18px;
}

.ocr-feature-table article {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.ocr-feature-table h3 {
  color: #2563eb;
}

.ocr-feature-table p {
  margin-bottom: 0;
}

.ocr-language-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ocr-language-grid button {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  padding: 16px 18px;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ocr-language-grid button:hover {
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.ocr-language-grid span {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 34px;
  border: 1px solid #c7d2fe;
  border-radius: var(--radius);
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 900;
}

.ocr-language-grid strong {
  color: #166534;
  font-size: 1.02rem;
}

.error-message {
  color: #b91c1c;
  font-weight: 700;
}

.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--border);
  background: #111827;
  color: #e5e7eb;
}

.footer-grid {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  gap: 26px;
}

.site-footer p,
.site-footer a {
  color: #cbd5e1;
}

.site-footer h2 {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 1rem;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 8px 0;
}

.footer-brand {
  color: #ffffff;
}

.footer-bottom {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 18px 0 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

:root[data-theme="dark"] .site-header {
  background: rgba(15, 23, 42, 0.94);
}

:root[data-theme="dark"] .brand-mark {
  color: #06121f;
}

:root[data-theme="dark"] .header-search input,
:root[data-theme="dark"] .hero-search input,
:root[data-theme="dark"] .form-field input,
:root[data-theme="dark"] .form-field select,
:root[data-theme="dark"] .tool-textarea,
:root[data-theme="dark"] .mega-menu,
:root[data-theme="dark"] .menu-toggle,
:root[data-theme="dark"] .theme-toggle {
  background: var(--surface);
  color: var(--text);
}

:root[data-theme="dark"] .header-search input::placeholder,
:root[data-theme="dark"] .hero-search input::placeholder,
:root[data-theme="dark"] .tool-textarea::placeholder {
  color: #7f8ca3;
}

:root[data-theme="dark"] .hero-section,
:root[data-theme="dark"] .tool-card,
:root[data-theme="dark"] .category-card,
:root[data-theme="dark"] .tool-panel,
:root[data-theme="dark"] .result-card,
:root[data-theme="dark"] .stats-strip div,
:root[data-theme="dark"] .hero-toolboard,
:root[data-theme="dark"] .conversion-callout,
:root[data-theme="dark"] .trust-item,
:root[data-theme="dark"] .feature-list article,
:root[data-theme="dark"] .directory-section,
:root[data-theme="dark"] .faq-list details,
:root[data-theme="dark"] .converter-file-card,
:root[data-theme="dark"] .todo-item,
:root[data-theme="dark"] .archive-file-row,
:root[data-theme="dark"] .product-family-grid .family-card,
:root[data-theme="dark"] .privacy-strip,
:root[data-theme="dark"] .archive-warning,
:root[data-theme="dark"] .ocr-language-grid button {
  background: rgba(23, 32, 51, 0.9);
  border-color: var(--border);
}

:root[data-theme="dark"] .archive-file-row-warning {
  border-color: #7f1d1d;
  background: #2a1820;
}

:root[data-theme="dark"] .hero-quick-grid a,
:root[data-theme="dark"] .mini-tool-list a,
:root[data-theme="dark"] .conversion-matrix a,
:root[data-theme="dark"] .conversion-matrix span,
:root[data-theme="dark"] .pill-links a,
:root[data-theme="dark"] .pill-links button,
:root[data-theme="dark"] .badge,
:root[data-theme="dark"] .rate-button {
  background: #111b2e;
  border-color: var(--border);
  color: var(--text);
}

:root[data-theme="dark"] .muted-band {
  background: #111b2e;
}

:root[data-theme="dark"] .family-blue,
:root[data-theme="dark"] .family-green,
:root[data-theme="dark"] .family-amber,
:root[data-theme="dark"] .family-violet,
:root[data-theme="dark"] .family-rose,
:root[data-theme="dark"] .family-neutral {
  background: #172033;
}

:root[data-theme="dark"] .tool-icon,
:root[data-theme="dark"] .family-icon,
:root[data-theme="dark"] .hero-quick-grid span,
:root[data-theme="dark"] .mini-tool-list span,
:root[data-theme="dark"] .ocr-language-grid span {
  color: #06121f;
}

:root[data-theme="dark"] .site-footer {
  background: #070b14;
}

@media (min-width: 680px) {
  .hero-search {
    grid-template-columns: 1fr auto;
  }

  .card-grid,
  .category-grid,
  .related-grid,
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .option-grid,
  .formula-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cash-denomination-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cash-custom-row {
    grid-template-columns: minmax(0, 1fr) 170px auto;
  }

  .gst-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .conversion-matrix {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .conversion-matrix a,
  .conversion-matrix span {
    border-right: 1px solid var(--border);
  }

  .product-family-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roadmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .converter-file-card {
    grid-template-columns: minmax(180px, 0.75fr) 1fr;
    align-items: center;
  }

  .split-range-row {
    grid-template-columns: 0.8fr 1fr 1fr auto;
    align-items: end;
  }

  .ocr-language-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ocr-feature-table article {
    grid-template-columns: minmax(220px, 0.7fr) 1fr;
  }

  .todo-item {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

@media (min-width: 980px) {
  .nav-shell {
    grid-template-columns: auto minmax(280px, 450px) 1fr;
  }

  .header-search {
    order: initial;
    grid-column: auto;
  }

  .menu-toggle {
    display: none;
  }

  .primary-menu {
    display: flex;
    grid-column: auto;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    padding: 0;
  }

  .primary-menu a {
    padding: 8px 10px;
    font-size: 0.94rem;
  }

  .mega-trigger {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.94rem;
  }

  .mega-menu {
    position: fixed;
    top: 76px;
    left: 50%;
    z-index: 30;
    width: min(calc(100vw - 40px), 1120px);
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 22px;
    transform: translateX(-50%);
    padding: 26px 28px;
  }

  .mega-menu-wrap:hover .mega-menu,
  .mega-menu-wrap:focus-within .mega-menu {
    display: grid;
  }

  .mega-menu a {
    min-height: 40px;
    padding: 7px 6px;
    font-size: 0.9rem;
  }

  .hero-section {
    grid-template-columns: minmax(0, 1fr) 360px;
    min-height: auto;
    padding-top: 34px;
    align-items: start;
  }

  .desktop-hero {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .split-workspace {
    grid-template-columns: minmax(0, 1fr) 380px;
  }

  .split-main-panel {
    min-height: 650px;
  }

  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .product-family-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .conversion-matrix {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .split-section,
  .tool-layout {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }

  .cash-counter-layout {
    grid-template-columns: minmax(0, 1.25fr) 420px;
    align-items: start;
  }

  .gst-bill-layout {
    grid-template-columns: minmax(0, 1.4fr) 420px;
    align-items: start;
  }

  .ocr-feature-heading {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .ocr-language-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .nav-shell {
    grid-template-columns: auto minmax(340px, 475px) 1fr;
  }

  .primary-menu {
    gap: 8px;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  body * {
    visibility: hidden;
  }

  .gst-print-area {
    display: block;
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    padding: 0;
    visibility: visible;
  }

  .gst-print-area * {
    visibility: visible;
  }

  .gst-print-card {
    width: 100%;
    padding: 0;
  }

  .gst-print-card table {
    page-break-inside: auto;
  }

  .gst-print-card tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
}
