:root {
  color-scheme: dark;
  --v2-bg: #0f172a;
  --v2-bg-soft: #111827;
  --v2-surface: rgba(17, 24, 39, 0.82);
  --v2-surface-solid: #111827;
  --v2-surface-hover: #1f2937;
  --v2-text: #f8fafc;
  --v2-text-secondary: #cbd5e1;
  --v2-text-muted: #94a3b8;
  --v2-border: rgba(148, 163, 184, 0.22);
  --v2-border-strong: rgba(148, 163, 184, 0.36);
  --v2-accent: #6366f1;
  --v2-accent-hover: #4f46e5;
  --v2-blue: #2563eb;
  --v2-cyan: #0891b2;
  --v2-green: #059669;
  --v2-radius: 8px;
  --v2-shadow: 0 24px 80px rgba(2, 6, 23, 0.36);
  --v2-font: "Inter", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --v2-bg: #f8fafc;
  --v2-bg-soft: #eef2f7;
  --v2-surface: rgba(255, 255, 255, 0.86);
  --v2-surface-solid: #ffffff;
  --v2-surface-hover: #f1f5f9;
  --v2-text: #0f172a;
  --v2-text-secondary: #334155;
  --v2-text-muted: #64748b;
  --v2-border: rgba(15, 23, 42, 0.12);
  --v2-border-strong: rgba(15, 23, 42, 0.22);
  --v2-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

html { scroll-behavior: smooth; }

body.redesign-v2 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--v2-font);
  color: var(--v2-text);
  background:
    radial-gradient(circle at 18% 12%, rgba(99, 102, 241, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(8, 145, 178, 0.12), transparent 24rem),
    linear-gradient(180deg, var(--v2-bg) 0%, var(--v2-bg-soft) 100%);
}

body.redesign-v2 > main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: 60px;
  border-bottom: 1px solid var(--v2-border);
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

[data-theme="light"] .navbar { background: rgba(248, 250, 252, 0.82); }

.navbar-inner {
  width: min(1120px, calc(100% - 40px));
  height: 60px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--v2-text);
  font-weight: 800;
  text-decoration: none;
}

.logo-img { width: 30px; height: 30px; }
.logo-text { color: var(--v2-text); font-size: 18px; letter-spacing: 0; white-space: nowrap; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.nav-link,
.nav-menu-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--v2-radius);
  color: var(--v2-text-secondary);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active,
.nav-menu[open] .nav-menu-trigger {
  color: var(--v2-text);
  background: rgba(99, 102, 241, 0.16);
}

.nav-menu { position: relative; }
.nav-menu summary { list-style: none; }
.nav-menu summary::-webkit-details-marker { display: none; }

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 260px;
  padding: 8px;
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius);
  background: var(--v2-surface-solid);
  box-shadow: var(--v2-shadow);
}

.nav-menu-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--v2-radius);
  color: var(--v2-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.nav-menu-panel a span {
  display: block;
  margin-top: 2px;
  color: var(--v2-text-muted);
  font-size: 12px;
  font-weight: 500;
}

.nav-menu-panel a:hover { background: var(--v2-surface-hover); }

.theme-toggle {
  min-width: 48px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius);
  color: var(--v2-text-secondary);
  background: transparent;
  font: 650 13px/1 var(--v2-font);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--v2-text);
  border-color: var(--v2-border-strong);
  background: var(--v2-surface-hover);
}

.redesign-v2 main { padding-top: 60px; }
.v2-container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.v2-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 74px 0 56px;
}

.v2-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.74fr);
  gap: 44px;
  align-items: center;
}

.v2-eyebrow {
  margin: 0 0 14px;
  color: var(--v2-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v2-hero h1,
.v2-section h2,
.v2-contact h2 {
  margin: 0;
  color: var(--v2-text);
  letter-spacing: 0;
}

.v2-hero h1 {
  max-width: 760px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 1.04;
  font-weight: 850;
}

.v2-hero-subtitle {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--v2-text-secondary);
  font-size: 20px;
  line-height: 1.7;
}

.v2-hero-actions,
.v2-card-actions,
.v2-contact-links { display: flex; flex-wrap: wrap; gap: 12px; }
.v2-hero-actions { margin-top: 34px; }

.v2-btn,
.v2-text-link,
.v2-contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--v2-radius);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.v2-btn-primary,
.v2-contact-links a:first-child {
  color: #fff;
  background: var(--v2-accent);
}

