/* ===========================================================================
   Pocketools — design system
   ---------------------------------------------------------------------------
   Tailwind (built locally to css/tailwind.css) provides layout and spacing
   utilities. This file owns the two things utilities cannot:

   1. The semantic colour tokens, as CSS custom properties, so one set of class
      names — bg-surface, text-muted, border-border — is correct in both light
      and dark mode and the markup needs no `dark:` variants.
   2. Component classes (.btn, .card, .field, .panel, .badge…), so a button is
      one class rather than fifteen utilities repeated across 31 tools.

   Load order is deliberate and load-bearing: this file first, Tailwind second,
   so a utility can always override a component. Reversed, `.empty-state
   { display: flex }` beats `.hidden { display: none }`.

   Everything is deliberately low-contrast in its decoration and high-contrast
   in its text. Colour comes from one place: each category carries its own hue
   (`--tile`, set inline from the registry), so an icon tile, a card's hover
   glow and a tool page header all agree without per-category CSS.
   ======================================================================== */

:root {
  color-scheme: light;

  /* Cool slate neutrals: a touch of blue keeps large white areas from
     reading as flat grey, and pairs with the indigo accent. */
  --bg: 247 248 252;
  --bg-elevated: 255 255 255;
  --surface: 255 255 255;
  --surface-2: 241 244 249;
  --surface-3: 228 233 242;

  --border: 226 231 240;
  --border-strong: 200 208 222;

  --fg: 15 23 42;
  --fg-muted: 71 85 105;
  --fg-subtle: 100 112 135;

  --accent: 79 70 229;
  --accent-hover: 67 56 202;
  --accent-fg: 255 255 255;
  --accent-soft: 238 240 255;
  --accent-ring: 129 140 248;
  /* Second stop for the few gradients (hero headline, primary button). */
  --accent-2: 168 85 247;

  --success: 21 128 61;
  --success-soft: 236 253 243;
  --warning: 180 83 9;
  --warning-soft: 255 250 235;
  --danger: 190 18 60;
  --danger-soft: 255 241 242;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.05);
  --shadow-md: 0 10px 30px -12px rgb(15 23 42 / 0.18), 0 2px 6px -2px rgb(15 23 42 / 0.06);
  --shadow-lg: 0 24px 60px -20px rgb(15 23 42 / 0.28);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}


/* --------------------------------------------------------------------- base */

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

/* A flat single-colour page reads as cheap at this size, so the body carries
   two quiet layers instead of the bg-bg utility: a top-anchored lightening
   that gives the page a sense of depth, and a very fine grain so large
   stretches of empty surface don't look like a solid PNG fill. Both are
   subtle enough to disappear next to actual content — this is atmosphere,
   not decoration competing for attention. */
