@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-mono-latin.woff2") format("woff2");
}

:root {
  --background: #f5fbf6;
  --foreground: #171d19;
  --card: #eff5ef;
  --card-foreground: #171d19;
  --popover: #e9efe9;
  --popover-foreground: #171d19;
  --primary: #006c4c;
  --primary-foreground: #ffffff;
  --primary-container: color-mix(in srgb, var(--primary) 30%, var(--surface-container-lowest));
  --on-primary-container: color-mix(in srgb, var(--primary) 72%, var(--foreground));
  --secondary: #4d6357;
  --secondary-foreground: #ffffff;
  --secondary-container: #cfe9d8;
  --on-secondary-container: #0a1f16;
  --tertiary: #3d6373;
  --tertiary-container: #c1e8fb;
  --on-tertiary-container: #001f29;
  --muted: #e3e9e3;
  --muted-foreground: #404943;
  --accent: var(--secondary-container);
  --accent-foreground: var(--on-secondary-container);
  --destructive: #ba1a1a;
  --destructive-foreground: #ffffff;
  --error-container: #ffdad6;
  --on-error-container: #410002;
  --border: #bfc9c1;
  --input: #707972;
  --ring: #006c4c;
  --outline: #707972;
  --outline-variant: #bfc9c1;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #eff5ef;
  --surface-container: #e9efe9;
  --surface-container-high: #e3e9e3;
  --surface-container-highest: #dde4de;
  --inverse-surface: #2c322d;
  --inverse-on-surface: #edf2ec;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 999px;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow-sm: 0 1px 2px rgb(23 29 25 / 0.08), 0 1px 3px 1px rgb(23 29 25 / 0.04);
  --shadow-md: 0 2px 6px 2px rgb(23 29 25 / 0.08), 0 1px 2px rgb(23 29 25 / 0.12);
  --shadow-lg: 0 8px 24px 4px rgb(23 29 25 / 0.12), 0 2px 6px rgb(23 29 25 / 0.08);
  --header-height: 4.5rem;
}

html[data-theme="dark"] {
  --background: #0f1511;
  --foreground: #dfe4de;
  --card: #171d19;
  --card-foreground: #dfe4de;
  --popover: #1b211d;
  --popover-foreground: #dfe4de;
  --primary: #6cdbae;
  --primary-foreground: #003826;
  --primary-container: color-mix(in srgb, var(--primary) 30%, var(--surface-container-lowest));
  --on-primary-container: color-mix(in srgb, var(--primary) 72%, var(--foreground));
  --secondary: #b3ccbe;
  --secondary-foreground: #1f352a;
  --secondary-container: #354b3f;
  --on-secondary-container: #cfe9d8;
  --tertiary: #a5ccdf;
  --tertiary-container: #244c5b;
  --on-tertiary-container: #c1e8fb;
  --muted: #252b27;
  --muted-foreground: #bfc9c1;
  --accent: var(--secondary-container);
  --accent-foreground: var(--on-secondary-container);
  --destructive: #ffb4ab;
  --destructive-foreground: #690005;
  --error-container: #93000a;
  --on-error-container: #ffdad6;
  --border: #404943;
  --input: #8a938c;
  --ring: #6cdbae;
  --outline: #8a938c;
  --outline-variant: #404943;
  --surface-container-lowest: #0a0f0c;
  --surface-container-low: #171d19;
  --surface-container: #1b211d;
  --surface-container-high: #252b27;
  --surface-container-highest: #303632;
  --inverse-surface: #dfe4de;
  --inverse-on-surface: #2c322d;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.35), 0 1px 3px 1px rgb(0 0 0 / 0.25);
  --shadow-md: 0 2px 6px 2px rgb(0 0 0 / 0.35), 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 8px 24px 4px rgb(0 0 0 / 0.45), 0 2px 6px rgb(0 0 0 / 0.35);
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

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

* {
  margin: 0;
}

body {
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

button {
  cursor: pointer;
}

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

ul,
ol {
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection {
  background: var(--primary);
  color: var(--primary-foreground);
}

.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;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  transform: translateY(-200%);
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding-inline: 1.25rem;
}

.container-narrow {
  max-width: 56rem;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 86%, transparent);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
}

.brand,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--foreground);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand:hover,
.back-link:hover {
  color: var(--primary);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow-sm);
}