.v2-btn-primary:hover,
.v2-contact-links a:first-child:hover { background: var(--v2-accent-hover); }

.v2-btn-ghost,
.v2-contact-links a:not(:first-child),
.v2-text-link {
  color: var(--v2-text);
  border: 1px solid var(--v2-border);
  background: rgba(148, 163, 184, 0.08);
}

.v2-btn-ghost:hover,
.v2-contact-links a:not(:first-child):hover,
.v2-text-link:hover {
  border-color: var(--v2-border-strong);
  background: var(--v2-surface-hover);
}

.v2-hero-panel,
.v2-card,
.v2-tool-card {
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius);
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow);
}

.v2-hero-panel { padding: 24px; }
.v2-panel-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--v2-border); }
.v2-panel-head strong,
.v2-signal-list strong { color: var(--v2-text); font-size: 16px; }
.v2-panel-head span,
.v2-signal-list span { color: var(--v2-text-muted); font-size: 13px; line-height: 1.5; }
.v2-signal-list { display: grid; gap: 14px; margin-top: 18px; }
.v2-signal-list a { display: grid; gap: 4px; padding: 12px; border-radius: var(--v2-radius); text-decoration: none; }
.v2-signal-list a:hover { background: var(--v2-surface-hover); }

.v2-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 32px;
  height: 44px;
  transform: translateX(-50%);
  color: var(--v2-text-muted);
}
.v2-scroll-hint svg { width: 100%; height: 100%; }
.v2-scroll-hint path { animation: v2Bounce 1.05s ease-in-out 0s 3; }
@keyframes v2Bounce { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(5px); } }

.v2-section { padding: 84px 0; border-top: 1px solid rgba(148, 163, 184, 0.08); }
.v2-section-head { max-width: 760px; margin-bottom: 28px; }
.v2-section-head-row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.v2-section h2,
.v2-contact h2 { font-size: 36px; line-height: 1.18; font-weight: 820; }

.v2-section-head p:not(.v2-eyebrow),
.v2-card p,
.v2-tool-card span,
.v2-contact p:not(.v2-eyebrow) {
  color: var(--v2-text-secondary);
  line-height: 1.7;
}

.v2-card-grid { display: grid; gap: 18px; }
.v2-card-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v2-card-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.v2-card,
.v2-tool-card {
  display: block;
  padding: 22px;
  color: inherit;
  text-decoration: none;
}

.v2-card-interactive,
.v2-tool-card { transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease; }
.v2-card-interactive:hover,
.v2-tool-card:hover { transform: translateY(-3px); border-color: rgba(99, 102, 241, 0.52); background: var(--v2-surface-hover); }