body {
  font-family: var(--font-sans);
  font-feature-settings: 'cv11', 'ss01';
  font-variation-settings: 'opsz' 32;
  background-color: rgb(var(--bg));
  background-image:
    radial-gradient(60% 40% at 15% 0%, rgb(var(--accent) / 0.07) 0%, transparent 70%),
    radial-gradient(50% 35% at 90% 5%, rgb(var(--accent-2) / 0.06) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.15'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, repeat;
}

code,
kbd,
pre,
samp,
.font-mono {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
}

::selection {
  background: rgb(var(--accent) / 0.25);
}

/* One consistent focus treatment everywhere. Never removed, only shaped. */
:focus-visible {
  outline: 2px solid rgb(var(--accent-ring));
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  background: rgb(var(--accent));
  color: rgb(var(--accent-fg));
  font-size: 0.875rem;
  font-weight: 500;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* Scrollbars: present, but quiet. */
* {
  scrollbar-width: thin;
  scrollbar-color: rgb(var(--border-strong)) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgb(var(--border-strong));
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 8px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgb(var(--fg-subtle));
  background-clip: padding-box;
}

/* Icons.
   Each icon is an <svg class="icon"><use href="#i-name"></use></svg> pointing
   at the inlined sprite. Presentation attributes on the sprite's root element
   do NOT apply to content referenced through <use>, so the stroke styling has
   to arrive as *inherited CSS properties* on the referencing element — which
   do cross into the referenced content. Without this, every icon renders as a
   filled black blob. */
.icon {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------- components */

.card {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
}

.card-hover {
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.card-hover:hover {
  border-color: rgb(var(--tile, var(--accent)) / 0.45);
  box-shadow: var(--shadow-md), 0 10px 30px -14px rgb(var(--tile, var(--accent)) / 0.45);
}
@media (hover: hover) {
  .card-hover:hover {
    transform: translateY(-2px);
  }
}

.panel {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid rgb(var(--border));
  background: rgb(var(--surface-2));
  min-height: 2.875rem;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(var(--fg-muted));
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Result metadata can be long ("1024 addresses · private (RFC 1918)"), and it
   must never push the panel title onto a second line. */
.panel-title [data-meta] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Buttons ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4375rem;
  padding: 0.5rem 0.875rem;
  min-height: 2.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  user-select: none;
}
.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, rgb(var(--accent)) 0%, rgb(var(--accent-2)) 130%);
  color: rgb(var(--accent-fg));
  box-shadow: 0 6px 18px -8px rgb(var(--accent) / 0.8), inset 0 1px 0 rgb(255 255 255 / 0.18);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, rgb(var(--accent-hover)) 0%, rgb(var(--accent-2)) 110%);
  box-shadow: 0 8px 22px -8px rgb(var(--accent) / 0.9), inset 0 1px 0 rgb(255 255 255 / 0.2);
}

.btn-secondary {
  background: rgb(var(--surface));
  border-color: rgb(var(--border));
  color: rgb(var(--fg));
}
.btn-secondary:hover:not(:disabled) {
  background: rgb(var(--surface-2));
  border-color: rgb(var(--border-strong));
}

.btn-ghost {
  background: transparent;
  color: rgb(var(--fg-muted));
}
.btn-ghost:hover:not(:disabled) {
  background: rgb(var(--surface-2));
  color: rgb(var(--fg));
}

.btn-danger {
  background: transparent;
  border-color: rgb(var(--border));
  color: rgb(var(--danger));
}
.btn-danger:hover:not(:disabled) {
  background: rgb(var(--danger-soft));
  border-color: rgb(var(--danger) / 0.4);
}

.btn-sm {
  padding: 0.3125rem 0.625rem;
  min-height: 1.875rem;
  font-size: 0.8125rem;
}

.btn-icon {
  padding: 0.4375rem;
  min-height: 2rem;
  min-width: 2rem;
}

/* Touch targets stay comfortable on small screens. */
@media (max-width: 640px) {
  .btn {
    min-height: 2.5rem;
  }
  .btn-icon {
    min-height: 2.5rem;
    min-width: 2.5rem;
  }
}

/* Form controls ------------------------------------------------------------ */

.field {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  min-height: 2.25rem;
  background: rgb(var(--bg-elevated));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius-sm);
  color: rgb(var(--fg));
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.12s ease;
}
.field:hover {
  border-color: rgb(var(--border-strong));
}
.field:focus {
  border-color: rgb(var(--accent));
  outline: none;
  box-shadow: 0 0 0 3px rgb(var(--accent) / 0.15);
}
.field::placeholder {
  color: rgb(var(--fg-subtle));
}
.field[aria-invalid='true'] {
  border-color: rgb(var(--danger));
}
.field-mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

select.field {
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
}

.label {
  display: block;
  margin-bottom: 0.3125rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgb(var(--fg-muted));
}

.hint {
  margin-top: 0.3125rem;
  font-size: 0.75rem;
  color: rgb(var(--fg-subtle));
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgb(var(--fg));
  cursor: pointer;
  padding: 0.25rem 0;
}
.checkbox-row input[type='checkbox'],
.checkbox-row input[type='radio'] {
  width: 1rem;
  height: 1rem;
  accent-color: rgb(var(--accent));
  flex: none;
  cursor: pointer;
}

/* Segmented control (used for modes and options) -------------------------- */

.segmented {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  background: rgb(var(--surface-2));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius-sm);
}
.segmented > button {
  padding: 0.3125rem 0.6875rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgb(var(--fg-muted));
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}
.segmented > button:hover {
  color: rgb(var(--fg));
}
.segmented > button[aria-pressed='true'],
.segmented > button[aria-selected='true'] {
  background: rgb(var(--surface));
  color: rgb(var(--fg));
  box-shadow: var(--shadow-sm);
}