.back-link .brand-mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.45rem;
  font-size: 0.8rem;
}

.brand-logo {
  height: 2rem;
  width: auto;
  display: block;
  object-fit: contain;
  flex: none;
}

.brand-logo-sm {
  height: 1.6rem;
}

.back-link .brand-logo-sm {
  border-radius: 0.35rem;
}

.back-link:hover .back-arrow {
  color: var(--primary);
  transform: translateX(-2px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.header-link:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted-foreground);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.theme-toggle .icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* --------------------------------------------------------------------------
   Hero + sections
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5.5rem 0 2.5rem;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  animation: fade-up 0.5s ease both;
}

.hero-title {
  max-width: 50rem;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
  animation: fade-up 0.55s 0.05s ease both;
}

.hero-text {
  max-width: 38rem;
  margin-top: 1.1rem;
  color: var(--muted-foreground);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
  text-wrap: pretty;
  animation: fade-up 0.55s 0.1s ease both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.8rem;
  animation: fade-up 0.55s 0.15s ease both;
}

.section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border);
}

.section-tinted {
  background: color-mix(in srgb, var(--card) 55%, transparent);
}

.section-head {
  max-width: 42rem;
  margin: 0 auto 2.25rem;
  text-align: center;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section-text {
  margin-top: 0.65rem;
  color: var(--muted-foreground);
  font-size: 0.975rem;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Buttons + link cards
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.65rem;
  padding: 0.65rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--primary) 88%, black);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}

.btn-secondary:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.btn-ghost {
  color: var(--muted-foreground);
}

.btn-ghost:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--primary);
  font-size: 0.875rem;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.link-card:hover {
  background: var(--accent);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  transform: translateY(-1px);
}

.link-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

/* --------------------------------------------------------------------------
   Features
   -------------------------------------------------------------------------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}

.feature-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.feature-text {
  color: var(--muted-foreground);
  font-size: 0.84rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Page grid
   -------------------------------------------------------------------------- */

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

.page-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.page-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  box-shadow: var(--shadow-md);
}

.page-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.page-card-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.page-card-arrow {
  color: var(--muted-foreground);
  transition: transform 0.18s ease, color 0.18s ease;
}

.page-card:hover .page-card-arrow {
  color: var(--primary);
  transform: translateX(3px);
}

.page-card-description {
  color: var(--muted-foreground);
  font-size: 0.8rem;
  line-height: 1.55;
}

.page-card-path {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.empty-state {
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--muted-foreground);
  text-align: center;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Article pages
   -------------------------------------------------------------------------- */

.page-main {
  padding: 3.5rem 0 5rem;
}

.article {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding-inline: 1.25rem;
}

.article-header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.article-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-wrap: balance;
}