.v2-tag {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.v2-tag-info { color: #bae6fd; background: rgba(37, 99, 235, 0.14); }
.v2-tag-success { color: #bbf7d0; background: rgba(5, 150, 105, 0.14); }

.v2-card h3,
.v2-tool-card strong {
  display: block;
  margin: 14px 0 8px;
  color: var(--v2-text);
  font-size: 20px;
  line-height: 1.3;
}

.v2-tool-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.v2-tool-card { min-height: 180px; }
.v2-tool-card em { display: inline-block; margin-top: 16px; color: var(--v2-accent); font-style: normal; font-weight: 800; }

.v2-tool-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--v2-radius);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  background: var(--v2-accent);
}

.v2-tool-time .v2-tool-icon { background: var(--v2-blue); }
.v2-tool-encode .v2-tool-icon { background: var(--v2-cyan); }
.v2-tool-match .v2-tool-icon { background: var(--v2-green); }
.v2-tool-sql .v2-tool-icon { background: #7c3aed; }
.v2-tool-jwt .v2-tool-icon { background: #0f766e; }
.v2-tool-java .v2-tool-icon { background: #4f46e5; }

.v2-contact { text-align: center; }
.v2-contact h2,
.v2-contact p { max-width: 720px; margin-left: auto; margin-right: auto; }
.v2-contact-links { justify-content: center; margin-top: 26px; }

.footer {
  border-top: 1px solid var(--v2-border);
  color: var(--v2-text-secondary);
  background: color-mix(in srgb, var(--v2-bg-soft) 72%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="light"] .footer {
  background: color-mix(in srgb, var(--v2-bg) 90%, #ffffff);
}

.footer-content {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0;
  display: grid;
  gap: 18px;
}

.footer-brand,
.footer-links { display: flex; align-items: center; gap: 14px; }
.footer-logo { width: 28px; height: 28px; }
.footer-brand-name { color: var(--v2-text); font-weight: 800; }
.footer-links { flex-wrap: wrap; }
.footer-links a { color: var(--v2-text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--v2-text); }
.footer-copyright { margin: 0; color: var(--v2-text-muted); font-size: 13px; }
.footer-copyright a { color: var(--v2-text-muted); text-decoration: none; }
.footer-copyright a:hover { text-decoration: underline; }

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
}

.footer-brand {
  color: var(--v2-text);
  text-decoration: none;
}

.footer-brand:hover {
  color: var(--v2-text);
  text-decoration: none;
}

.logo-sub {
  color: var(--v2-text-muted);
  font-size: 14px;
  font-weight: 600;
}

.nav-unit-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}
.nav-unit-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--v2-text-muted);
  white-space: nowrap;
}
.nav-unit-seg {
  display: inline-flex;
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius);
  overflow: hidden;
}
.nav-unit-btn {
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--v2-text-secondary);
  font: 650 12px/1 var(--v2-font);
  cursor: pointer;
}
.nav-unit-btn:hover { background: var(--v2-surface-hover); color: var(--v2-text); }
.nav-unit-btn.active {
  background: rgba(99, 102, 241, 0.2);
  color: var(--v2-text);
}

.v2-hero-compact {
  min-height: auto;
  padding: 48px 0 28px;
}
.v2-hero-inner-single { grid-template-columns: 1fr; }
.v2-hero-compact h1 { font-size: clamp(32px, 5vw, 52px); }
.v2-hero-compact .v2-hero-subtitle { margin-top: 14px; font-size: 17px; }
.v2-section-tight { padding: 28px 0 72px; border-top: none; }
.au-page-content { display: flex; flex-direction: column; gap: 1.25rem; padding-bottom: 2rem; }

@media (max-width: 820px) {
  .nav-unit-wrap {
    order: 2;
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
  .logo-sub { display: none; }
}

@media (max-width: 1080px) {
  .v2-tool-grid,
  .v2-card-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-card-grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .navbar { height: auto; }
  .navbar-inner {
    width: min(100% - 24px, 1120px);
    min-height: 60px;
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }
  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 2px;
  }
  .nav-link,
  .nav-menu-trigger { padding: 0 9px; font-size: 13px; }
  .theme-toggle { margin-left: auto; }
  .redesign-v2 main { padding-top: 104px; }
  .v2-container { width: min(100% - 28px, 1120px); }
  .v2-hero { min-height: auto; padding: 40px 0 36px; }
  .v2-hero-inner { grid-template-columns: 1fr; }
  .v2-hero h1 { font-size: 44px; }
  .v2-hero-subtitle { font-size: 17px; }
  .v2-scroll-hint { display: none; }
  .v2-section { padding: 58px 0; }
  .v2-section-head-row { align-items: flex-start; flex-direction: column; }
  .v2-card-grid-three,
  .v2-card-grid-four,
  .v2-tool-grid { grid-template-columns: 1fr; }
  .v2-hero-actions,
  .v2-contact-links { flex-direction: column; }
  .v2-btn,
  .v2-contact-links a { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .v2-scroll-hint path,
  .v2-card-interactive,
  .v2-tool-card { animation: none; transition: none; }
}

/* truncated footer-support from tools site — not used on au */
.footer-support {
  display: none;
}
