@charset "UTF-8";
/* === 1. VARIABLES & LAYOUT ENGINE === */
:root {
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  /* Theme Colors */
  --c-text: #1a1a1a;
  --c-bg: #ffffff;
  --c-accent: #ff6600;
  --c-muted: #666666;
  --c-border: #dddddd;
  --c-bg-light: #f7f7f7;
  /* LAYOUT CALCULATIONS */
  --header-height: 60px;
  --max-width: 1200px; /* Slightly tighter content max-width for readability */
  /* 
     RESPONSIVE GUTTER:
     min: 1.5rem (24px) -> Phone
     val: 5vw (5% of viewport) -> Tablet/Laptop
     max: 3rem (48px) -> Desktop
  */
  --gutter: clamp(1.5rem, 5vw, 3rem);
  /* 
     The Magic Formula:
     It chooses the larger of the two:
     1. The Responsive Gutter (defined above).
     2. The math needed to center the content on 4K screens.
  */
  --layout-padding: max(var(--gutter), calc((100vw - var(--max-width)) / 2));
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-text: #f0f0f0;
    --c-bg: #111111;
    --c-accent: #ff7a00;
    --c-muted: #a0a0a0;
    --c-border: #333333;
    --c-bg-light: #1f1f1f;
  }
}
/* 1. Box Sizing (The Golden Rule) */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. Remove default margins */
/* This is crucial. Browsers add weird margins to headers, body, and lists. 
   We zero them out here so your base.css controls the spacing completely. */
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

/* 3. List defaults */
/* Remove default padding and bullets. 
   You usually add these back in base.css only for specific text-content areas. */
ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 4. Set core body defaults */
body {
  min-height: 100vh; /* Ensures footer can stick to bottom */
  text-rendering: optimizeSpeed; /* improved font rendering */
  line-height: 1.5; /* Good default, overridden in base */
}

/* 5. Make images easier to work with */
/* By default images are 'inline', which causes invisible gaps below them. 
   Making them block fixes this. */
img, picture {
  max-width: 100%;
  display: block;
}

/* 6. Inherit fonts for form controls */
/* By default, inputs and buttons DO NOT inherit your font-family. 
   This forces them to use your site's font. */
input, button, textarea, select {
  font: inherit;
}

/* 7. Remove animations for people who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* === SITE HEADER CONTAINER === */
/* Scoped to '#site-header-frame > header' so it doesn't affect <header> tags inside <main> */
#site-header-frame > header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Smart Padding: Background is full width, content is centered */
  padding-inline: var(--layout-padding);
}

/* Frosted Glass Effect */
@supports (backdrop-filter: blur(12px)) {
  #site-header-frame > header {
    background-color: color-mix(in srgb, var(--c-bg) 85%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}
/* === LOGO / BRAND === */
#site-header-frame > header > a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--c-text);
  font-size: 1.15rem;
  white-space: nowrap;
  text-decoration: none;
}

#site-header-frame > header > a:hover {
  text-decoration: none;
  color: var(--c-accent);
}

#site-header-frame > header > a svg {
  margin: 0;
  width: 128px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: scale 0.2s ease;
  fill: currentColor;
}

#site-header-frame > header > a:hover svg {
  scale: 1.1;
}

/* === MOBILE TOGGLE === */
/* The checkbox (hidden) */ /* Hide visually, but allow keyboard focus */
#menu-toggle {
  /* Use the sr-only logic here if you don't want the utility class on the input itself */
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Show a focus ring on the Label when the hidden input is focused */
#menu-toggle:focus-visible ~ label {
  outline: 2px solid var(--c-accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* The Hamburger Button */
#site-header-frame > header label[for=menu-toggle] {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -10px; /* Align visual icon with grid */
}

#site-header-frame > header label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--c-text);
  border-radius: 2px;
  margin: 0 auto;
  transition: transform 0.2s, opacity 0.2s;
}

/* Animation State */
#menu-toggle:checked ~ label span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#menu-toggle:checked ~ label span:nth-child(2) {
  opacity: 0;
}

#menu-toggle:checked ~ label span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* === NAVIGATION CONTAINER === */
#site-header-frame > header nav {
  /* Mobile Layout (Default) */
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  /* Alignment match */
  padding: 1.5rem var(--layout-padding);
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  /* Scroll on mobile if too tall */
  max-height: 80vh;
  overflow-y: auto;
}

/* Reveal nav when checkbox is checked */
#menu-toggle:checked ~ nav {
  display: flex;
}

/* === LINKS & DROPDOWN BUTTONS === */
/* Shared style for standard links and dropdown toggles */
#site-header-frame > header .nav-link,
#site-header-frame > header .dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Arrow goes to far right on mobile */
  width: 100%;
  padding: 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--c-text);
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

#site-header-frame > header .nav-link:hover,
#site-header-frame > header .dropdown-toggle:hover {
  color: var(--c-accent);
  text-decoration: none;
  padding-left: 5px; /* Subtle movement on hover */
  transition: padding 0.2s;
}

#site-header-frame > header .nav-link[aria-current=page] {
  color: var(--c-accent);
  font-weight: 600;
}

/* === DROPDOWN (Mobile Accordion) === */
#site-header-frame > header .dropdown {
  width: 100%;
}

/* Arrow Icon */
#site-header-frame > header .dropdown-toggle .arrow {
  font-size: 0.8em;
  transition: transform 0.2s;
}

#site-header-frame > header .dropdown.is-open .arrow {
  transform: rotate(180deg);
}

/* Submenu (Mobile) */
#site-header-frame > header .dropdown-menu {
  display: none;
  flex-direction: column;
  padding-left: 1rem;
  margin-top: 0.25rem;
  border-left: 2px solid var(--c-border);
}

#site-header-frame > header .dropdown.is-open .dropdown-menu {
  display: flex;
  animation: mobileSlide 0.2s ease-out;
}

#site-header-frame > header .dropdown-item {
  display: block;
  padding: 0.6rem 0.75rem;
  color: var(--c-muted);
  text-decoration: none;
  font-size: 1rem;
}

#site-header-frame > header .dropdown-item:hover {
  color: var(--c-accent);
}

@keyframes mobileSlide {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* === DESKTOP RESPONSIVE === */
@media (min-width: 800px) {
  /* Hide burger */
  #site-header-frame > header label[for=menu-toggle] {
    display: none;
  }
  #menu-toggle {
    display: none;
  }
  /* Reset Nav Container */
  #site-header-frame > header nav {
    position: static;
    width: auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    max-height: none;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: center;
  }
  /* Reset Links */
  #site-header-frame > header .nav-link,
  #site-header-frame > header .dropdown-toggle {
    width: auto;
    padding: 0;
    font-size: 0.95rem;
    border: none;
    gap: 6px;
  }
  #site-header-frame > header .nav-link:hover,
  #site-header-frame > header .dropdown-toggle:hover {
    padding-left: 0;
    text-decoration: none;
  }
  /* === DROPDOWN (Desktop Popover) === */
  #site-header-frame > header .dropdown {
    width: auto;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
  }
  /* The Floating Card */
  #site-header-frame > header .dropdown-menu {
    display: none; /* Hidden until hover */
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    margin-top: 10px;
    border-left: none; /* remove mobile border */
  }
  /* Hover Bridge */
  #site-header-frame > header .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
  }
  /* Open on Hover */
  #site-header-frame > header .dropdown:hover .dropdown-menu,
  #site-header-frame > header .dropdown:focus-within .dropdown-menu {
    display: flex;
    animation: desktopFade 0.15s ease-out;
  }
  /* Dropdown Items */
  #site-header-frame > header .dropdown-item {
    color: var(--c-text);
    border-radius: 4px;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
  }
  #site-header-frame > header .dropdown-item:hover {
    background-color: var(--c-bg-light);
    color: var(--c-accent);
    text-decoration: none;
  }
}
@keyframes desktopFade {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ---- 101_breadcrumb.max.css ---- */
/* === Breadcrumbs (global) ============================================= */
.breadcrumbs {
  /* Layout constraints */
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto; /* Reduced bottom margin slightly */
  /* Reduced vertical padding (0.5rem), consistent side gutter */
  padding: 0.5rem var(--gutter);
  /* Typography */
  font-size: 1rem; /* Slightly bigger */
  color: var(--c-muted);
}

.breadcrumbs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center; /* Perfect vertical centering */
  flex-wrap: nowrap; /* STRICT single line */
  gap: 0.5rem;
  width: 100%;
  overflow: hidden; /* Cut off anything that overflows bounds */
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  /* Flex magic for truncation: */
  min-width: 0; /* Allows item to shrink smaller than its content */
  flex-shrink: 1; /* Allow this item to compress if space is tight */
  white-space: nowrap;
  margin-bottom: 0;
}

/* Separator styling */
.breadcrumbs__item + .breadcrumbs__item::before {
  content: "›";
  margin-right: 0.5rem;
  font-size: 1.1em;
  color: color-mix(in srgb, var(--c-muted) 60%, transparent);
  line-height: 1; /* Fix vertical alignment of the symbol */
  /* Ensure the separator never shrinks or cuts off */
  flex-shrink: 0;
}

/* Link & Text Styling */
.breadcrumbs__link,
.breadcrumbs__current {
  /* Logic to trigger the ellipsis (...) */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* Visuals */
  transition: color 0.15s ease, border-color 0.15s ease;
}

.breadcrumbs__link {
  color: var(--c-muted);
  text-decoration: none;
}

.breadcrumbs__link:hover {
  color: var(--c-accent);
  border-bottom-color: color-mix(in srgb, var(--c-accent) 45%, transparent);
  text-decoration: none;
}

.breadcrumbs__current {
  color: var(--c-text);
  font-weight: 600;
}

/* === 2. BODY & STRUCTURE === */
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-text);
  background-color: var(--c-bg);
  overflow-x: hidden;
  /* Sticky Footer Setup */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main Content Container */
main {
  width: 100%;
  padding-inline: var(--layout-padding);
  padding-top: 1rem;
  padding-bottom: 2rem;
  flex: 1; /* Pushes footer to bottom */
}

main > .container {
  width: 95%;
  margin-left: auto;
  margin-right: auto;
}

/* === 3. TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin: 1.5rem 0 1rem;
  line-height: 1.2;
  color: var(--c-text);
}

h1 {
  font-size: 2.25rem;
  margin-top: 0;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

p {
  margin: 0 0 1.25rem 0;
}

a {
  color: var(--c-accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  text-decoration: underline;
}

/* === 4. LISTS === */
ul, ol {
  margin: 0 0 1.5rem 2rem;
  padding: 0;
}

ul {
  list-style: disc;
}

ol {
  list-style: decimal;
}

li {
  margin-bottom: 0.5rem;
}

/* Nested lists */
ul ul, ol ol, ul ol, ol ul {
  margin-bottom: 0;
}

/* === 5. FORMS & BUTTONS === */
/* Label Styling */
label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* 1. WRAPPER LABELS */
label:has(input[type=checkbox]),
label:has(input[type=radio]) {
  display: flex;
  align-items: flex-start; /* Keep top alignment for multi-line text */
  gap: 0.75rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
  font-weight: 400;
  /* Enforce a consistent line-height so we can calculate against it */
  line-height: 1.5;
}

/* Generic Inputs (Text, Email, Password, Textarea, Select) */
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=reset]):not([type=file]):not([type=range]), select, textarea {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  background: var(--c-bg-light);
  color: var(--c-text);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 20%, transparent);
}

/* 3. CUSTOM CHECKBOXES & RADIOS */
input[type=checkbox],
input[type=radio] {
  /* ... existing appearance: none, etc ... */
  appearance: none;
  -webkit-appearance: none;
  /* 1. Shrink box slightly to match text 'cap height' better */
  width: 1.15em;
  height: 1.15em;
  /* ... colors/borders ... */
  background-color: var(--c-bg-light);
  border: 1px solid var(--c-border);
  cursor: pointer;
  /* ... layout ... */
  display: grid;
  place-content: center;
  margin: 0;
  flex-shrink: 0;
  transition: all 0.2s ease;
  /* 
     THE ALIGNMENT FIX:
     Formula: (LineHeight - CheckboxHeight) / 2
     This pushes the box down to the exact vertical center of the text line.
  */
  margin-top: 0.175em;
}

/* Hover State */
input[type=checkbox]:hover,
input[type=radio]:hover {
  border-color: var(--c-accent);
}

/* --- Checkbox Specifics --- */
input[type=checkbox] {
  border-radius: 4px;
}

input[type=checkbox]:checked {
  background-color: var(--c-accent);
  border-color: var(--c-accent);
}

/* Checkmark Icon */
input[type=checkbox]::before {
  content: "";
  width: 0.75em;
  height: 0.75em;
  transform: scale(0);
  transition: 0.15s transform ease-in-out;
  background-color: white;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input[type=checkbox]:checked::before {
  transform: scale(1);
}

/* --- Radio Specifics --- */
input[type=radio] {
  border-radius: 50%;
}

input[type=radio]:checked {
  border-color: var(--c-accent);
  background-color: var(--c-bg);
}

/* Radio Dot */
input[type=radio]::before {
  content: "";
  width: 0.75em;
  height: 0.75em;
  border-radius: 50%;
  transform: scale(0);
  transition: 0.15s transform ease-in-out;
  background-color: var(--c-accent);
}

input[type=radio]:checked::before {
  transform: scale(1);
}

/* Buttons */
button, .button {
  display: inline-block;
  background-color: var(--c-accent);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  line-height: 1;
}

button:hover, .button:hover {
  filter: brightness(110%);
  text-decoration: none;
}

/* Disabled State */
input:disabled, select:disabled, textarea:disabled, button:disabled {
  background-color: var(--c-bg-light);
  color: var(--c-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

/* === 6. TABLES === */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

th, td {
  padding: 0.75rem;
  border: 1px solid var(--c-border);
  text-align: left;
}

th {
  background-color: var(--c-bg-light);
  font-weight: 700;
}

/* === 7. UTILITIES & MEDIA === */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
  border-radius: 4px;
}

blockquote {
  border-left: 4px solid var(--c-accent);
  background: var(--c-bg-light);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--c-muted);
  font-style: italic;
  border-radius: 0 4px 4px 0;
}

code, pre {
  font-family: var(--font-mono);
  background: var(--c-bg-light);
  border-radius: 4px;
  font-size: 0.9em;
}

code {
  padding: 0.2em 0.4em;
  border: 1px solid var(--c-border);
}

pre {
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--c-border);
  margin-bottom: 1.5rem;
}

pre code {
  padding: 0;
  border: none;
  background: transparent;
}

hr {
  border: 0;
  border-top: 1px solid var(--c-border);
  margin: 2.5rem 0;
}

/* === 8. ACCESSIBILITY & MISC === */
/* Focus Rings */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* Time Element */
time {
  font-size: 0.9em;
  color: var(--c-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Screen Reader Only Utility */
.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;
}

/* === CODE BLOCKS === */
code, pre {
  font-family: var(--font-mono);
  background: var(--c-bg-light);
  border-radius: 4px;
  font-size: 0.9em;
}

code {
  padding: 0.2em 0.4em;
  border: 1px solid var(--c-border);
}

pre {
  /* 1. This allows us to position the button inside relative to this box */
  position: relative;
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--c-border);
  margin-bottom: 1.5rem;
  /* 2. Add top padding so code doesn't overlap the button */
  padding-top: 2.5rem;
}

pre code {
  /* Reset styles for the code inside the block */
  padding: 0;
  border: none;
  background: transparent;
}

/* === THE INJECTED BUTTON === */
/* We need one class for this, just to target the button itself */
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 3px;
  font-size: 0.75rem;
  font-family: var(--font-body);
  padding: 3px 8px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  /* Prevent user from accidentally selecting the button text */
  user-select: none;
}

.copy-btn:hover {
  opacity: 1;
  border-color: var(--c-accent);
  color: var(--c-accent);
  text-decoration: none; /* override global button link styles if any */
}

/* === FILE UPLOAD DROP ZONE === */
.drop-zone {
  /* Layout Container */
  position: relative;
  max-width: 100%;
  height: 160px; /* Fixed height for consistency */
  margin-bottom: 1.5rem;
  /* Visuals */
  background-color: var(--c-bg-light);
  border: 2px dashed var(--c-border);
  border-radius: 6px;
  /* Transitions */
  transition: all 0.2s ease;
}

/* Hover & Drag Over State */
.drop-zone:hover,
.drop-zone.drop-zone--over {
  border-color: var(--c-accent);
  background-color: color-mix(in srgb, var(--c-accent) 5%, var(--c-bg));
}

/* 
   THE TRIGGER
   We make the input cover the ENTIRE box but be invisible.
   This ensures clicking anywhere works, and drag-drop works natively.
*/
.drop-zone__input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0; /* Invisible */
  cursor: pointer;
  z-index: 2; /* Sits on top of the text */
}

/* 
   THE CONTENT (Icon + Text)
   We position this absolutely in the center, underneath the invisible input.
*/
.drop-zone__content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Below the input */
  /* Flexbox Centering */
  display: flex;
  flex-direction: column;
  align-items: center; /* Horizontally Center */
  justify-content: center; /* Vertically Center */
  text-align: center;
  padding: 1rem;
  pointer-events: none; /* Let clicks pass through to the input */
}

/* Typography & Icons */
.drop-zone__prompt {
  font-size: 1rem;
  color: var(--c-muted);
  line-height: 1.4;
}

.drop-zone__prompt strong {
  color: var(--c-accent);
  font-weight: 600;
}

.drop-zone__icon {
  width: 42px;
  height: 42px;
  margin-bottom: 0.75rem;
  color: var(--c-muted);
  fill: currentColor;
  display: block; /* Fixes alignment quirks */
}

/* Focus State (Accessibility) */
.drop-zone__input:focus + .drop-zone__content {
  outline: 2px solid var(--c-accent);
  outline-offset: -2px;
  border-radius: 4px;
}

/* ==========================================================================
   UNIVERSAL PAGE HEADER
   ========================================================================== */
.page-header {
  padding: 0.5rem 0 1.5rem 0;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.page-header .page-header-content {
  flex: 1 1 min-content;
}
.page-header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.2;
}
.page-header .text-lead {
  margin: 0.5rem 0 0 0;
  color: var(--c-muted);
  line-height: 1.5;
}
.page-header .header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.page-header.is-centered {
  text-align: center;
  padding: 1.5rem 0 1.5rem;
  display: block;
}
.page-header.is-centered .page-header-content {
  max-width: 800px;
  margin: 0 auto;
}
.page-header.is-centered .header-actions {
  justify-content: center;
  margin-top: 1.5rem;
}

/* === LEGAL DOCUMENT LAYOUT === */
/* Applies to Privacy Policy, Terms, Cookies, Modern Slavery, etc. */
/* Main Container */
.legal-document {
  max-width: 800px;
  margin: 4rem auto;
  font-size: 1.05rem; /* Slightly larger text for readability */
}

/* Header */
.legal-document .doc-header {
  margin-bottom: 2.5rem;
  height: auto;
  background-color: transparent;
  color: inherit;
  line-height: normal;
}

.legal-document .doc-header h1 {
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
}

.legal-document .doc-header .text-lead {
  color: var(--c-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* Table of Contents */
.legal-document .doc-toc {
  background-color: var(--c-bg-light);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 3rem;
}

.legal-document .doc-toc h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted);
}

