/* ==========================================================================
   TOURMORE Unified Public & Programmatic SEO Stylesheet
   Exact parity with Daylight Studio & Midnight Studio design tokens
   (tokens.css + PublicLayout.tsx + LandingPage.tsx + PricingPage.tsx)
   ========================================================================== */

:root,
[data-theme="light"] {
  color-scheme: light;
  --bg-canvas: #FAFBFB;
  --bg-surface: #FFFFFF;
  --bg-subtle: rgba(11, 43, 46, 0.045);
  --bg-hover: rgba(11, 43, 46, 0.06);
  --bg-input: rgba(255, 255, 255, 0.96);
  --border-subtle: rgba(11, 43, 46, 0.08);
  --border-default: rgba(11, 43, 46, 0.13);
  --border-strong: rgba(11, 43, 46, 0.24);
  --text-primary: #0B2B2E;
  --text-secondary: #3A5457;
  --text-muted: #566E71;
  --brand-spruce: #0B2B2E;
  --brand-emerald: #0E9F6E;
  --brand-mint: #34D399;
  --brand-soft-bg: rgba(14, 159, 110, 0.09);
  --brand-soft-border: rgba(14, 159, 110, 0.22);
  --green-pill-ink: #047857;
  --cta-bg: #0B2B2E;
  --cta-hover: #123D41;
  --cta-ink: #FFFFFF;
  --pill-nav-bg: rgba(11, 43, 46, 0.93);
  --pill-nav-shadow: 0 12px 32px -8px rgba(7, 28, 30, 0.34), inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03), inset 0 0.5px 0 rgba(255, 255, 255, 0.9);
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-canvas: #090D0F;
  --bg-surface: #12181B;
  --bg-subtle: rgba(235, 246, 244, 0.06);
  --bg-hover: rgba(235, 246, 244, 0.085);
  --bg-input: rgba(12, 17, 20, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-default: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text-primary: #F5F5F7;
  --text-secondary: #A1A1A6;
  --text-muted: #98989D;
  --brand-spruce: #0B2B2E;
  --brand-emerald: #10B981;
  --brand-mint: #34D399;
  --brand-soft-bg: rgba(52, 211, 153, 0.12);
  --brand-soft-border: rgba(52, 211, 153, 0.28);
  --green-pill-ink: #34D399;
  --cta-bg: #F5F5F7;
  --cta-hover: #E5E5EA;
  --cta-ink: #0B2B2E;
  --pill-nav-bg: rgba(14, 24, 27, 0.92);
  --pill-nav-shadow: 0 14px 36px -8px rgba(0, 0, 0, 0.65), inset 0 0.5px 0 rgba(255, 255, 255, 0.14);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.38), inset 0 0.5px 0 rgba(255, 255, 255, 0.08);
}

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

html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-spruce);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
}

/* Subtle Architectural Studio Grid + Emerald Light Bloom (matches LandingPage) */
.tm-hero-grid {
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto 0;
  height: 440px;
  z-index: 0;
  background-image:
    radial-gradient(ellipse 68% 58% at 50% 0%, rgba(14, 159, 110, 0.11) 0%, rgba(11, 43, 46, 0.025) 55%, transparent 100%),
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Visitors-Inspired Floating Dark Spruce Pill Header (exact match to PublicLayout) */
.tm-header {
  position: fixed;
  top: 14px;
  left: 12px;
  right: 12px;
  z-index: 50;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.tm-pill-nav {
  pointer-events: auto;
  width: 100%;
  max-width: 660px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 24px;
  background: var(--pill-nav-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--pill-nav-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.tm-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #FFFFFF;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.tm-brand-badge {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  flex-shrink: 0;
}

.tm-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.tm-nav-links a {
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: rgba(235, 246, 244, 0.78);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}

.tm-nav-links a:hover,
.tm-nav-links a[aria-current="page"] {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
}

.tm-nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.tm-theme-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(235, 246, 244, 0.88);
  cursor: pointer;
  padding: 0;
  transition: background-color 150ms ease, transform 120ms ease;
}

.tm-theme-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.tm-theme-btn:active {
  transform: scale(0.95);
}

[data-theme="light"] .tm-icon-sun { display: none; }
[data-theme="dark"] .tm-icon-moon { display: none; }

.tm-nav-cta {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #34D399;
  color: #062426;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.45);
  transition: filter 150ms ease, transform 120ms ease;
}

.tm-nav-cta:hover {
  filter: brightness(1.05);
}

.tm-nav-cta:active {
  transform: scale(0.98);
}

/* Main Content Container */
main, .tm-main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 108px 20px 48px;
}

.tm-hero {
  max-width: 720px;
  margin-bottom: 28px;
}

.tm-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--brand-soft-bg);
  border: 1px solid var(--brand-soft-border);
  color: var(--green-pill-ink);
  margin-bottom: 14px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.034em;
  line-height: 1.08;
  margin: 0 0 12px;
  color: var(--text-primary);
}