/* Badges + status ---------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.1875rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--border));
  background: rgb(var(--surface-2));
  color: rgb(var(--fg-muted));
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.badge-accent {
  background: rgb(var(--accent-soft));
  border-color: rgb(var(--accent) / 0.25);
  color: rgb(var(--accent));
}
.badge-success {
  background: rgb(var(--success-soft));
  border-color: rgb(var(--success) / 0.3);
  color: rgb(var(--success));
}
.badge-warning {
  background: rgb(var(--warning-soft));
  border-color: rgb(var(--warning) / 0.3);
  color: rgb(var(--warning));
}
.badge-danger {
  background: rgb(var(--danger-soft));
  border-color: rgb(var(--danger) / 0.3);
  color: rgb(var(--danger));
}

/* Inline messages: errors and successes never use browser dialogs. */
.message {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.message-error {
  background: rgb(var(--danger-soft));
  border-color: rgb(var(--danger) / 0.3);
  color: rgb(var(--danger));
}
.message-success {
  background: rgb(var(--success-soft));
  border-color: rgb(var(--success) / 0.3);
  color: rgb(var(--success));
}
.message-warning {
  background: rgb(var(--warning-soft));
  border-color: rgb(var(--warning) / 0.3);
  color: rgb(var(--warning));
}
.message-info {
  background: rgb(var(--surface-2));
  border-color: rgb(var(--border));
  color: rgb(var(--fg-muted));
}
.message-title {
  font-weight: 600;
}
.message-detail {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.85;
}

/* Keyboard hints ----------------------------------------------------------- */

kbd,
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.375rem;
  padding: 0.125rem 0.375rem;
  border-radius: 5px;
  border: 1px solid rgb(var(--border));
  border-bottom-width: 2px;
  background: rgb(var(--surface-2));
  color: rgb(var(--fg-muted));
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Editors ------------------------------------------------------------------ */

.editor-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.editor-surface {
  position: relative;
  flex: 1 1 auto;
  min-height: 14rem;
  background: rgb(var(--bg-elevated));
}

@media (min-width: 1024px) {
  .editor-surface {
    min-height: 22rem;
  }
}

.editor-textarea {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: 0.875rem;
  border: 0;
  background: transparent;
  color: rgb(var(--fg));
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  resize: vertical;
  tab-size: 2;
}
.editor-textarea:focus {
  outline: none;
}
.editor-textarea::placeholder {
  color: rgb(var(--fg-subtle));
}

/* Monaco mounts into this once (and if) it loads. Height matches the textarea
   it replaces so nothing shifts — CLS is a feature, not an afterthought. */
.monaco-host {
  width: 100%;
  min-height: 14rem;
}
@media (min-width: 1024px) {
  .monaco-host {
    min-height: 22rem;
  }
}
.monaco-host .monaco-editor,
.monaco-host .monaco-editor .overflow-guard {
  border-radius: 0;
}
.monaco-host .monaco-editor,
.monaco-host .monaco-editor-background,
.monaco-host .monaco-editor .margin {
  background-color: rgb(var(--bg-elevated)) !important;
}

.output-surface {
  padding: 0.875rem;
  margin: 0;
  overflow: auto;
  max-height: 32rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  white-space: pre;
  color: rgb(var(--fg));
  tab-size: 2;
}
.output-surface[data-wrap='true'] {
  white-space: pre-wrap;
  word-break: break-word;
}

/* Empty + loading states --------------------------------------------------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: rgb(var(--fg-subtle));
}
.empty-state-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgb(var(--surface-2));
  border: 1px solid rgb(var(--border));
  color: rgb(var(--fg-subtle));
}
.empty-state-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(var(--fg-muted));
}
.empty-state-body {
  font-size: 0.8125rem;
  max-width: 26rem;
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgb(var(--surface-2)) 25%,
    rgb(var(--surface-3)) 50%,
    rgb(var(--surface-2)) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes skeleton-shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgb(var(--border-strong));
  border-top-color: rgb(var(--accent));
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.is-busy {
  cursor: progress;
}

/* Tables ------------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.data-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgb(var(--border));
  background: rgb(var(--surface-2));
  color: rgb(var(--fg-muted));
  font-weight: 600;
  white-space: nowrap;
}
.data-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgb(var(--border));
  vertical-align: top;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover td {
  background: rgb(var(--surface-2) / 0.6);
}
.data-table .cell-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.kv-list {
  display: grid;
  gap: 0;
}
.kv-row {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgb(var(--border));
  font-size: 0.8125rem;
}
.kv-row:last-child {
  border-bottom: 0;
}
.kv-key {
  color: rgb(var(--fg-muted));
  font-weight: 500;
}
.kv-value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  word-break: break-all;
}
@media (max-width: 640px) {
  .kv-row {
    grid-template-columns: 1fr;
    gap: 0.125rem;
  }
}

/* Command palette ---------------------------------------------------------- */

/* The palette is a native <dialog>, so focus trapping, Escape-to-close and
   inert background content come from the platform instead of from script. */
.palette-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
.palette-dialog:not([open]) {
  display: none;
}
.palette-dialog::backdrop {
  background: rgb(0 0 0 / 0.5);
  backdrop-filter: blur(2px);
}
.palette-dialog > .palette {
  margin: 4rem auto 1rem;
}
@media (max-width: 640px) {
  .palette-dialog > .palette {
    margin: auto auto 0.75rem;
    max-height: 78vh;
  }
  .palette-dialog {
    display: flex;
    align-items: flex-end;
  }
  .palette-dialog:not([open]) {
    display: none;
  }
}

.palette {
  width: 100%;
  max-width: 34rem;
  max-height: min(30rem, 80vh);
  display: flex;
  flex-direction: column;
  background: rgb(var(--bg-elevated));
  border: 1px solid rgb(var(--border-strong));
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -12px rgb(0 0 0 / 0.35);
  overflow: hidden;
}

.palette-input-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgb(var(--border));
}
.palette-input {
  flex: 1;
  border: 0;
  background: transparent;
  color: rgb(var(--fg));
  font-size: 0.9375rem;
}
.palette-input:focus {
  outline: none;
}
.palette-results {
  overflow-y: auto;
  padding: 0.375rem;
}
.palette-group-label {
  padding: 0.5rem 0.625rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--fg-subtle));
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-sm);
  color: rgb(var(--fg));
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}
.palette-item[aria-selected='true'] {
  background: rgb(var(--accent-soft));
  color: rgb(var(--accent));
}
.palette-item-meta {
  margin-left: auto;
  font-size: 0.75rem;
  color: rgb(var(--fg-subtle));
}
.palette-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.875rem;
  border-top: 1px solid rgb(var(--border));
  background: rgb(var(--surface-2));
  font-size: 0.6875rem;
  color: rgb(var(--fg-subtle));
}