.legal-document .doc-toc ol {
  margin: 0 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.legal-document .doc-toc li {
  margin-bottom: 0.5rem;
}

.legal-document .doc-toc a {
  color: var(--c-text);
  text-decoration: underline;
  text-decoration-color: var(--c-border);
}

.legal-document .doc-toc a:hover {
  color: var(--c-accent);
  text-decoration-color: var(--c-accent);
}

/* Sections */
.legal-document section {
  margin-bottom: 3.5rem;
  scroll-margin-top: calc(var(--header-height) + 2rem); /* Fix jumpy anchor links */
}

.legal-document section h2 {
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.legal-document section h3 {
  margin-top: 2rem;
  font-size: 1.3rem;
  color: var(--c-text);
}

.legal-document section p {
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: color-mix(in srgb, var(--c-text) 90%, transparent);
}

/* Lists within sections */
.legal-document section ul,
.legal-document section ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.legal-document section li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.legal-document section li strong {
  color: var(--c-text);
}

/* Links inside content */
.legal-document section a {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--c-accent);
}

/* === LEGAL HUB LAYOUT === */
.page--legal-hub .hub-header {
  margin: 4rem 0 4rem;
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
}

.page--legal-hub .hub-header h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: var(--c-text);
  letter-spacing: -0.02em;
}

.page--legal-hub .hub-header .text-lead {
  color: var(--c-muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

/* The Grid */
.page--legal-hub .legal-grid {
  display: grid;
  /* Allows cards to wrap dynamically */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

/* Card Styling */
.page--legal-hub .legal-group {
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.page--legal-hub .legal-group:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  border-color: color-mix(in srgb, var(--c-accent) 30%, var(--c-border));
}

@media (prefers-color-scheme: dark) {
  .page--legal-hub .legal-group:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  }
}
/* Header & Icon Flexbox */
.page--legal-hub .legal-group__header {
  display: flex;
  align-items: center;
  gap: 1.25rem; /* Slightly more breathing room between icon and text */
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.page--legal-hub .legal-group__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; /* Increased from 44px */
  height: 48px; /* Increased from 44px */
  border-radius: 10px;
  background-color: color-mix(in srgb, var(--c-accent) 12%, transparent); /* Slightly richer tint */
  color: var(--c-accent);
  flex-shrink: 0; /* Prevents the box from shrinking if the header text is long */
}

.page--legal-hub .legal-group__icon svg {
  width: 26px !important; /* Overrides any inline SVG attributes */
  height: 26px !important; /* Overrides any inline SVG attributes */
  display: block; /* Removes the invisible HTML text-baseline gap */
  margin: 0;
}

.page--legal-hub .legal-group h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text);
}

/* Links */
.page--legal-hub .legal-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page--legal-hub .legal-group li {
  margin-bottom: 0.85rem;
}

.page--legal-hub .legal-group a {
  display: flex;
  align-items: center;
  color: var(--c-text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0;
  transition: color 0.2s, transform 0.2s;
}

/* Adds a subtle arrow pseudo-element on hover */
.page--legal-hub .legal-group a::before {
  content: "→";
  opacity: 0;
  margin-left: -10px;
  margin-right: 10px;
  color: var(--c-accent);
  transform: translateX(-10px);
  transition: all 0.2s ease;
}

.page--legal-hub .legal-group a:hover {
  color: var(--c-accent);
  transform: translateX(4px);
}

.page--legal-hub .legal-group a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* Footer Area */
.page--legal-hub .hub-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-border);
  text-align: center;
}

.page--legal-hub .hub-footer a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

/* === LOGIN & AUTH PAGES === */
/* The Login Card */
.page--login .auth-card {
  width: 100%;
  max-width: 420px;
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  margin: 3rem auto 5rem auto;
}
.page--login .auth-card.is-centered {
  text-align: center;
}

/* Header */
.page--login .auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page--login .auth-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.page--login .auth-header .text-lead {
  font-size: 1rem;
  color: var(--c-muted);
  line-height: 1.6;
  margin: 0;
}

/* Hero Icon (e.g., Check email envelope) */
.page--login .auth-hero-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1;
}

/* Alert Box */
.page--login .auth-alert {
  background-color: color-mix(in srgb, #ef4444 10%, var(--c-bg));
  border: 1px solid #ef4444;
  color: #b91c1c;
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

/* Form Styles */
.page--login .auth-form .form-group {
  margin-bottom: 1.5rem;
}
.page--login .auth-form .form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page--login .auth-form .password-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.page--login .auth-form .password-header a {
  font-size: 0.85rem;
  color: var(--c-accent);
  text-decoration: none;
}
.page--login .auth-form .password-header a:hover {
  text-decoration: underline;
}
.page--login .auth-form input[type=email],
.page--login .auth-form input[type=password],
.page--login .auth-form input[type=text] {
  padding: 0.85rem;
  margin-bottom: 0; /* Let the form-group handle spacing */
}
.page--login .auth-form .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: normal;
  cursor: pointer;
  margin-bottom: 0;
}
.page--login .auth-form .auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

/* Footer Links */
.page--login .auth-links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.page--login .auth-links a {
  color: var(--c-muted);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: all 0.2s;
}

.page--login .auth-links a:hover {
  color: var(--c-accent);
  text-decoration-color: var(--c-accent);
}

/* --- VARIANT: EMPLOYEE LOGIN --- */
/* Added via addBodyClass('page--login-employee') */
.page--login-employee .auth-card {
  border-top: 4px solid var(--c-accent);
}

/* === DOCUMENTATION PAGES === */
.page--docs {
  /* Sidebar Navigation Section */
  /* Main Content Area */
}
.page--docs .docs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: 5rem;
  padding-top: 2rem;
}
@media (min-width: 900px) {
  .page--docs .docs-layout {
    /* Let the second column take the remaining space naturally */
    grid-template-columns: 250px 1fr;
    gap: 4rem;
  }
}
.page--docs .docs-sidebar {
  background: var(--c-bg-light);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius, 8px);
  padding: 1.5rem;
}
@media (min-width: 900px) {
  .page--docs .docs-sidebar {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
  }
}
.page--docs .docs-sidebar .docs-nav-group {
  margin-bottom: 2rem;
}
.page--docs .docs-sidebar .docs-nav-group:last-child {
  margin-bottom: 0;
}
.page--docs .docs-sidebar .docs-nav-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-muted);
  margin-bottom: 1rem;
}
.page--docs .docs-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.page--docs .docs-sidebar a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--c-text);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  margin-left: -0.75rem;
}
.page--docs .docs-sidebar a:hover {
  background-color: var(--c-bg);
  color: var(--c-accent);
}
.page--docs .docs-sidebar a.is-active {
  background-color: color-mix(in srgb, var(--c-accent) 10%, transparent);
  color: var(--c-accent);
  font-weight: 600;
}
.page--docs .docs-content {
  /* Prevent blowout from code blocks, but lock the text to a readable width */
  min-width: 0;
  max-width: 800px;
  width: 100%;
}
.page--docs .docs-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.page--docs .docs-content .docs-lead {
  font-size: 1.25rem;
  color: var(--c-muted);
  line-height: 1.6;
  margin-bottom: 3rem;
}
.page--docs .docs-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-border);
}
.page--docs .docs-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.page--docs .docs-content p, .page--docs .docs-content li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--c-text);
  margin-bottom: 1.25rem;
}
.page--docs .docs-content ul, .page--docs .docs-content ol {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}
.page--docs .docs-content ul li, .page--docs .docs-content ol li {
  margin-bottom: 0.5rem;
}
.page--docs .docs-content a {
  color: var(--c-accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--c-accent) 30%, transparent);
  text-underline-offset: 3px;
}
.page--docs .docs-content a:hover {
  text-decoration-color: var(--c-accent);
}
.page--docs .docs-content .docs-callout {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--c-accent);
  background: color-mix(in srgb, var(--c-accent) 5%, transparent);
  border-radius: 0 8px 8px 0;
  margin: 2.5rem 0;
  font-size: 0.95rem;
}
.page--docs .docs-content .docs-callout strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--c-accent);
}
.page--docs .docs-content .docs-callout p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* === SYSTEM STATUS PAGE === */
.page--status .status-header {
  text-align: center;
  padding: 3rem 1rem;
  margin-bottom: 2rem;
  background: var(--c-bg-light);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius, 8px);
}
.page--status .status-global-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 1rem;
}
.page--status .status-global-badge.is-operational {
  background: color-mix(in srgb, #10b981 15%, transparent);
  color: #059669;
  border: 1px solid color-mix(in srgb, #10b981 30%, transparent);
}
.page--status .status-global-badge.is-degraded {
  background: color-mix(in srgb, #f59e0b 15%, transparent);
  color: #d97706;
  border: 1px solid color-mix(in srgb, #f59e0b 30%, transparent);
}
.page--status .status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.page--status .status-dot.is-operational {
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}
.page--status .status-dot.is-degraded {
  background-color: #f59e0b;
}
.page--status .status-dot.is-down {
  background-color: #ef4444;
}
.page--status .status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .page--status .status-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.page--status .status-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius, 8px);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.page--status .status-card h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
}
.page--status .status-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--c-muted);
}
.page--status .status-card .status-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: capitalize;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}
/* === SITE FOOTER WRAPPER === */
body > footer {
  background-color: var(--c-bg-light);
  border-top: 1px solid var(--c-border);
  padding-top: 4rem;
  padding-bottom: 2rem;
  width: 100%;
  margin-top: auto; /* Sticky footer behavior */
}

/* === THE CENTERED CONTENT BLOCK === */
body > footer .footer-inner {
  /* 1. Center the container itself */
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: var(--gutter);
  /* 2. Flex Layout to center the group of columns */
  display: flex;
  flex-wrap: wrap; /* Allows stacking on mobile */
  /* This centers the group of columns horizontally */
  justify-content: center;
  /* Gap between columns */
  gap: 3rem;
}

/* === THE COLUMNS === */
/* Common style for Brand column and Link columns */
body > footer .footer-col {
  /* Flex-grow: 1, Flex-shrink: 1, Basis: 200px */
  flex: 1 1 200px;
  /* Prevent them from stretching too wide on huge screens */
  max-width: 300px;
  /* Ensure text stays left-aligned */
  text-align: left;
}

/* Make the Brand column slightly wider and more dominant */
body > footer .brand-col {
  flex: 1 1 280px; /* Slightly higher basis */
  max-width: 400px; /* Can grow wider than links */
}

/* === TYPOGRAPHY === */
body > footer h4 {
  font-size: 0.95rem;
  color: var(--c-text);
  margin: 0 0 1.2rem 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body > footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

body > footer li {
  margin-bottom: 0.7rem;
}

body > footer a {
  color: var(--c-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

body > footer a:hover {
  color: var(--c-accent);
  text-decoration: none;
}

/* === BRAND COLUMN DETAILS === */
body > footer .brand-col strong {
  display: block;
  font-size: 1.2rem;
  color: var(--c-text);
  margin-bottom: 0.5rem;
}

body > footer .brand-col p {
  color: var(--c-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
}

/* === SOCIAL ICONS === */
body > footer .socials {
  display: flex;
  gap: 0.8rem;
}

body > footer .socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  /* 1. Use Variables, not hardcoded colors */
  background-color: var(--c-bg); /* White in Light Mode, Black in Dark Mode */
  border: 1px solid var(--c-border);
  color: var(--c-text); /* Dark in Light Mode, White in Dark Mode */
  border-radius: 6px;
  transition: all 0.2s ease;
}

/* Ensure the SVG uses the text color */
body > footer .socials a svg {
  width: 20px;
  height: 20px;
  fill: currentColor; /* Matches the 'color' property above */
  display: block;
}

/* Hover State */
body > footer .socials a:hover {
  border-color: var(--c-accent);
  background-color: var(--c-accent);
  color: #fff; /* Always white on hover because the background is orange */
  transform: translateY(-2px);
  text-decoration: none;
}

/* === BOTTOM COPYRIGHT === */
body > footer .footer-bottom {
  max-width: var(--max-width);
  margin: 3rem auto 0; /* Top margin separates it from columns */
  padding-top: 1.5rem;
  padding-inline: var(--gutter);
  border-top: 1px solid var(--c-border);
  text-align: center;
  color: var(--c-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   MODULE: CORE
   Scope: Variables, Reset, Header, Layout, Utilities
   ========================================================================== */
/* 1. GLOBAL SCOPE & VARIABLES */
.sub-tools {
  padding-top: clamp(1.5rem, 3vw, 3rem);
  padding-bottom: clamp(3rem, 5vw, 5rem);
  /* Design Tokens */
  --tool-radius: 8px;
  --tool-input-height: 48px;
  --tool-border: 1px solid var(--c-border);
  --tool-shadow: 0 4px 20px rgba(0,0,0,0.03);
  /* Colors */
  --tool-bg-input: var(--c-bg-light);
  --tool-bg-card: var(--c-bg);
}

.sub-tools .tool-shell {
  max-width: 1100px;
  margin: 0 auto;
}

/* 2. HEADER TYPOGRAPHY */
.sub-tools .tool-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.sub-tools .tool-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.sub-tools .tool-header .text-lead {
  max-width: 60ch;
  margin: 0 auto;
  font-size: 1.125rem;
  color: var(--c-muted);
  line-height: 1.6;
}

.sub-tools .tool-header::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--c-accent);
  margin: 1.5rem auto 0;
  border-radius: 2px;
  opacity: 0.8;
}

/* 3. LAYOUT ENGINE */
.sub-tools .tool-layout {
  display: grid;
  gap: 1.5rem;
}

/* Split (50/50 on desktop) */
.sub-tools .tool-layout--split {
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .sub-tools .tool-layout--split {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
  }
}
/* Heavy Left (60/40 on desktop) */
.sub-tools .tool-layout--split-heavy-left {
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .sub-tools .tool-layout--split-heavy-left {
    grid-template-columns: 1.6fr 1fr;
  }
}
/* Stacked (Single column, narrow) */
.sub-tools .tool-layout--stacked {
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
}

/* Wide (Single column, full width) */
.sub-tools .tool-layout--wide {
  grid-template-columns: 1fr;
  max-width: 100%;
}

/* 9. UTILITIES & ANIMATIONS */
.sub-tools .text-mono {
  font-family: var(--font-mono);
}

.sub-tools .fade-in {
  animation: fadeInTool 0.3s ease-out forwards;
}

@keyframes fadeInTool {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.sub-tools .tool-disclaimer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--c-border);
  color: var(--c-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.sub-tools .tool-disclaimer a {
  color: var(--c-text);
  text-decoration: underline;
}

/*UI*/
/* ==========================================================================
   MODULE: UI COMPONENTS
   Scope: Cards, Buttons, Alerts, Badges
   ========================================================================== */
/* 4. CARDS & CONTAINERS */
.sub-tools .tool-card {
  background: var(--tool-bg-card);
  border: var(--tool-border);
  border-radius: var(--tool-radius);
  padding: 1.5rem;
  box-shadow: var(--tool-shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.sub-tools .tool-card h3,
.sub-tools .form-heading {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

/* Remove top margin if heading is first element in card */
.sub-tools .tool-card > h3:first-child,
.sub-tools .form-heading:first-child {
  margin-top: 0;
}

.sub-tools .tool-card .card-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-border);
}

/* 6. ACTIONS & BUTTONS */
.sub-tools .form-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Primary Action Button */
.sub-tools .btn-action {
  flex: 1;
  background-color: var(--c-accent);
  color: #fff;
  border: none;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--tool-radius);
  cursor: pointer;
  text-align: center;
  transition: filter 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.sub-tools .btn-action:hover {
  filter: brightness(110%);
  text-decoration: none;
}

.sub-tools .btn-action:active {
  transform: translateY(1px);
}

/* Secondary / Reset Button */
.sub-tools .btn-secondary {
  background-color: transparent;
  color: var(--c-muted);
  border: 1px solid var(--c-border);
  padding: 0.9rem 1.5rem;
  border-radius: var(--tool-radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sub-tools .btn-secondary:hover {
  background: var(--c-bg-light);
  color: var(--c-text);
  border-color: var(--c-text);
}

/* 8. ALERTS & NOTIFICATIONS */
.sub-tools .tool-alert {
  padding: 1rem;
  border-radius: var(--tool-radius);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.5;
}

.sub-tools .alert-info {
  background-color: color-mix(in srgb, #3b82f6 10%, var(--c-bg));
  border: 1px solid color-mix(in srgb, #3b82f6 30%, transparent);
  color: #1d4ed8;
}

.sub-tools .alert-success {
  background-color: color-mix(in srgb, #10b981 10%, var(--c-bg));
  border: 1px solid color-mix(in srgb, #10b981 30%, transparent);
  color: #047857;
}

.sub-tools .alert-warning {
  background-color: color-mix(in srgb, #f59e0b 10%, var(--c-bg));
  border: 1px solid color-mix(in srgb, #f59e0b 30%, transparent);
  color: #b45309;
}

.sub-tools .alert-error {
  background-color: color-mix(in srgb, #ef4444 10%, var(--c-bg));
  border: 1px solid color-mix(in srgb, #ef4444 30%, transparent);
  color: #b91c1c;
}

/* 9. BADGES (Utility) */
.sub-tools .tool-badge {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
  background-color: var(--c-bg-light);
  color: var(--c-muted);
  border: 1px solid var(--c-border);
}

/*Forms*/
/* ==========================================================================
   MODULE: FORMS & INPUTS
   Scope: Inputs, Textareas, Sliders, Toggles, Dropzones, Dynamic Lists
   ========================================================================== */
/* 5. INPUT LIBRARY */
/* Spacing Wrapper */
.sub-tools .form-group {
  /* Controls the distance to the NEXT question */
  margin-bottom: 1.75rem;
}

/* Side-by-Side Grid */
.sub-tools .form-row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

@media (min-width: 600px) {
  .sub-tools .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}
/* Labels */
.sub-tools label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 0.5rem;
}

.sub-tools label .label-hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

/* Base Input Styles */
.sub-tools input.tool-input,
.sub-tools select.tool-select,
.sub-tools textarea.tool-textarea {
  display: block;
  width: 100%;
  height: var(--tool-input-height);
  padding: 0 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--c-text);
  background-color: var(--tool-bg-input);
  border: 1px solid color-mix(in srgb, var(--c-border) 80%, transparent);
  border-radius: var(--tool-radius);
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 0.35rem !important;
  box-sizing: border-box;
}

.sub-tools textarea.tool-textarea {
  height: auto;
  padding: 0.85rem 1rem;
  min-height: 120px;
  resize: vertical;
}

.sub-tools input.tool-input:focus,
.sub-tools select.tool-select:focus,
.sub-tools textarea.tool-textarea:focus {
  border-color: var(--c-accent);
  outline: 0;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-accent) 15%, transparent);
  background-color: var(--c-bg);
  position: relative;
  z-index: 2;
}

.sub-tools input:disabled,
.sub-tools select:disabled,
.sub-tools textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: color-mix(in srgb, var(--c-bg-light) 90%, var(--c-text));
}

/* Input Code Editor (Textarea variant) */
.sub-tools textarea.tool-code-editor {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--c-text);
  background-color: var(--c-bg);
  min-height: 250px;
  white-space: pre;
  tab-size: 4;
}

/* Hints */
.sub-tools small.text-muted {
  display: block;
  font-size: 0.85rem;
  color: var(--c-muted);
  line-height: 1.4;
  margin-top: -0.25rem;
  margin-bottom: 0;
}

/* Spinner Removal */
.sub-tools input[type=number]::-webkit-outer-spin-button,
.sub-tools input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sub-tools input[type=number] {
  -moz-appearance: textfield;
}

/* Input Groups (Prefix/Suffix) */
.sub-tools .input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-bottom: 0.35rem !important;
  position: relative;
}

.sub-tools .input-group-addon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-muted);
  background-color: color-mix(in srgb, var(--c-bg-light) 60%, var(--c-bg));
  border: 1px solid color-mix(in srgb, var(--c-border) 80%, transparent);
  white-space: nowrap;
  height: var(--tool-input-height);
  box-sizing: border-box;
}

.sub-tools .input-group-addon:first-child {
  border-right: 0;
  border-top-left-radius: var(--tool-radius);
  border-bottom-left-radius: var(--tool-radius);
}

.sub-tools .input-group-addon:last-child {
  border-left: 0;
  border-top-right-radius: var(--tool-radius);
  border-bottom-right-radius: var(--tool-radius);
}

.sub-tools .input-group .tool-input {
  margin-bottom: 0 !important;
  flex: 1;
  border-radius: 0;
  z-index: 1;
}

.sub-tools .input-group > .tool-input:first-child {
  border-top-left-radius: var(--tool-radius);
  border-bottom-left-radius: var(--tool-radius);
}

.sub-tools .input-group > .tool-input:last-child {
  border-top-right-radius: var(--tool-radius);
  border-bottom-right-radius: var(--tool-radius);
}

/* Range Sliders */
.sub-tools .range-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--tool-bg-input);
  border: 1px solid color-mix(in srgb, var(--c-border) 80%, transparent);
  border-radius: var(--tool-radius);
  height: var(--tool-input-height);
  padding: 0 1rem;
  box-sizing: border-box;
  margin-bottom: 0.35rem;
}

.sub-tools input[type=range].tool-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  cursor: pointer;
  flex: 1;
  border: none;
  padding: 0;
  margin: 0;
  height: 20px;
  display: block;
}

.sub-tools input[type=range].tool-range:focus {
  outline: none;
  box-shadow: none;
}

/* Range Track & Thumb (Webkit) */
.sub-tools input[type=range].tool-range::-webkit-slider-track {
  width: 100%;
  height: 6px;
  background: var(--c-border);
  border-radius: 3px;
  cursor: pointer;
}

.sub-tools input[type=range].tool-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--c-accent);
  cursor: pointer;
  margin-top: -7px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  border: 2px solid var(--c-bg);
  transition: transform 0.1s;
}

.sub-tools input[type=range].tool-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

/* Range Track & Thumb (Firefox) */
.sub-tools input[type=range].tool-range::-moz-range-track {
  width: 100%;
  height: 6px;
  background: var(--c-border);
  border-radius: 3px;
  cursor: pointer;
}

.sub-tools input[type=range].tool-range::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border: 2px solid var(--c-bg);
  border-radius: 50%;
  background: var(--c-accent);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.sub-tools .range-val-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--c-accent);
  font-size: 1.1rem;
  min-width: 3ch;
  text-align: right;
  display: flex;
  align-items: center;
  height: 100%;
}