.lead {
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  max-width: 62ch;
}

h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 32px 0 10px;
  color: var(--text-primary);
}

p {
  margin: 0 0 14px;
  color: var(--text-secondary);
  max-width: 68ch;
}

a {
  color: var(--brand-emerald);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

/* Tool Switcher Segmented Bar (/tools/*) */
.tm-tool-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.tm-tool-tabs a {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.tm-tool-tabs a:hover {
  color: var(--text-primary);
}

.tm-tool-tabs a[aria-current="page"] {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-card);
}

/* Elevated Surface Cards */
.tm-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.tm-card > :first-child {
  margin-top: 0;
}

.tm-card > :last-child {
  margin-bottom: 0;
}

/* Venue Metric Strip (<dl>) */
dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

dl > div {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}

dt {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
}

dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

/* Tables (exact match to PricingPage comparison matrix) */
.tm-table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow-x: auto;
  box-shadow: var(--shadow-card);
  margin: 20px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

caption {
  text-align: left;
  padding: 14px 20px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

thead tr {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

th, td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

thead th, tbody th {
  color: var(--text-primary);
  font-weight: 600;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg-hover);
}

/* Interactive Calculator Forms */
form[data-tool] {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: end;
  margin-bottom: 24px;
}

form[data-tool] label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

form[data-tool] input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--border-default);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

form[data-tool] input:focus {
  outline: none;
  border-color: var(--brand-emerald);
  box-shadow: 0 0 0 3px var(--brand-soft-bg);
}

form[data-tool] button[type="submit"] {
  height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  border: none;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease, transform 120ms ease;
}

form[data-tool] button[type="submit"]:hover {
  background: var(--cta-hover);
}

form[data-tool] button[type="submit"]:active {
  transform: scale(0.98);
}

form[data-tool] output {
  grid-column: 1 / -1;
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--brand-soft-bg);
  border: 1px solid var(--brand-soft-border);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 0;
}

/* Index Lists (/venues, /routes) */
.tm-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 24px;
  display: grid;
  gap: 10px;
}

.tm-list li {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.tm-list li a {
  font-weight: 600;
  color: var(--text-primary);
}

.tm-list li a:hover {
  color: var(--brand-emerald);
}

/* Signature Primary CTA Pill */
.tm-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 140ms ease, transform 120ms ease;
}

.cta:hover {
  background: var(--cta-hover);
  text-decoration: none;
}

.cta:active {
  transform: scale(0.98);
}

.tm-meta-links {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 16px 0 0;
}

.tm-meta-links a {
  color: var(--text-primary);
  font-weight: 500;
}

:focus-visible {
  outline: 2px solid var(--brand-emerald);
  outline-offset: 2px;
}

/* Unified Single-Tier Footer (exact match to PublicLayout) */
.tm-footer {
  margin-top: 48px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.tm-footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tm-footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tm-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tm-footer-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cta-bg);
  color: var(--cta-ink);
}

.tm-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}

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

.tm-footer-bottom {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.tm-footer-legal {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tm-footer-legal a {
  color: var(--text-muted);
}

.tm-footer-theme {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text-secondary);
  cursor: pointer;
}

.tm-footer-theme:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .tm-pill-nav {
    padding: 7px 10px;
    gap: 8px;
  }
  .tm-nav-links {
    display: none;
  }
  .tm-main {
    padding: 92px 16px 36px;
  }
  form[data-tool] {
    padding: 18px;
    grid-template-columns: 1fr;
  }
  .tm-card {
    padding: 18px;
  }
  th, td {
    padding: 11px 14px;
  }
}