/* Toasts ------------------------------------------------------------------- */

#toast-region {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  background: rgb(var(--fg));
  color: rgb(var(--bg));
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.18s ease;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* Prose (tool explanations and guides) ------------------------------------ */

.prose-eup {
  color: rgb(var(--fg-muted));
  font-size: 0.9375rem;
  line-height: 1.7;
  max-width: 68ch;
}
.prose-eup > * + * {
  margin-top: 1rem;
}
.prose-eup h2 {
  margin-top: 2rem;
  color: rgb(var(--fg));
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.prose-eup h3 {
  margin-top: 1.5rem;
  color: rgb(var(--fg));
  font-size: 1rem;
  font-weight: 600;
}
.prose-eup a {
  color: rgb(var(--accent));
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose-eup a:hover {
  text-decoration-thickness: 2px;
}
.prose-eup ul,
.prose-eup ol {
  padding-left: 1.25rem;
}
.prose-eup ul {
  list-style: disc;
}
.prose-eup ol {
  list-style: decimal;
}
.prose-eup li + li {
  margin-top: 0.375rem;
}
.prose-eup code {
  padding: 0.125rem 0.3125rem;
  border-radius: 4px;
  background: rgb(var(--surface-2));
  border: 1px solid rgb(var(--border));
  font-size: 0.8125em;
  color: rgb(var(--fg));
}
.prose-eup pre {
  padding: 0.875rem;
  border-radius: var(--radius-sm);
  background: rgb(var(--surface-2));
  border: 1px solid rgb(var(--border));
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.prose-eup pre code {
  padding: 0;
  border: 0;
  background: none;
}
.prose-eup strong {
  color: rgb(var(--fg));
  font-weight: 600;
}

/* Details / FAQ ----------------------------------------------------------- */

.faq-item {
  border-bottom: 1px solid rgb(var(--border));
}
.faq-item:last-child {
  border-bottom: 0;
}
.faq-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9375rem 0;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgb(var(--fg));
  list-style: none;
}
.faq-summary::-webkit-details-marker {
  display: none;
}
.faq-summary .faq-chevron {
  transition: transform 0.15s ease;
  color: rgb(var(--fg-subtle));
  margin-top: 0.1875rem;
}
details[open] > .faq-summary .faq-chevron {
  transform: rotate(90deg);
}
.faq-body {
  padding-bottom: 1rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgb(var(--fg-muted));
  max-width: 68ch;
}

/* Ad slots ---------------------------------------------------------------- */

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 6rem;
  border: 1px dashed rgb(var(--border));
  border-radius: var(--radius);
  color: rgb(var(--fg-subtle));
  font-size: 0.75rem;
  background: rgb(var(--surface-2) / 0.5);
}

/* Utilities --------------------------------------------------------------- */

.divide-border > * + * {
  border-top: 1px solid rgb(var(--border));
}

.sr-only-focusable:not(:focus):not(:focus-within) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.grid-tools {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

.hairline {
  height: 1px;
  background: rgb(var(--border));
}

/* Reveal-on-scroll ----------------------------------------------------------
   Gated behind html.js so a page with JS disabled or broken never hides
   content behind an animation that will never fire — the class name is added
   by an inline script in base.html, before first paint. */

html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* A gentle cascade for grids that reveal together. Plain CSS has no loop, so
   the handful of above-the-fold positions are listed explicitly. */
.grid-tools > .reveal:nth-child(1),
.grid-categories > .reveal:nth-child(1) { transition-delay: 0ms; }
.grid-tools > .reveal:nth-child(2),
.grid-categories > .reveal:nth-child(2) { transition-delay: 45ms; }
.grid-tools > .reveal:nth-child(3),
.grid-categories > .reveal:nth-child(3) { transition-delay: 90ms; }
.grid-tools > .reveal:nth-child(4),
.grid-categories > .reveal:nth-child(4) { transition-delay: 135ms; }
.grid-tools > .reveal:nth-child(5),
.grid-categories > .reveal:nth-child(5) { transition-delay: 180ms; }
.grid-tools > .reveal:nth-child(6),
.grid-categories > .reveal:nth-child(6) { transition-delay: 225ms; }
.grid-tools > .reveal:nth-child(7),
.grid-categories > .reveal:nth-child(7) { transition-delay: 270ms; }
.grid-tools > .reveal:nth-child(8),
.grid-categories > .reveal:nth-child(8) { transition-delay: 315ms; }

/* Hero decoration ------------------------------------------------------------
   A quiet accent-tinted glow behind the hero copy. Built from the existing
   --accent token (no new colour), blurred low enough to read as atmosphere
   rather than a graphic, and it drifts slowly rather than sitting static. */

.hero-glow {
  position: absolute;
  inset: -15% -10% auto -10%;
  height: 28rem;
  background:
    radial-gradient(45% 55% at 25% 25%, rgb(var(--accent) / 0.14), transparent 70%),
    radial-gradient(35% 45% at 85% 15%, rgb(var(--accent) / 0.09), transparent 70%);
  filter: blur(48px);
  pointer-events: none;
  animation: hero-glow-drift 20s ease-in-out infinite alternate;
}
@keyframes hero-glow-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(3%, 4%, 0) scale(1.06); }
}