/* Toggle Switch */
.sub-tools .tool-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  cursor: pointer;
  padding: 0.5rem 0;
}

.sub-tools .tool-switch input[type=checkbox] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sub-tools .switch-track {
  position: relative;
  width: 52px;
  height: 30px;
  background-color: color-mix(in srgb, var(--c-border) 80%, #000);
  border-radius: 999px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.sub-tools .switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 26px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-tools .tool-switch input:checked + .switch-track {
  background-color: var(--c-accent);
}

.sub-tools .tool-switch input:checked + .switch-track::after {
  transform: translateX(22px);
}

/* File Dropzone */
.sub-tools .tool-dropzone {
  border: 2px dashed var(--c-border);
  border-radius: var(--tool-radius);
  background-color: color-mix(in srgb, var(--c-bg-light) 40%, var(--c-bg));
  text-align: center;
  padding: 3rem 1.5rem;
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

.sub-tools .tool-dropzone:hover,
.sub-tools .tool-dropzone.drag-over {
  border-color: var(--c-accent);
  background-color: color-mix(in srgb, var(--c-accent) 5%, var(--c-bg));
}

.sub-tools .tool-dropzone input[type=file] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.sub-tools .dz-icon {
  font-size: 3rem;
  color: var(--c-muted);
  margin-bottom: 1rem;
  display: block;
}

.sub-tools .dz-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 0.5rem;
  display: block;
}

.sub-tools .dz-sub {
  font-size: 0.85rem;
  color: var(--c-muted);
}

/* Color Picker */
.sub-tools input[type=color].tool-color {
  padding: 0.25rem;
  height: 50px;
  cursor: pointer;
}

/* 5.1 DYNAMIC LISTS (Flex Layout) */
.sub-tools .dynamic-list-wrapper {
  margin-bottom: 2rem;
}

.sub-tools .dynamic-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sub-tools .dynamic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  background: var(--c-bg-light);
  border: 1px solid var(--c-border);
  padding: 1.25rem;
  border-radius: var(--tool-radius);
  position: relative;
  animation: fadeInRow 0.2s ease-out;
}

@media (min-width: 768px) {
  .sub-tools .dynamic-row {
    background: transparent;
    border: none;
    border-bottom: 1px dashed var(--c-border);
    padding: 0 0 1.5rem 0;
    border-radius: 0;
  }
}
@keyframes fadeInRow {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.sub-tools .dynamic-row .form-group {
  flex: 1 1 150px;
  min-width: 140px;
  margin-bottom: 0 !important;
}

/* Remove Row Button */
.sub-tools .btn-remove-row {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  color: var(--c-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 4px;
}

@media (max-width: 767px) {
  .sub-tools .btn-remove-row {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
    margin-bottom: 0;
    background: var(--c-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
}
.sub-tools .btn-remove-row:hover {
  color: #ef4444;
  border-color: #ef4444;
  background: #fef2f2;
}

/* Add Row Button */
.sub-tools .btn-add-row {
  width: 100%;
  border-style: dashed;
  padding: 0.75rem;
}

/* Results*/
/* ==========================================================================
   MODULE: RESULTS & OUTPUTS
   Scope: Metrics, Tables, Code, File Downloads
   ========================================================================== */
/* 7. OUTPUT LIBRARY */
.sub-tools .tool-result-section {
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

/* Empty State */
.sub-tools .state-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: var(--c-muted);
}

.sub-tools .state-empty .empty-icon {
  width: 80px;
  height: 80px;
  background: var(--c-bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--c-border);
}

.sub-tools .state-empty .empty-icon svg {
  width: 40px;
  height: 40px;
}

/* Loading State */
.sub-tools .state-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.sub-tools .loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--c-bg-light);
  border-top: 4px solid var(--c-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
/* Metrics */
.sub-tools .out-metric {
  text-align: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 1.5rem;
}

.sub-tools .out-metric-value {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--c-text);
}

.sub-tools .out-metric-label {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--c-muted);
  margin-top: 0.5rem;
}

.sub-tools .currency {
  color: var(--c-muted);
  font-size: 0.6em;
  vertical-align: top;
  margin-right: 0.1em;
}

/* Tables */
.sub-tools .out-table-container {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius);
  margin-top: 1.5rem;
}

.sub-tools .out-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
}

.sub-tools .out-table th {
  background-color: var(--c-bg-light);
  color: var(--c-muted);
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}

.sub-tools .out-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}

.sub-tools .out-table tr:last-child td {
  border-bottom: none;
}

/* Comparison Table Specifics */
.sub-tools .out-table[data-mode=key_value_columns] .td-label {
  font-weight: 600;
  width: 40%;
}

.sub-tools .out-table[data-mode=key_value_columns] .td-current,
.sub-tools .out-table[data-mode=key_value_columns] .td-new {
  font-family: var(--font-mono);
  width: 30%;
}

.sub-tools .out-table[data-mode=key_value_columns] th:nth-child(3),
.sub-tools .out-table[data-mode=key_value_columns] td:nth-child(3) {
  background-color: color-mix(in srgb, var(--c-accent) 5%, transparent);
}

/* Code Output */
.sub-tools .out-code-wrapper {
  position: relative;
  margin-top: 1rem;
  border-radius: var(--tool-radius);
  overflow: hidden;
  border: 1px solid var(--c-border);
}

.sub-tools .code-toolbar {
  background: #2d2d2d;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: flex-end;
  border-bottom: 1px solid #444;
}

.sub-tools .btn-code-copy {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.sub-tools .btn-code-copy:hover {
  background: var(--c-accent);
}

.sub-tools pre.tool-output-code {
  margin: 0;
  background: #1e1e1e;
  color: #e0e0e0;
  padding: 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  max-height: 500px;
}

/* Data Lists */
.sub-tools .out-datalist {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.sub-tools .datalist-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--c-border);
  font-size: 0.95rem;
}

.sub-tools .datalist-label {
  color: var(--c-muted);
}

.sub-tools .datalist-value {
  font-weight: 600;
  color: var(--c-text);
  text-align: right;
}

/* File Download Card */
.sub-tools .out-file-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--c-bg-light);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius);
  padding: 1.25rem;
  margin-top: 1rem;
}

.sub-tools .file-icon-wrap {
  width: 48px;
  height: 48px;
  background: var(--c-bg);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--c-accent);
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.sub-tools .file-meta-wrap {
  flex: 1;
  min-width: 0;
}

.sub-tools .file-name {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.sub-tools .file-size {
  font-size: 0.85rem;
  color: var(--c-muted);
}

.sub-tools .btn-download {
  background: var(--c-accent);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  white-space: nowrap;
}

/* Color Swatch */
.sub-tools .out-swatch {
  height: 120px;
  width: 100%;
  border-radius: var(--tool-radius);
  border: 1px solid var(--c-border);
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.sub-tools .swatch-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--swatch-color, transparent);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/*content*/
/* ==========================================================================
   MODULE: CONTENT & FAQ
   Scope: Content Blocks, FAQs, Instructional Text
   ========================================================================== */
.sub-tools .tool-content-area {
  margin-top: 3rem;
}

.sub-tools .tool-content-area h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--c-text);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* --- FAQ Items --- */
.sub-tools .faq-item {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--c-border) 50%, transparent);
  padding-bottom: 1.5rem;
}

.sub-tools .faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sub-tools .faq-item h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--c-text);
}

.sub-tools .faq-item p {
  color: var(--c-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  margin: 0;
}

/* --- General Content Body --- */
.sub-tools .tool-card .text-muted {
  line-height: 1.6;
}

.sub-tools .tool-card .text-muted p {
  margin-bottom: 1rem;
}

.sub-tools .tool-card .text-muted p:last-child {
  margin-bottom: 0;
}

/* === 950_print.max.css === */
/* Hide the print date on normal screens */
.print-date {
  display: none;
}

@media print {
  /* --- 1. BASE PAPER RESET --- */
  body {
    background-color: #fff !important;
    color: #000 !important;
    font-size: 11pt !important;
  }
  /* Hide EVERYTHING we don't want on paper */
  body > header nav,
  body > header label[for=menu-toggle],
  #menu-toggle,
  .breadcrumbs,
  body > footer .footer-inner,
  .hub-footer,
  .copy-btn,
  .drop-zone,
  .btn-action,
  .btn-secondary {
    display: none !important;
  }
  /* --- 2. HEADER --- */
  body > header {
    position: static !important; /* Removes sticky behavior */
    height: auto !important;
    padding: 0 0 1rem 0 !important;
    background: transparent !important;
    border-bottom: 2px solid #000 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
  }
  body > header a {
    color: #000 !important;
    text-decoration: none !important;
  }
  /* Reveal the hidden date specifically for print */
  .print-date {
    display: block !important;
    font-size: 10pt;
    color: #555;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  /* --- 3. FOOTER --- */
  body > footer {
    background: transparent !important;
    border-top: none !important;
    padding: 0 !important;
    margin-top: 1.5cm !important;
  }
  /* Only show the bottom copyright bit */
  body > footer .footer-bottom {
    margin: 0 !important;
    padding: 1rem 0 0 0 !important;
    border-top: 1px solid #ccc !important;
    color: #555 !important;
  }
  /* --- 4. LAYOUT & SPACING --- */
  main.container,
  .legal-document,
  .sub-tools .tool-shell {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 1cm 0 !important;
  }
  /* Flatten out tool cards and TOCs */
  .sub-tools .tool-card,
  .legal-document .doc-toc {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    background: transparent !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  /* --- 5. TYPOGRAPHY & PAGE BREAKS --- */
  h1, h2, h3, h4, h5, h6 {
    color: #000 !important;
    /* Prevent headings from being stranded at the bottom of a page */
    page-break-after: avoid;
    break-after: avoid;
  }
  /* Prevent tables, lists, and code blocks from splitting across pages awkwardly */
  p, li, table, pre, img, dl {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  a {
    color: #000 !important;
    /* Optionally, you can leave underline on to show it was a link */
    text-decoration: underline !important;
  }
  /* Ensure code blocks print cleanly without dark backgrounds */
  pre, code {
    background: transparent !important;
    border: 1px solid #ccc !important;
    color: #000 !important;
    white-space: pre-wrap !important; /* Force code to wrap on paper */
  }
}
/* === ABOUT PAGE === */
/* 1. HERO SECTION */
.page--about .about-hero {
  padding: 6rem 0 4rem;
  text-align: center;
  background: radial-gradient(circle at center, var(--c-bg-light) 0%, var(--c-bg) 70%);
  border-bottom: 1px solid var(--c-border);
}

.page--about .about-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem); /* Responsive giant text */
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.page--about .text-highlight {
  color: var(--c-accent);
  position: relative;
  display: inline-block;
}

/* 2. MISSION GRID (3 Cards) */
.page--about .mission-section {
  padding: 4rem 0;
}

.page--about .mission-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .page--about .mission-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.page--about .mission-card {
  background: var(--c-bg);
  padding: 2rem;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page--about .mission-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-color: var(--c-accent);
}

.page--about .mission-card .icon-wrap {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Hide middle icon on mobile to save space, show on desktop */
.page--about .icon-wrap-mobile {
  display: none;
}

.page--about .mission-card h3 {
  margin-top: 0;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.page--about .mission-card p {
  color: var(--c-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* 3. ECOSYSTEM (The Corporate "Verticals") */
.page--about .ecosystem-section {
  padding: 4rem 0;
  background-color: var(--c-bg-light);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.page--about .section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.page--about .section-header h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.page--about .ecosystem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .page--about .ecosystem-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.page--about .eco-item {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page--about .eco-item h3 {
  margin-top: 0;
  color: var(--c-accent);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.page--about .eco-item p {
  margin-bottom: 1.5rem;
}

.page--about .feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.page--about .feature-list li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--c-muted);
}

.page--about .feature-list li::before {
  content: "•";
  color: var(--c-accent);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* 4. STATS (Fake it til you make it) */
.page--about .stats-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--c-border);
}

.page--about .stats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 2rem;
  text-align: center;
}

.page--about .stat .number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--c-text);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.page--about .stat .label {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--c-muted);
  font-weight: 600;
}

/* 5. CTA SECTION */
.page--about .cta-section {
  padding: 6rem 0;
  text-align: center;
}

.page--about .cta-buttons {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Secondary Outline Button Style */
.page--about .button--outline {
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-text);
}

.page--about .button--outline:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: transparent;
}

/* === CONTACT PAGE LAYOUT === */
/* Main Grid: Info Left, Form Right */
.page--contact .contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (min-width: 900px) {
  .page--contact .contact-layout {
    grid-template-columns: 1fr 2fr; /* 1/3 sidebar, 2/3 form */
    gap: 4rem;
  }
}
/* Header */
.page--contact .contact-header {
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 2rem;
  margin-bottom: 3rem;
}

.page--contact .contact-header h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* === LEFT SIDEBAR (Info) === */
.page--contact .info-block {
  margin-bottom: 2.5rem;
}

.page--contact .info-block h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted);
  margin: 0 0 1rem 0;
  border-bottom: 2px solid var(--c-bg-light);
  padding-bottom: 0.5rem;
  display: inline-block;
}

/* Address */
.page--contact address {
  font-style: normal;
  line-height: 1.6;
  color: var(--c-text);
}

/* Email Directory */
.page--contact .email-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page--contact .email-list li {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.page--contact .dept-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.page--contact .dept-link {
  color: var(--c-accent);
  font-size: 0.9rem;
}

/* Corporate Metadata (DL/DT/DD) */
.page--contact .corporate-details dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0;
  font-size: 0.9rem;
}

.page--contact .corporate-details dt {
  color: var(--c-muted);
  font-weight: 500;
}

.page--contact .corporate-details dd {
  margin: 0;
  color: var(--c-text);
}

/* === RIGHT SIDE (Form) === */
.page--contact .contact-form-wrapper {
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 2rem;
  /* Subtle lift */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* 2 Column Inputs */
.page--contact .form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 650px) {
  .page--contact .form-grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}
/* Form Actions (Button + Disclaimer) */
.page--contact .form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
}

.page--contact .form-actions .text-muted {
  margin: 0;
  line-height: 1.4;
}

/* === STATUS PAGE === */
/* 1. Hero Colors */
.status-hero {
  padding: 4rem 0;
  color: white;
  text-align: center;
}

/* Dynamic State Colors */
.status-bg-green {
  background-color: #10b981;
}

.status-bg-orange {
  background-color: #f59e0b;
}

.status-bg-blue {
  background-color: #3b82f6;
}

.status-bg-red {
  background-color: #ef4444;
}

.status-hero h1 {
  color: white;
  margin: 0;
  font-size: 2rem;
}

.status-hero .hero-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.status-hero .last-updated {
  margin-top: 1rem;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* 2. Systems Grid */
.page--status .status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: -2rem auto 4rem; /* Overlap hero slightly */
  max-width: 800px;
  background: var(--c-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--c-border);
}

.page--status .status-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--c-bg-light);
}

.page--status .status-card:last-child {
  border-bottom: none;
}

.page--status .sys-name {
  font-weight: 600;
}

.page--status .sys-state {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Text Colors */
.text-green {
  color: #10b981;
}

.text-orange {
  color: #f59e0b;
}

.text-blue {
  color: #3b82f6;
}

.text-red {
  color: #ef4444;
}

/* 3. Timeline */
.page--status .incident-section {
  max-width: 800px;
  margin: 0 auto 4rem;
}

.page--status .incident-item {
  border-left: 2px solid var(--c-border);
  padding-left: 2rem;
  padding-bottom: 2rem;
  position: relative;
}

.page--status .incident-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0;
  width: 10px;
  height: 10px;
  background: var(--c-muted);
  border-radius: 50%;
}

.page--status .incident-date {
  font-size: 0.85rem;
  color: var(--c-muted);
  margin-bottom: 0.5rem;
}

.page--status .incident-body h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.page--status .badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 4px;
  margin-top: 0.5rem;
  text-transform: uppercase;
}

