:root {
  --bg: #0b1220;
  --bg-elev: #111b2e;
  --bg-card: #152138;
  --bg-input: #0d1627;
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(56, 189, 248, 0.35);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-soft: #cbd5e1;
  --teal: #0ea5e9;
  --teal-light: #38bdf8;
  --emerald: #10b981;
  --emerald-light: #34d399;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 18px 48px rgba(2, 6, 23, 0.45);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background:
    radial-gradient(900px 500px at 12% -6%, rgba(14, 165, 233, 0.16), transparent 62%),
    radial-gradient(760px 460px at 88% 2%, rgba(16, 185, 129, 0.12), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

code, pre, .mono {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 18, 32, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.15);
  color: var(--teal-light);
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--text-soft);
  font-weight: 500;
}

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

.nav-cta {
  padding: 8px 15px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), var(--emerald));
  color: #04131c !important;
  font-weight: 700 !important;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.nav-cta:hover {
  opacity: 0.94;
  transform: translateY(-1px);
}

/* Hero */
.hero {
  padding: 44px 0 36px;
}

.hero-top {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 30px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--emerald-light);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.gradient-text {
  background: linear-gradient(95deg, #38bdf8 0%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 0 auto;
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 680px;
}

/* Tool Workspace */
.tool-shell {
  background: linear-gradient(180deg, rgba(21, 33, 56, 0.92), rgba(17, 27, 46, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tool-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(11, 18, 32, 0.65);
  border-bottom: 1px solid var(--border);
}

.tabs {
  display: inline-flex;
  background: var(--bg-input);
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--border);
  gap: 4px;
}

.tab-btn {
  appearance: none;
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn.active {
  background: rgba(14, 165, 233, 0.18);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.quota-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

.quota-pill strong {
  color: var(--emerald-light);
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.18fr);
  min-height: 520px;
}

.tool-input-pane {
  padding: 22px 24px 24px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tool-output-pane {
  padding: 22px 24px 24px;
  background: rgba(11, 18, 32, 0.45);
  display: flex;
  flex-direction: column;
}

.sample-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sample-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
}

.sample-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-chip {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--text-soft);
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}

.sample-chip:hover,
.sample-chip.active {
  background: rgba(14, 165, 233, 0.2);
  border-color: var(--teal-light);
  color: #fff;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-soft);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  resize: vertical;
  min-height: 82px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal-light);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(135deg, var(--teal), var(--emerald));
  color: #04131c;
  font-weight: 700;
  font-size: 0.96rem;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-soft);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.btn-secondary:hover {
  border-color: var(--teal-light);
  color: #fff;
  text-decoration: none;
}

.btn-duty-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.14);
  color: var(--emerald-light) !important;
  font-size: 0.83rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.14s ease;
}

.btn-duty-link:hover {
  background: rgba(16, 185, 129, 0.24);
  border-color: var(--emerald-light);
}

/* BYOK Drawer */
.byok-details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(11, 18, 32, 0.55);
  padding: 10px 12px;
}

.byok-details summary {
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.byok-details[open] summary {
  color: var(--teal-light);
  margin-bottom: 10px;
}

.byok-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.help-text {
  font-size: 0.77rem;
  color: var(--text-muted);
  margin: 0;
}

/* Output Pane States */
.empty-state {
  margin: auto;
  text-align: center;
  max-width: 420px;
  padding: 24px 12px;
}

.empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.empty-state p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.feature-pills span {
  font-size: 0.76rem;
  color: var(--text-soft);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}

.loading-state {
  margin: auto;
  text-align: center;
  padding: 36px 16px;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(56, 189, 248, 0.22);
  border-top-color: var(--teal-light);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-box {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fecdd3;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.9rem;
}

.error-box strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
}

/* Result Card */
.result-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.hs-code-cluster {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.code-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--teal-light);
  font-weight: 700;
}

.hs-main-code {
  font-family: var(--font-mono);
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}

.hs-sub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--teal-light);
}

.pill-green {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--emerald-light);
}

.pill-amber {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

.confidence-box {
  min-width: 145px;
  text-align: right;
}

.confidence-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--emerald-light);
}

.confidence-bar {
  margin-top: 5px;
  height: 7px;
  width: 100%;
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--emerald));
  border-radius: 999px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-block {
  background: rgba(21, 33, 56, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
}

.panel-block h4 {
  margin: 0 0 9px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.hierarchy-list {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
}

.hierarchy-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
}

.hierarchy-item span:first-child {
  color: var(--text-muted);
  font-weight: 600;
}

.gri-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gri-step {
  border-left: 3px solid var(--teal);
  padding-left: 11px;
}

.gri-step-head {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.gri-step-head span {
  font-family: var(--font-mono);
  color: var(--teal-light);
  margin-right: 6px;
}

.gri-step p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.alt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alt-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(11, 18, 32, 0.6);
  border: 1px solid var(--border);
  font-size: 0.84rem;
}

.alt-item strong {
  font-family: var(--font-mono);
  color: var(--amber);
}

.duty-grid {
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
}

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

.disclaimer-note {
  font-size: 0.77rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* Bulk Table */
.bulk-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 11px;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

table.data-table th,
table.data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.data-table th {
  background: rgba(11, 18, 32, 0.85);
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table.data-table tr:last-child td {
  border-bottom: none;
}

.csv-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.file-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px dashed var(--border-strong);
  background: rgba(14, 165, 233, 0.08);
  color: var(--teal-light);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.file-label input {
  display: none;
}

/* Sections */
.section {
  padding: 64px 0;
}

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 38px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: -0.025em;
}

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

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 233, 0.14);
  color: var(--teal-light);
  font-weight: 800;
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Guides Grid */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.guide-card:hover {
  border-color: var(--teal-light);
  transform: translateY(-2px);
  text-decoration: none;
}

.guide-hs {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--emerald-light);
}

.guide-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.guide-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.price-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.price-card.featured {
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.12), rgba(17, 27, 46, 0.96));
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 18px 44px rgba(14, 165, 233, 0.14);
}

.price-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.08rem;
}

.price-amount {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.price-amount span {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.price-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--text-soft);
  flex: 1;
}

.price-features li::before {
  content: "✓";
  color: var(--emerald-light);
  font-weight: 800;
  margin-right: 9px;
}

/* FAQ */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.98rem;
  color: #fff;
}

.faq-item p {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* pSEO & Article Pages */
.article-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 36px 20px 72px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.geo-answer-box {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 22px 0 28px;
}

.geo-label {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--emerald-light);
  margin-bottom: 8px;
}

.geo-answer-box p {
  margin: 0;
  font-size: 1.02rem;
  color: #f8fafc;
}

.cta-banner {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 28px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cta-banner h3 {
  margin: 0 0 4px;
  font-size: 1.12rem;
}

.cta-banner p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-section {
  margin-top: 32px;
}

.article-section h2 {
  font-size: 1.38rem;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.article-section p,
.article-section li {
  color: var(--text-soft);
  font-size: 0.96rem;
}

.trap-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.trap-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: 10px;
  padding: 14px 16px;
}

.trap-card strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
}

.modal-card h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.modal-card .modal-sub {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.success-box {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #d1fae5;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 44px;
  margin-top: 40px;
  background: rgba(7, 12, 22, 0.72);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--text-soft);
}

.footer-disclaimer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .tool-input-pane {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .cards-3,
  .guides-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links a:not(.keep-mobile) {
    display: none;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .hierarchy-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