/* Icon tiles: the small icon squares on cards and headers respond when the
   card or link around them is hovered, instead of sitting inert. */
.icon-tile {
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.group:hover .icon-tile {
  transform: scale(1.08) rotate(-3deg);
}

/* Category-coloured tile. `--tile` is an RGB triple set inline from the
   category's `color`; without one it falls back to the site accent. */
.tile {
  background: rgb(var(--tile, var(--accent)) / 0.12);
  border: 1px solid rgb(var(--tile, var(--accent)) / 0.22);
  color: rgb(var(--tile, var(--accent)));
}
.group:hover .tile {
  background: rgb(var(--tile, var(--accent)) / 0.2);
}
.tile-solid {
  background: linear-gradient(140deg, rgb(var(--tile, var(--accent))) 0%, rgb(var(--tile, var(--accent)) / 0.7) 100%);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgb(var(--tile, var(--accent)) / 0.9), inset 0 1px 0 rgb(255 255 255 / 0.25);
}

/* Headline accent: the one piece of gradient text on the site. */
.text-gradient {
  background: linear-gradient(100deg, rgb(var(--accent)) 10%, rgb(var(--accent-2)) 60%, rgb(236 72 153) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hero backdrop: a faint dot grid that fades out towards the edges. */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(var(--fg) / 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}

/* The floating tool tiles on the right of the hero. */
.hero-mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.875rem;
}
.hero-mosaic > a {
  animation: float-y 7s ease-in-out infinite;
}
.hero-mosaic > a:nth-child(3n + 2) {
  animation-delay: -2.3s;
  margin-top: 1.25rem;
  margin-bottom: -1.25rem;
}
.hero-mosaic > a:nth-child(3n) {
  animation-delay: -4.6s;
}
@keyframes float-y {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

/* A card that carries its category colour along its top edge. */
.card-accent-top {
  position: relative;
  overflow: hidden;
}
.card-accent-top::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, rgb(var(--tile, var(--accent))), rgb(var(--tile, var(--accent)) / 0.2));
  opacity: 0.85;
}

/* Section eyebrow label above a heading. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(var(--accent));
}

/* A pill that frames a short message above the hero headline. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3125rem 0.75rem 0.3125rem 0.375rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--border));
  background: rgb(var(--surface) / 0.8);
  box-shadow: var(--shadow-sm);
  font-size: 0.8125rem;
  color: rgb(var(--fg-muted));
}
.pill-tag {
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  background: rgb(var(--accent-soft));
  color: rgb(var(--accent));
  font-weight: 600;
  font-size: 0.75rem;
}

/* Buttons get a light press-down instead of feeling static. */
.btn:active:not(:disabled):not([aria-disabled='true']) {
  transform: scale(0.97);
}

/* A brief highlight when a tool's result changes, so pressing Format/Run
   reads as an action with a visible effect rather than a silent DOM swap. */
@keyframes result-flash {
  from { background-color: rgb(var(--accent-soft)); }
  to { background-color: transparent; }
}
.result-flash {
  animation: result-flash 0.7s ease;
}

/* File tools ----------------------------------------------------------------
   The drop target is a <label> for the file input, so a click anywhere on it
   opens the picker with no script, and keyboard users reach the input
   through the "Add files" label in the panel head. */

.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 15rem;
  padding: 2rem 1.25rem;
  border: 2px dashed rgb(var(--tile, var(--accent)) / 0.35);
  border-radius: var(--radius);
  background:
    radial-gradient(60% 80% at 50% 0%, rgb(var(--tile, var(--accent)) / 0.08), transparent 70%),
    rgb(var(--surface-2) / 0.5);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, min-height 0.2s ease;
}
.file-drop:hover,
.file-drop.is-dragging {
  border-color: rgb(var(--tile, var(--accent)) / 0.8);
  background-color: rgb(var(--tile, var(--accent)) / 0.06);
}
.file-drop.is-dragging {
  transform: scale(1.005);
}
.file-drop.is-compact {
  min-height: 0;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 0.875rem 1rem;
  gap: 0.25rem 0.625rem;
}
.file-drop.is-compact .file-drop-icon {
  width: 2rem;
  height: 2rem;
  margin: 0;
}
.file-drop.is-compact .file-drop-icon .icon {
  width: 1rem;
  height: 1rem;
}
.file-drop.is-compact .file-drop-title {
  font-size: 0.875rem;
}
.file-drop.is-compact .file-drop-private {
  display: none;
}
.file-drop-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 0.5rem;
  border-radius: 1rem;
  background: linear-gradient(140deg, rgb(var(--tile, var(--accent))) 0%, rgb(var(--tile, var(--accent)) / 0.7) 100%);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgb(var(--tile, var(--accent)) / 0.9);
}
.file-drop-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgb(var(--fg));
}
.file-drop-hint {
  font-size: 0.8125rem;
  color: rgb(var(--fg-muted));
}
.file-drop-private {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: rgb(var(--success));
}
.file-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius-sm);
  background: rgb(var(--surface));
}
[data-output] .file-row {
  border: 0;
  border-radius: 0;
  padding: 0.625rem 0.875rem;
}
.file-thumb {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgb(var(--border));
  background:
    conic-gradient(rgb(var(--surface-2)) 25%, rgb(var(--surface)) 0 50%, rgb(var(--surface-2)) 0 75%, rgb(var(--surface)) 0) 0 0 / 10px 10px;
  color: rgb(var(--tile, var(--accent)));
}