.badge-green {
  background: #d1fae5;
  color: #065f46;
}

.badge-orange {
  background: #ffedd5;
  color: #9a3412;
}

/* 1. HERO SEARCH */
.page--support .support-hero {
  background-color: var(--c-bg);
  padding: 5rem 0 4rem;
  text-align: center;
  border-bottom: none; /* FIX: Removed the <hr> effect here */
}

.page--support .support-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.page--support .search-wrapper {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.page--support .search-wrapper input {
  width: 100%;
  padding: 1rem 3rem 1rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 50px;
  border: 1px solid var(--c-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.page--support .search-wrapper input:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page--support .search-wrapper button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--c-muted);
  cursor: pointer;
  padding: 8px;
}

.page--support .search-wrapper button:hover {
  color: var(--c-accent);
}

/* 2. SYSTEM STATUS BAR (Floating Card Design) */
.page--support .status-bar {
  background-color: transparent; /* Removed full-width background */
  border: none;
  padding: 0 1.5rem; /* Mobile side-gutters */
  /* Pulls the card slightly up into the hero's whitespace */
  margin-top: -1.5rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 10;
}

.page--support .status-bar .container {
  max-width: 850px; /* ~80% width look on desktop */
  margin: 0 auto;
  /* Card Styling */
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  padding: 1.25rem 2rem;
  /* Layout */
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Allows stacking on mobile */
  gap: 1.5rem;
}

.page--support .status-indicator {
  display: flex;
  align-items: flex-start; /* Better for multiline text on mobile */
  gap: 1rem;
  flex: 1 1 300px; /* Allows it to take up space and wrap nicely */
}

.page--support .status-indicator span:last-child {
  line-height: 1.5;
  font-size: 0.95rem;
  color: var(--c-muted);
}

.page--support .status-indicator strong {
  color: var(--c-text);
}

/* The Pulsing Dot */
.page--support .pulse-dot {
  width: 10px;
  height: 10px;
  background-color: #10b981;
  border-radius: 50%;
  position: relative;
  margin-top: 0.35rem; /* Aligns dot with the first line of text */
  flex-shrink: 0; /* Prevents dot from squishing on tiny screens */
}

.page--support .pulse-dot::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
  opacity: 0.7;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70% {
    transform: scale(2.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}
.page--support .status-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--c-accent);
  white-space: nowrap; /* Prevents the arrow from breaking to a new line */
  transition: filter 0.2s;
}

.page--support .status-link:hover {
  text-decoration: none;
  filter: brightness(115%);
}

/* 3. KNOWLEDGE BASE GRID */
.page--support .kb-section {
  padding: 4rem 0;
}

.page--support .kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.page--support .kb-card {
  display: block;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
  height: 100%;
}

.page--support .kb-card:hover {
  border-color: var(--c-accent);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.page--support .kb-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.page--support .kb-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--c-text);
}

.page--support .kb-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--c-muted);
  line-height: 1.5;
}

/* 4. TICKET FORM */
.page--support .ticket-section {
  background-color: var(--c-bg-light);
  padding: 4rem 0;
  border-top: 1px solid var(--c-border);
}

.page--support .ticket-wrapper {
  max-width: 700px;
  margin: 0 auto;
  background: var(--c-bg);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--c-border);
}

.page--support .ticket-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page--support .form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 600px) {
  .page--support .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}
.page--support .form-group {
  margin-bottom: 1.5rem;
}

.page--support .form-actions {
  margin-top: 2rem;
  text-align: right;
}

/* ==========================================================================
   HTML SITEMAP PAGE
   Scope: .page--sitemap
   ========================================================================== */
.page--sitemap .sitemap-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 5rem;
}
@media (min-width: 650px) {
  .page--sitemap .sitemap-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1024px) {
  .page--sitemap .sitemap-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.page--sitemap .sitemap-section {
  background: var(--c-bg-light);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius, 12px);
  padding: 1.5rem;
}
.page--sitemap .sitemap-section h2 {
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
  color: var(--c-text);
  border-bottom: 2px solid color-mix(in srgb, var(--c-border) 60%, transparent);
  padding-bottom: 0.5rem;
}
.page--sitemap .sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  /* Nested Lists (e.g. for categories and tools) */
}
.page--sitemap .sitemap-list li {
  margin-bottom: 0.6rem;
  line-height: 1.4;
}
.page--sitemap .sitemap-list a {
  color: var(--c-muted);
  text-decoration: none;
  transition: color 0.15s;
  font-size: 0.95rem;
}
.page--sitemap .sitemap-list a:hover {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page--sitemap .sitemap-list .sitemap-cat-link {
  color: var(--c-text);
  font-weight: 600;
}
.page--sitemap .sitemap-list ul {
  list-style: none;
  padding-left: 1.25rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  border-left: 1px dashed var(--c-border);
}
.page--sitemap .sitemap-list ul li {
  margin-bottom: 0.4rem;
  position: relative;
  /* Create a subtle branch connector look */
}
.page--sitemap .sitemap-list ul li::before {
  content: "";
  position: absolute;
  left: -1.25rem;
  top: 0.65rem;
  width: 0.75rem;
  height: 1px;
  background: var(--c-border);
}

/* ==========================================================================
   ERROR PAGES (404, 500, etc.)
   Scope: .page--error
   ========================================================================== */
.page--error {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  text-align: center;
  padding: 4rem 1.5rem;
  position: relative;
  overflow: hidden;
  /* Giant faint background number */
  /* Content Card */
}
.page--error .error-bg-code {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: clamp(10rem, 30vw, 30rem);
  font-weight: 900;
  color: var(--c-border);
  opacity: 0.3;
  z-index: -1;
  user-select: none;
  pointer-events: none;
}
.page--error .error-content {
  max-width: 500px;
  background: color-mix(in srgb, var(--c-bg) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 3rem 2rem;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--c-border) 60%, transparent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  z-index: 1;
  animation: slideUpFade 0.4s ease-out;
}
.page--error .error-icon-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: color-mix(in srgb, var(--c-accent) 10%, var(--c-bg-light));
  border: 2px solid color-mix(in srgb, var(--c-accent) 20%, transparent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-accent);
  /* Playful floating animation */
  animation: floatIcon 4s ease-in-out infinite;
}
.page--error .error-icon-wrap svg {
  width: 40px;
  height: 40px;
  stroke-width: 2px;
}
.page--error h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.page--error .error-desc {
  color: var(--c-muted);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}
.page--error .error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Animations */
@keyframes slideUpFade {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes floatIcon {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}
/* ==========================================================================
   HOMEPAGE
   Scope: .page--home
   ========================================================================== */
.page--home {
  padding-top: 0;
  /* --- 1. HERO SECTION --- */
  /* --- 2. BENTO GRID SECTION --- */
  /* Grid Spans for Desktop */
  /* --- 3. TRUST BANNER --- */
}
.page--home .home-hero {
  position: relative;
  padding: 4rem 1.5rem 4rem;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--c-accent) 8%, var(--c-bg-light)) 0%, var(--c-bg) 60%);
  border-bottom: 1px solid var(--c-border);
  overflow: hidden;
}
.page--home .home-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-accent), transparent);
  opacity: 0.3;
}
.page--home .home-hero .hero-kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-accent);
  background: color-mix(in srgb, var(--c-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-accent) 20%, transparent);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.5s ease-out;
}
.page--home .home-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 auto 1.5rem;
  max-width: 900px;
  color: var(--c-text);
  animation: fadeInUp 0.5s ease-out 0.1s both;
}
.page--home .home-hero h1 .text-highlight {
  color: var(--c-accent);
  position: relative;
  display: inline-block;
}
.page--home .home-hero .lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--c-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
  animation: fadeInUp 0.5s ease-out 0.2s both;
}
.page--home .home-hero .hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.5s ease-out 0.3s both;
}
.page--home .home-hero .hero-actions .btn-outline {
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-text);
}
.page--home .home-hero .hero-actions .btn-outline:hover {
  background: var(--c-bg-light);
  border-color: var(--c-text);
}
.page--home .home-bento-section {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.page--home .bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .page--home .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .page--home .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(280px, auto);
  }
}
.page--home .bento-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 24px;
  padding: 2.5rem;
  text-decoration: none;
  color: var(--c-text);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  /* Gradient overlay that reveals on hover */
}
.page--home .bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom right, color-mix(in srgb, var(--c-accent) 5%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}
.page--home .bento-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  border-color: color-mix(in srgb, var(--c-accent) 40%, var(--c-border));
}
.page--home .bento-card:hover::before {
  opacity: 1;
}
.page--home .bento-card:hover .bento-icon {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
  transform: scale(1.1);
}
.page--home .bento-card:hover .bento-arrow {
  transform: translateX(5px);
  color: var(--c-accent);
}
.page--home .bento-card > * {
  position: relative;
  z-index: 1;
}
.page--home .bento-card .bento-icon {
  width: 56px;
  height: 56px;
  background: var(--c-bg-light);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 2rem;
  color: var(--c-text);
  transition: all 0.3s ease;
}
.page--home .bento-card .bento-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 2px;
}
.page--home .bento-card h2 {
  margin: 0 0 0.75rem 0;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}
.page--home .bento-card p {
  color: var(--c-muted);
  line-height: 1.6;
  margin: 0 0 2rem 0;
  flex-grow: 1;
  font-size: 1.05rem;
}
.page--home .bento-card .bento-footer {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--c-text);
  font-size: 0.95rem;
}
.page--home .bento-card .bento-footer .bento-arrow {
  margin-left: 0.5rem;
  transition: transform 0.2s ease, color 0.2s ease;
}
@media (min-width: 1024px) {
  .page--home {
    /* Make Apps span 2 columns */
    /* Make Tools take up 1 column but span 2 rows */
    /* Make Blog span 1 column */
    /* Make Company span 1 column */
  }
  .page--home .bento-card--apps {
    grid-column: span 2;
  }
  .page--home .bento-card--tools {
    grid-column: span 1;
    grid-row: span 2;
  }
  .page--home .bento-card--blog {
    grid-column: span 1;
  }
  .page--home .bento-card--company {
    grid-column: span 1;
  }
}
.page--home .home-trust-banner {
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg-light);
  padding: 3rem 1.5rem;
  text-align: center;
}
.page--home .home-trust-banner .trust-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}
.page--home .home-trust-banner .trust-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--c-text);
  font-weight: 600;
  font-size: 1.1rem;
}
.page--home .home-trust-banner .trust-item svg {
  color: var(--c-accent);
  width: 24px;
  height: 24px;
}

/* Animations */
@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ==========================================================================
   PRICING & SUBSCRIPTIONS PAGE
   Scope: .page--pricing
   ========================================================================== */
.page--pricing {
  padding-bottom: 5rem;
  /* --- THE PRICING GRID --- */
}
.page--pricing .pricing-hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  border-bottom: 1px solid var(--c-border);
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--c-accent) 8%, var(--c-bg-light)) 0%, var(--c-bg) 70%);
}
.page--pricing .pricing-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.page--pricing .pricing-hero .text-lead {
  color: var(--c-muted);
  font-size: 1.15rem;
  max-width: 65ch;
  margin: 0 auto;
  line-height: 1.6;
}
.page--pricing .pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 4rem auto;
  align-items: stretch;
}
@media (min-width: 850px) {
  .page--pricing .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.page--pricing .pricing-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.page--pricing .pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.05);
  border-color: color-mix(in srgb, var(--c-accent) 40%, var(--c-border));
}
.page--pricing .pricing-card--featured {
  border: 2px solid var(--c-accent);
  background: color-mix(in srgb, var(--c-accent) 2%, var(--c-bg));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--c-accent) 8%, transparent);
}
.page--pricing .pricing-card--featured .popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
}
.page--pricing .pricing-card h2 {
  font-size: 1.35rem;
  margin: 0 0 0.5rem 0;
}
.page--pricing .pricing-card .price-row {
  margin: 1.5rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}
.page--pricing .pricing-card .price-row .amount {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 800;
  color: var(--c-text);
  line-height: 1;
}
.page--pricing .pricing-card .price-row .period {
  color: var(--c-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.page--pricing .pricing-card .tier-desc {
  color: var(--c-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  min-height: 3em;
}
.page--pricing .pricing-card .feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem 0;
  flex-grow: 1;
}
.page--pricing .pricing-card .feature-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--c-text) 90%, transparent);
}
.page--pricing .pricing-card .feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: 800;
}
.page--pricing .pricing-card .feature-list .is-disabled {
  color: var(--c-muted);
  opacity: 0.6;
  text-decoration: line-through;
}
.page--pricing .pricing-card .feature-list .is-disabled::before {
  content: "–";
  color: var(--c-muted);
}
.page--pricing .pricing-card .card-footer {
  margin-top: auto;
}
.page--pricing .pricing-card .card-footer .button {
  width: 100%;
  text-align: center;
  padding: 0.85rem 1.5rem;
}
.page--pricing .pricing-card .card-footer .button--outline {
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-text);
}
.page--pricing .pricing-card .card-footer .button--outline:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

/* ==========================================================================
   ACCOUNT DASHBOARD
   Scope: .page--account
   ========================================================================== */
.page--account .account-container {
  max-width: 900px;
  margin: 3rem auto 5rem;
}
.page--account .account-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.page--account .account-header h1 {
  margin: 0 0 0.5rem 0;
}
.page--account .account-header p {
  color: var(--c-muted);
  margin: 0;
  font-size: 1.05rem;
}
.page--account .account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.page--account .account-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius, 12px);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}
.page--account .account-card h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 0.75rem;
}
.page--account .account-card .account-desc {
  color: var(--c-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}
.page--account .account-dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 0 0 1.5rem 0;
}
.page--account .account-dl dt {
  color: var(--c-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.page--account .account-dl dd {
  margin: 0 0 1.25rem 0;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--c-text);
}
.page--account .account-dl dd:last-child {
  margin-bottom: 0;
}
.page--account .account-stat-large {
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 1.75rem;
  margin-top: 0.25rem;
}
.page--account .account-stat-large.text-accent {
  color: var(--c-accent);
}
.page--account .account-sub-stat {
  font-size: 0.85rem;
  color: var(--c-muted);
  font-family: var(--font-body);
  font-weight: normal;
  margin-top: 0.35rem;
}
.page--account .account-badge {
  font-size: 0.75rem;
  vertical-align: middle;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-left: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-body);
}
.page--account .account-badge--green {
  background: color-mix(in srgb, #10b981 15%, var(--c-bg));
  color: #059669;
  border: 1px solid color-mix(in srgb, #10b981 30%, transparent);
}
.page--account .account-badge--orange {
  background: color-mix(in srgb, #f59e0b 15%, var(--c-bg));
  color: #d97706;
  border: 1px solid color-mix(in srgb, #f59e0b 30%, transparent);
}
.page--account .account-badge--grey {
  background: var(--c-bg-light);
  color: var(--c-muted);
  border: 1px solid var(--c-border);
}
.page--account .account-action {
  margin-top: auto;
}
.page--account .account-action .button {
  width: 100%;
  text-align: center;
}

/* ==========================================================================
   APPS INDEX PAGE
   Scope: .page--apps-main
   ========================================================================== */
.page--apps-main .hero {
  padding: 4rem 0;
  text-align: center;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 3rem;
}
.page--apps-main .hero .kicker {
  color: var(--c-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.page--apps-main .hero .lead {
  color: var(--c-muted);
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.page--apps-main .hero .highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  /* Add these 3 lines to override the global list styles */
  list-style: none;
  padding: 0;
  margin: 0;
}
.page--apps-main .hero .highlights li {
  background: var(--c-bg-light);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  font-size: 0.9rem;
  color: var(--c-muted);
  font-weight: 500;
}
.page--apps-main .apps-category-section {
  margin-bottom: 4rem;
}
.page--apps-main .apps-category-section .category-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--c-bg-light);
  padding-bottom: 1rem;
}
.page--apps-main .apps-category-section .category-header h2 {
  margin: 0;
  font-size: 1.75rem;
}
.page--apps-main .apps-category-section .category-header p {
  margin: 0.25rem 0 0 0;
  color: var(--c-muted);
}
.page--apps-main .apps-category-section .app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.page--apps-main .apps-category-section .app-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius, 12px);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: var(--c-text);
  display: flex;
  flex-direction: column;
}
.page--apps-main .apps-category-section .app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  border-color: var(--c-accent);
}
.page--apps-main .apps-category-section .app-card .app-card__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.page--apps-main .apps-category-section .app-card .app-card__header img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.page--apps-main .apps-category-section .app-card .app-card__header h3 {
  margin: 0;
  font-size: 1.25rem;
}
.page--apps-main .apps-category-section .app-card .app-card__desc {
  color: var(--c-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.page--apps-main .apps-category-section .app-card .app-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  border-top: 1px solid var(--c-bg-light);
  padding-top: 1rem;
}
.page--apps-main .apps-category-section .app-card .app-card__footer .platform {
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.page--apps-main .apps-category-section .app-card .app-card__footer .price {
  color: var(--c-accent);
}

/* ==========================================================================
   APP SHOW PAGE
   Scope: .page--apps-show
   ========================================================================== */
.page--apps-show {
  /* --- THE FLICK-THROUGH GALLERY --- */
  /* --- THE 2 COLUMN LAYOUT (Features Left, Meta Right) --- */
}
.page--apps-show .app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 0 4rem 0;
}
.page--apps-show .app-hero-banner {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--tool-radius, 12px);
  margin-bottom: 3rem;
  border: 1px solid var(--c-border);
}
.page--apps-show .app-header {
  text-align: center;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-inline: auto;
}
.page--apps-show .app-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}
.page--apps-show .app-header h1 img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  margin: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.page--apps-show .app-header .app-overview {
  font-size: 1.15rem;
  color: var(--c-muted);
  line-height: 1.7;
}
.page--apps-show .app-gallery {
  position: relative;
  margin: 3rem 0;
}
.page--apps-show .app-gallery__track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0 2rem 0;
  /* Hide scrollbar for a cleaner look */
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
.page--apps-show .app-gallery__track::-webkit-scrollbar {
  display: none; /* Chrome */
}
.page--apps-show .app-gallery__item {
  flex: 0 0 auto;
  /* Show 80% of the item on mobile so users know they can swipe */
  width: 80%;
  max-width: 280px;
  scroll-snap-align: center;
}
.page--apps-show .app-gallery__item img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--c-border);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  display: block;
}
.page--apps-show .app-gallery__btn {
  position: absolute;
  /* Offset vertically by -0.5rem to perfectly align with the images, 
     counteracting the asymmetric padding on the track */
  top: calc(50% - 0.5rem);
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  /* Dark mode visibility boost */
}
.page--apps-show .app-gallery__btn svg {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0;
  /* Force the Lucide SVG to obey our CSS variables instead of its hardcoded white */
  stroke: currentColor !important;
}
.page--apps-show .app-gallery__btn:hover {
  color: var(--c-accent);
  border-color: var(--c-accent);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
@media (prefers-color-scheme: dark) {
  .page--apps-show .app-gallery__btn {
    background: var(--c-bg-light);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    border-color: color-mix(in srgb, var(--c-border) 40%, #fff);
  }
  .page--apps-show .app-gallery__btn:hover {
    background: var(--c-bg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
  }
}
.page--apps-show .app-gallery__btn--prev {
  left: -20px;
}
.page--apps-show .app-gallery__btn--next {
  right: -20px;
}
@media (max-width: 768px) {
  .page--apps-show .app-gallery__btn {
    display: none; /* Hide buttons on mobile, swiping is natural */
  }
}
.page--apps-show .app-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}
@media (min-width: 900px) {
  .page--apps-show .app-body {
    grid-template-columns: 1.8fr 1fr;
  }
}
.page--apps-show .features-column .feature-section {
  margin-bottom: 3rem;
}
.page--apps-show .features-column .feature-section h3 {
  color: var(--c-text);
  border-bottom: 2px solid var(--c-bg-light);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
.page--apps-show .features-column .feature-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.page--apps-show .features-column .feature-section ul li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--c-text) 80%, transparent);
}
.page--apps-show .features-column .feature-section ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--c-accent);
  font-weight: bold;
}
.page--apps-show .meta-column {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}
.page--apps-show .meta-column .meta-card {
  background: var(--c-bg-light);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 2rem;
}
.page--apps-show .meta-column .meta-card h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  border-bottom: 2px solid color-mix(in srgb, var(--c-border) 50%, transparent);
  padding-bottom: 0.75rem;
}
.page--apps-show .meta-column .meta-card dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 0 0 1.5rem 0;
}
.page--apps-show .meta-column .meta-card dl dt {
  font-weight: 600;
  color: var(--c-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.page--apps-show .meta-column .meta-card dl dd {
  margin: 0 0 1rem 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-text);
}
.page--apps-show .meta-column .meta-card .conclusion {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--c-muted);
  border-top: 1px dashed var(--c-border);
  padding-top: 1.5rem;
  margin-top: 0;
}