.article-description {
  margin-top: 0.75rem;
  color: var(--muted-foreground);
  font-size: 1.02rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.article-blocks {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.block-heading {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-wrap: balance;
}

.block-heading-1 {
  margin-top: 1.5rem;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}

.block-heading-2 {
  margin-top: 1.25rem;
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
}

.block-heading-3 {
  margin-top: 1rem;
  font-size: 1.25rem;
}

.block-heading-4 {
  margin-top: 0.75rem;
  font-size: 1.1rem;
}

.block-paragraph {
  color: var(--foreground);
  font-size: 1rem;
  line-height: 1.75;
  white-space: pre-wrap;
}

.block-divider {
  width: 100%;
  height: 0;
  margin: 0.75rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.code-block {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--secondary);
  overflow-x: auto;
}

.code-label {
  margin-bottom: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-block pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.block-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-left: 1.25rem;
  list-style: disc;
}

.block-list li {
  line-height: 1.65;
}

.block-list li::marker {
  color: var(--primary);
}

.block-image {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.block-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  object-fit: cover;
}

.block-image figcaption {
  color: var(--muted-foreground);
  font-size: 0.8rem;
  text-align: center;
}

.callout {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  background: var(--card);
}

.callout-icon {
  color: var(--primary);
  margin-top: 0.1rem;
}

.callout-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.callout-text {
  margin-top: 0.2rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.callout-success {
  border-left-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--card));
}

.callout-warning {
  border-left-color: #c3af32;
  background: color-mix(in srgb, #c3af32 8%, var(--card));
}

.callout-warning .callout-icon {
  color: #a08f1f;
}

.callout-info {
  border-left-color: #4f84ba;
  background: color-mix(in srgb, #4f84ba 6%, var(--card));
}

.callout-info .callout-icon {
  color: #4f84ba;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 45%, transparent);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 1.4rem;
}

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

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.footer-links a {
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Error pages
   -------------------------------------------------------------------------- */

.error-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height) - 9rem);
  padding: 4rem 1.25rem;
  text-align: center;
}

.error-code {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.error-title {
  margin-top: 0.75rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.error-text {
  max-width: 30rem;
  margin-top: 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.65;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.error-details {
  width: 100%;
  max-width: 42rem;
  margin-top: 1.5rem;
  text-align: left;
}

/* --------------------------------------------------------------------------
   Animations + responsive
   -------------------------------------------------------------------------- */

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

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .container {
    padding-inline: 1rem;
  }

  .hero {
    padding: 4rem 0 2rem;
  }

  .section {
    padding: 3.25rem 0;
  }

  .features-grid,
  .pages-grid,
  .links-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-main {
    padding-top: 2.5rem;
  }

  .article {
    padding-inline: 1rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .hero-actions {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .article {
    max-width: none;
  }
}

/* --------------------------------------------------------------------------
   Header navigation additions
   -------------------------------------------------------------------------- */

.header-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted-foreground);
}

.header-menu-toggle:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle .icon {
  transition: transform 0.15s ease;
}

.nav-dropdown.is-open .nav-dropdown-toggle .icon {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 50;
  display: none;
  min-width: 11rem;
  max-height: 70vh;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}

.nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
  animation: fade-up 0.12s ease both;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 5px;
  color: var(--muted-foreground);
  font-size: 0.82rem;
  font-weight: 500;
}

.nav-dropdown-menu a:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.nav-dropdown-menu a:first-child {
  margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--border);
  border-radius: 5px 5px 0 0;
  color: var(--foreground);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Shop listing
   -------------------------------------------------------------------------- */

.shop-main {
  min-height: 60vh;
}

.shop-hero {
  padding: 4.75rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 55%),
    var(--background);
  text-align: center;
}

.shop-hero .hero-badge {
  margin-bottom: 1rem;
}

.shop-title {
  font-size: clamp(2.25rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.shop-intro {
  max-width: 40rem;
  margin: 1rem auto 0;
  color: var(--muted-foreground);
  font-size: 1.02rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.shop-hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-top: 1.5rem;
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

.shop-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.shop-hero-meta .icon {
  color: var(--primary);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  box-shadow: var(--shadow-md);
}

.product-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%),
    var(--muted);
  overflow: hidden;
}

.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.product-card:hover .product-card-media img {
  transform: scale(1.03);
}

.product-card-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.product-card-placeholder .icon {
  width: 1.6rem;
  height: 1.6rem;
}

.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem;
}

.product-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-card-title {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.product-price {
  flex: none;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.product-card-description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 0.82rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}

.product-card-meta {
  color: var(--muted-foreground);
  font-size: 0.7rem;
}

.product-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
}

.product-card-cta .icon {
  transition: transform 0.18s ease;
}

.product-card:hover .product-card-cta .icon {
  transform: translateX(3px);
}

.shop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 3.5rem 1.5rem;
}

.shop-empty .icon {
  width: 2rem;
  height: 2rem;
  color: var(--primary);
}

.shop-empty h2 {
  font-size: 1.15rem;
  font-weight: 650;
}