/* ===========================================================================
   Document generators
   ---------------------------------------------------------------------------
   The form (left) uses the site's components. The document itself is paper:
   it is always light, whatever the site theme, because it is a preview of
   something that will be printed. Its only colour is --doc-accent, which the
   visitor picks. Sizes are in mm/pt so the preview and the PDF agree.
   ======================================================================== */

.doc-form .field-color {
  height: 2.25rem;
  padding: 0.1875rem;
  cursor: pointer;
}

.doc-section {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
}
.doc-section-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.doc-section-summary::-webkit-details-marker {
  display: none;
}
.doc-section-summary:hover {
  background: rgb(var(--surface-2) / 0.6);
}
.doc-section[open] > .doc-section-summary {
  border-bottom: 1px solid rgb(var(--border));
}
.doc-section[open] > .doc-section-summary .faq-chevron {
  transform: rotate(90deg);
}
.doc-section-body {
  padding: 0.875rem;
  display: grid;
  gap: 0.75rem;
}
.doc-grid {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .doc-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* A repeatable row (line item, job, earning). */
.doc-row {
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius-sm);
  background: rgb(var(--surface-2) / 0.5);
}
.doc-row + .doc-row {
  margin-top: 0.5rem;
}
.doc-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(var(--fg-subtle));
}
.doc-row .label {
  font-size: 0.75rem;
  margin-bottom: 0.1875rem;
}
.doc-row .field {
  min-height: 2rem;
  padding: 0.375rem 0.625rem;
}