/* Overall container */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header */
.app-header {
  text-align: center;
  margin-bottom: 3rem;
}

.app-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.app-meta {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.app-overview {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Body Layout */
.app-body {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.features-column {
  flex: 2;
}

.screenshots-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 2rem;
}

/* Screenshot Placeholders */
.screenshot-placeholder {
  background-color: #f4f4f4;
  border: 1px dashed #ccc;
  border-radius: 12px;
  width: 100%;
  height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.9rem;
  font-style: italic;
}

/* Features */
.feature-section {
  margin-bottom: 2.5em;
}

.feature-section h3 {
  font-size: 1.4rem;
  border-bottom: 2px solid #eee;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
  color: #333;
}

.feature-section ul {
  list-style-type: none;
  padding-left: 0;
}

.feature-section li {
  margin-bottom: 0.75em;
  padding-left: 1.75em;
  position: relative;
  line-height: 1.5;
}

.feature-section li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745; /* Green checkmark */
  font-weight: bold;
  font-size: 1.2em;
  top: -2px;
}

/* Footer */
.app-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
  text-align: center;
  font-size: 1.1rem;
  color: #444;
}

/* Responsive */
@media (max-width: 992px) {
  .app-body {
    flex-direction: column-reverse;
  }
  .screenshots-column {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    width: 100%;
  }
  .screenshot-placeholder {
    min-width: 220px;
    height: 400px;
  }
}
@media (max-width: 576px) {
  .app-container {
    padding: 1rem 0.5rem;
  }
  .app-header h1 {
    font-size: 2rem;
  }
  .screenshot-placeholder {
    min-width: 180px;
    height: 320px;
  }
}
/* ==========================================================================
   COMPONENT: BIG NUMBER (Hero Metric)
   Target: .result-big-number
   ========================================================================== */
/* 1. Main Container */
.page--tool-page #ui-result-container .result-big-number {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius);
  margin-bottom: 2rem;
  box-shadow: var(--tool-shadow);
  animation: fadeInRow 0.3s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Optional: Subtle accent line at top */
.page--tool-page #ui-result-container .result-big-number::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--c-accent);
  opacity: 0.8;
}

/* 2. The Label (Top) */
.page--tool-page #ui-result-container .result-big-number .bn-label {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-muted);
  margin-bottom: 0.5rem;
}

/* 3. The Main Value Row (Flex wrapper for alignment) */
.page--tool-page #ui-result-container .result-big-number .bn-value-row {
  display: inline-flex;
  align-items: baseline; /* Aligns symbols with the bottom of the number */
  justify-content: center;
  gap: 0.1em;
  line-height: 1;
  margin-bottom: 0.5rem;
  flex-wrap: wrap; /* Safety for very long numbers on tiny screens */
}

/* The Number Itself */
.page--tool-page #ui-result-container .result-big-number .bn-value {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 8vw, 5rem); /* Responsive scaling */
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums; /* Monospaced numbers */
}

/* Prepend/Append (Symbols/Units) */
.page--tool-page #ui-result-container .result-big-number .bn-prepend,
.page--tool-page #ui-result-container .result-big-number .bn-append {
  font-size: clamp(1.5rem, 4vw, 2.5rem); /* ~50% of value size */
  font-weight: 400;
  color: var(--c-muted);
}

.page--tool-page #ui-result-container .result-big-number .bn-prepend {
  margin-right: 0.1rem;
  vertical-align: top; /* Sometimes looks better lifted slightly */
}

.page--tool-page #ui-result-container .result-big-number .bn-append {
  margin-left: 0.1rem;
}

/* 4. Addendum (Per Month / Frequency) */
.page--tool-page #ui-result-container .result-big-number .bn-addendum {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 1.5rem;
}

/* 5. Info Block (Description) */
.page--tool-page #ui-result-container .result-big-number .bn-info {
  font-size: 0.95rem;
  color: var(--c-muted);
  background-color: color-mix(in srgb, var(--c-bg-light) 50%, transparent);
  padding: 0.5rem 1rem;
  border-radius: 999px; /* Pill shape */
  display: inline-block;
  margin-bottom: 1.5rem;
}

/* 6. Disclaimer (Legal Text) */
.page--tool-page #ui-result-container .result-big-number .bn-disclaimer {
  font-size: 0.75rem;
  color: var(--c-muted);
  opacity: 0.8;
  border-top: 1px dashed var(--c-border);
  padding-top: 1rem;
  margin-top: auto; /* Pushes to bottom if height is fixed */
  width: 100%;
  max-width: 80%; /* Don't stretch full width for readability */
  line-height: 1.4;
}

/* 7. Status Coloring Modifiers (Applied to container) */
/* Success */
.page--tool-page #ui-result-container .result-big-number.status-positive::before {
  background: #10b981;
}

.page--tool-page #ui-result-container .result-big-number.status-positive .bn-value {
  color: color-mix(in srgb, #10b981 80%, var(--c-text));
}

/* Warning/Negative */
.page--tool-page #ui-result-container .result-big-number.status-negative::before {
  background: #ef4444;
}

.page--tool-page #ui-result-container .result-big-number.status-negative .bn-value {
  color: color-mix(in srgb, #ef4444 80%, var(--c-text));
}

.page--tool-page #ui-result-container .result-big-number .bn-secondary-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 3rem; /* Row gap, Col gap */
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
  width: 100%;
}

/* Secondary Item Wrapper */
.page--tool-page #ui-result-container .result-big-number .bn-sec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

/* Secondary Label */
.page--tool-page #ui-result-container .result-big-number .bn-sec-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--c-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

/* Secondary Value */
.page--tool-page #ui-result-container .result-big-number .bn-sec-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-text);
}

/* Secondary Unit (Inline) */
.page--tool-page #ui-result-container .result-big-number .bn-sec-unit {
  font-size: 0.8em;
  color: var(--c-muted);
  margin-left: 2px;
}

/* ==========================================================================
   COMPONENT: KEY-VALUE GRID (Summary Box)
   Target: .result-kv-grid
   ========================================================================== */
/* 1. Main Container & Title */
.page--tool-page #ui-result-container .result-kv-grid {
  margin-bottom: 2rem;
  animation: fadeInRow 0.3s ease-out;
}

.page--tool-page #ui-result-container .result-kv-grid .kv-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-border);
  font-weight: 700;
}

/* 2. Grid/List Layout Engine */
.page--tool-page #ui-result-container .result-kv-grid .kv-items-wrapper {
  display: grid;
  gap: 1rem;
}

/* Layout: Grid (Default - Adaptive Columns) */
.page--tool-page #ui-result-container .result-kv-grid .kv-items-wrapper:not(.layout-list) {
  /* Auto-fit: Creates as many columns as fit, min-width 150px */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* Layout: List (Vertical Compact) */
.page--tool-page #ui-result-container .result-kv-grid .kv-items-wrapper.layout-list {
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

/* 3. The Item Card */
.page--tool-page #ui-result-container .result-kv-grid .kv-item {
  background-color: var(--c-bg-light);
  border: 1px solid color-mix(in srgb, var(--c-border) 60%, transparent);
  border-radius: var(--tool-radius);
  padding: 1rem 1.25rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.1s, border-color 0.2s, box-shadow 0.2s;
  overflow: hidden; /* Contains status border */
}

/* List Mode Specifics for Item */
.page--tool-page #ui-result-container .result-kv-grid .kv-items-wrapper.layout-list .kv-item {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
}

/* 4. Typography & Inner Elements */
/* Top Label Row */
.page--tool-page #ui-result-container .result-kv-grid .kv-label-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

/* In list mode, label is on the left, remove margin */
.page--tool-page #ui-result-container .result-kv-grid .kv-items-wrapper.layout-list .kv-label-row {
  margin-bottom: 0;
  margin-right: 1rem;
}

.page--tool-page #ui-result-container .result-kv-grid .kv-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--c-muted);
  line-height: 1.2;
}

/* Main Value Row */
.page--tool-page #ui-result-container .result-kv-grid .kv-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  color: var(--c-text);
}

.page--tool-page #ui-result-container .result-kv-grid .kv-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* List mode value adjustments */
.page--tool-page #ui-result-container .result-kv-grid .kv-items-wrapper.layout-list .kv-value {
  font-size: 1.25rem;
}

.page--tool-page #ui-result-container .result-kv-grid .kv-prepend,
.page--tool-page #ui-result-container .result-kv-grid .kv-unit {
  font-size: 0.9rem;
  color: var(--c-muted);
  font-weight: 500;
}

/* 5. Tooltips */
.page--tool-page #ui-result-container .result-kv-grid .kv-tooltip-trigger {
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c-border) 80%, transparent);
  color: var(--c-muted);
  font-size: 10px;
  font-weight: bold;
  opacity: 0.7;
}

/* Simple CSS Tooltip implementation */
.page--tool-page #ui-result-container .result-kv-grid .kv-tooltip-trigger:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #2d2d2d;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: normal;
  width: max-content;
  max-width: 200px;
  z-index: 10;
  pointer-events: none;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-transform: none;
  font-weight: normal;
  letter-spacing: 0;
  text-align: center;
}

/* 6. Status Indicators (Color Coding) */
.page--tool-page #ui-result-container .result-kv-grid .kv-item[data-status] {
  border-left-width: 4px;
}

/* Positive (Green) */
.page--tool-page #ui-result-container .result-kv-grid .kv-item[data-status=positive] {
  border-left-color: #10b981; /* Emerald 500 */
  background-color: color-mix(in srgb, #10b981 3%, var(--c-bg-light));
}

.page--tool-page #ui-result-container .result-kv-grid .kv-item[data-status=positive] .kv-value {
  color: color-mix(in srgb, #10b981 80%, var(--c-text));
}

/* Negative (Red) */
.page--tool-page #ui-result-container .result-kv-grid .kv-item[data-status=negative] {
  border-left-color: #ef4444; /* Red 500 */
  background-color: color-mix(in srgb, #ef4444 3%, var(--c-bg-light));
}

.page--tool-page #ui-result-container .result-kv-grid .kv-item[data-status=negative] .kv-value {
  color: color-mix(in srgb, #ef4444 80%, var(--c-text));
}

/* Warning (Amber) */
.page--tool-page #ui-result-container .result-kv-grid .kv-item[data-status=warning] {
  border-left-color: #f59e0b; /* Amber 500 */
  background-color: color-mix(in srgb, #f59e0b 3%, var(--c-bg-light));
}

/* Neutral (Blue/Gray) */
.page--tool-page #ui-result-container .result-kv-grid .kv-item[data-status=neutral] {
  border-left-color: #3b82f6; /* Blue 500 */
}

/* 7. Click To Copy Functionality */
.page--tool-page #ui-result-container .result-kv-grid .kv-item.is-copyable {
  cursor: pointer;
}

.page--tool-page #ui-result-container .result-kv-grid .kv-item.is-copyable:hover {
  border-color: var(--c-accent);
  background-color: var(--c-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page--tool-page #ui-result-container .result-kv-grid .kv-item.is-copyable:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* Copy Icon (Hidden by default, shows on hover/touch) */
.page--tool-page #ui-result-container .result-kv-grid .kv-copy-icon {
  opacity: 0;
  transition: opacity 0.2s;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.8rem;
  color: var(--c-muted);
}

/* List mode copy icon positioning */
.page--tool-page #ui-result-container .result-kv-grid .kv-items-wrapper.layout-list .kv-copy-icon {
  top: 50%;
  transform: translateY(-50%);
  right: 0.5rem;
}

.page--tool-page #ui-result-container .result-kv-grid .kv-item.is-copyable:hover .kv-copy-icon {
  opacity: 1;
}

/* 8. Mobile Optimization */
@media (max-width: 600px) {
  /* Force 2 columns on small screens instead of 1 big one, unless very narrow */
  .page--tool-page #ui-result-container .result-kv-grid .kv-items-wrapper:not(.layout-list) {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Reduce font size slightly for 2-col mobile view */
  .page--tool-page #ui-result-container .result-kv-grid .kv-value {
    font-size: 1.25rem;
  }
}
@media (max-width: 400px) {
  /* Collapse to single column on very small devices */
  .page--tool-page #ui-result-container .result-kv-grid .kv-items-wrapper:not(.layout-list) {
    grid-template-columns: 1fr;
  }
}
/* ==========================================================================
   COMPONENT: SMART TABLE
   Target: .result-smart-table
   ========================================================================== */
/* 1. Container & Header */
.page--tool-page #ui-result-container .result-smart-table {
  margin-bottom: 2rem;
  animation: fadeInRow 0.3s ease-out;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.page--tool-page #ui-result-container .result-smart-table .st-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.page--tool-page #ui-result-container .result-smart-table .st-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-text);
  margin: 0;
  line-height: 1.2;
}

/* 2. Toolbar (Search & Export) */
.page--tool-page #ui-result-container .result-smart-table .st-toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

/* Search Input */
.page--tool-page #ui-result-container .result-smart-table .st-search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.page--tool-page #ui-result-container .result-smart-table .st-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem; /* Space for icon */
  font-size: 0.9rem;
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius);
  background-color: var(--c-bg);
  color: var(--c-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.page--tool-page #ui-result-container .result-smart-table .st-search-input:focus {
  border-color: var(--c-accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 15%, transparent);
}

/* Search Icon (Pseudo) */
.page--tool-page #ui-result-container .result-smart-table .st-search-wrapper::before {
  content: "🔍"; /* Or an SVG background */
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(100%);
}

/* Export Button */
.page--tool-page #ui-result-container .result-smart-table .btn-st-export {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-accent);
  background-color: color-mix(in srgb, var(--c-accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-accent) 20%, transparent);
  border-radius: var(--tool-radius);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.page--tool-page #ui-result-container .result-smart-table .btn-st-export:hover {
  background-color: color-mix(in srgb, var(--c-accent) 15%, transparent);
  text-decoration: none;
}

/* 3. Table Wrapper (Responsive Scroll) */
.page--tool-page #ui-result-container .result-smart-table .st-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius);
  background: var(--c-bg);
  box-shadow: var(--tool-shadow);
  -webkit-overflow-scrolling: touch; /* Smooth scroll iOS */
}

/* 4. Table Base Styles */
.page--tool-page #ui-result-container .result-smart-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 600px; /* Force scroll on small screens */
}

.page--tool-page #ui-result-container .result-smart-table th,
.page--tool-page #ui-result-container .result-smart-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}

/* Headers */
.page--tool-page #ui-result-container .result-smart-table th {
  background-color: var(--c-bg-light);
  color: var(--c-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Rows & Striping */
.page--tool-page #ui-result-container .result-smart-table tbody tr:hover {
  background-color: color-mix(in srgb, var(--c-bg-light) 50%, var(--c-bg));
}

.page--tool-page #ui-result-container .result-smart-table tbody tr:last-child td {
  border-bottom: none;
}

/* Footer */
.page--tool-page #ui-result-container .result-smart-table tfoot {
  background-color: var(--c-bg-light);
  font-weight: 700;
  border-top: 2px solid var(--c-border);
}

.page--tool-page #ui-result-container .result-smart-table tfoot td {
  border-bottom: none;
  color: var(--c-text);
}

/* 5. Column Alignments */
.page--tool-page #ui-result-container .result-smart-table .align-left {
  text-align: left;
}

.page--tool-page #ui-result-container .result-smart-table .align-center {
  text-align: center;
}

.page--tool-page #ui-result-container .result-smart-table .align-right {
  text-align: right;
}

/* 6. Data Formatting Variants */
/* Currency / Numbers */
.page--tool-page #ui-result-container .result-smart-table .fmt-currency,
.page--tool-page #ui-result-container .result-smart-table .fmt-percent {
  font-family: var(--font-mono);
  font-feature-settings: "tnum"; /* Tabular numbers */
  letter-spacing: -0.02em;
}

/* Code / ID */
.page--tool-page #ui-result-container .result-smart-table .fmt-code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background-color: color-mix(in srgb, var(--c-bg-light) 80%, var(--c-text));
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--c-accent);
  display: inline-block;
}

/* Date */
.page--tool-page #ui-result-container .result-smart-table .fmt-date {
  color: var(--c-muted);
  white-space: nowrap;
}

/* 7. Mobile Adjustments */
@media (max-width: 600px) {
  /* Stack toolbar elements vertically on mobile */
  .page--tool-page #ui-result-container .result-smart-table .st-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .page--tool-page #ui-result-container .result-smart-table .btn-st-export {
    justify-content: center;
    width: 100%;
  }
}
/* ==========================================================================
   COMPONENT: COMPARISON / DELTA CARD
   Target: .result-comparison-card
   ========================================================================== */
/* 1. Main Container & Header */
.page--tool-page #ui-result-container .result-comparison-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--tool-shadow);
  animation: fadeInRow 0.3s ease-out;
  position: relative;
  overflow: hidden;
}

.page--tool-page #ui-result-container .result-comparison-card .comp-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted);
  margin: 0 0 1.5rem 0;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* 2. Layout Engine (3 Columns: Before - Delta - After) */
.page--tool-page #ui-result-container .result-comparison-card .comp-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  position: relative;
}

/* 3. The "Before" and "After" Items */
.page--tool-page #ui-result-container .result-comparison-card .comp-item {
  text-align: center;
  padding: 1rem;
  border-radius: var(--tool-radius);
  background-color: var(--c-bg-light);
  border: 1px solid transparent;
  transition: transform 0.2s;
}

/* Specific styling for Before (Left) */
.page--tool-page #ui-result-container .result-comparison-card .comp-item.mod-before {
  border-color: color-mix(in srgb, var(--c-border) 60%, transparent);
  background-color: color-mix(in srgb, var(--c-bg-light) 50%, transparent);
}