.shop-empty p {
  max-width: 28rem;
  color: var(--muted-foreground);
  font-size: 0.86rem;
  line-height: 1.6;
}

.shop-payment-note {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-top: 2rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.shop-payment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  flex: none;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}

.shop-payment-note h2 {
  font-size: 0.9rem;
  font-weight: 650;
}

.shop-payment-note p {
  margin-top: 0.25rem;
  color: var(--muted-foreground);
  font-size: 0.8rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* --------------------------------------------------------------------------
   Product page
   -------------------------------------------------------------------------- */

.product-main {
  padding: 2.25rem 0 5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 500;
}

.breadcrumb a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 2rem;
  align-items: start;
}

.product-content {
  min-width: 0;
}

.product-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 8;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%),
    var(--muted);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-media-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

.product-media-placeholder .icon {
  width: 2rem;
  height: 2rem;
}

.product-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.product-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-wrap: balance;
}

.product-description {
  max-width: 38rem;
  margin-top: 0.6rem;
  color: var(--muted-foreground);
  font-size: 0.97rem;
  line-height: 1.65;
}

.product-heading-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
  gap: 0.1rem;
}

.product-price-lg {
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.product-heading-price small {
  color: var(--muted-foreground);
  font-size: 0.68rem;
}

.product-details {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--foreground);
  font-size: 0.95rem;
  line-height: 1.75;
  white-space: pre-wrap;
}

.product-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.product-info-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.product-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  flex: none;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}

.product-info-card h2 {
  font-size: 0.84rem;
  font-weight: 650;
}

.product-info-card p {
  margin-top: 0.15rem;
  color: var(--muted-foreground);
  font-size: 0.76rem;
  line-height: 1.55;
}

.product-payment {
  margin-top: 1.75rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--card) 60%, transparent);
}

.product-payment h2 {
  font-size: 0.9rem;
  font-weight: 650;
}

.product-payment p {
  margin-top: 0.3rem;
  color: var(--muted-foreground);
  font-size: 0.8rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.product-side {
  position: sticky;
  top: 5rem;
}

.order-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-md);
}

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.order-card-head h2 {
  font-size: 1rem;
  font-weight: 650;
}

.order-price {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
}

.order-packages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.order-packages legend {
  margin-bottom: 0.35rem;
  color: var(--foreground);
  font-size: 0.75rem;
  font-weight: 600;
}

.package-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.package-option:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

.package-option:has(input:checked) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--background));
}

.package-option input {
  margin-top: 0.2rem;
  accent-color: var(--primary);
}

.package-option-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.package-option-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.8rem;
}

.package-option-top span {
  flex: none;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.package-option-body small {
  margin-top: 0.1rem;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  line-height: 1.5;
}

.order-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.order-card .field {
  gap: 0.3rem;
}

.order-card .field > span {
  font-size: 0.72rem;
}

.order-card .field em {
  color: var(--muted-foreground);
  font-style: normal;
  font-weight: 400;
}

.order-card .field input,
.order-card .field textarea {
  width: 100%;
  min-height: 2.25rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--background);
  font-size: 0.8rem;
}

.order-card .field textarea {
  resize: vertical;
}

.order-card .field input:focus,
.order-card .field textarea:focus {
  border-color: var(--primary);
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

.order-help {
  color: var(--muted-foreground);
  font-size: 0.68rem;
  line-height: 1.5;
  text-align: center;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.preview-callout {
  margin-bottom: 1.25rem;
}

/* Public alerts */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.78rem;
  line-height: 1.5;
}

.alert .icon {
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
  flex: none;
}

.alert-error {
  border-color: color-mix(in srgb, var(--destructive) 30%, var(--border));
  background: color-mix(in srgb, var(--destructive) 7%, var(--card));
  color: var(--destructive);
}

.alert-success {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  background: color-mix(in srgb, var(--primary) 7%, var(--card));
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   SecurityBot status
   -------------------------------------------------------------------------- */

.status-panel {
  position: relative;
  margin-bottom: 2rem;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--muted-foreground);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.status-panel.is-online {
  border-left-color: var(--primary);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 45%),
    var(--card);
}

.status-panel.is-offline {
  border-left-color: #c3af32;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, #c3af32 9%, transparent), transparent 45%),
    var(--card);
}

.status-panel-main {
  min-width: 0;
}

.status-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted-foreground);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted-foreground) 15%, transparent);
}