/* The preview stage: an A4 sheet scaled to the panel width. */
.doc-stage-wrap {
  padding: 1rem;
  background:
    radial-gradient(rgb(var(--fg) / 0.06) 1px, transparent 1px) 0 0 / 16px 16px,
    rgb(var(--surface-2));
}
.doc-stage {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}
.doc-page {
  --doc-scale: 1;
  width: 210mm;
  min-height: 297mm;
  transform: scale(var(--doc-scale));
  transform-origin: top left;
  /* A faint dashed rule every 297mm shows where a long document will break
     onto a new sheet. */
  background: repeating-linear-gradient(
    to bottom,
    #fff 0,
    #fff calc(297mm - 1px),
    #cbd5e1 calc(297mm - 1px),
    #cbd5e1 297mm
  );
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 12px 32px -12px rgb(15 23 42 / 0.35);
}

.doc {
  --doc-accent: #4f46e5;
  --doc-ink: #0f172a;
  --doc-muted: #64748b;
  --doc-line: #e2e8f0;
  --doc-soft: #f8fafc;
  box-sizing: border-box;
  min-height: 297mm;
  /* Matches print exactly: @page gives 12mm top/bottom and 10mm sides, and
     the printed .doc adds 5mm each side, so a preview page holds the same
     273mm of content as a printed one. */
  padding: 12mm 15mm;
  color: var(--doc-ink);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 9.5pt;
  line-height: 1.5;
  background: transparent;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
}
.doc *,
.doc *::before,
.doc *::after {
  box-sizing: border-box;
}
.doc p {
  margin: 0 0 0.7em;
}
.doc h1,
.doc h2,
.doc h3,
.doc h4 {
  margin: 0;
  color: var(--doc-ink);
}
.doc ul {
  margin: 0.25em 0 0.6em;
  padding-left: 1.15em;
  list-style: disc;
}
.doc li + li {
  margin-top: 0.2em;
}
.doc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10mm;
  padding-bottom: 5mm;
  border-bottom: 2px solid var(--doc-accent);
}
.doc-brand {
  display: flex;
  align-items: flex-start;
  gap: 4mm;
  min-width: 0;
}
.doc-logo {
  max-width: 34mm;
  max-height: 18mm;
  object-fit: contain;
}
.doc-title-block {
  text-align: right;
  flex: none;
}
.doc-title {
  font-size: 22pt;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--doc-accent);
  text-transform: uppercase;
}
.doc-label {
  margin-bottom: 1.2mm;
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--doc-muted);
}
.doc-muted {
  color: var(--doc-muted);
}
.doc-strong {
  font-weight: 600;
}
.doc-text {
  white-space: normal;
}
.doc-party {
  min-width: 0;
  overflow-wrap: anywhere;
}
.doc-party-name {
  font-size: 11pt;
  font-weight: 700;
}
.doc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8mm;
}
.doc-section-gap {
  margin-top: 6mm;
}
.doc-meta {
  display: grid;
  gap: 1.2mm;
  align-content: start;
}
.doc-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 4mm;
}
.doc-meta-row span {
  color: var(--doc-muted);
}
.doc-highlight {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4mm;
  margin-top: 2mm;
  padding: 3mm 4mm;
  border-radius: 2.5mm;
  background: color-mix(in srgb, var(--doc-accent) 9%, #fff);
  color: var(--doc-accent);
}
.doc-highlight strong {
  font-size: 13pt;
  font-weight: 800;
}
.doc-table {
  width: 100%;
  margin-top: 6mm;
  border-collapse: collapse;
}
.doc-table th {
  padding: 2.4mm 2.5mm;
  background: var(--doc-accent);
  color: #fff;
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}
.doc-table th:first-child {
  border-top-left-radius: 1.5mm;
  border-bottom-left-radius: 1.5mm;
}
.doc-table th:last-child {
  border-top-right-radius: 1.5mm;
  border-bottom-right-radius: 1.5mm;
}
.doc-table td {
  padding: 2.6mm 2.5mm;
  border-bottom: 1px solid var(--doc-line);
  vertical-align: top;
}
.doc-table tr {
  break-inside: avoid;
}
.doc-table .doc-num {
  text-align: right;
  white-space: nowrap;
}
.doc-table th.doc-num {
  text-align: right;
}
.doc-item {
  font-weight: 600;
}
.doc-item-sub {
  margin-top: 0.6mm;
  font-size: 8.5pt;
  color: var(--doc-muted);
}
.doc-empty {
  padding: 8mm 0 !important;
  text-align: center;
  color: var(--doc-muted);
}
.doc-summary {
  display: grid;
  grid-template-columns: 1fr 72mm;
  gap: 8mm;
  margin-top: 5mm;
  break-inside: avoid;
}
.doc-totals {
  display: grid;
  gap: 1.4mm;
}
.doc-total-row {
  display: flex;
  justify-content: space-between;
  gap: 4mm;
  padding: 0 2.5mm;
}
.doc-total-row span:first-child {
  color: var(--doc-muted);
}
.doc-grand {
  margin-top: 1.5mm;
  padding: 2.6mm 2.5mm;
  border-radius: 1.5mm;
  background: var(--doc-accent);
  color: #fff;
  font-size: 11pt;
  font-weight: 800;
}
.doc-grand span:first-child {
  color: #fff;
}
.doc-due {
  font-weight: 800;
  color: var(--doc-accent);
}
.doc-words {
  align-self: start;
  padding: 3mm 4mm;
  border: 1px dashed var(--doc-line);
  border-radius: 2mm;
  background: var(--doc-soft);
}
.doc-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10mm;
  margin-top: 9mm;
  break-inside: avoid;
}
.doc-sign {
  min-width: 52mm;
  text-align: center;
}
.doc-sign-img {
  display: block;
  max-width: 48mm;
  max-height: 16mm;
  margin: 0 auto 1mm;
  object-fit: contain;
}
.doc-sign-space {
  height: 14mm;
}
.doc-sign-line {
  border-top: 1px solid var(--doc-ink);
  margin-bottom: 1.2mm;
}
.doc-sign-name {
  font-weight: 700;
}
/* Letters and agreements: a readable single column of prose. */
.doc-letter {
  font-size: 10.5pt;
  line-height: 1.65;
}
.doc-letter .doc-body {
  margin-top: 8mm;
}
.doc-letter .doc-subject {
  margin: 6mm 0 4mm;
  font-weight: 700;
}
.doc-clauses {
  margin: 2mm 0 0;
  padding-left: 1.3em;
  list-style: decimal;
}
.doc-clauses > li {
  margin-top: 1.6mm;
  padding-left: 0.4em;
}
.doc-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2mm 6mm;
}
.doc-kv > :nth-child(odd) {
  color: var(--doc-muted);
}
.doc-kv > :nth-child(even) {
  font-weight: 600;
}
.doc-box {
  padding: 4mm 5mm;
  border: 1px solid var(--doc-line);
  border-radius: 2.5mm;
}
.doc-pill {
  display: inline-block;
  padding: 0.6mm 2.4mm;
  border-radius: 99px;
  background: color-mix(in srgb, var(--doc-accent) 10%, #fff);
  color: var(--doc-accent);
  font-size: 8pt;
  font-weight: 600;
}
.doc-accent {
  color: var(--doc-accent);
}
.doc-rule {
  height: 0;
  margin: 5mm 0;
  border: 0;
  border-top: 1px solid var(--doc-line);
}

/* Print: only the document, at true size. The page margins come from
   @page so that every page of a long document gets them, not just the
   first; the document's own padding is dropped to match. */
@page {
  size: A4;
  margin: 12mm 10mm;
}
#print-root {
  display: none;
}
@media print {
  body.is-printing-doc > *:not(#print-root) {
    display: none !important;
  }
  html:has(body.is-printing-doc),
  body.is-printing-doc {
    background: #fff !important;
    color-scheme: light;
  }
  body.is-printing-doc #print-root {
    display: block;
  }
  #print-root .doc {
    min-height: auto;
    padding: 0 5mm;
  }
}

/* Respect the user's motion preference. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .card-hover:hover {
    transform: none;
  }
}

/* Print: the result is usually what people want on paper. */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