/* Specific styling for After (Right) - Highlighted */
.page--tool-page #ui-result-container .result-comparison-card .comp-item.mod-after {
  border-color: var(--c-accent);
  background-color: color-mix(in srgb, var(--c-accent) 5%, var(--c-bg));
  box-shadow: 0 4px 15px color-mix(in srgb, var(--c-accent) 10%, transparent);
}

.page--tool-page #ui-result-container .result-comparison-card .comp-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.page--tool-page #ui-result-container .result-comparison-card .comp-value {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.25rem); /* Responsive font size */
  font-weight: 800;
  color: var(--c-text);
  line-height: 1.1;
}

.page--tool-page #ui-result-container .result-comparison-card .comp-unit {
  font-size: 0.5em;
  color: var(--c-muted);
  vertical-align: middle;
  margin-left: 0.1em;
}

/* 4. The Delta (Middle Section) */
.page--tool-page #ui-result-container .result-comparison-card .comp-delta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding: 0 1rem;
}

/* The Arrow Graphic */
.page--tool-page #ui-result-container .result-comparison-card .delta-arrow {
  font-size: 1.5rem;
  color: var(--c-border);
  margin-bottom: 0.5rem;
  line-height: 1;
}

/* The Pill containing the value */
.page--tool-page #ui-result-container .result-comparison-card .delta-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  border: 1px solid transparent;
  background: var(--c-bg); /* Fallback */
  white-space: nowrap;
}

.page--tool-page #ui-result-container .result-comparison-card .delta-desc {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-muted);
  margin-top: 0.5rem;
  text-align: center;
  max-width: 120px;
  line-height: 1.3;
}

/* 5. Sentiment Coloring (Good/Bad/Neutral) */
/* Sentiment: Good (Green) */
.page--tool-page #ui-result-container .result-comparison-card .comp-delta[data-sentiment=good] .delta-pill {
  background-color: color-mix(in srgb, #10b981 10%, var(--c-bg));
  color: #047857; /* Dark Green Text */
  border-color: color-mix(in srgb, #10b981 40%, transparent);
}

.page--tool-page #ui-result-container .result-comparison-card .comp-delta[data-sentiment=good] .delta-arrow {
  color: #10b981;
}

/* Sentiment: Bad (Red) */
.page--tool-page #ui-result-container .result-comparison-card .comp-delta[data-sentiment=bad] .delta-pill {
  background-color: color-mix(in srgb, #ef4444 10%, var(--c-bg));
  color: #b91c1c; /* Dark Red Text */
  border-color: color-mix(in srgb, #ef4444 40%, transparent);
}

.page--tool-page #ui-result-container .result-comparison-card .comp-delta[data-sentiment=bad] .delta-arrow {
  color: #ef4444;
}

/* Sentiment: Neutral (Grey/Blue) */
.page--tool-page #ui-result-container .result-comparison-card .comp-delta[data-sentiment=neutral] .delta-pill {
  background-color: var(--c-bg-light);
  color: var(--c-text);
  border-color: var(--c-border);
}

/* 6. Mobile Responsiveness */
@media (max-width: 700px) {
  .page--tool-page #ui-result-container .result-comparison-card .comp-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  /* Rotate arrow for vertical layout */
  .page--tool-page #ui-result-container .result-comparison-card .delta-arrow {
    transform: rotate(90deg);
    margin: 0.25rem 0;
  }
  /* Make the Delta section tighter vertically */
  .page--tool-page #ui-result-container .result-comparison-card .comp-delta {
    margin: -0.5rem 0; /* Pull items closer */
  }
  /* Adjust order visually if needed (e.g. arrow between boxes) */
  .page--tool-page #ui-result-container .result-comparison-card .comp-item {
    width: 100%;
    box-sizing: border-box;
  }
}
/* ==========================================================================
   COMPONENT: TEXT / CODE BLOCK
   Target: .result-code-block
   ========================================================================== */
/* 1. Main Container */
.page--tool-page #ui-result-container .result-code-block {
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius);
  margin-bottom: 2rem;
  box-shadow: var(--tool-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Clips content to rounded corners */
  animation: fadeInRow 0.3s ease-out;
}

/* 2. Header (Label + Actions) */
.page--tool-page #ui-result-container .result-code-block .rcb-header {
  background-color: var(--c-bg-light);
  border-bottom: 1px solid var(--c-border);
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 40px;
}

.page--tool-page #ui-result-container .result-code-block .rcb-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Language Badge (Optional visual indicator) */
.page--tool-page #ui-result-container .result-code-block .rcb-lang-badge {
  font-size: 0.7rem;
  background-color: color-mix(in srgb, var(--c-text) 10%, transparent);
  color: var(--c-muted);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  text-transform: lowercase;
}

/* 3. Actions Toolbar */
.page--tool-page #ui-result-container .result-code-block .rcb-actions {
  display: flex;
  gap: 0.5rem;
}

.page--tool-page #ui-result-container .result-code-block .btn-rcb-action {
  background: transparent;
  border: 1px solid transparent;
  color: var(--c-muted);
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.page--tool-page #ui-result-container .result-code-block .btn-rcb-action:hover {
  background-color: color-mix(in srgb, var(--c-bg) 50%, transparent);
  color: var(--c-text);
  border-color: var(--c-border);
}

/* Active state for Toggle buttons (like Wrap) */
.page--tool-page #ui-result-container .result-code-block .btn-rcb-action.is-active {
  background-color: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}

/* 4. Content Area */
.page--tool-page #ui-result-container .result-code-block .rcb-content {
  position: relative;
  margin: 0;
  background-color: var(--c-bg);
  /* Optional: darker background for code blocks specifically? 
     If so: background-color: #1e1e1e; color: #e0e0e0; */
}

/* Common styles for PRE and TEXTAREA */
.page--tool-page #ui-result-container .result-code-block .rcb-code,
.page--tool-page #ui-result-container .result-code-block .rcb-editor {
  display: block;
  width: 100%;
  padding: 1rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--c-text);
  border: none;
  box-sizing: border-box;
  overflow-x: auto; /* Allow horizontal scroll */
  white-space: pre; /* Default: No wrap */
  tab-size: 4;
}

/* Wrap Modifier (Applied via JS to the element) */
.page--tool-page #ui-result-container .result-code-block .rcb-code.is-wrapped,
.page--tool-page #ui-result-container .result-code-block .rcb-editor.is-wrapped {
  white-space: pre-wrap;
  word-break: break-all; /* Ensures hashes/long strings don't break layout */
}

/* Specifics for Textarea (Editable mode) */
.page--tool-page #ui-result-container .result-code-block .rcb-editor {
  min-height: 150px;
  resize: vertical; /* Allow vertical resizing */
  background: transparent;
  outline: none;
}

.page--tool-page #ui-result-container .result-code-block .rcb-editor:focus {
  background-color: color-mix(in srgb, var(--c-accent) 2%, var(--c-bg));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c-accent) 10%, transparent);
}

/* 5. Footer / Meta Stats */
.page--tool-page #ui-result-container .result-code-block .rcb-meta {
  background-color: var(--c-bg-light);
  border-top: 1px solid var(--c-border);
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  color: var(--c-muted);
  text-align: right;
  font-family: var(--font-mono);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.page--tool-page #ui-result-container .result-code-block .rcb-stat {
  display: inline-flex;
  align-items: center;
}

.page--tool-page #ui-result-container .result-code-block .rcb-stat strong {
  font-weight: 600;
  color: var(--c-text);
  margin-left: 0.25em;
}

/* 6. Scrollbar Styling (Webkit) for the code area */
.page--tool-page #ui-result-container .result-code-block .rcb-code::-webkit-scrollbar,
.page--tool-page #ui-result-container .result-code-block .rcb-editor::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.page--tool-page #ui-result-container .result-code-block .rcb-code::-webkit-scrollbar-track,
.page--tool-page #ui-result-container .result-code-block .rcb-editor::-webkit-scrollbar-track {
  background: var(--c-bg-light);
}

.page--tool-page #ui-result-container .result-code-block .rcb-code::-webkit-scrollbar-thumb,
.page--tool-page #ui-result-container .result-code-block .rcb-editor::-webkit-scrollbar-thumb {
  background: var(--c-border);
  border-radius: 4px;
}

/* ==========================================================================
   COMPONENT: MEDIA STAGE (Visuals)
   Target: .result-media-stage
   ========================================================================== */
/* 1. Main Container */
.page--tool-page #ui-result-container .result-media-stage {
  background-color: var(--c-bg); /* Checkers pattern below overrides this for transparency */
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius);
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
  box-shadow: var(--tool-shadow);
  animation: fadeInRow 0.3s ease-out;
}

/* 2. Header (Dimensions & Mime Info) */
.page--tool-page #ui-result-container .result-media-stage .rms-header {
  background-color: var(--c-bg-light);
  border-bottom: 1px solid var(--c-border);
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--c-muted);
}

.page--tool-page #ui-result-container .result-media-stage .rms-meta-group {
  display: flex;
  gap: 1rem;
}

.page--tool-page #ui-result-container .result-media-stage .rms-tag {
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  color: var(--c-text);
}

/* 3. The Stage (Where content lives) */
.page--tool-page #ui-result-container .result-media-stage .rms-content {
  position: relative;
  width: 100%;
  min-height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Transparency Checkerboard Pattern */
  background-image: linear-gradient(45deg, #e5e5e5 25%, transparent 25%), linear-gradient(-45deg, #e5e5e5 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e5e5e5 75%), linear-gradient(-45deg, transparent 75%, #e5e5e5 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  background-color: #fff; /* Base for checkerboard */
}

/* Dark Mode Checkerboard Adjustments */
@media (prefers-color-scheme: dark) {
  .page--tool-page #ui-result-container .result-media-stage .rms-content {
    background-image: linear-gradient(45deg, #333 25%, transparent 25%), linear-gradient(-45deg, #333 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #333 75%), linear-gradient(-45deg, transparent 75%, #333 75%);
    background-color: #222;
  }
}
/* 4. Media Elements */
.page--tool-page #ui-result-container .result-media-stage img.rms-media,
.page--tool-page #ui-result-container .result-media-stage video.rms-media {
  max-width: 100%;
  max-height: 600px; /* Prevent huge vertical images */
  height: auto;
  display: block;
  object-fit: contain;
}

.page--tool-page #ui-result-container .result-media-stage audio.rms-media {
  width: 100%;
  max-width: 500px;
  margin: 2rem;
}

/* 5. Overlay Actions (Floating Buttons on Image) */
.page--tool-page #ui-result-container .result-media-stage .rms-overlay-actions {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.5rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  z-index: 10;
  transition: opacity 0.2s;
}

/* Hide actions until hover (optional preference) */
.page--tool-page #ui-result-container .result-media-stage:hover .rms-overlay-actions {
  opacity: 1;
}

.page--tool-page #ui-result-container .result-media-stage .btn-rms-action {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.page--tool-page #ui-result-container .result-media-stage .btn-rms-action:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
}

/* 6. Comparison Slider (Specific Mode) */
.page--tool-page #ui-result-container .result-media-stage.mode-slider .rms-content {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  overflow: hidden;
}

.page--tool-page #ui-result-container .result-media-stage .rms-compare-container {
  position: relative;
  width: 100%;
  height: 100%; /* Or fixed height based on JS */
  min-height: 400px; /* Fallback */
}

.page--tool-page #ui-result-container .result-media-stage .rms-compare-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover; /* Or contain */
  background-position: center;
}

.page--tool-page #ui-result-container .result-media-stage .rms-compare-overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%; /* JS updates this */
  overflow: hidden;
  border-right: 2px solid white;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

/* Handle for the slider (Visual only, JS handles logic) */
.page--tool-page #ui-result-container .result-media-stage .rms-slider-handle {
  position: absolute;
  top: 50%;
  right: -17px; /* Half width of handle */
  width: 34px;
  height: 34px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 1.2rem;
  cursor: col-resize;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transform: translateY(-50%);
}

/* 7. Footer (Primary Actions) */
.page--tool-page #ui-result-container .result-media-stage .rms-footer {
  border-top: 1px solid var(--c-border);
  padding: 1rem;
  background: var(--c-bg);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.page--tool-page #ui-result-container .result-media-stage .btn-rms-primary {
  background-color: var(--c-accent);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--tool-radius);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.page--tool-page #ui-result-container .result-media-stage .btn-rms-primary:hover {
  filter: brightness(110%);
}

/* ==========================================================================
   COMPONENT: VISUAL GRAPH (Chart)
   Target: .result-visual-graph
   ========================================================================== */
/* 1. Main Container */
.page--tool-page #ui-result-container .result-visual-graph {
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--tool-shadow);
  animation: fadeInRow 0.3s ease-out;
  display: flex;
  flex-direction: column;
}

/* 2. Header & Title */
.page--tool-page #ui-result-container .result-visual-graph .rvg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid transparent;
}

.page--tool-page #ui-result-container .result-visual-graph .rvg-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted);
  margin: 0;
}

/* Optional: Chart Controls (e.g. "Yearly" vs "Monthly" toggles) */
.page--tool-page #ui-result-container .result-visual-graph .rvg-controls {
  display: flex;
  gap: 0.5rem;
}

/* 3. Canvas Wrapper (Crucial for Chart.js Responsiveness) */
.page--tool-page #ui-result-container .result-visual-graph .rvg-canvas-wrapper {
  position: relative;
  width: 100%;
  /* Min-height ensures it doesn't collapse on empty data or mobile */
  min-height: 300px;
  height: 400px; /* Default height, can be overridden inline */
  margin-bottom: 1.5rem;
}

.page--tool-page #ui-result-container .result-visual-graph canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* 4. Custom Legend (HTML based for better responsiveness) */
.page--tool-page #ui-result-container .result-visual-graph .rvg-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: auto; /* Push to bottom if flex container grows */
  padding-top: 1rem;
  border-top: 1px dashed var(--c-border);
}

.page--tool-page #ui-result-container .result-visual-graph .rvg-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--c-text);
  cursor: pointer; /* Suggests toggling series visibility */
  transition: opacity 0.2s;
  user-select: none;
}

.page--tool-page #ui-result-container .result-visual-graph .rvg-legend-item:hover {
  opacity: 0.8;
}

/* State: Hidden Series (grayed out) */
.page--tool-page #ui-result-container .result-visual-graph .rvg-legend-item.is-hidden {
  opacity: 0.4;
  text-decoration: line-through;
}

/* The Color Dot */
.page--tool-page #ui-result-container .result-visual-graph .rvg-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--series-color, var(--c-accent));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Box style for Bar charts */
.page--tool-page #ui-result-container .result-visual-graph .rvg-legend-dot.is-box {
  border-radius: 2px;
}

/* 5. Custom Tooltip (If you implement custom HTML tooltips instead of Canvas ones) */
.page--tool-page #ui-result-container .result-visual-graph .rvg-tooltip {
  position: absolute;
  background: rgba(30, 30, 30, 0.95);
  color: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  pointer-events: none;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  z-index: 100;
  transform: translate(-50%, -100%);
  margin-top: -10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.1s;
}

.page--tool-page #ui-result-container .result-visual-graph .rvg-tooltip.is-visible {
  opacity: 1;
}

/* 6. Mobile Optimization */
@media (max-width: 600px) {
  .page--tool-page #ui-result-container .result-visual-graph {
    padding: 1rem;
  }
  .page--tool-page #ui-result-container .result-visual-graph .rvg-canvas-wrapper {
    height: 250px; /* Slightly shorter on mobile */
  }
  .page--tool-page #ui-result-container .result-visual-graph .rvg-legend {
    gap: 0.75rem;
    font-size: 0.8rem;
  }
}
/* ==========================================================================
   COMPONENT: BULK FILE LIST
   Target: .result-bulk-file-list
   ========================================================================== */
/* 1. Main Container */
.page--tool-page #ui-result-container .result-bulk-file-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
  animation: fadeInRow 0.3s ease-out;
}

/* 2. Global Action Card (Download All) */
.page--tool-page #ui-result-container .result-bulk-file-list .bfl-global-card {
  background-color: color-mix(in srgb, var(--c-bg-light) 50%, var(--c-bg));
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius);
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--tool-shadow);
}

.page--tool-page #ui-result-container .result-bulk-file-list .bfl-global-info {
  display: flex;
  flex-direction: column;
}

.page--tool-page #ui-result-container .result-bulk-file-list .bfl-global-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 0.25rem;
}

.page--tool-page #ui-result-container .result-bulk-file-list .bfl-global-meta {
  font-size: 0.85rem;
  color: var(--c-muted);
}

.page--tool-page #ui-result-container .result-bulk-file-list .btn-bfl-download-all {
  background-color: var(--c-accent);
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--tool-radius);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: filter 0.2s;
  white-space: nowrap;
}

.page--tool-page #ui-result-container .result-bulk-file-list .btn-bfl-download-all:hover {
  filter: brightness(110%);
}

/* 3. The File List */
.page--tool-page #ui-result-container .result-bulk-file-list .bfl-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* 4. Individual File Item */
.page--tool-page #ui-result-container .result-bulk-file-list .bfl-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  padding: 0.75rem;
  border-radius: var(--tool-radius);
  transition: border-color 0.2s, background-color 0.2s;
}

.page--tool-page #ui-result-container .result-bulk-file-list .bfl-item:hover {
  border-color: color-mix(in srgb, var(--c-border) 80%, var(--c-text));
  background-color: var(--c-bg-light);
}

/* 5. Item Columns */
/* A. Preview / Icon */
.page--tool-page #ui-result-container .result-bulk-file-list .bfl-preview {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background-color: var(--c-bg-light);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-border);
  color: var(--c-muted);
  font-size: 1.5rem;
}

.page--tool-page #ui-result-container .result-bulk-file-list .bfl-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* B. Meta Data (Name & Size) */
.page--tool-page #ui-result-container .result-bulk-file-list .bfl-details {
  flex: 1;
  min-width: 0; /* Enables truncation */
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.page--tool-page #ui-result-container .result-bulk-file-list .bfl-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page--tool-page #ui-result-container .result-bulk-file-list .bfl-size {
  font-size: 0.8rem;
  color: var(--c-muted);
}

/* C. Status & Actions */
.page--tool-page #ui-result-container .result-bulk-file-list .bfl-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Status: Done (Success) */
.page--tool-page #ui-result-container .result-bulk-file-list .bfl-status-done {
  color: #10b981;
  font-size: 1.2rem;
}

/* Status: Processing (Spinner) */
.page--tool-page #ui-result-container .result-bulk-file-list .bfl-status-processing {
  width: 20px;
  height: 20px;
  border: 2px solid var(--c-bg-light);
  border-top: 2px solid var(--c-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Status: Error */
.page--tool-page #ui-result-container .result-bulk-file-list .bfl-status-error {
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  background: color-mix(in srgb, #ef4444 10%, transparent);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* Download Button (Individual) */
.page--tool-page #ui-result-container .result-bulk-file-list .btn-bfl-single-dl {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--c-bg-light);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-size: 1.1rem;
}

.page--tool-page #ui-result-container .result-bulk-file-list .btn-bfl-single-dl:hover {
  background-color: var(--c-accent);
  color: white;
  border-color: var(--c-accent);
}