.is-online .status-dot {
  background: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

.is-offline .status-dot {
  background: #c3af32;
  box-shadow: 0 0 0 3px color-mix(in srgb, #c3af32 18%, transparent);
}

.status-panel-label {
  color: var(--muted-foreground);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status-pill {
  padding: 0.12rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 650;
}

.is-online .status-pill {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}

.is-offline .status-pill {
  border-color: color-mix(in srgb, #c3af32 35%, var(--border));
  background: color-mix(in srgb, #c3af32 12%, transparent);
  color: #8a7a13;
}

html[data-theme="dark"] .is-offline .status-pill {
  color: #d9c64d;
}

.status-panel-title {
  margin-top: 0.7rem;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.status-panel-text {
  margin-top: 0.25rem;
  color: var(--muted-foreground);
  font-size: 0.84rem;
  line-height: 1.6;
}

.status-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.status-panel-actions .btn {
  min-height: 2.25rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
}

.status-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 1.1rem 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}

.status-facts > div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.6rem 0.75rem;
  background: var(--card);
}

.status-facts dt {
  color: var(--muted-foreground);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-facts dd {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
}

.status-facts dd small {
  display: block;
  margin-top: 0.05rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
}

.status-checks {
  margin-top: 0.9rem;
}

.status-checks-label {
  color: var(--muted-foreground);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-checks ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.status-checks li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--background);
  font-size: 0.7rem;
}

.status-check-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--muted-foreground);
}

.status-checks li.is-good .status-check-dot {
  background: var(--primary);
}

.status-checks li.is-bad .status-check-dot {
  background: var(--destructive);
}

.status-checks small {
  color: var(--muted-foreground);
}

.status-error {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.7rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Invoice
   -------------------------------------------------------------------------- */

.invoice-main {
  padding: 2rem 0 4.5rem;
}

.invoice-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.invoice-created {
  margin-bottom: 1rem;
}

.invoice-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.invoice-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--muted) 32%, var(--card));
}

.invoice-business {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.invoice-business .brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  font-size: 1.05rem;
}

.invoice-business-logo {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  object-fit: contain;
  border-radius: 0.5rem;
  background: var(--card);
}

.invoice-business h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.invoice-business-details {
  margin-top: 0.2rem;
  color: var(--muted-foreground);
  font-size: 0.72rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.invoice-head-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  text-align: right;
}