/* 6. Mobile Optimization */
@media (max-width: 500px) {
  .page--tool-page #ui-result-container .result-bulk-file-list .bfl-global-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .page--tool-page #ui-result-container .result-bulk-file-list .btn-bfl-download-all {
    justify-content: center;
  }
  /* Make individual items wrap if names are long or screen is tiny */
  .page--tool-page #ui-result-container .result-bulk-file-list .bfl-item {
    gap: 0.75rem;
  }
}
/* ==========================================================================
   COMPONENT: EQUATION BLOCK (LaTeX)
   Target: .result-equation-block
   ========================================================================== */
/* 1. Main Container */
.page--tool-page #ui-result-container .result-equation-block {
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius);
  margin-bottom: 2rem;
  box-shadow: var(--tool-shadow);
  animation: fadeInRow 0.3s ease-out;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 2. Header (Label) */
.page--tool-page #ui-result-container .result-equation-block .reb-header {
  background-color: var(--c-bg-light);
  border-bottom: 1px solid var(--c-border);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 3. The Math Display Area */
.page--tool-page #ui-result-container .result-equation-block .reb-math-display {
  padding: 2rem 1rem;
  text-align: center;
  overflow-x: auto;
  overflow-y: hidden;
  /* Center content if it's smaller than width */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
  background-color: var(--c-bg);
}

/* Font sizing for the math content (Targeting common library classes) */
.page--tool-page #ui-result-container .result-equation-block .reb-math-content {
  font-size: 1.5rem;
  color: var(--c-text);
  /* Fallback font if KaTeX/MathJax fails to load */
  font-family: "Times New Roman", serif;
  line-height: 1.2;
}

/* 4. Explanation Text */
.page--tool-page #ui-result-container .result-equation-block .reb-explanation {
  padding: 0 1.25rem 1.25rem 1.25rem;
  font-size: 0.95rem;
  color: var(--c-muted);
  line-height: 1.6;
  border-bottom: 1px dashed var(--c-border);
}

.page--tool-page #ui-result-container .result-equation-block .reb-explanation p:last-child {
  margin-bottom: 0;
}

/* 5. Variables Grid */
.page--tool-page #ui-result-container .result-equation-block .reb-variables {
  padding: 1rem 1.25rem;
  background-color: color-mix(in srgb, var(--c-bg-light) 40%, var(--c-bg));
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page--tool-page #ui-result-container .result-equation-block .reb-var-item {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
}

.page--tool-page #ui-result-container .result-equation-block .reb-var-symbol {
  font-family: "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  margin-right: 0.4rem;
  color: var(--c-accent);
}

.page--tool-page #ui-result-container .result-equation-block .reb-var-equals {
  margin-right: 0.4rem;
  color: var(--c-muted);
  font-size: 0.8em;
}

.page--tool-page #ui-result-container .result-equation-block .reb-var-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--c-text);
}

/* 6. Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
  .page--tool-page #ui-result-container .result-equation-block .reb-math-content {
    color: #ececec;
  }
}
/* ==========================================================================
   COMPONENT: TIMELINE / STEPS
   Target: .result-timeline
   ========================================================================== */
/* 1. Main Container */
.page--tool-page #ui-result-container .result-timeline {
  margin-bottom: 2rem;
  padding: 0.5rem;
  animation: fadeInRow 0.3s ease-out;
}

/* 2. Step Item (Vertical Default) */
.page--tool-page #ui-result-container .result-timeline .timeline-step {
  display: flex;
  position: relative;
  padding-bottom: 2rem; /* Space for the line */
}

.page--tool-page #ui-result-container .result-timeline .timeline-step:last-child {
  padding-bottom: 0;
}

/* 3. The Visual Track (Marker + Line) */
.page--tool-page #ui-result-container .result-timeline .step-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 1.25rem;
  min-width: 40px; /* Width of the marker area */
}

/* The Marker (Circle/Icon) */
.page--tool-page #ui-result-container .result-timeline .step-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--c-bg);
  border: 2px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2; /* Sit on top of the line */
  font-size: 0.9rem;
  color: var(--c-muted);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* The Connecting Line */
.page--tool-page #ui-result-container .result-timeline .step-line {
  flex: 1;
  width: 2px;
  background-color: var(--c-border);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  min-height: 20px;
}

/* Hide line for the last item */
.page--tool-page #ui-result-container .result-timeline .timeline-step:last-child .step-line {
  display: none;
}

/* 4. Content Area */
.page--tool-page #ui-result-container .result-timeline .step-content {
  flex: 1;
  padding-top: 0.25rem; /* Align text with top of marker visually */
}

.page--tool-page #ui-result-container .result-timeline .step-label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-text);
  margin-bottom: 0.25rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page--tool-page #ui-result-container .result-timeline .step-sub {
  font-size: 0.85rem;
  color: var(--c-muted);
  font-weight: 400;
  font-family: var(--font-mono);
}

.page--tool-page #ui-result-container .result-timeline .step-desc {
  font-size: 0.9rem;
  color: var(--c-muted);
  margin-top: 0.5rem;
  line-height: 1.5;
  background-color: color-mix(in srgb, var(--c-bg-light) 30%, transparent);
  padding: 0.75rem;
  border-radius: var(--tool-radius);
}

/* 5. Status Logic (The Colors) */
/* Status: COMPLETE */
.page--tool-page #ui-result-container .result-timeline .timeline-step[data-status=complete] .step-marker {
  background-color: #10b981;
  border-color: #10b981;
  color: white;
}

.page--tool-page #ui-result-container .result-timeline .timeline-step[data-status=complete] .step-line {
  background-color: #10b981; /* Solid green line connecting to next */
}

/* Status: CURRENT */
.page--tool-page #ui-result-container .result-timeline .timeline-step[data-status=current] .step-marker {
  background-color: var(--c-bg);
  border-color: var(--c-accent);
  color: var(--c-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-accent) 20%, transparent);
}

.page--tool-page #ui-result-container .result-timeline .timeline-step[data-status=current] .step-label {
  color: var(--c-accent);
}

/* Status: UPCOMING */
.page--tool-page #ui-result-container .result-timeline .timeline-step[data-status=upcoming] .step-marker {
  background-color: var(--c-bg-light);
  border-color: var(--c-border);
  color: var(--c-border);
}

.page--tool-page #ui-result-container .result-timeline .timeline-step[data-status=upcoming] .step-line {
  background: repeating-linear-gradient(to bottom, var(--c-border), var(--c-border) 4px, transparent 4px, transparent 8px);
  width: 2px;
}

/* 6. HORIZONTAL ORIENTATION MODIFIER (Desktop Only) */
/* Applied via .orientation-horizontal class on container */
@media (min-width: 768px) {
  .page--tool-page #ui-result-container .result-timeline.orientation-horizontal {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 1rem;
    overflow-x: auto; /* Safety scroll */
  }
  .page--tool-page #ui-result-container .result-timeline.orientation-horizontal .timeline-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    padding-bottom: 0;
    padding-right: 0;
    min-width: 120px; /* Prevent squishing */
  }
  /* Adjust Track for horizontal */
  .page--tool-page #ui-result-container .result-timeline.orientation-horizontal .step-track {
    flex-direction: row;
    margin-right: 0;
    margin-bottom: 1rem;
    width: 100%;
    position: relative;
    justify-content: center;
  }
  /* Rotate Line to Horizontal */
  .page--tool-page #ui-result-container .result-timeline.orientation-horizontal .step-line {
    position: absolute;
    top: 50%;
    left: 50%; /* Starts at center of this marker */
    width: 100%; /* Spans to right */
    height: 2px; /* Thickness */
    margin: 0;
    transform: translateY(-50%);
    z-index: 1;
  }
  /* Hide line on last item */
  .page--tool-page #ui-result-container .result-timeline.orientation-horizontal .timeline-step:last-child .step-line {
    display: none;
  }
  /* Dashed line fix for horizontal */
  .page--tool-page #ui-result-container .result-timeline.orientation-horizontal .timeline-step[data-status=upcoming] .step-line {
    background: repeating-linear-gradient(to right, var(--c-border), var(--c-border) 4px, transparent 4px, transparent 8px);
    height: 2px;
    width: 100%;
  }
  .page--tool-page #ui-result-container .result-timeline.orientation-horizontal .step-label {
    justify-content: center;
    flex-direction: column;
    gap: 0;
  }
}
/* ==========================================================================
   COMPONENT: METRIC GRID (Multiple Numbers)
   Target: .result-metric-grid
   ========================================================================== */
/* 1. Main Container */
.page--tool-page #ui-result-container .result-metric-grid {
  display: grid;
  /* Auto-fit columns: Min width 180px, otherwise stretch to fill */
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  animation: fadeInRow 0.3s ease-out;
}

/* 2. Individual Card Item */
.page--tool-page #ui-result-container .result-metric-grid .rmg-item {
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--tool-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Optional hover effect */
.page--tool-page #ui-result-container .result-metric-grid .rmg-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border-color: color-mix(in srgb, var(--c-border) 80%, var(--c-text));
}

/* 3. Label */
.page--tool-page #ui-result-container .result-metric-grid .rmg-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  margin-bottom: 0.75rem;
}

/* 4. Value Wrapper */
.page--tool-page #ui-result-container .result-metric-grid .rmg-value-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.2rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* The Number */
.page--tool-page #ui-result-container .result-metric-grid .rmg-value {
  font-family: var(--font-mono);
  font-size: 2.25rem; /* Large, but smaller than the Big Number Hero */
  font-weight: 700;
  color: var(--c-text);
}

/* Units / Prepend */
.page--tool-page #ui-result-container .result-metric-grid .rmg-unit {
  font-size: 1rem;
  color: var(--c-muted);
  font-weight: 500;
}

/* 5. Subtext / Addendum */
.page--tool-page #ui-result-container .result-metric-grid .rmg-sub {
  font-size: 0.8rem;
  color: var(--c-muted);
  margin-top: 0.25rem;
}

/* 6. Status Indicators (Top Border) */
.page--tool-page #ui-result-container .result-metric-grid .rmg-item[data-status=positive] {
  border-top: 3px solid #10b981;
}

.page--tool-page #ui-result-container .result-metric-grid .rmg-item[data-status=negative] {
  border-top: 3px solid #ef4444;
}

.page--tool-page #ui-result-container .result-metric-grid .rmg-item[data-status=warning] {
  border-top: 3px solid #f59e0b;
}

.page--tool-page #ui-result-container .result-metric-grid .rmg-prepend {
  font-size: 1.25rem;
  color: var(--c-muted);
  font-weight: 500;
  margin-right: 0.1em;
}

/* 7. Mobile Optimization */
@media (max-width: 450px) {
  .page--tool-page #ui-result-container .result-metric-grid {
    grid-template-columns: 1fr; /* Stack vertically on very small screens */
  }
}
/* ==========================================================================
   MODULE: ADVANCED INPUTS
   Scope: .page--tool-page #main-tool-form
   ========================================================================== */
/* Ensure wrapper exists for scope if not present in HTML */
.page--tool-page #main-tool-form {
  --inp-radius: var(--tool-radius, 8px);
  --inp-bg: var(--tool-bg-input, #f8f9fa);
  --inp-border: 1px solid #e2e8f0;
  --inp-focus: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* --- 1. ENHANCED STANDARD INPUTS --- */
.page--tool-page #main-tool-form .input-group {
  display: flex;
  align-items: stretch;
  border: var(--inp-border);
  border-radius: var(--inp-radius);
  background: var(--inp-bg);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.page--tool-page #main-tool-form .input-group:focus-within {
  box-shadow: var(--inp-focus);
  border-color: var(--c-accent);
}

.page--tool-page #main-tool-form .input-group .tool-input {
  border: none;
  box-shadow: none;
  background: transparent;
  height: 48px;
  z-index: 2;
}

.page--tool-page #main-tool-form .input-group-addon {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: rgba(0, 0, 0, 0.02);
  color: var(--c-muted);
  font-weight: 600;
  font-size: 0.9em;
  user-select: none;
}

/* --- 2. TOGGLE SWITCH --- */
.page--tool-page #main-tool-form .tool-switch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--tool-bg-card);
  border: var(--inp-border);
  border-radius: var(--inp-radius);
  cursor: pointer;
  transition: background 0.2s;
}

.page--tool-page #main-tool-form .tool-switch:hover {
  background: var(--inp-bg);
}

.page--tool-page #main-tool-form .tool-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.page--tool-page #main-tool-form .switch-track {
  width: 48px;
  height: 26px;
  background: #cbd5e1;
  border-radius: 99px;
  position: relative;
  transition: background 0.3s ease;
}

.page--tool-page #main-tool-form .switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.page--tool-page #main-tool-form .tool-switch input:checked + .switch-track {
  background: var(--c-accent);
}

.page--tool-page #main-tool-form .tool-switch input:checked + .switch-track::after {
  transform: translateX(22px);
}

/* --- 3. DYNAMIC SUBSETS (COMPLEX CARDS) --- */
.page--tool-page #main-tool-form .dynamic-group-wrapper {
  background: rgba(0, 0, 0, 0.02);
  padding: 1.5rem;
  border-radius: var(--inp-radius);
  border: 1px dashed var(--c-border);
  margin-bottom: 2rem;
}

.page--tool-page #main-tool-form .dynamic-entry-card {
  background: var(--tool-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--inp-radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.page--tool-page #main-tool-form .entry-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-border);
}

.page--tool-page #main-tool-form .entry-count {
  font-weight: 800;
  color: var(--c-muted);
  font-family: var(--font-mono);
}

/* --- 4. FILE DROPZONE --- */
.page--tool-page #main-tool-form .tool-dropzone {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: var(--inp-radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all 0.2s;
  background: var(--inp-bg);
}

.page--tool-page #main-tool-form .tool-dropzone:hover,
.page--tool-page #main-tool-form .tool-dropzone.drag-over {
  border-color: var(--c-accent);
  background: color-mix(in srgb, var(--c-accent) 5%, white);
}

.page--tool-page #main-tool-form .tool-dropzone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.page--tool-page #main-tool-form .dz-content {
  pointer-events: none; /* Let clicks pass to input */
}

.page--tool-page #main-tool-form .dz-preview-list {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.page--tool-page #main-tool-form .dz-file-tag {
  font-size: 0.8rem;
  padding: 4px 8px;
  background: white;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Tools Category Pages (e.g. Financial Tools)
   Scoped: .page--tools-category
   ========================================================================== */
.page--tools-category .tools-breadcrumbs {
  max-width: 1100px;
  margin: 0 auto 1rem;
  color: var(--c-muted);
  font-size: 0.9rem;
}

.page--tools-category .tools-breadcrumbs a {
  color: var(--c-muted);
  text-decoration: none;
}

.page--tools-category .tools-breadcrumbs a:hover {
  color: var(--c-accent);
  text-decoration: underline;
}

.page--tools-category .tools-cat-hero {
  max-width: 980px;
  margin: 0 auto 2rem;
  padding: 2.25rem 0 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--c-border);
  background: radial-gradient(circle at 50% 0%, var(--c-bg-light) 0%, var(--c-bg) 70%);
}

.page--tools-category .tools-cat-hero h1 {
  margin: 0 0 0.75rem 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

.page--tools-category .tools-cat-hero .text-lead {
  margin: 0 auto 1.25rem;
  max-width: 70ch;
  color: var(--c-muted);
  font-size: 1.1rem;
}

.page--tools-category .tools-cat-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* Optional outline button variant (matches your about page convention) */
.page--tools-category .button--outline {
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-text);
}

.page--tools-category .button--outline:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: transparent;
}

.page--tools-category .tools-cat-note {
  max-width: 80ch;
  margin: 0.5rem auto 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--c-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--c-bg-light) 70%, var(--c-bg));
  color: var(--c-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.page--tools-category .tools-cat-note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Sections */
.page--tools-category .tools-cat-section {
  max-width: 1100px;
  margin: 2rem auto;
}

.page--tools-category .tools-cat-section-head h2 {
  margin: 0 0 0.35rem 0;
  font-size: 1.45rem;
}

.page--tools-category .tools-subtext {
  margin: 0;
  color: var(--c-muted);
}

/* Shared grid patterns */
.page--tools-category .tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 720px) {
  .page--tools-category .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1040px) {
  .page--tools-category .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.page--tools-category .tools-grid > * {
  min-width: 0;
}

/* Featured tool items */
.page--tools-category .tool-item {
  display: block;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--c-text);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
}

.page--tools-category .tool-item:hover {
  border-color: var(--c-accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.page--tools-category .tool-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.page--tools-category .tool-item h3 {
  margin: 0;
  font-size: 1.05rem;
}

.page--tools-category .tool-item p {
  margin: 0 0 0.8rem 0;
  color: var(--c-muted);
  line-height: 1.6;
}

.page--tools-category .tool-item-meta {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c-bg-light) 60%, var(--c-bg));
  white-space: nowrap;
}

.page--tools-category .tool-item-cta {
  font-weight: 800;
  color: var(--c-accent);
}

/* Subcategory cards */
.page--tools-category .tool-cat-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  height: 100%;
}

.page--tools-category .tool-cat-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.05rem;
}

.page--tools-category .tool-cat-card p {
  margin: 0 0 0.9rem 0;
  color: var(--c-muted);
  line-height: 1.6;
}

/* Chips */
.page--tools-category .tool-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: flex-start;
}

.page--tools-category .tool-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: color-mix(in srgb, var(--c-bg-light) 65%, var(--c-bg));
  color: var(--c-text);
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page--tools-category .tool-chip:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  text-decoration: none;
}

.page--tools-category .tool-chip--muted {
  color: var(--c-muted);
  opacity: 0.95;
}

/* Copy block */
.page--tools-category .tools-cat-copy p {
  color: color-mix(in srgb, var(--c-text) 88%, transparent);
  line-height: 1.7;
}

/* FAQ */
.page--tools-category .tools-faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 900px) {
  .page--tools-category .tools-faq-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.page--tools-category .tools-faq-item {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 1.1rem;
}

.page--tools-category .tools-faq-item h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.page--tools-category .tools-faq-item p {
  margin: 0;
  color: var(--c-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Tools Index Page (scoped to .page--tools-index)
   ========================================================================== */
.page--tools-index .tools-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--c-border);
  background: radial-gradient(circle at 50% 0%, var(--c-bg-light) 0%, var(--c-bg) 70%);
}

.page--tools-index .tools-hero-inner {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.page--tools-index .tools-hero h1 {
  margin: 0 0 0.75rem 0;
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  letter-spacing: -0.02em;
}

.page--tools-index .tools-hero .text-lead {
  color: var(--c-muted);
  font-size: 1.1rem;
  margin: 0 auto 1.25rem;
  max-width: 68ch;
}

.page--tools-index .tools-hero-actions {
  display: grid;
  justify-items: center;
}

.page--tools-index .tools-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  width: 100%;
  max-width: 700px;
  align-items: center; /* important: avoids weird vertical stretch */
}

/* Fix global input defaults for this specific search input */
.page--tools-index .tools-search input {
  width: 100%;
  margin: 0 !important; /* kills base.css bottom margin */
  height: 48px;
  padding: 0 1rem !important;
  border-radius: 14px;
  background: color-mix(in srgb, var(--c-bg-light) 70%, var(--c-bg));
  border: 1px solid var(--c-border);
}

/* Match button height so it looks like a unified control */
.page--tools-index .tools-search button {
  height: 48px;
  padding: 0 1.1rem !important;
  border-radius: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Optional: if mobile feels tight, stack search */
@media (max-width: 520px) {
  .page--tools-index .tools-search {
    grid-template-columns: 1fr;
  }
  .page--tools-index .tools-search button {
    width: 100%;
  }
}
.page--tools-index .tools-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin: 1.1rem auto 0.75rem;
  max-width: 760px;
}

.page--tools-index .tools-feature {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c-bg-light) 60%, var(--c-bg));
  font-size: 0.9rem;
  color: var(--c-muted);
}

.page--tools-index .tools-feature strong {
  color: var(--c-text);
  font-weight: 700;
}

.page--tools-index .tools-feature .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--c-accent);
  opacity: 0.9;
}

.page--tools-index .tools-hero-note {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  color: var(--c-muted);
}

/* Sections */
.page--tools-index .tools-section {
  max-width: 1100px;
  margin: 2.25rem auto;
}

.page--tools-index .tools-section-head {
  margin-bottom: 1rem;
}

.page--tools-index .tools-section h2 {
  margin: 0 0 0.35rem 0;
  font-size: 1.45rem;
}

.page--tools-index .tools-subtext {
  margin: 0;
  color: var(--c-muted);
}

/* Grid */
.page--tools-index .tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 720px) {
  .page--tools-index .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1040px) {
  .page--tools-index .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* Category cards */
.page--tools-index .tool-cat-card {
  display: block;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--c-text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
}

.page--tools-index .tool-cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-accent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

.page--tools-index .tool-cat-top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.75rem;
}

.page--tools-index .tool-cat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--c-bg-light) 70%, var(--c-bg));
  border: 1px solid var(--c-border);
  font-size: 1.25rem;
  flex: 0 0 auto;
}

/* Robust text wrapping inside a flex row */
.page--tools-index .tool-cat-title {
  display: grid;
  gap: 0.15rem;
  min-width: 0; /* CRITICAL: prevents overflow in flex */
}

.page--tools-index .tool-cat-card h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.page--tools-index .tool-cat-count {
  font-size: 0.85rem;
  color: var(--c-muted);
  display: inline-block;
}

.page--tools-index .tool-cat-card p {
  margin: 0 0 0.9rem 0;
  color: var(--c-muted);
  line-height: 1.6;
}

/* Tool chips (examples) */
.page--tools-index .tool-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  align-items: flex-start;
}

.page--tools-index .tool-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: color-mix(in srgb, var(--c-bg-light) 65%, var(--c-bg));
  color: var(--c-text);
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  max-width: 100%;
}

.page--tools-index .tool-chip:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  text-decoration: none;
  cursor: pointer;
}

.page--tools-index .tool-chip--muted {
  color: var(--c-muted);
  opacity: 0.95;
}

.page--tools-index .tool-cat-cta {
  font-weight: 800;
  color: var(--c-accent);
}

/* Featured tools cards */
.page--tools-index .tools-grid--tools .tool-item {
  display: block;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--c-text);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
}

.page--tools-index .tools-grid--tools .tool-item:hover {
  border-color: var(--c-accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.page--tools-index .tool-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.page--tools-index .tool-item h3 {
  margin: 0;
  font-size: 1.05rem;
}

.page--tools-index .tool-item p {
  margin: 0 0 0.8rem 0;
  color: var(--c-muted);
  line-height: 1.6;
}

.page--tools-index .tool-item-meta {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c-bg-light) 60%, var(--c-bg));
  white-space: nowrap;
}

.page--tools-index .tool-item-cta {
  font-weight: 800;
  color: var(--c-accent);
}

/* FAQ */
.page--tools-index .tools-faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 900px) {
  .page--tools-index .tools-faq-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.page--tools-index .tools-faq-item {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 1.1rem;
}

.page--tools-index .tools-faq-item h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.page--tools-index .tools-faq-item p {
  margin: 0;
  color: var(--c-muted);
  line-height: 1.6;
}

/* Bottom disclaimer */
.page--tools-index .tools-disclaimer {
  margin: 1rem 0 0;
  color: var(--c-muted);
  font-size: 0.9rem;
}

.page--tools-index .tools-disclaimer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Card is no longer an <a> */
.page--tools-index .tool-cat-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
  min-width: 0;
}

.page--tools-index .tool-cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-accent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
}

/* Main link block inside the card */
.page--tools-index .tool-cat-mainlink {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.page--tools-index .tool-cat-mainlink:hover {
  text-decoration: none;
}

/* Ensure grid items can shrink (prevents rare overflow) */
.page--tools-index .tools-grid > * {
  min-width: 0;
}

/* Make CTA link look like before */
.page--tools-index .tool-cat-cta {
  display: inline-block;
  margin-top: 0.6rem;
  font-weight: 800;
  color: var(--c-accent);
  text-decoration: none;
}

.page--tools-index .tool-cat-cta:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page--tool-page {
  /* ==========================================================================
     TOOL PAGE STRUCTURAL LAYOUT
     ========================================================================== */
  /* The Main Split Wrapper (Mobile First) */
  /* The Card Wrapper */
  /* CRITICAL: Prevents Chart.js and Tables from breaking the grid width */
  /* Form Input Rows (Places APR and Years side-by-side) */
  /* ==========================================================================
     LAYOUT: HYBRID (Split Top, Full-Width Bottom)
     ========================================================================== */
  /* Mobile First: Everything stacks */
}
.page--tool-page .tool-layout--split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
  /* Desktop Split View: Form on Left (360px), Results on Right (1fr) */
}
@media (min-width: 900px) {
  .page--tool-page .tool-layout--split {
    grid-template-columns: 360px minmax(0, 1fr);
  }
}
.page--tool-page .tool-card {
  background: var(--c-bg, #ffffff);
  border: 1px solid var(--c-border, #e2e8f0);
  border-radius: var(--tool-radius, 12px);
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.page--tool-page .tool-result-section {
  min-width: 0;
  overflow: hidden;
}
.page--tool-page .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  /* Stack on tiny mobile screens */
}
@media (max-width: 500px) {
  .page--tool-page .form-row-2 {
    grid-template-columns: 1fr;
  }
}
.page--tool-page .tool-layout--hybrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
  /* Make the empty state look like a card, since we are dissolving its parent */
  /* Desktop: The Magic Grid */
}
.page--tool-page .tool-layout--hybrid .state-empty {
  background: color-mix(in srgb, var(--c-bg-light) 50%, transparent);
  border: 1px dashed var(--c-border);
  border-radius: var(--tool-radius);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--c-muted);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 900px) {
  .page--tool-page .tool-layout--hybrid {
    grid-template-columns: 360px minmax(0, 1fr);
    /* 1. DISSOLVE THE WRAPPERS
       This makes the individual result blocks direct children of the main grid */
    /* 2. FORM: Locks to the left column */
    /* 3. SMALL OUTPUTS: Lock to the right column */
    /* 4. LARGE OUTPUTS: Break out and span full width! */
  }
  .page--tool-page .tool-layout--hybrid > .tool-result-section,
  .page--tool-page .tool-layout--hybrid #ui-result-container {
    display: contents;
  }
  .page--tool-page .tool-layout--hybrid > .tool-card:first-child {
    grid-column: 1/2;
  }
  .page--tool-page .tool-layout--hybrid .state-empty,
  .page--tool-page .tool-layout--hybrid .result-big-number,
  .page--tool-page .tool-layout--hybrid .result-metric-grid,
  .page--tool-page .tool-layout--hybrid .result-comparison-card {
    grid-column: 2/3;
  }
  .page--tool-page .tool-layout--hybrid .result-smart-table,
  .page--tool-page .tool-layout--hybrid .result-visual-graph,
  .page--tool-page .tool-layout--hybrid .result-media-stage {
    grid-column: 1/-1; /* Spans from first line to last line */
    width: 100%;
    margin-top: 1rem;
  }
}

/* ==========================================================================
   BLOG PUBLIC PAGES
   Scope: .page--blog-index, .page--blog-show
   ========================================================================== */
.page--blog-index {
  /* Universal Grid for Categories & Posts */
  /* --- THE EDITORIAL CARD SYSTEM --- */
}
.page--blog-index .blog-header {
  text-align: center;
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 3rem;
}
.page--blog-index .blog-header h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}
.page--blog-index .editorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-bottom: 5rem;
}
.page--blog-index .editorial-card {
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius, 12px);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: var(--c-text);
  position: relative;
  /* Modifier for Category variants to make them look distinct if desired */
}
.page--blog-index .editorial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: color-mix(in srgb, var(--c-accent) 40%, var(--c-border));
}
.page--blog-index .editorial-card:hover .ec-image img {
  transform: scale(1.05);
}
.page--blog-index .editorial-card .ec-image {
  /* 1. Force strict dimensions so Flexbox cannot squish it */
  flex: 0 0 220px;
  width: 100%;
  position: relative;
  background: color-mix(in srgb, var(--c-bg-light) 40%, var(--c-bg));
  /* 2. Strictly clip anything that tries to escape */
  overflow: hidden !important;
  border-bottom: 1px solid var(--c-border);
}
.page--blog-index .editorial-card .ec-image img {
  /* 3. Absolutely position the image so it ignores all margins/padding */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 4. Reset any global margins/padding that might exist */
  margin: 0;
  padding: 0;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.page--blog-index .editorial-card .ec-image .ec-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-family: var(--font-mono);
  font-weight: bold;
  color: color-mix(in srgb, var(--c-muted) 50%, transparent);
}
.page--blog-index .editorial-card .ec-image .ec-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.page--blog-index .editorial-card .ec-image .ec-link-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
}
.page--blog-index .editorial-card .ec-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.page--blog-index .editorial-card .ec-content h2, .page--blog-index .editorial-card .ec-content h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
  line-height: 1.35;
}
.page--blog-index .editorial-card .ec-content h2 a, .page--blog-index .editorial-card .ec-content h3 a {
  color: var(--c-text);
  text-decoration: none;
  /* Makes the text section of the card clickable */
}
.page--blog-index .editorial-card .ec-content h2 a::after, .page--blog-index .editorial-card .ec-content h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
}
.page--blog-index .editorial-card .ec-content .ec-meta {
  font-size: 0.85rem;
  color: var(--c-muted);
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}
.page--blog-index .editorial-card .ec-content .ec-desc {
  color: color-mix(in srgb, var(--c-text) 80%, transparent);
  margin: 0;
  line-height: 1.6;
  font-size: 0.95rem;
  /* Perfect 3-line truncation */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.page--blog-index .editorial-card.is-category .ec-content h3 {
  color: var(--c-accent);
}

/* ==========================================================================
   BLOG SHOW ARTICLE
   Scope: .page--blog-show
   ========================================================================== */
.page--blog-show {
  /* Author Bios */
}
.page--blog-show .blog-article {
  max-width: 800px;
  margin: 4rem auto 6rem;
}
.page--blog-show .article-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--c-border);
}
.page--blog-show .article-header .cat-tag {
  display: inline-block;
  background: color-mix(in srgb, var(--c-accent) 10%, transparent);
  color: var(--c-accent);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  margin-bottom: 1rem;
  transition: filter 0.2s;
}
.page--blog-show .article-header .cat-tag:hover {
  filter: brightness(1.2);
}
.page--blog-show .article-header h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.page--blog-show .article-header .article-meta {
  font-family: var(--font-mono);
  color: var(--c-muted);
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.9rem;
}
.page--blog-show .article-hero-img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--tool-radius);
  margin-bottom: 3rem;
  border: 1px solid var(--c-border);
}
.page--blog-show .article-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: color-mix(in srgb, var(--c-text) 90%, transparent);
}
.page--blog-show .article-content h2, .page--blog-show .article-content h3, .page--blog-show .article-content h4 {
  color: var(--c-text);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.page--blog-show .article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--tool-radius);
  margin: 2rem 0;
  border: 1px solid var(--c-border);
}
.page--blog-show .article-content p {
  margin-bottom: 1.5rem;
}
.page--blog-show .author-bio-card {
  margin-top: 5rem;
  padding: 2rem;
  background: var(--c-bg-light);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius);
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
@media (max-width: 600px) {
  .page--blog-show .author-bio-card {
    flex-direction: column;
    text-align: center;
  }
}
.page--blog-show .author-bio-card .author-pic-wrap {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.page--blog-show .author-bio-card .author-pic-wrap img, .page--blog-show .author-bio-card .author-pic-wrap .author-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--c-bg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.page--blog-show .author-bio-card .author-pic-wrap .author-placeholder {
  background: var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-muted);
}
.page--blog-show .author-bio-card .author-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
}
.page--blog-show .author-bio-card .author-info .author-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--c-muted);
  margin-bottom: 0.5rem;
}
@media (max-width: 600px) {
  .page--blog-show .author-bio-card .author-info .author-stats {
    justify-content: center;
  }
}
.page--blog-show .author-bio-card .author-info p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--c-text) 80%, transparent);
}

/* ==========================================================================
   ADMIN LAYOUT
   ========================================================================== */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 4rem;
}
@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr; /* Stacks the sidebar on top of content on mobile */
  }
}

.admin-sidebar {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius, 12px);
  padding: 1.5rem;
  position: sticky;
  top: 2rem;
}
.admin-sidebar__group {
  margin-bottom: 1.5rem;
}
.admin-sidebar__group:last-child {
  margin-bottom: 0;
}
.admin-sidebar__title {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted);
  margin-bottom: 0.75rem;
}
.admin-sidebar__link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--c-text);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.admin-sidebar__link:hover {
  background: var(--c-bg-light);
}
.admin-sidebar__link.is-active {
  background: color-mix(in srgb, var(--c-accent) 15%, transparent);
  color: var(--c-accent);
  font-weight: 600;
}

.admin-content {
  /* min-width: 0 is a CSS Grid trick that prevents wide tables from blowing out the layout */
  min-width: 0;
}

/* ==========================================================================
   ADMIN DASHBOARD
   Scope: .page--admin-dashboard
   ========================================================================== */
.page--admin-dashboard .admin-container {
  max-width: 1000px;
  margin: 3rem auto 6rem;
}
.page--admin-dashboard .admin-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 1.5rem;
}
.page--admin-dashboard .admin-header h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}
.page--admin-dashboard .admin-header .text-lead {
  color: var(--c-muted);
  font-size: 1.1rem;
  margin: 0;
}
.page--admin-dashboard .admin-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .page--admin-dashboard .admin-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.page--admin-dashboard .admin-card {
  display: flex;
  align-items: center;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius, 12px);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--c-text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}
.page--admin-dashboard .admin-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.page--admin-dashboard .admin-card:hover .admin-card-arrow {
  color: var(--c-accent);
  transform: translateX(4px);
}
.page--admin-dashboard .admin-card-icon {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--c-bg-light) 60%, var(--c-bg));
  border: 1px solid var(--c-border);
  border-radius: 12px;
  margin-right: 1.5rem;
}
.page--admin-dashboard .admin-card-content {
  flex: 1;
  min-width: 0; /* Prevents text overflow breaking the flex layout */
}
.page--admin-dashboard .admin-card-content h2 {
  font-size: 1.15rem;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}
.page--admin-dashboard .admin-card-content p {
  font-size: 0.9rem;
  color: var(--c-muted);
  margin: 0;
  line-height: 1.5;
}
.page--admin-dashboard .admin-card-arrow {
  font-size: 1.5rem;
  color: var(--c-muted);
  margin-left: 1rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

/* ==========================================================================
   ADMIN BLOG PAGES
   Scope: .page--admin-blog
   ========================================================================== */
.page--admin-blog .admin-container {
  max-width: 1200px;
  margin: 3rem auto;
}
.page--admin-blog .admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.page--admin-blog .admin-header h1 {
  margin: 0;
}
.page--admin-blog .actions-cell form {
  margin: 0;
}
.page--admin-blog .form-wrapper {
  max-width: 900px;
  margin: 0 auto;
}
.page--admin-blog .tox-tinymce {
  border-radius: var(--tool-radius) !important;
  border: 1px solid var(--c-border) !important;
}

/* ==========================================================================
   ADMIN API REFERENCE
   Scope: .page--admin-api-reference
   ========================================================================== */
.page--admin-api-reference {
  /* Hub Grid */
  /* Endpoint Details */
  /* Parameter Tables */
}
.page--admin-api-reference .admin-api-container {
  max-width: 900px;
  margin: 3rem auto 6rem;
}
.page--admin-api-reference .api-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 1.5rem;
}
.page--admin-api-reference .api-header h1 {
  margin-bottom: 0.5rem;
}
.page--admin-api-reference .api-header .text-lead {
  color: var(--c-muted);
  margin: 0;
}
.page--admin-api-reference .api-module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .page--admin-api-reference .api-module-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.page--admin-api-reference .api-module-card {
  display: flex;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius, 12px);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--c-text);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.page--admin-api-reference .api-module-card:hover:not(.is-disabled) {
  transform: translateY(-3px);
  border-color: var(--c-accent);
  box-shadow: var(--tool-shadow);
}
.page--admin-api-reference .api-module-card.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--c-bg-light);
}
.page--admin-api-reference .module-icon {
  font-size: 2rem;
  margin-right: 1.25rem;
}
.page--admin-api-reference .module-content h2 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem 0;
}
.page--admin-api-reference .module-content p {
  font-size: 0.9rem;
  color: var(--c-muted);
  margin: 0;
  line-height: 1.5;
}
.page--admin-api-reference .api-endpoint-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--tool-radius, 12px);
  margin-bottom: 2rem;
  overflow: hidden;
}
.page--admin-api-reference .endpoint-header {
  background: var(--c-bg-light);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.page--admin-api-reference .endpoint-header .method {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}
.page--admin-api-reference .endpoint-header .method.badge-post {
  background: #dbeafe;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
}
.page--admin-api-reference .endpoint-header .method.badge-get {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.page--admin-api-reference .endpoint-header .method.badge-put {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.page--admin-api-reference .endpoint-header .method.badge-del {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.page--admin-api-reference .endpoint-header .url {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  word-break: break-all;
}
.page--admin-api-reference .endpoint-body {
  padding: 1.5rem;
}
.page--admin-api-reference .endpoint-body h3 {
  margin-top: 0;
  font-size: 1.25rem;
}
.page--admin-api-reference .endpoint-body h4 {
  font-size: 1rem;
  margin: 2rem 0 1rem;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 0.5rem;
}
.page--admin-api-reference .endpoint-body pre {
  background: #1e1e1e;
  color: #e0e0e0;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  border: none;
}
.page--admin-api-reference .endpoint-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}
.page--admin-api-reference .api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.page--admin-api-reference .api-table th, .page--admin-api-reference .api-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--c-border);
}
.page--admin-api-reference .api-table th {
  background: var(--c-bg-light);
  color: var(--c-muted);
  font-weight: 600;
}
.page--admin-api-reference .api-table code {
  background: var(--c-bg-light);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--c-accent);
}
.page--admin-api-reference .api-table .req-yes {
  color: #b91c1c;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
}
.page--admin-api-reference .api-table .req-no {
  color: var(--c-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

/*# sourceMappingURL=app-7d1043473d.output.css.map */