.invoice-kicker {
  color: var(--muted-foreground);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.invoice-number {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 650;
}

.invoice-status {
  margin-top: 0.2rem;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 650;
  text-transform: capitalize;
}

.invoice-status.status-paid {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}

.invoice-status.status-pending {
  border-color: color-mix(in srgb, #c3af32 35%, var(--border));
  background: color-mix(in srgb, #c3af32 12%, transparent);
  color: #8a7a13;
}

html[data-theme="dark"] .invoice-status.status-pending {
  color: #d9c64d;
}

.invoice-status.status-cancelled,
.invoice-status.status-refunded {
  border-color: color-mix(in srgb, var(--destructive) 30%, var(--border));
  background: color-mix(in srgb, var(--destructive) 8%, transparent);
  color: var(--destructive);
}

.invoice-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr 1fr;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border);
}

.invoice-meta-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.invoice-meta-grid strong {
  font-size: 0.84rem;
  font-weight: 650;
}

.invoice-meta-grid span {
  color: var(--muted-foreground);
  font-size: 0.72rem;
}

.invoice-label {
  color: var(--muted-foreground) !important;
  font-size: 0.62rem !important;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.invoice-meta-total {
  align-items: flex-end;
  text-align: right;
}

.invoice-meta-total strong {
  color: var(--primary);
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.invoice-table-wrap {
  padding: 0 1.75rem;
  overflow-x: auto;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.invoice-table th {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
}

.invoice-table td {
  padding: 0.85rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  vertical-align: top;
}

.invoice-table td strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 650;
}

.invoice-table td small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  line-height: 1.5;
}

.invoice-item-variant {
  display: inline-block;
  margin-top: 0.15rem;
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 500;
}

.invoice-table .is-numeric {
  padding-left: 1rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.invoice-table tfoot td {
  padding: 0.5rem 0;
  border-bottom: 0;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.invoice-table tfoot tr:first-child td {
  padding-top: 0.85rem;
}

.invoice-total-row td {
  padding-top: 0.35rem !important;
  color: var(--foreground) !important;
  font-size: 0.95rem !important;
  font-weight: 700;
}

.invoice-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-top: 1px solid var(--border);
}

.invoice-block h2 {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.invoice-block p {
  margin-top: 0.35rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.invoice-muted {
  color: var(--muted-foreground);
  font-size: 0.72rem !important;
}

.delivery-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.delivery-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  overflow: hidden;
}

.delivery-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
}

.delivery-item-head strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 0.76rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-kind {
  padding: 0.1rem 0.4rem;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--primary);
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.delivery-item pre {
  margin: 0;
  padding: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.invoice-note {
  padding: 0 1.75rem 1.5rem;
}

.invoice-note h2 {
  font-size: 0.75rem;
  font-weight: 650;
}

.invoice-note p {
  margin-top: 0.25rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.invoice-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--muted) 30%, var(--card));
  color: var(--muted-foreground);
  font-size: 0.72rem;
}

.invoice-foot a {
  color: var(--primary);
  font-weight: 500;
}

.invoice-private-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  text-align: center;
}

.invoice-private-note .icon {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Responsive additions
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
  .product-layout {
    grid-template-columns: minmax(0, 1fr) 19rem;
    gap: 1.5rem;
  }

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

@media (max-width: 820px) {
  .product-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-side {
    position: static;
  }

  .product-heading {
    flex-direction: column;
    gap: 0.5rem;
  }

  .product-heading-price {
    align-items: flex-start;
  }

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

  .invoice-meta-total {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 860px) {
  .header-menu-toggle {
    display: inline-flex;
  }

  .header-nav {
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }

  .header-nav.is-open {
    display: flex;
  }

  .header-link {
    width: 100%;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-toggle {
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    width: 100%;
    margin-top: 0.15rem;
    box-shadow: none;
  }
}

@media (max-width: 640px) {
  .shop-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-main {
    padding-top: 1.5rem;
  }

  .product-media {
    aspect-ratio: 4 / 3;
  }

  .product-info-grid,
  .order-fields {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .invoice-head,
  .invoice-meta-grid,
  .invoice-columns {
    padding-inline: 1.15rem;
  }

  .invoice-table-wrap {
    padding-inline: 1.15rem;
  }

  .invoice-meta-grid,
  .invoice-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .invoice-toolbar {
    flex-wrap: wrap;
  }
}

@media print {
  .invoice-body {
    background: #fff;
  }

  .invoice-main {
    padding: 0;
  }

  .invoice-toolbar,
  .invoice-created,
  .invoice-private-note,
  .site-header,
  .site-footer {
    display: none !important;
  }

  .invoice-card {
    border: 0;
    box-shadow: none;
  }

  .invoice-card,
  .invoice-card * {
    color: #000 !important;
  }

  .invoice-head,
  .invoice-foot {
    background: #fff;
  }

  .delivery-item-head .btn {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Material 3 inspired theme
   Tonal surfaces, expressive shapes, pill actions, and filled text fields.
   -------------------------------------------------------------------------- */

body {
  letter-spacing: 0.01em;
}

.site-header {
  min-height: var(--header-height);
  border-bottom: 1px solid var(--outline-variant);
  background: color-mix(in srgb, var(--background) 92%, transparent);
  box-shadow: none;
}

.header-inner {
  min-height: var(--header-height);
}

.brand,
.back-link {
  font-weight: 600;
}

.brand-mark {
  border-radius: 0.8rem;
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}

.header-link {
  border-radius: var(--radius-full);
  padding: 0.55rem 0.9rem;
}

.nav-dropdown-toggle {
  background: transparent;
}

.nav-dropdown.is-open .nav-dropdown-toggle {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

@media (hover: hover) {
  .header-link:hover,
  .nav-dropdown-toggle:hover {
    background: var(--secondary-container);
    color: var(--on-secondary-container);
  }
}

.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
}

@media (hover: hover) {
  .theme-toggle:hover {
    background: var(--secondary-container);
    color: var(--on-secondary-container);
  }
}

.nav-dropdown-menu {
  padding: 0.45rem;
  border: 0;
  border-radius: 1rem;
  background: var(--surface-container);
  box-shadow: var(--shadow-lg);
}

.nav-dropdown-menu a {
  border-radius: 0.7rem;
  padding: 0.55rem 0.75rem;
}

.nav-dropdown-menu a:first-child {
  border-bottom: 1px solid var(--outline-variant);
  border-radius: 0.7rem 0.7rem 0 0;
}

.hero {
  padding: 6rem 0 2.5rem;
}

.hero-badge {
  padding: 0.4rem 0.9rem;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--surface-container-high);
  color: var(--on-surface-variant);
  box-shadow: none;
}

.hero-title {
  font-weight: 600;
  letter-spacing: -0.04em;
}

.hero-text {
  color: var(--on-surface-variant);
}

.section {
  padding: 5rem 0;
  border-top: 0;
}

.section-tinted {
  background: var(--surface-container-low);
}

.section-title {
  font-weight: 600;
}

.section-text {
  color: var(--on-surface-variant);
}

.btn {
  min-height: 2.75rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--primary) 88%, black);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  border-color: var(--outline);
  background: transparent;
  color: var(--primary);
}

.btn-secondary:hover {
  border-color: transparent;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.btn-ghost {
  color: var(--primary);
}

.btn-ghost:hover {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.link-card {
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-container-low);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.link-card:hover {
  border-color: transparent;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  box-shadow: var(--shadow-md);
}

.feature-card,
.page-card,
.product-card,
.product-info-card,
.product-payment,
.shop-payment-note,
.callout,
.order-card,
.checkout-card {
  border: 0;
  background: var(--surface-container-low);
  box-shadow: var(--shadow-sm);
}

.feature-card,
.page-card,
.product-card {
  border-radius: var(--radius-xl);
}

.feature-card:hover,
.page-card:hover,
.product-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.feature-icon,
.product-info-icon,
.shop-payment-icon,
.product-media-placeholder,
.product-card-placeholder {
  border-radius: 1rem;
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.feature-text,
.page-card-description,
.product-card-description,
.product-description,
.product-info-card p,
.product-payment p,
.shop-payment-note p,
.shop-intro,
.shop-hero-meta,
.article-description,
.block-paragraph,
.callout-text {
  color: var(--on-surface-variant);
}

.page-card-path,
.product-price,
.product-price-lg,
.order-price,
.breadcrumb a,
.product-card-cta {
  color: var(--primary);
}

.page-card:hover .page-card-arrow {
  color: var(--primary);
}

.article-header {
  border-bottom-color: var(--outline-variant);
}

.article-title {
  font-weight: 600;
}

.code-block {
  border-radius: var(--radius-lg);
  background: var(--surface-container-highest);
}

.callout {
  border-left: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-container-high);
}

.callout-success {
  background: color-mix(in srgb, var(--primary-container) 55%, var(--surface-container-low));
}

.callout-warning {
  background: color-mix(in srgb, #ffdf9a 45%, var(--surface-container-low));
}

.callout-info {
  background: color-mix(in srgb, var(--tertiary-container) 45%, var(--surface-container-low));
}

.alert {
  border: 0;
  border-radius: var(--radius-lg);
}

.alert-error {
  background: var(--error-container);
  color: var(--on-error-container);
}

.alert-success {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.status-panel {
  border: 0;
  border-left: 0;
  border-radius: var(--radius-xl);
  background: var(--surface-container-low);
}

.status-facts > div,
.status-checks {
  border-color: var(--outline-variant);
}

.site-footer {
  border-top: 1px solid var(--outline-variant);
  background: var(--surface-container-low);
}

.footer-links a:hover {
  color: var(--primary);
}

/* Shop */

.shop-hero {
  padding: 5.5rem 0 4rem;
  border-bottom: 0;
  background: var(--surface-container-low);
}

.shop-title {
  font-weight: 600;
}

.shop-hero-meta {
  gap: 0.5rem;
}

.shop-hero-meta span {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--surface-container-high);
}

.shop-grid {
  gap: 1.5rem;
}

.product-card-media {
  background: var(--surface-container-high);
}

.product-card-body {
  padding: 1.25rem;
}

.product-card-title {
  font-weight: 600;
}

.product-card-foot {
  border-top-color: var(--outline-variant);
}

.product-card-cta {
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.product-card:hover .product-card-cta {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.shop-payment-note {
  border-radius: var(--radius-xl);
}

/* Product and checkout */

.product-main {
  padding-top: 2.5rem;
}

.breadcrumb {
  color: var(--on-surface-variant);
}

.product-media {
  border: 0;
  background: var(--surface-container-high);
}

.product-title {
  font-weight: 600;
}

.product-heading-price small {
  color: var(--on-surface-variant);
}

.product-details {
  border-top-color: var(--outline-variant);
}

.product-info-grid {
  gap: 1rem;
}

.product-info-card,
.product-payment {
  border-radius: var(--radius-lg);
}

.product-side {
  top: 5.5rem;
}

.order-card {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--surface-container);
  box-shadow: var(--shadow-md);
}

.order-card-head {
  border-bottom-color: var(--outline-variant);
}

.order-card-head h2 {
  font-weight: 600;
}

.package-option {
  border-color: var(--outline-variant);
  border-radius: var(--radius-lg);
  background: var(--surface-container-low);
}

.package-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--secondary-container);
}

.package-option input {
  accent-color: var(--primary);
}

.package-option-top span {
  color: var(--primary);
}

.order-card .field input,
.order-card .field textarea {
  border: 0;
  border-bottom: 1px solid var(--outline);
  border-radius: 0.75rem 0.75rem 0 0;
  background: var(--surface-container-highest);
  padding: 0.65rem 0.75rem;
}

.order-card .field input:focus,
.order-card .field textarea:focus {
  border-bottom: 2px solid var(--primary);
  box-shadow: none;
}

.checkout-note {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--surface-container-high);
  color: var(--on-surface-variant);
  font-size: 0.8rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.checkout-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: 0.72rem;
  font-weight: 600;
}

.checkout-lead {
  color: var(--on-surface-variant);
  font-size: 0.85rem;
  line-height: 1.6;
}

.invoice-pay-button {
  margin-top: 0.5rem;
  margin-bottom: 0.35rem;
}

/* Invoice */

.invoice-card {
  border-radius: var(--radius-xl);
  background: var(--surface-container-low);
}

.invoice-head {
  border-bottom-color: var(--outline-variant);
}

.invoice-business .brand-mark {
  background: var(--primary);
  color: var(--primary-foreground);
}

.invoice-table th {
  border-bottom-color: var(--outline-variant);
  color: var(--on-surface-variant);
}

.invoice-table td {
  border-bottom-color: var(--outline-variant);
}

.invoice-status.status-paid {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.invoice-status.status-pending {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.invoice-block h2 {
  font-weight: 600;
}

.delivery-item {
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-container-high);
}

.delivery-item-head {
  border-bottom-color: var(--outline-variant);
}

.delivery-kind {
  border: 0;
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.invoice-note {
  border-top-color: var(--outline-variant);
}

@media (max-width: 640px) {
  .hero {
    padding: 4.5rem 0 3.5rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .order-card {
    padding: 1.25rem;
  }

  .shop-hero {
    padding: 4rem 0 3rem;
  }
}

